shalu-dashboard-ui.js 3.5 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824
  1. import { defineComponent as te, computed as L, openBlock as pe, createElementBlock as Qe, normalizeStyle as Sr, toDisplayString as Vi, Fragment as wt, isVNode as nu, Comment as H9, Text as $S, reactive as tn, getCurrentInstance as vn, onMounted as it, onUpdated as ap, onUnmounted as rl, watch as se, inject as Ge, provide as pt, ref as U, unref as z, shallowRef as ae, watchEffect as ht, onBeforeUnmount as yt, triggerRef as Vle, createVNode as M, h as qg, Transition as ho, withDirectives as Oi, resolveDirective as Fle, cloneVNode as Bs, render as lf, nextTick as Tt, toRef as Nn, withModifiers as uf, vShow as zs, onBeforeMount as G9, Teleport as AS, createTextVNode as Kt, isRef as op, toRefs as ES, toRaw as Ko, onBeforeUpdate as j9, TransitionGroup as eI, onActivated as Wle, getCurrentScope as Z9, onScopeDispose as d0, createElementVNode as He, warn as Qle, mergeProps as _n, renderSlot as zn, useAttrs as Hle, useSlots as U9, createCommentVNode as _t, normalizeClass as Ye, createBlock as je, withCtx as we, resolveDynamicComponent as Ec, readonly as Gle, onDeactivated as jle, vModelRadio as X9, renderList as cg, withKeys as q4, pushScopeId as MS, popScopeId as IS, resolveComponent as fi, defineExpose as Zle } from "vue";
  2. var Li = /* @__PURE__ */ ((t) => (t[t.STATIC = 0] = "STATIC", t[t.API = 1] = "API", t))(Li || {});
  3. const tI = {
  4. text: {
  5. type: String,
  6. required: !0
  7. },
  8. width: {
  9. type: Number
  10. },
  11. height: {
  12. type: Number
  13. },
  14. fontSize: {
  15. type: Number
  16. },
  17. fontWeight: {
  18. type: [Number, String]
  19. },
  20. color: {
  21. type: String
  22. },
  23. backgroundColor: {
  24. type: String
  25. },
  26. textAlign: {
  27. type: String
  28. },
  29. direction: {
  30. type: String
  31. }
  32. }, Ule = {
  33. container: {
  34. style: {
  35. background: {
  36. type: "none"
  37. }
  38. },
  39. props: {
  40. width: 300,
  41. height: 80
  42. }
  43. },
  44. props: {
  45. text: "标题内容",
  46. fontSize: 24,
  47. color: "#fff",
  48. fontWeight: "bold",
  49. textAlign: "left",
  50. direction: "horizontal"
  51. }
  52. };
  53. function Xle(t) {
  54. const e = {};
  55. for (const n in t)
  56. if (typeof t[n] == "object")
  57. switch (n) {
  58. case "background":
  59. 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);
  60. break;
  61. case "border":
  62. t[n].type === "none" ? e[n] = "none" : e[n] = `${t[n].width}px ${t[n].type} ${t[n].color}`;
  63. break;
  64. case "borderRadius":
  65. 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}`;
  66. break;
  67. case "boxShadow":
  68. 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" : ""}`);
  69. break;
  70. case "backdropFilter":
  71. t[n].enabled && (e[n] = `blur(${t[n].blur}px)`);
  72. break;
  73. }
  74. else typeof t[n] == "number" ? e[n] = t[n] + "px" : typeof t[n] == "string" && (e[n] = t[n]);
  75. return e;
  76. }
  77. const Yle = te({
  78. name: "DTitle",
  79. props: tI,
  80. setup(t) {
  81. return {
  82. style: L(() => {
  83. const n = Xle(t), r = {};
  84. return n.color.length > 9 && (r.backgroundImage = n.color, r.webkitBackgroundClip = "text", r.webkitTextFillColor = "transparent"), {
  85. ...r,
  86. ...n,
  87. width: "100%",
  88. height: "100%",
  89. lineHeight: t.height + "px"
  90. };
  91. })
  92. };
  93. }
  94. }), $r = (t, e) => {
  95. const n = t.__vccOpts || t;
  96. for (const [r, i] of e)
  97. n[r] = i;
  98. return n;
  99. };
  100. function qle(t, e, n, r, i, a) {
  101. return pe(), Qe("div", {
  102. class: "cus-title",
  103. style: Sr(t.style)
  104. }, Vi(t.text), 5);
  105. }
  106. const Zd = /* @__PURE__ */ $r(Yle, [["render", qle]]);
  107. function Kg(t) {
  108. "@babel/helpers - typeof";
  109. return Kg = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
  110. return typeof e;
  111. } : function(e) {
  112. return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  113. }, Kg(t);
  114. }
  115. function Kle(t, e) {
  116. if (Kg(t) != "object" || !t) return t;
  117. var n = t[Symbol.toPrimitive];
  118. if (n !== void 0) {
  119. var r = n.call(t, e || "default");
  120. if (Kg(r) != "object") return r;
  121. throw new TypeError("@@toPrimitive must return a primitive value.");
  122. }
  123. return (e === "string" ? String : Number)(t);
  124. }
  125. function Jle(t) {
  126. var e = Kle(t, "string");
  127. return Kg(e) == "symbol" ? e : e + "";
  128. }
  129. function eue(t, e, n) {
  130. return (e = Jle(e)) in t ? Object.defineProperty(t, e, {
  131. value: n,
  132. enumerable: !0,
  133. configurable: !0,
  134. writable: !0
  135. }) : t[e] = n, t;
  136. }
  137. function K4(t, e) {
  138. var n = Object.keys(t);
  139. if (Object.getOwnPropertySymbols) {
  140. var r = Object.getOwnPropertySymbols(t);
  141. e && (r = r.filter(function(i) {
  142. return Object.getOwnPropertyDescriptor(t, i).enumerable;
  143. })), n.push.apply(n, r);
  144. }
  145. return n;
  146. }
  147. function j(t) {
  148. for (var e = 1; e < arguments.length; e++) {
  149. var n = arguments[e] != null ? arguments[e] : {};
  150. e % 2 ? K4(Object(n), !0).forEach(function(r) {
  151. eue(t, r, n[r]);
  152. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : K4(Object(n)).forEach(function(r) {
  153. Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
  154. });
  155. }
  156. return t;
  157. }
  158. function I() {
  159. return I = Object.assign ? Object.assign.bind() : function(t) {
  160. for (var e = 1; e < arguments.length; e++) {
  161. var n = arguments[e];
  162. for (var r in n) ({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
  163. }
  164. return t;
  165. }, I.apply(null, arguments);
  166. }
  167. const tue = (t) => typeof t == "function", nue = Array.isArray, rue = (t) => typeof t == "string", iue = (t) => t !== null && typeof t == "object", aue = /^on[^a-z]/, oue = (t) => aue.test(t), Y9 = (t) => {
  168. const e = /* @__PURE__ */ Object.create(null);
  169. return (n) => e[n] || (e[n] = t(n));
  170. }, sue = /-(\w)/g, nI = Y9((t) => t.replace(sue, (e, n) => n ? n.toUpperCase() : "")), lue = /\B([A-Z])/g, uue = Y9((t) => t.replace(lue, "-$1").toLowerCase()), cue = Object.prototype.hasOwnProperty, J4 = (t, e) => cue.call(t, e);
  171. function fue(t, e, n, r) {
  172. const i = t[n];
  173. if (i != null) {
  174. const a = J4(i, "default");
  175. if (a && r === void 0) {
  176. const o = i.default;
  177. r = i.type !== Function && tue(o) ? o() : o;
  178. }
  179. i.type === Boolean && (!J4(e, n) && !a ? r = !1 : r === "" && (r = !0));
  180. }
  181. return r;
  182. }
  183. function due(t) {
  184. return Object.keys(t).reduce((e, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (e[n] = t[n]), e), {});
  185. }
  186. function Zp(t) {
  187. return typeof t == "number" ? `${t}px` : t;
  188. }
  189. function Nd(t) {
  190. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
  191. return typeof t == "function" ? t(e) : t ?? n;
  192. }
  193. function hue(t) {
  194. let e;
  195. const n = new Promise((i) => {
  196. e = t(() => {
  197. i(!0);
  198. });
  199. }), r = () => {
  200. e == null || e();
  201. };
  202. return r.then = (i, a) => n.then(i, a), r.promise = n, r;
  203. }
  204. function ye() {
  205. const t = [];
  206. for (let e = 0; e < arguments.length; e++) {
  207. const n = e < 0 || arguments.length <= e ? void 0 : arguments[e];
  208. if (n) {
  209. if (rue(n))
  210. t.push(n);
  211. else if (nue(n))
  212. for (let r = 0; r < n.length; r++) {
  213. const i = ye(n[r]);
  214. i && t.push(i);
  215. }
  216. else if (iue(n))
  217. for (const r in n)
  218. n[r] && t.push(r);
  219. }
  220. }
  221. return t.join(" ");
  222. }
  223. var q9 = function() {
  224. if (typeof Map < "u")
  225. return Map;
  226. function t(e, n) {
  227. var r = -1;
  228. return e.some(function(i, a) {
  229. return i[0] === n ? (r = a, !0) : !1;
  230. }), r;
  231. }
  232. return (
  233. /** @class */
  234. function() {
  235. function e() {
  236. this.__entries__ = [];
  237. }
  238. return Object.defineProperty(e.prototype, "size", {
  239. /**
  240. * @returns {boolean}
  241. */
  242. get: function() {
  243. return this.__entries__.length;
  244. },
  245. enumerable: !0,
  246. configurable: !0
  247. }), e.prototype.get = function(n) {
  248. var r = t(this.__entries__, n), i = this.__entries__[r];
  249. return i && i[1];
  250. }, e.prototype.set = function(n, r) {
  251. var i = t(this.__entries__, n);
  252. ~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
  253. }, e.prototype.delete = function(n) {
  254. var r = this.__entries__, i = t(r, n);
  255. ~i && r.splice(i, 1);
  256. }, e.prototype.has = function(n) {
  257. return !!~t(this.__entries__, n);
  258. }, e.prototype.clear = function() {
  259. this.__entries__.splice(0);
  260. }, e.prototype.forEach = function(n, r) {
  261. r === void 0 && (r = null);
  262. for (var i = 0, a = this.__entries__; i < a.length; i++) {
  263. var o = a[i];
  264. n.call(r, o[1], o[0]);
  265. }
  266. }, e;
  267. }()
  268. );
  269. }(), r2 = typeof window < "u" && typeof document < "u" && window.document === document, v1 = function() {
  270. 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")();
  271. }(), pue = function() {
  272. return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(v1) : function(t) {
  273. return setTimeout(function() {
  274. return t(Date.now());
  275. }, 1e3 / 60);
  276. };
  277. }(), vue = 2;
  278. function gue(t, e) {
  279. var n = !1, r = !1, i = 0;
  280. function a() {
  281. n && (n = !1, t()), r && s();
  282. }
  283. function o() {
  284. pue(a);
  285. }
  286. function s() {
  287. var l = Date.now();
  288. if (n) {
  289. if (l - i < vue)
  290. return;
  291. r = !0;
  292. } else
  293. n = !0, r = !1, setTimeout(o, e);
  294. i = l;
  295. }
  296. return s;
  297. }
  298. var mue = 20, yue = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], bue = typeof MutationObserver < "u", _ue = (
  299. /** @class */
  300. function() {
  301. function t() {
  302. this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = gue(this.refresh.bind(this), mue);
  303. }
  304. return t.prototype.addObserver = function(e) {
  305. ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
  306. }, t.prototype.removeObserver = function(e) {
  307. var n = this.observers_, r = n.indexOf(e);
  308. ~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
  309. }, t.prototype.refresh = function() {
  310. var e = this.updateObservers_();
  311. e && this.refresh();
  312. }, t.prototype.updateObservers_ = function() {
  313. var e = this.observers_.filter(function(n) {
  314. return n.gatherActive(), n.hasActive();
  315. });
  316. return e.forEach(function(n) {
  317. return n.broadcastActive();
  318. }), e.length > 0;
  319. }, t.prototype.connect_ = function() {
  320. !r2 || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), bue ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
  321. attributes: !0,
  322. childList: !0,
  323. characterData: !0,
  324. subtree: !0
  325. })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
  326. }, t.prototype.disconnect_ = function() {
  327. !r2 || !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);
  328. }, t.prototype.onTransitionEnd_ = function(e) {
  329. var n = e.propertyName, r = n === void 0 ? "" : n, i = yue.some(function(a) {
  330. return !!~r.indexOf(a);
  331. });
  332. i && this.refresh();
  333. }, t.getInstance = function() {
  334. return this.instance_ || (this.instance_ = new t()), this.instance_;
  335. }, t.instance_ = null, t;
  336. }()
  337. ), K9 = function(t, e) {
  338. for (var n = 0, r = Object.keys(e); n < r.length; n++) {
  339. var i = r[n];
  340. Object.defineProperty(t, i, {
  341. value: e[i],
  342. enumerable: !1,
  343. writable: !1,
  344. configurable: !0
  345. });
  346. }
  347. return t;
  348. }, yh = function(t) {
  349. var e = t && t.ownerDocument && t.ownerDocument.defaultView;
  350. return e || v1;
  351. }, J9 = DS(0, 0, 0, 0);
  352. function g1(t) {
  353. return parseFloat(t) || 0;
  354. }
  355. function e8(t) {
  356. for (var e = [], n = 1; n < arguments.length; n++)
  357. e[n - 1] = arguments[n];
  358. return e.reduce(function(r, i) {
  359. var a = t["border-" + i + "-width"];
  360. return r + g1(a);
  361. }, 0);
  362. }
  363. function Oue(t) {
  364. for (var e = ["top", "right", "bottom", "left"], n = {}, r = 0, i = e; r < i.length; r++) {
  365. var a = i[r], o = t["padding-" + a];
  366. n[a] = g1(o);
  367. }
  368. return n;
  369. }
  370. function Sue(t) {
  371. var e = t.getBBox();
  372. return DS(0, 0, e.width, e.height);
  373. }
  374. function xue(t) {
  375. var e = t.clientWidth, n = t.clientHeight;
  376. if (!e && !n)
  377. return J9;
  378. var r = yh(t).getComputedStyle(t), i = Oue(r), a = i.left + i.right, o = i.top + i.bottom, s = g1(r.width), l = g1(r.height);
  379. if (r.boxSizing === "border-box" && (Math.round(s + a) !== e && (s -= e8(r, "left", "right") + a), Math.round(l + o) !== n && (l -= e8(r, "top", "bottom") + o)), !Cue(t)) {
  380. var u = Math.round(s + a) - e, c = Math.round(l + o) - n;
  381. Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
  382. }
  383. return DS(i.left, i.top, s, l);
  384. }
  385. var wue = /* @__PURE__ */ function() {
  386. return typeof SVGGraphicsElement < "u" ? function(t) {
  387. return t instanceof yh(t).SVGGraphicsElement;
  388. } : function(t) {
  389. return t instanceof yh(t).SVGElement && typeof t.getBBox == "function";
  390. };
  391. }();
  392. function Cue(t) {
  393. return t === yh(t).document.documentElement;
  394. }
  395. function Tue(t) {
  396. return r2 ? wue(t) ? Sue(t) : xue(t) : J9;
  397. }
  398. function Pue(t) {
  399. var e = t.x, n = t.y, r = t.width, i = t.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, o = Object.create(a.prototype);
  400. return K9(o, {
  401. x: e,
  402. y: n,
  403. width: r,
  404. height: i,
  405. top: n,
  406. right: e + r,
  407. bottom: i + n,
  408. left: e
  409. }), o;
  410. }
  411. function DS(t, e, n, r) {
  412. return { x: t, y: e, width: n, height: r };
  413. }
  414. var $ue = (
  415. /** @class */
  416. function() {
  417. function t(e) {
  418. this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = DS(0, 0, 0, 0), this.target = e;
  419. }
  420. return t.prototype.isActive = function() {
  421. var e = Tue(this.target);
  422. return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
  423. }, t.prototype.broadcastRect = function() {
  424. var e = this.contentRect_;
  425. return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
  426. }, t;
  427. }()
  428. ), Aue = (
  429. /** @class */
  430. /* @__PURE__ */ function() {
  431. function t(e, n) {
  432. var r = Pue(n);
  433. K9(this, { target: e, contentRect: r });
  434. }
  435. return t;
  436. }()
  437. ), Eue = (
  438. /** @class */
  439. function() {
  440. function t(e, n, r) {
  441. if (this.activeObservations_ = [], this.observations_ = new q9(), typeof e != "function")
  442. throw new TypeError("The callback provided as parameter 1 is not a function.");
  443. this.callback_ = e, this.controller_ = n, this.callbackCtx_ = r;
  444. }
  445. return t.prototype.observe = function(e) {
  446. if (!arguments.length)
  447. throw new TypeError("1 argument required, but only 0 present.");
  448. if (!(typeof Element > "u" || !(Element instanceof Object))) {
  449. if (!(e instanceof yh(e).Element))
  450. throw new TypeError('parameter 1 is not of type "Element".');
  451. var n = this.observations_;
  452. n.has(e) || (n.set(e, new $ue(e)), this.controller_.addObserver(this), this.controller_.refresh());
  453. }
  454. }, t.prototype.unobserve = function(e) {
  455. if (!arguments.length)
  456. throw new TypeError("1 argument required, but only 0 present.");
  457. if (!(typeof Element > "u" || !(Element instanceof Object))) {
  458. if (!(e instanceof yh(e).Element))
  459. throw new TypeError('parameter 1 is not of type "Element".');
  460. var n = this.observations_;
  461. n.has(e) && (n.delete(e), n.size || this.controller_.removeObserver(this));
  462. }
  463. }, t.prototype.disconnect = function() {
  464. this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
  465. }, t.prototype.gatherActive = function() {
  466. var e = this;
  467. this.clearActive(), this.observations_.forEach(function(n) {
  468. n.isActive() && e.activeObservations_.push(n);
  469. });
  470. }, t.prototype.broadcastActive = function() {
  471. if (this.hasActive()) {
  472. var e = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
  473. return new Aue(r.target, r.broadcastRect());
  474. });
  475. this.callback_.call(e, n, e), this.clearActive();
  476. }
  477. }, t.prototype.clearActive = function() {
  478. this.activeObservations_.splice(0);
  479. }, t.prototype.hasActive = function() {
  480. return this.activeObservations_.length > 0;
  481. }, t;
  482. }()
  483. ), ej = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new q9(), tj = (
  484. /** @class */
  485. /* @__PURE__ */ function() {
  486. function t(e) {
  487. if (!(this instanceof t))
  488. throw new TypeError("Cannot call a class as a function.");
  489. if (!arguments.length)
  490. throw new TypeError("1 argument required, but only 0 present.");
  491. var n = _ue.getInstance(), r = new Eue(e, n, this);
  492. ej.set(this, r);
  493. }
  494. return t;
  495. }()
  496. );
  497. [
  498. "observe",
  499. "unobserve",
  500. "disconnect"
  501. ].forEach(function(t) {
  502. tj.prototype[t] = function() {
  503. var e;
  504. return (e = ej.get(this))[t].apply(e, arguments);
  505. };
  506. });
  507. var nj = function() {
  508. return typeof v1.ResizeObserver < "u" ? v1.ResizeObserver : tj;
  509. }();
  510. const i2 = (t) => t != null && t !== "", sr = (t, e) => {
  511. const n = I({}, t);
  512. return Object.keys(e).forEach((r) => {
  513. const i = n[r];
  514. if (i)
  515. i.type || i.default ? i.default = e[r] : i.def ? i.def(e[r]) : n[r] = {
  516. type: i,
  517. default: e[r]
  518. };
  519. else
  520. throw new Error(`not have ${r} prop`);
  521. }), n;
  522. }, Mue = (t) => {
  523. const e = Object.keys(t), n = {}, r = {}, i = {};
  524. for (let a = 0, o = e.length; a < o; a++) {
  525. const s = e[a];
  526. oue(s) ? (n[s[2].toLowerCase() + s.slice(3)] = t[s], r[s] = t[s]) : i[s] = t[s];
  527. }
  528. return {
  529. onEvents: r,
  530. events: n,
  531. extraAttrs: i
  532. };
  533. }, Iue = function() {
  534. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  535. const n = {}, r = /;(?![^(]*\))/g, i = /:(.+)/;
  536. return typeof t == "object" ? t : (t.split(r).forEach(function(a) {
  537. if (a) {
  538. const o = a.split(i);
  539. if (o.length > 1) {
  540. const s = e ? nI(o[0].trim()) : o[0].trim();
  541. n[s] = o[1].trim();
  542. }
  543. }
  544. }), n);
  545. }, m1 = (t, e) => t[e] !== void 0, rj = Symbol("skipFlatten"), Yn = function() {
  546. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  547. const n = Array.isArray(t) ? t : [t], r = [];
  548. return n.forEach((i) => {
  549. Array.isArray(i) ? r.push(...Yn(i, e)) : i && i.type === wt ? i.key === rj ? r.push(i) : r.push(...Yn(i.children, e)) : i && nu(i) ? e && !rI(i) ? r.push(i) : e || r.push(i) : i2(i) && r.push(i);
  550. }), r;
  551. }, ij = function(t) {
  552. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  553. if (nu(t))
  554. return t.type === wt ? e === "default" ? Yn(t.children) : [] : t.children && t.children[e] ? Yn(t.children[e](n)) : [];
  555. {
  556. const r = t.$slots[e] && t.$slots[e](n);
  557. return Yn(r);
  558. }
  559. }, Ts = (t) => {
  560. var e;
  561. let n = ((e = t == null ? void 0 : t.vnode) === null || e === void 0 ? void 0 : e.el) || t && (t.$el || t);
  562. for (; n && !n.tagName; )
  563. n = n.nextSibling;
  564. return n;
  565. }, Due = (t) => {
  566. const e = {};
  567. if (t.$ && t.$.vnode) {
  568. const n = t.$.vnode.props || {};
  569. Object.keys(t.$props).forEach((r) => {
  570. const i = t.$props[r], a = uue(r);
  571. (i !== void 0 || a in n) && (e[r] = i);
  572. });
  573. } else if (nu(t) && typeof t.type == "object") {
  574. const n = t.props || {}, r = {};
  575. Object.keys(n).forEach((a) => {
  576. r[nI(a)] = n[a];
  577. });
  578. const i = t.type.props || {};
  579. Object.keys(i).forEach((a) => {
  580. const o = fue(i, r, a, r[a]);
  581. (o !== void 0 || a in r) && (e[a] = o);
  582. });
  583. }
  584. return e;
  585. }, Rue = function(t) {
  586. 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;
  587. if (t.$) {
  588. const a = t[e];
  589. if (a !== void 0)
  590. return typeof a == "function" && r ? a(n) : a;
  591. i = t.$slots[e], i = r && i ? i(n) : i;
  592. } else if (nu(t)) {
  593. const a = t.props && t.props[e];
  594. if (a !== void 0 && t.props !== null)
  595. return typeof a == "function" && r ? a(n) : a;
  596. t.type === wt ? i = t.children : t.children && t.children[e] && (i = t.children[e], i = r && i ? i(n) : i);
  597. }
  598. return Array.isArray(i) && (i = Yn(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
  599. };
  600. function t8() {
  601. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
  602. return t.$ ? n = I(I({}, n), t.$attrs) : n = I(I({}, n), t.props), Mue(n)[e ? "onEvents" : "events"];
  603. }
  604. function kue(t, e) {
  605. let r = ((nu(t) ? t.props : t.$attrs) || {}).style || {};
  606. return typeof r == "string" && (r = Iue(r, e)), r;
  607. }
  608. function Lue(t) {
  609. return t.length === 1 && t[0].type === wt;
  610. }
  611. function rI(t) {
  612. return t && (t.type === H9 || t.type === wt && t.children.length === 0 || t.type === $S && t.children.trim() === "");
  613. }
  614. function ss() {
  615. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  616. const e = [];
  617. return t.forEach((n) => {
  618. Array.isArray(n) ? e.push(...n) : (n == null ? void 0 : n.type) === wt ? e.push(...ss(n.children)) : e.push(n);
  619. }), e.filter((n) => !rI(n));
  620. }
  621. function Yi(t) {
  622. return Array.isArray(t) && t.length === 1 && (t = t[0]), t && t.__v_isVNode && typeof t.type != "symbol";
  623. }
  624. function RS(t, e) {
  625. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  626. var r, i;
  627. return (r = e[n]) !== null && r !== void 0 ? r : (i = t[n]) === null || i === void 0 ? void 0 : i.call(t);
  628. }
  629. const bh = te({
  630. compatConfig: {
  631. MODE: 3
  632. },
  633. name: "ResizeObserver",
  634. props: {
  635. disabled: Boolean,
  636. onResize: Function
  637. },
  638. emits: ["resize"],
  639. setup(t, e) {
  640. let {
  641. slots: n
  642. } = e;
  643. const r = tn({
  644. width: 0,
  645. height: 0,
  646. offsetHeight: 0,
  647. offsetWidth: 0
  648. });
  649. let i = null, a = null;
  650. const o = () => {
  651. a && (a.disconnect(), a = null);
  652. }, s = (c) => {
  653. const {
  654. onResize: f
  655. } = t, d = c[0].target, {
  656. width: h,
  657. height: p
  658. } = d.getBoundingClientRect(), {
  659. offsetWidth: v,
  660. offsetHeight: g
  661. } = d, m = Math.floor(h), y = Math.floor(p);
  662. if (r.width !== m || r.height !== y || r.offsetWidth !== v || r.offsetHeight !== g) {
  663. const b = {
  664. width: m,
  665. height: y,
  666. offsetWidth: v,
  667. offsetHeight: g
  668. };
  669. I(r, b), f && Promise.resolve().then(() => {
  670. f(I(I({}, b), {
  671. offsetWidth: v,
  672. offsetHeight: g
  673. }), d);
  674. });
  675. }
  676. }, l = vn(), u = () => {
  677. const {
  678. disabled: c
  679. } = t;
  680. if (c) {
  681. o();
  682. return;
  683. }
  684. const f = Ts(l);
  685. f !== i && (o(), i = f), !a && f && (a = new nj(s), a.observe(f));
  686. };
  687. return it(() => {
  688. u();
  689. }), ap(() => {
  690. u();
  691. }), rl(() => {
  692. o();
  693. }), se(() => t.disabled, () => {
  694. u();
  695. }, {
  696. flush: "post"
  697. }), () => {
  698. var c;
  699. return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
  700. };
  701. }
  702. });
  703. let aj = (t) => setTimeout(t, 16), oj = (t) => clearTimeout(t);
  704. typeof window < "u" && "requestAnimationFrame" in window && (aj = (t) => window.requestAnimationFrame(t), oj = (t) => window.cancelAnimationFrame(t));
  705. let n8 = 0;
  706. const iI = /* @__PURE__ */ new Map();
  707. function sj(t) {
  708. iI.delete(t);
  709. }
  710. function xt(t) {
  711. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  712. n8 += 1;
  713. const n = n8;
  714. function r(i) {
  715. if (i === 0)
  716. sj(n), t();
  717. else {
  718. const a = aj(() => {
  719. r(i - 1);
  720. });
  721. iI.set(n, a);
  722. }
  723. }
  724. return r(e), n;
  725. }
  726. xt.cancel = (t) => {
  727. const e = iI.get(t);
  728. return sj(e), oj(e);
  729. };
  730. const ru = function() {
  731. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  732. e[n] = arguments[n];
  733. return e;
  734. }, sp = (t) => {
  735. const e = t;
  736. return e.install = function(n) {
  737. n.component(e.displayName || e.name, t);
  738. }, t;
  739. };
  740. function y1() {
  741. return {
  742. type: [Function, Array]
  743. };
  744. }
  745. function $t(t) {
  746. return {
  747. type: Object,
  748. default: t
  749. };
  750. }
  751. function nt(t) {
  752. return {
  753. type: Boolean,
  754. default: t
  755. };
  756. }
  757. function tt(t) {
  758. return {
  759. type: Function,
  760. default: t
  761. };
  762. }
  763. function ha(t, e) {
  764. return {
  765. validator: () => !0,
  766. default: t
  767. };
  768. }
  769. function cf(t) {
  770. return {
  771. type: Array,
  772. default: t
  773. };
  774. }
  775. function hn(t) {
  776. return {
  777. type: String,
  778. default: t
  779. };
  780. }
  781. function gn(t, e) {
  782. return t ? {
  783. type: t,
  784. default: e
  785. } : ha(e);
  786. }
  787. let pr = !1;
  788. try {
  789. const t = Object.defineProperty({}, "passive", {
  790. get() {
  791. pr = !0;
  792. }
  793. });
  794. window.addEventListener("testPassive", null, t), window.removeEventListener("testPassive", null, t);
  795. } catch {
  796. }
  797. function vr(t, e, n, r) {
  798. if (t && t.addEventListener) {
  799. let i = r;
  800. i === void 0 && pr && (e === "touchstart" || e === "touchmove" || e === "wheel") && (i = {
  801. passive: !1
  802. }), t.addEventListener(e, n, i);
  803. }
  804. return {
  805. remove: () => {
  806. t && t.removeEventListener && t.removeEventListener(e, n);
  807. }
  808. };
  809. }
  810. const aI = "anticon", lj = Symbol("GlobalFormContextKey"), Nue = (t) => {
  811. pt(lj, t);
  812. }, Bue = () => Ge(lj, {
  813. validateMessages: L(() => {
  814. })
  815. }), zue = () => ({
  816. iconPrefixCls: String,
  817. getTargetContainer: {
  818. type: Function
  819. },
  820. getPopupContainer: {
  821. type: Function
  822. },
  823. prefixCls: String,
  824. getPrefixCls: {
  825. type: Function
  826. },
  827. renderEmpty: {
  828. type: Function
  829. },
  830. transformCellText: {
  831. type: Function
  832. },
  833. csp: $t(),
  834. input: $t(),
  835. autoInsertSpaceInButton: {
  836. type: Boolean,
  837. default: void 0
  838. },
  839. locale: $t(),
  840. pageHeader: $t(),
  841. componentSize: {
  842. type: String
  843. },
  844. componentDisabled: {
  845. type: Boolean,
  846. default: void 0
  847. },
  848. direction: {
  849. type: String,
  850. default: "ltr"
  851. },
  852. space: $t(),
  853. virtual: {
  854. type: Boolean,
  855. default: void 0
  856. },
  857. dropdownMatchSelectWidth: {
  858. type: [Number, Boolean],
  859. default: !0
  860. },
  861. form: $t(),
  862. pagination: $t(),
  863. theme: $t(),
  864. select: $t(),
  865. wave: $t()
  866. }), oI = Symbol("configProvider"), uj = {
  867. getPrefixCls: (t, e) => e || (t ? `ant-${t}` : "ant"),
  868. iconPrefixCls: L(() => aI),
  869. getPopupContainer: L(() => () => document.body),
  870. direction: L(() => "ltr")
  871. }, kS = () => Ge(oI, uj), Vue = (t) => pt(oI, t), cj = Symbol("DisabledContextKey"), Jo = () => Ge(cj, U(void 0)), fj = (t) => {
  872. const e = Jo();
  873. return pt(cj, L(() => {
  874. var n;
  875. return (n = t.value) !== null && n !== void 0 ? n : e.value;
  876. })), t;
  877. }, Fue = {
  878. // Options.jsx
  879. items_per_page: "/ page",
  880. jump_to: "Go to",
  881. jump_to_confirm: "confirm",
  882. page: "",
  883. // Pagination.jsx
  884. prev_page: "Previous Page",
  885. next_page: "Next Page",
  886. prev_5: "Previous 5 Pages",
  887. next_5: "Next 5 Pages",
  888. prev_3: "Previous 3 Pages",
  889. next_3: "Next 3 Pages"
  890. }, Wue = {
  891. locale: "en_US",
  892. today: "Today",
  893. now: "Now",
  894. backToToday: "Back to today",
  895. ok: "Ok",
  896. clear: "Clear",
  897. month: "Month",
  898. year: "Year",
  899. timeSelect: "select time",
  900. dateSelect: "select date",
  901. weekSelect: "Choose a week",
  902. monthSelect: "Choose a month",
  903. yearSelect: "Choose a year",
  904. decadeSelect: "Choose a decade",
  905. yearFormat: "YYYY",
  906. dateFormat: "M/D/YYYY",
  907. dayFormat: "D",
  908. dateTimeFormat: "M/D/YYYY HH:mm:ss",
  909. monthBeforeYear: !0,
  910. previousMonth: "Previous month (PageUp)",
  911. nextMonth: "Next month (PageDown)",
  912. previousYear: "Last year (Control + left)",
  913. nextYear: "Next year (Control + right)",
  914. previousDecade: "Last decade",
  915. nextDecade: "Next decade",
  916. previousCentury: "Last century",
  917. nextCentury: "Next century"
  918. }, dj = {
  919. placeholder: "Select time",
  920. rangePlaceholder: ["Start time", "End time"]
  921. }, r8 = {
  922. lang: I({
  923. placeholder: "Select date",
  924. yearPlaceholder: "Select year",
  925. quarterPlaceholder: "Select quarter",
  926. monthPlaceholder: "Select month",
  927. weekPlaceholder: "Select week",
  928. rangePlaceholder: ["Start date", "End date"],
  929. rangeYearPlaceholder: ["Start year", "End year"],
  930. rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
  931. rangeMonthPlaceholder: ["Start month", "End month"],
  932. rangeWeekPlaceholder: ["Start week", "End week"]
  933. }, Wue),
  934. timePickerLocale: I({}, dj)
  935. }, $i = "${label} is not a valid ${type}", Vs = {
  936. locale: "en",
  937. Pagination: Fue,
  938. DatePicker: r8,
  939. TimePicker: dj,
  940. Calendar: r8,
  941. global: {
  942. placeholder: "Please select"
  943. },
  944. Table: {
  945. filterTitle: "Filter menu",
  946. filterConfirm: "OK",
  947. filterReset: "Reset",
  948. filterEmptyText: "No filters",
  949. filterCheckall: "Select all items",
  950. filterSearchPlaceholder: "Search in filters",
  951. emptyText: "No data",
  952. selectAll: "Select current page",
  953. selectInvert: "Invert current page",
  954. selectNone: "Clear all data",
  955. selectionAll: "Select all data",
  956. sortTitle: "Sort",
  957. expand: "Expand row",
  958. collapse: "Collapse row",
  959. triggerDesc: "Click to sort descending",
  960. triggerAsc: "Click to sort ascending",
  961. cancelSort: "Click to cancel sorting"
  962. },
  963. Tour: {
  964. Next: "Next",
  965. Previous: "Previous",
  966. Finish: "Finish"
  967. },
  968. Modal: {
  969. okText: "OK",
  970. cancelText: "Cancel",
  971. justOkText: "OK"
  972. },
  973. Popconfirm: {
  974. okText: "OK",
  975. cancelText: "Cancel"
  976. },
  977. Transfer: {
  978. titles: ["", ""],
  979. searchPlaceholder: "Search here",
  980. itemUnit: "item",
  981. itemsUnit: "items",
  982. remove: "Remove",
  983. selectCurrent: "Select current page",
  984. removeCurrent: "Remove current page",
  985. selectAll: "Select all data",
  986. removeAll: "Remove all data",
  987. selectInvert: "Invert current page"
  988. },
  989. Upload: {
  990. uploading: "Uploading...",
  991. removeFile: "Remove file",
  992. uploadError: "Upload error",
  993. previewFile: "Preview file",
  994. downloadFile: "Download file"
  995. },
  996. Empty: {
  997. description: "No data"
  998. },
  999. Icon: {
  1000. icon: "icon"
  1001. },
  1002. Text: {
  1003. edit: "Edit",
  1004. copy: "Copy",
  1005. copied: "Copied",
  1006. expand: "Expand"
  1007. },
  1008. PageHeader: {
  1009. back: "Back"
  1010. },
  1011. Form: {
  1012. optional: "(optional)",
  1013. defaultValidateMessages: {
  1014. default: "Field validation error for ${label}",
  1015. required: "Please enter ${label}",
  1016. enum: "${label} must be one of [${enum}]",
  1017. whitespace: "${label} cannot be a blank character",
  1018. date: {
  1019. format: "${label} date format is invalid",
  1020. parse: "${label} cannot be converted to a date",
  1021. invalid: "${label} is an invalid date"
  1022. },
  1023. types: {
  1024. string: $i,
  1025. method: $i,
  1026. array: $i,
  1027. object: $i,
  1028. number: $i,
  1029. date: $i,
  1030. boolean: $i,
  1031. integer: $i,
  1032. float: $i,
  1033. regexp: $i,
  1034. email: $i,
  1035. url: $i,
  1036. hex: $i
  1037. },
  1038. string: {
  1039. len: "${label} must be ${len} characters",
  1040. min: "${label} must be at least ${min} characters",
  1041. max: "${label} must be up to ${max} characters",
  1042. range: "${label} must be between ${min}-${max} characters"
  1043. },
  1044. number: {
  1045. len: "${label} must be equal to ${len}",
  1046. min: "${label} must be minimum ${min}",
  1047. max: "${label} must be maximum ${max}",
  1048. range: "${label} must be between ${min}-${max}"
  1049. },
  1050. array: {
  1051. len: "Must be ${len} ${label}",
  1052. min: "At least ${min} ${label}",
  1053. max: "At most ${max} ${label}",
  1054. range: "The amount of ${label} must be between ${min}-${max}"
  1055. },
  1056. pattern: {
  1057. mismatch: "${label} does not match the pattern ${pattern}"
  1058. }
  1059. }
  1060. },
  1061. Image: {
  1062. preview: "Preview"
  1063. },
  1064. QRCode: {
  1065. expired: "QR code expired",
  1066. refresh: "Refresh",
  1067. scanned: "Scanned"
  1068. }
  1069. }, hj = te({
  1070. compatConfig: {
  1071. MODE: 3
  1072. },
  1073. name: "LocaleReceiver",
  1074. props: {
  1075. componentName: String,
  1076. defaultLocale: {
  1077. type: [Object, Function]
  1078. },
  1079. children: {
  1080. type: Function
  1081. }
  1082. },
  1083. setup(t, e) {
  1084. let {
  1085. slots: n
  1086. } = e;
  1087. const r = Ge("localeData", {}), i = L(() => {
  1088. const {
  1089. componentName: o = "global",
  1090. defaultLocale: s
  1091. } = t, l = s || Vs[o || "global"], {
  1092. antLocale: u
  1093. } = r, c = o && u ? u[o] : {};
  1094. return I(I({}, typeof l == "function" ? l() : l), c || {});
  1095. }), a = L(() => {
  1096. const {
  1097. antLocale: o
  1098. } = r, s = o && o.locale;
  1099. return o && o.exist && !s ? Vs.locale : s;
  1100. });
  1101. return () => {
  1102. const o = t.children || n.default, {
  1103. antLocale: s
  1104. } = r;
  1105. return o == null ? void 0 : o(i.value, a.value, s);
  1106. };
  1107. }
  1108. });
  1109. function LS(t, e, n) {
  1110. const r = Ge("localeData", {});
  1111. return [L(() => {
  1112. const {
  1113. antLocale: a
  1114. } = r, o = z(e) || Vs[t || "global"], s = t && a ? a[t] : {};
  1115. return I(I(I({}, typeof o == "function" ? o() : o), s || {}), z(n) || {});
  1116. })];
  1117. }
  1118. function sI(t) {
  1119. for (var e = 0, n, r = 0, i = t.length; i >= 4; ++r, i -= 4)
  1120. 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): */
  1121. (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
  1122. n >>> 24, e = /* Math.imul(k, m): */
  1123. (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
  1124. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  1125. switch (i) {
  1126. case 3:
  1127. e ^= (t.charCodeAt(r + 2) & 255) << 16;
  1128. case 2:
  1129. e ^= (t.charCodeAt(r + 1) & 255) << 8;
  1130. case 1:
  1131. e ^= t.charCodeAt(r) & 255, e = /* Math.imul(h, m): */
  1132. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  1133. }
  1134. return e ^= e >>> 13, e = /* Math.imul(h, m): */
  1135. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
  1136. }
  1137. const i8 = "%";
  1138. class Que {
  1139. constructor(e) {
  1140. this.cache = /* @__PURE__ */ new Map(), this.instanceId = e;
  1141. }
  1142. get(e) {
  1143. return this.cache.get(Array.isArray(e) ? e.join(i8) : e) || null;
  1144. }
  1145. update(e, n) {
  1146. const r = Array.isArray(e) ? e.join(i8) : e, i = this.cache.get(r), a = n(i);
  1147. a === null ? this.cache.delete(r) : this.cache.set(r, a);
  1148. }
  1149. }
  1150. const pj = "data-token-hash", Hc = "data-css-hash", Hue = "data-cache-path", Bd = "__cssinjs_instance__";
  1151. function Jg() {
  1152. const t = Math.random().toString(12).slice(2);
  1153. if (typeof document < "u" && document.head && document.body) {
  1154. const e = document.body.querySelectorAll(`style[${Hc}]`) || [], {
  1155. firstChild: n
  1156. } = document.head;
  1157. Array.from(e).forEach((i) => {
  1158. i[Bd] = i[Bd] || t, i[Bd] === t && document.head.insertBefore(i, n);
  1159. });
  1160. const r = {};
  1161. Array.from(document.querySelectorAll(`style[${Hc}]`)).forEach((i) => {
  1162. var a;
  1163. const o = i.getAttribute(Hc);
  1164. r[o] ? i[Bd] === t && ((a = i.parentNode) === null || a === void 0 || a.removeChild(i)) : r[o] = !0;
  1165. });
  1166. }
  1167. return new Que(t);
  1168. }
  1169. const vj = Symbol("StyleContextKey"), Gue = () => {
  1170. var t, e, n;
  1171. const r = vn();
  1172. let i;
  1173. if (r && r.appContext) {
  1174. 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__;
  1175. a ? i = a : (i = Jg(), r.appContext.config.globalProperties && (r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
  1176. } else
  1177. i = Jg();
  1178. return i;
  1179. }, gj = {
  1180. cache: Jg(),
  1181. defaultCache: !0,
  1182. hashPriority: "low"
  1183. }, NS = () => {
  1184. const t = Gue();
  1185. return Ge(vj, ae(I(I({}, gj), {
  1186. cache: t
  1187. })));
  1188. }, jue = (t) => {
  1189. const e = NS(), n = ae(I(I({}, gj), {
  1190. cache: Jg()
  1191. }));
  1192. return se([() => z(t), e], () => {
  1193. const r = I({}, e.value), i = z(t);
  1194. Object.keys(i).forEach((o) => {
  1195. const s = i[o];
  1196. i[o] !== void 0 && (r[o] = s);
  1197. });
  1198. const {
  1199. cache: a
  1200. } = i;
  1201. r.cache = r.cache || Jg(), r.defaultCache = !a && e.value.defaultCache, n.value = r;
  1202. }, {
  1203. immediate: !0
  1204. }), pt(vj, n), n;
  1205. }, Zue = () => ({
  1206. autoClear: nt(),
  1207. /** @private Test only. Not work in production. */
  1208. mock: hn(),
  1209. /**
  1210. * Only set when you need ssr to extract style on you own.
  1211. * If not provided, it will auto create <style /> on the end of Provider in server side.
  1212. */
  1213. cache: $t(),
  1214. /** Tell children that this context is default generated context */
  1215. defaultCache: nt(),
  1216. /** Use `:where` selector to reduce hashId css selector priority */
  1217. hashPriority: hn(),
  1218. /** Tell cssinjs where to inject style in */
  1219. container: gn(),
  1220. /** Component wil render inline `<style />` for fallback in SSR. Not recommend. */
  1221. ssrInline: nt(),
  1222. /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  1223. transformers: cf(),
  1224. /**
  1225. * Linters to lint css before inject in document.
  1226. * Styles will be linted after transforming.
  1227. * Please note that `linters` do not support dynamic update.
  1228. */
  1229. linters: cf()
  1230. });
  1231. sp(te({
  1232. name: "AStyleProvider",
  1233. inheritAttrs: !1,
  1234. props: Zue(),
  1235. setup(t, e) {
  1236. let {
  1237. slots: n
  1238. } = e;
  1239. return jue(t), () => {
  1240. var r;
  1241. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  1242. };
  1243. }
  1244. }));
  1245. function Uue() {
  1246. return !1;
  1247. }
  1248. let a2 = !1;
  1249. function Xue() {
  1250. return a2;
  1251. }
  1252. const Yue = process.env.NODE_ENV === "production" ? Uue : Xue;
  1253. if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
  1254. const t = window;
  1255. if (typeof t.webpackHotUpdate == "function") {
  1256. const e = t.webpackHotUpdate;
  1257. t.webpackHotUpdate = function() {
  1258. return a2 = !0, setTimeout(() => {
  1259. a2 = !1;
  1260. }, 0), e(...arguments);
  1261. };
  1262. }
  1263. }
  1264. function mj(t, e, n, r) {
  1265. const i = NS(), a = ae(""), o = ae();
  1266. ht(() => {
  1267. a.value = [t, ...e.value].join("%");
  1268. });
  1269. const s = Yue(), l = (u) => {
  1270. i.value.cache.update(u, (c) => {
  1271. const [f = 0, d] = c || [];
  1272. return f - 1 === 0 ? (r == null || r(d, !1), null) : [f - 1, d];
  1273. });
  1274. };
  1275. return se(a, (u, c) => {
  1276. c && l(c), i.value.cache.update(u, (f) => {
  1277. const [d = 0, h] = f || [];
  1278. let p = h;
  1279. process.env.NODE_ENV !== "production" && h && s && (r == null || r(p, s), p = null);
  1280. const v = p || n();
  1281. return [d + 1, v];
  1282. }), o.value = i.value.cache.get(a.value)[1];
  1283. }, {
  1284. immediate: !0
  1285. }), yt(() => {
  1286. l(a.value);
  1287. }), o;
  1288. }
  1289. function Ta() {
  1290. return !!(typeof window < "u" && window.document && window.document.createElement);
  1291. }
  1292. function $l(t, e) {
  1293. return t && t.contains ? t.contains(e) : !1;
  1294. }
  1295. const a8 = "data-vc-order", que = "vc-util-key", o2 = /* @__PURE__ */ new Map();
  1296. function yj() {
  1297. let {
  1298. mark: t
  1299. } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  1300. return t ? t.startsWith("data-") ? t : `data-${t}` : que;
  1301. }
  1302. function BS(t) {
  1303. return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
  1304. }
  1305. function Kue(t) {
  1306. return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
  1307. }
  1308. function bj(t) {
  1309. return Array.from((o2.get(t) || t).children).filter((e) => e.tagName === "STYLE");
  1310. }
  1311. function _j(t) {
  1312. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1313. if (!Ta())
  1314. return null;
  1315. const {
  1316. csp: n,
  1317. prepend: r
  1318. } = e, i = document.createElement("style");
  1319. i.setAttribute(a8, Kue(r)), n != null && n.nonce && (i.nonce = n == null ? void 0 : n.nonce), i.innerHTML = t;
  1320. const a = BS(e), {
  1321. firstChild: o
  1322. } = a;
  1323. if (r) {
  1324. if (r === "queue") {
  1325. const s = bj(a).filter((l) => ["prepend", "prependQueue"].includes(l.getAttribute(a8)));
  1326. if (s.length)
  1327. return a.insertBefore(i, s[s.length - 1].nextSibling), i;
  1328. }
  1329. a.insertBefore(i, o);
  1330. } else
  1331. a.appendChild(i);
  1332. return i;
  1333. }
  1334. function Oj(t) {
  1335. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1336. const n = BS(e);
  1337. return bj(n).find((r) => r.getAttribute(yj(e)) === t);
  1338. }
  1339. function b1(t) {
  1340. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1341. const n = Oj(t, e);
  1342. n && BS(e).removeChild(n);
  1343. }
  1344. function Jue(t, e) {
  1345. const n = o2.get(t);
  1346. if (!n || !$l(document, n)) {
  1347. const r = _j("", e), {
  1348. parentNode: i
  1349. } = r;
  1350. o2.set(t, i), t.removeChild(r);
  1351. }
  1352. }
  1353. function em(t, e) {
  1354. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  1355. var r, i, a;
  1356. const o = BS(n);
  1357. Jue(o, n);
  1358. const s = Oj(e, n);
  1359. if (s)
  1360. 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;
  1361. const l = _j(t, n);
  1362. return l.setAttribute(yj(n), e), l;
  1363. }
  1364. function ece(t, e) {
  1365. if (t.length !== e.length)
  1366. return !1;
  1367. for (let n = 0; n < t.length; n++)
  1368. if (t[n] !== e[n])
  1369. return !1;
  1370. return !0;
  1371. }
  1372. class _h {
  1373. constructor() {
  1374. this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
  1375. }
  1376. size() {
  1377. return this.keys.length;
  1378. }
  1379. internalGet(e) {
  1380. let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = {
  1381. map: this.cache
  1382. };
  1383. return e.forEach((i) => {
  1384. var a;
  1385. r ? r = (a = r == null ? void 0 : r.map) === null || a === void 0 ? void 0 : a.get(i) : r = void 0;
  1386. }), r != null && r.value && n && (r.value[1] = this.cacheCallTimes++), r == null ? void 0 : r.value;
  1387. }
  1388. get(e) {
  1389. var n;
  1390. return (n = this.internalGet(e, !0)) === null || n === void 0 ? void 0 : n[0];
  1391. }
  1392. has(e) {
  1393. return !!this.internalGet(e);
  1394. }
  1395. set(e, n) {
  1396. if (!this.has(e)) {
  1397. if (this.size() + 1 > _h.MAX_CACHE_SIZE + _h.MAX_CACHE_OFFSET) {
  1398. const [i] = this.keys.reduce((a, o) => {
  1399. const [, s] = a;
  1400. return this.internalGet(o)[1] < s ? [o, this.internalGet(o)[1]] : a;
  1401. }, [this.keys[0], this.cacheCallTimes]);
  1402. this.delete(i);
  1403. }
  1404. this.keys.push(e);
  1405. }
  1406. let r = this.cache;
  1407. e.forEach((i, a) => {
  1408. if (a === e.length - 1)
  1409. r.set(i, {
  1410. value: [n, this.cacheCallTimes++]
  1411. });
  1412. else {
  1413. const o = r.get(i);
  1414. o ? o.map || (o.map = /* @__PURE__ */ new Map()) : r.set(i, {
  1415. map: /* @__PURE__ */ new Map()
  1416. }), r = r.get(i).map;
  1417. }
  1418. });
  1419. }
  1420. deleteByPath(e, n) {
  1421. var r;
  1422. const i = e.get(n[0]);
  1423. if (n.length === 1)
  1424. return i.map ? e.set(n[0], {
  1425. map: i.map
  1426. }) : e.delete(n[0]), (r = i.value) === null || r === void 0 ? void 0 : r[0];
  1427. const a = this.deleteByPath(i.map, n.slice(1));
  1428. return (!i.map || i.map.size === 0) && !i.value && e.delete(n[0]), a;
  1429. }
  1430. delete(e) {
  1431. if (this.has(e))
  1432. return this.keys = this.keys.filter((n) => !ece(n, e)), this.deleteByPath(this.cache, e);
  1433. }
  1434. }
  1435. _h.MAX_CACHE_SIZE = 20;
  1436. _h.MAX_CACHE_OFFSET = 5;
  1437. let s2 = {};
  1438. function ff(t, e) {
  1439. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error(`Warning: ${e}`);
  1440. }
  1441. function tce(t, e) {
  1442. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.warn(`Note: ${e}`);
  1443. }
  1444. function nce() {
  1445. s2 = {};
  1446. }
  1447. function Sj(t, e, n) {
  1448. !e && !s2[n] && (t(!1, n), s2[n] = !0);
  1449. }
  1450. function la(t, e) {
  1451. Sj(ff, t, e);
  1452. }
  1453. function o8(t, e) {
  1454. Sj(tce, t, e);
  1455. }
  1456. function rce() {
  1457. }
  1458. let Yr = rce;
  1459. process.env.NODE_ENV !== "production" && (Yr = (t, e, n) => {
  1460. la(t, `[ant-design-vue: ${e}] ${n}`), process.env.NODE_ENV === "test" && nce();
  1461. });
  1462. let s8 = 0;
  1463. class xj {
  1464. constructor(e) {
  1465. this.derivatives = Array.isArray(e) ? e : [e], this.id = s8, e.length === 0 && Yr(e.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), s8 += 1;
  1466. }
  1467. getDerivativeToken(e) {
  1468. return this.derivatives.reduce((n, r) => r(e, n), void 0);
  1469. }
  1470. }
  1471. const Kw = new _h();
  1472. function wj(t) {
  1473. const e = Array.isArray(t) ? t : [t];
  1474. return Kw.has(e) || Kw.set(e, new xj(e)), Kw.get(e);
  1475. }
  1476. const l8 = /* @__PURE__ */ new WeakMap();
  1477. function _1(t) {
  1478. let e = l8.get(t) || "";
  1479. return e || (Object.keys(t).forEach((n) => {
  1480. const r = t[n];
  1481. e += n, r instanceof xj ? e += r.id : r && typeof r == "object" ? e += _1(r) : e += r;
  1482. }), l8.set(t, e)), e;
  1483. }
  1484. function ice(t, e) {
  1485. return sI(`${e}_${_1(t)}`);
  1486. }
  1487. const fg = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), Cj = "_bAmBoO_";
  1488. function ace(t, e, n) {
  1489. var r, i;
  1490. if (Ta()) {
  1491. em(t, fg);
  1492. const a = document.createElement("div");
  1493. 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");
  1494. const o = n ? n(a) : (r = getComputedStyle(a).content) === null || r === void 0 ? void 0 : r.includes(Cj);
  1495. return (i = a.parentNode) === null || i === void 0 || i.removeChild(a), b1(fg), o;
  1496. }
  1497. return !1;
  1498. }
  1499. let Jw;
  1500. function oce() {
  1501. return Jw === void 0 && (Jw = ace(`@layer ${fg} { .${fg} { content: "${Cj}"!important; } }`, (t) => {
  1502. t.className = fg;
  1503. })), Jw;
  1504. }
  1505. const u8 = {}, sce = process.env.NODE_ENV === "production", lce = process.env.NODE_ENV === "prerender", uce = !sce && !lce ? "css-dev-only-do-not-override" : "css", bc = /* @__PURE__ */ new Map();
  1506. function cce(t) {
  1507. bc.set(t, (bc.get(t) || 0) + 1);
  1508. }
  1509. function fce(t, e) {
  1510. typeof document < "u" && document.querySelectorAll(`style[${pj}="${t}"]`).forEach((r) => {
  1511. var i;
  1512. r[Bd] === e && ((i = r.parentNode) === null || i === void 0 || i.removeChild(r));
  1513. });
  1514. }
  1515. const dce = 0;
  1516. function hce(t, e) {
  1517. bc.set(t, (bc.get(t) || 0) - 1);
  1518. const n = Array.from(bc.keys()), r = n.filter((i) => (bc.get(i) || 0) <= 0);
  1519. n.length - r.length > dce && r.forEach((i) => {
  1520. fce(i, e), bc.delete(i);
  1521. });
  1522. }
  1523. const pce = (t, e, n, r) => {
  1524. const i = n.getDerivativeToken(t);
  1525. let a = I(I({}, i), e);
  1526. return r && (a = r(a)), a;
  1527. };
  1528. function vce(t, e) {
  1529. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : U({});
  1530. const r = NS(), i = L(() => I({}, ...e.value)), a = L(() => _1(i.value)), o = L(() => _1(n.value.override || u8));
  1531. return mj("token", L(() => [n.value.salt || "", t.value.id, a.value, o.value]), () => {
  1532. const {
  1533. salt: l = "",
  1534. override: u = u8,
  1535. formatToken: c,
  1536. getComputedToken: f
  1537. } = n.value, d = f ? f(i.value, u, t.value) : pce(i.value, u, t.value, c), h = ice(d, l);
  1538. d._tokenKey = h, cce(h);
  1539. const p = `${uce}-${sI(h)}`;
  1540. return d._hashId = p, [d, p];
  1541. }, (l) => {
  1542. var u;
  1543. hce(l[0]._tokenKey, (u = r.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  1544. });
  1545. }
  1546. var gce = {
  1547. animationIterationCount: 1,
  1548. aspectRatio: 1,
  1549. borderImageOutset: 1,
  1550. borderImageSlice: 1,
  1551. borderImageWidth: 1,
  1552. boxFlex: 1,
  1553. boxFlexGroup: 1,
  1554. boxOrdinalGroup: 1,
  1555. columnCount: 1,
  1556. columns: 1,
  1557. flex: 1,
  1558. flexGrow: 1,
  1559. flexPositive: 1,
  1560. flexShrink: 1,
  1561. flexNegative: 1,
  1562. flexOrder: 1,
  1563. gridRow: 1,
  1564. gridRowEnd: 1,
  1565. gridRowSpan: 1,
  1566. gridRowStart: 1,
  1567. gridColumn: 1,
  1568. gridColumnEnd: 1,
  1569. gridColumnSpan: 1,
  1570. gridColumnStart: 1,
  1571. msGridRow: 1,
  1572. msGridRowSpan: 1,
  1573. msGridColumn: 1,
  1574. msGridColumnSpan: 1,
  1575. fontWeight: 1,
  1576. lineHeight: 1,
  1577. opacity: 1,
  1578. order: 1,
  1579. orphans: 1,
  1580. tabSize: 1,
  1581. widows: 1,
  1582. zIndex: 1,
  1583. zoom: 1,
  1584. WebkitLineClamp: 1,
  1585. // SVG-related properties
  1586. fillOpacity: 1,
  1587. floodOpacity: 1,
  1588. stopOpacity: 1,
  1589. strokeDasharray: 1,
  1590. strokeDashoffset: 1,
  1591. strokeMiterlimit: 1,
  1592. strokeOpacity: 1,
  1593. strokeWidth: 1
  1594. }, Tj = "comm", Pj = "rule", $j = "decl", mce = "@import", yce = "@keyframes", bce = "@layer", Aj = Math.abs, lI = String.fromCharCode;
  1595. function Ej(t) {
  1596. return t.trim();
  1597. }
  1598. function b_(t, e, n) {
  1599. return t.replace(e, n);
  1600. }
  1601. function _ce(t, e, n) {
  1602. return t.indexOf(e, n);
  1603. }
  1604. function tm(t, e) {
  1605. return t.charCodeAt(e) | 0;
  1606. }
  1607. function nm(t, e, n) {
  1608. return t.slice(e, n);
  1609. }
  1610. function xs(t) {
  1611. return t.length;
  1612. }
  1613. function Oce(t) {
  1614. return t.length;
  1615. }
  1616. function my(t, e) {
  1617. return e.push(t), t;
  1618. }
  1619. var zS = 1, Oh = 1, Mj = 0, Pa = 0, Bn = 0, lp = "";
  1620. function uI(t, e, n, r, i, a, o, s) {
  1621. return { value: t, root: e, parent: n, type: r, props: i, children: a, line: zS, column: Oh, length: o, return: "", siblings: s };
  1622. }
  1623. function Sce() {
  1624. return Bn;
  1625. }
  1626. function xce() {
  1627. return Bn = Pa > 0 ? tm(lp, --Pa) : 0, Oh--, Bn === 10 && (Oh = 1, zS--), Bn;
  1628. }
  1629. function Ja() {
  1630. return Bn = Pa < Mj ? tm(lp, Pa++) : 0, Oh++, Bn === 10 && (Oh = 1, zS++), Bn;
  1631. }
  1632. function Gc() {
  1633. return tm(lp, Pa);
  1634. }
  1635. function __() {
  1636. return Pa;
  1637. }
  1638. function VS(t, e) {
  1639. return nm(lp, t, e);
  1640. }
  1641. function l2(t) {
  1642. switch (t) {
  1643. case 0:
  1644. case 9:
  1645. case 10:
  1646. case 13:
  1647. case 32:
  1648. return 5;
  1649. case 33:
  1650. case 43:
  1651. case 44:
  1652. case 47:
  1653. case 62:
  1654. case 64:
  1655. case 126:
  1656. case 59:
  1657. case 123:
  1658. case 125:
  1659. return 4;
  1660. case 58:
  1661. return 3;
  1662. case 34:
  1663. case 39:
  1664. case 40:
  1665. case 91:
  1666. return 2;
  1667. case 41:
  1668. case 93:
  1669. return 1;
  1670. }
  1671. return 0;
  1672. }
  1673. function wce(t) {
  1674. return zS = Oh = 1, Mj = xs(lp = t), Pa = 0, [];
  1675. }
  1676. function Cce(t) {
  1677. return lp = "", t;
  1678. }
  1679. function eC(t) {
  1680. return Ej(VS(Pa - 1, u2(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
  1681. }
  1682. function Tce(t) {
  1683. for (; (Bn = Gc()) && Bn < 33; )
  1684. Ja();
  1685. return l2(t) > 2 || l2(Bn) > 3 ? "" : " ";
  1686. }
  1687. function Pce(t, e) {
  1688. for (; --e && Ja() && !(Bn < 48 || Bn > 102 || Bn > 57 && Bn < 65 || Bn > 70 && Bn < 97); )
  1689. ;
  1690. return VS(t, __() + (e < 6 && Gc() == 32 && Ja() == 32));
  1691. }
  1692. function u2(t) {
  1693. for (; Ja(); )
  1694. switch (Bn) {
  1695. case t:
  1696. return Pa;
  1697. case 34:
  1698. case 39:
  1699. t !== 34 && t !== 39 && u2(Bn);
  1700. break;
  1701. case 40:
  1702. t === 41 && u2(t);
  1703. break;
  1704. case 92:
  1705. Ja();
  1706. break;
  1707. }
  1708. return Pa;
  1709. }
  1710. function $ce(t, e) {
  1711. for (; Ja() && t + Bn !== 57; )
  1712. if (t + Bn === 84 && Gc() === 47)
  1713. break;
  1714. return "/*" + VS(e, Pa - 1) + "*" + lI(t === 47 ? t : Ja());
  1715. }
  1716. function Ace(t) {
  1717. for (; !l2(Gc()); )
  1718. Ja();
  1719. return VS(t, Pa);
  1720. }
  1721. function Ece(t) {
  1722. return Cce(O_("", null, null, null, [""], t = wce(t), 0, [0], t));
  1723. }
  1724. function O_(t, e, n, r, i, a, o, s, l) {
  1725. for (var u = 0, c = 0, f = o, d = 0, h = 0, p = 0, v = 1, g = 1, m = 1, y = 0, b = "", _ = i, O = a, S = r, x = b; g; )
  1726. switch (p = y, y = Ja()) {
  1727. case 40:
  1728. if (p != 108 && tm(x, f - 1) == 58) {
  1729. _ce(x += b_(eC(y), "&", "&\f"), "&\f", Aj(u ? s[u - 1] : 0)) != -1 && (m = -1);
  1730. break;
  1731. }
  1732. case 34:
  1733. case 39:
  1734. case 91:
  1735. x += eC(y);
  1736. break;
  1737. case 9:
  1738. case 10:
  1739. case 13:
  1740. case 32:
  1741. x += Tce(p);
  1742. break;
  1743. case 92:
  1744. x += Pce(__() - 1, 7);
  1745. continue;
  1746. case 47:
  1747. switch (Gc()) {
  1748. case 42:
  1749. case 47:
  1750. my(Mce($ce(Ja(), __()), e, n, l), l);
  1751. break;
  1752. default:
  1753. x += "/";
  1754. }
  1755. break;
  1756. case 123 * v:
  1757. s[u++] = xs(x) * m;
  1758. case 125 * v:
  1759. case 59:
  1760. case 0:
  1761. switch (y) {
  1762. case 0:
  1763. case 125:
  1764. g = 0;
  1765. case 59 + c:
  1766. m == -1 && (x = b_(x, /\f/g, "")), h > 0 && xs(x) - f && my(h > 32 ? f8(x + ";", r, n, f - 1, l) : f8(b_(x, " ", "") + ";", r, n, f - 2, l), l);
  1767. break;
  1768. case 59:
  1769. x += ";";
  1770. default:
  1771. if (my(S = c8(x, e, n, u, c, i, s, b, _ = [], O = [], f, a), a), y === 123)
  1772. if (c === 0)
  1773. O_(x, e, S, S, _, a, f, s, O);
  1774. else
  1775. switch (d === 99 && tm(x, 3) === 110 ? 100 : d) {
  1776. case 100:
  1777. case 108:
  1778. case 109:
  1779. case 115:
  1780. O_(t, S, S, r && my(c8(t, S, S, 0, 0, i, s, b, i, _ = [], f, O), O), i, O, f, s, r ? _ : O);
  1781. break;
  1782. default:
  1783. O_(x, S, S, S, [""], O, 0, s, O);
  1784. }
  1785. }
  1786. u = c = h = 0, v = m = 1, b = x = "", f = o;
  1787. break;
  1788. case 58:
  1789. f = 1 + xs(x), h = p;
  1790. default:
  1791. if (v < 1) {
  1792. if (y == 123)
  1793. --v;
  1794. else if (y == 125 && v++ == 0 && xce() == 125)
  1795. continue;
  1796. }
  1797. switch (x += lI(y), y * v) {
  1798. case 38:
  1799. m = c > 0 ? 1 : (x += "\f", -1);
  1800. break;
  1801. case 44:
  1802. s[u++] = (xs(x) - 1) * m, m = 1;
  1803. break;
  1804. case 64:
  1805. Gc() === 45 && (x += eC(Ja())), d = Gc(), c = f = xs(b = x += Ace(__())), y++;
  1806. break;
  1807. case 45:
  1808. p === 45 && xs(x) == 2 && (v = 0);
  1809. }
  1810. }
  1811. return a;
  1812. }
  1813. function c8(t, e, n, r, i, a, o, s, l, u, c, f) {
  1814. for (var d = i - 1, h = i === 0 ? a : [""], p = Oce(h), v = 0, g = 0, m = 0; v < r; ++v)
  1815. for (var y = 0, b = nm(t, d + 1, d = Aj(g = o[v])), _ = t; y < p; ++y)
  1816. (_ = Ej(g > 0 ? h[y] + " " + b : b_(b, /&\f/g, h[y]))) && (l[m++] = _);
  1817. return uI(t, e, n, i === 0 ? Pj : s, l, u, c, f);
  1818. }
  1819. function Mce(t, e, n, r) {
  1820. return uI(t, e, n, Tj, lI(Sce()), nm(t, 2, -2), 0, r);
  1821. }
  1822. function f8(t, e, n, r, i) {
  1823. return uI(t, e, n, $j, nm(t, 0, r), nm(t, r + 1, -1), r, i);
  1824. }
  1825. function c2(t, e) {
  1826. for (var n = "", r = 0; r < t.length; r++)
  1827. n += e(t[r], r, t, e) || "";
  1828. return n;
  1829. }
  1830. function Ice(t, e, n, r) {
  1831. switch (t.type) {
  1832. case bce:
  1833. if (t.children.length) break;
  1834. case mce:
  1835. case $j:
  1836. return t.return = t.return || t.value;
  1837. case Tj:
  1838. return "";
  1839. case yce:
  1840. return t.return = t.value + "{" + c2(t.children, r) + "}";
  1841. case Pj:
  1842. if (!xs(t.value = t.props.join(","))) return "";
  1843. }
  1844. return xs(n = c2(t.children, r)) ? t.return = t.value + "{" + n + "}" : "";
  1845. }
  1846. function Ij(t, e) {
  1847. const {
  1848. path: n,
  1849. parentSelectors: r
  1850. } = e;
  1851. la(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${t}${r.length ? ` Selector info: ${r.join(" -> ")}` : ""}`);
  1852. }
  1853. const Dce = (t, e, n) => {
  1854. if (t === "content") {
  1855. const r = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
  1856. (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) !== "'")) && Ij(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`, n);
  1857. }
  1858. }, Rce = (t, e, n) => {
  1859. t === "animation" && n.hashId && e !== "none" && Ij(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`, n);
  1860. }, d8 = "data-ant-cssinjs-cache-path", kce = "_FILE_STYLE__";
  1861. let jc, Dj = !0;
  1862. function Lce() {
  1863. var t;
  1864. if (!jc && (jc = {}, Ta())) {
  1865. const e = document.createElement("div");
  1866. e.className = d8, e.style.position = "fixed", e.style.visibility = "hidden", e.style.top = "-9999px", document.body.appendChild(e);
  1867. let n = getComputedStyle(e).content || "";
  1868. n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((i) => {
  1869. const [a, o] = i.split(":");
  1870. jc[a] = o;
  1871. });
  1872. const r = document.querySelector(`style[${d8}]`);
  1873. r && (Dj = !1, (t = r.parentNode) === null || t === void 0 || t.removeChild(r)), document.body.removeChild(e);
  1874. }
  1875. }
  1876. function Nce(t) {
  1877. return Lce(), !!jc[t];
  1878. }
  1879. function Bce(t) {
  1880. const e = jc[t];
  1881. let n = null;
  1882. if (e && Ta())
  1883. if (Dj)
  1884. n = kce;
  1885. else {
  1886. const r = document.querySelector(`style[${Hc}="${jc[t]}"]`);
  1887. r ? n = r.innerHTML : delete jc[t];
  1888. }
  1889. return [n, e];
  1890. }
  1891. const h8 = Ta(), Rj = "_skip_check_", kj = "_multi_value_";
  1892. function p8(t) {
  1893. return c2(Ece(t), Ice).replace(/\{%%%\:[^;];}/g, ";");
  1894. }
  1895. function zce(t) {
  1896. return typeof t == "object" && t && (Rj in t || kj in t);
  1897. }
  1898. function Vce(t, e, n) {
  1899. if (!e)
  1900. return t;
  1901. const r = `.${e}`, i = n === "low" ? `:where(${r})` : r;
  1902. return t.split(",").map((o) => {
  1903. var s;
  1904. const l = o.trim().split(/\s+/);
  1905. let u = l[0] || "";
  1906. const c = ((s = u.match(/^\w+/)) === null || s === void 0 ? void 0 : s[0]) || "";
  1907. return u = `${c}${i}${u.slice(c.length)}`, [u, ...l.slice(1)].join(" ");
  1908. }).join(",");
  1909. }
  1910. const f2 = /* @__PURE__ */ new Set();
  1911. process.env.NODE_ENV;
  1912. const d2 = function(t) {
  1913. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
  1914. root: n,
  1915. injectHash: r,
  1916. parentSelectors: i
  1917. } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
  1918. root: !0,
  1919. parentSelectors: []
  1920. };
  1921. const {
  1922. hashId: a,
  1923. layer: o,
  1924. path: s,
  1925. hashPriority: l,
  1926. transformers: u = [],
  1927. linters: c = []
  1928. } = e;
  1929. let f = "", d = {};
  1930. function h(g) {
  1931. const m = g.getName(a);
  1932. if (!d[m]) {
  1933. const [y] = d2(g.style, e, {
  1934. root: !1,
  1935. parentSelectors: i
  1936. });
  1937. d[m] = `@keyframes ${g.getName(a)}${y}`;
  1938. }
  1939. }
  1940. function p(g) {
  1941. let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  1942. return g.forEach((y) => {
  1943. Array.isArray(y) ? p(y, m) : y && m.push(y);
  1944. }), m;
  1945. }
  1946. if (p(Array.isArray(t) ? t : [t]).forEach((g) => {
  1947. const m = typeof g == "string" && !n ? {} : g;
  1948. if (typeof m == "string")
  1949. f += `${m}
  1950. `;
  1951. else if (m._keyframe)
  1952. h(m);
  1953. else {
  1954. const y = u.reduce((b, _) => {
  1955. var O;
  1956. return ((O = _ == null ? void 0 : _.visit) === null || O === void 0 ? void 0 : O.call(_, b)) || b;
  1957. }, m);
  1958. Object.keys(y).forEach((b) => {
  1959. var _;
  1960. const O = y[b];
  1961. if (typeof O == "object" && O && (b !== "animationName" || !O._keyframe) && !zce(O)) {
  1962. let S = !1, x = b.trim(), C = !1;
  1963. (n || r) && a ? x.startsWith("@") ? S = !0 : x = Vce(b, a, l) : n && !a && (x === "&" || x === "") && (x = "", C = !0);
  1964. const [T, w] = d2(O, e, {
  1965. root: C,
  1966. injectHash: S,
  1967. parentSelectors: [...i, x]
  1968. });
  1969. d = I(I({}, d), w), f += `${x}${T}`;
  1970. } else {
  1971. let S = function(C, T) {
  1972. process.env.NODE_ENV !== "production" && (typeof O != "object" || !(O != null && O[Rj])) && [Dce, Rce, ...c].forEach(($) => $(C, T, {
  1973. path: s,
  1974. hashId: a,
  1975. parentSelectors: i
  1976. }));
  1977. const w = C.replace(/[A-Z]/g, ($) => `-${$.toLowerCase()}`);
  1978. let P = T;
  1979. !gce[C] && typeof P == "number" && P !== 0 && (P = `${P}px`), C === "animationName" && (T != null && T._keyframe) && (h(T), P = T.getName(a)), f += `${w}:${P};`;
  1980. };
  1981. const x = (_ = O == null ? void 0 : O.value) !== null && _ !== void 0 ? _ : O;
  1982. typeof O == "object" && (O != null && O[kj]) && Array.isArray(x) ? x.forEach((C) => {
  1983. S(b, C);
  1984. }) : S(b, x);
  1985. }
  1986. });
  1987. }
  1988. }), !n)
  1989. f = `{${f}}`;
  1990. else if (o && oce()) {
  1991. const g = o.split(",");
  1992. f = `@layer ${g[g.length - 1].trim()} {${f}}`, g.length > 1 && (f = `@layer ${o}{%%%:%}${f}`);
  1993. }
  1994. return [f, d];
  1995. };
  1996. function Fce(t, e) {
  1997. return sI(`${t.join("%")}${e}`);
  1998. }
  1999. function h2(t, e) {
  2000. const n = NS(), r = L(() => t.value.token._tokenKey), i = L(() => [r.value, ...t.value.path]);
  2001. let a = h8;
  2002. return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (a = n.value.mock === "client"), mj(
  2003. "style",
  2004. i,
  2005. // Create cache if needed
  2006. () => {
  2007. const {
  2008. path: o,
  2009. hashId: s,
  2010. layer: l,
  2011. nonce: u,
  2012. clientOnly: c,
  2013. order: f = 0
  2014. } = t.value, d = i.value.join("|");
  2015. if (Nce(d)) {
  2016. const [x, C] = Bce(d);
  2017. if (x)
  2018. return [x, r.value, C, {}, c, f];
  2019. }
  2020. const h = e(), {
  2021. hashPriority: p,
  2022. container: v,
  2023. transformers: g,
  2024. linters: m,
  2025. cache: y
  2026. } = n.value, [b, _] = d2(h, {
  2027. hashId: s,
  2028. hashPriority: p,
  2029. layer: l,
  2030. path: o.join("-"),
  2031. transformers: g,
  2032. linters: m
  2033. }), O = p8(b), S = Fce(i.value, O);
  2034. if (a) {
  2035. const x = {
  2036. mark: Hc,
  2037. prepend: "queue",
  2038. attachTo: v,
  2039. priority: f
  2040. }, C = typeof u == "function" ? u() : u;
  2041. C && (x.csp = {
  2042. nonce: C
  2043. });
  2044. const T = em(O, S, x);
  2045. T[Bd] = y.instanceId, T.setAttribute(pj, r.value), process.env.NODE_ENV !== "production" && T.setAttribute(Hue, i.value.join("|")), Object.keys(_).forEach((w) => {
  2046. f2.has(w) || (f2.add(w), em(p8(_[w]), `_effect-${w}`, {
  2047. mark: Hc,
  2048. prepend: "queue",
  2049. attachTo: v
  2050. }));
  2051. });
  2052. }
  2053. return [O, r.value, S, _, c, f];
  2054. },
  2055. // Remove cache if no need
  2056. (o, s) => {
  2057. let [, , l] = o;
  2058. (s || n.value.autoClear) && h8 && b1(l, {
  2059. mark: Hc
  2060. });
  2061. }
  2062. ), (o) => o;
  2063. }
  2064. class Ot {
  2065. constructor(e, n) {
  2066. this._keyframe = !0, this.name = e, this.style = n;
  2067. }
  2068. getName() {
  2069. let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
  2070. return e ? `${e}-${this.name}` : this.name;
  2071. }
  2072. }
  2073. const Wce = "4.2.3", O1 = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
  2074. function Or(t, e) {
  2075. Qce(t) && (t = "100%");
  2076. var n = Hce(t);
  2077. 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);
  2078. }
  2079. function yy(t) {
  2080. return Math.min(1, Math.max(0, t));
  2081. }
  2082. function Qce(t) {
  2083. return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
  2084. }
  2085. function Hce(t) {
  2086. return typeof t == "string" && t.indexOf("%") !== -1;
  2087. }
  2088. function Lj(t) {
  2089. return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
  2090. }
  2091. function by(t) {
  2092. return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
  2093. }
  2094. function Mc(t) {
  2095. return t.length === 1 ? "0" + t : String(t);
  2096. }
  2097. function Gce(t, e, n) {
  2098. return {
  2099. r: Or(t, 255) * 255,
  2100. g: Or(e, 255) * 255,
  2101. b: Or(n, 255) * 255
  2102. };
  2103. }
  2104. function v8(t, e, n) {
  2105. t = Or(t, 255), e = Or(e, 255), n = Or(n, 255);
  2106. var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = 0, s = (r + i) / 2;
  2107. if (r === i)
  2108. o = 0, a = 0;
  2109. else {
  2110. var l = r - i;
  2111. switch (o = s > 0.5 ? l / (2 - r - i) : l / (r + i), r) {
  2112. case t:
  2113. a = (e - n) / l + (e < n ? 6 : 0);
  2114. break;
  2115. case e:
  2116. a = (n - t) / l + 2;
  2117. break;
  2118. case n:
  2119. a = (t - e) / l + 4;
  2120. break;
  2121. }
  2122. a /= 6;
  2123. }
  2124. return { h: a, s: o, l: s };
  2125. }
  2126. function tC(t, e, n) {
  2127. 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;
  2128. }
  2129. function jce(t, e, n) {
  2130. var r, i, a;
  2131. if (t = Or(t, 360), e = Or(e, 100), n = Or(n, 100), e === 0)
  2132. i = n, a = n, r = n;
  2133. else {
  2134. var o = n < 0.5 ? n * (1 + e) : n + e - n * e, s = 2 * n - o;
  2135. r = tC(s, o, t + 1 / 3), i = tC(s, o, t), a = tC(s, o, t - 1 / 3);
  2136. }
  2137. return { r: r * 255, g: i * 255, b: a * 255 };
  2138. }
  2139. function p2(t, e, n) {
  2140. t = Or(t, 255), e = Or(e, 255), n = Or(n, 255);
  2141. 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;
  2142. if (r === i)
  2143. a = 0;
  2144. else {
  2145. switch (r) {
  2146. case t:
  2147. a = (e - n) / s + (e < n ? 6 : 0);
  2148. break;
  2149. case e:
  2150. a = (n - t) / s + 2;
  2151. break;
  2152. case n:
  2153. a = (t - e) / s + 4;
  2154. break;
  2155. }
  2156. a /= 6;
  2157. }
  2158. return { h: a, s: l, v: o };
  2159. }
  2160. function Zce(t, e, n) {
  2161. t = Or(t, 360) * 6, e = Or(e, 100), n = Or(n, 100);
  2162. 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];
  2163. return { r: u * 255, g: c * 255, b: f * 255 };
  2164. }
  2165. function v2(t, e, n, r) {
  2166. var i = [
  2167. Mc(Math.round(t).toString(16)),
  2168. Mc(Math.round(e).toString(16)),
  2169. Mc(Math.round(n).toString(16))
  2170. ];
  2171. 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("");
  2172. }
  2173. function Uce(t, e, n, r, i) {
  2174. var a = [
  2175. Mc(Math.round(t).toString(16)),
  2176. Mc(Math.round(e).toString(16)),
  2177. Mc(Math.round(n).toString(16)),
  2178. Mc(Xce(r))
  2179. ];
  2180. 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("");
  2181. }
  2182. function Xce(t) {
  2183. return Math.round(parseFloat(t) * 255).toString(16);
  2184. }
  2185. function g8(t) {
  2186. return Di(t) / 255;
  2187. }
  2188. function Di(t) {
  2189. return parseInt(t, 16);
  2190. }
  2191. function Yce(t) {
  2192. return {
  2193. r: t >> 16,
  2194. g: (t & 65280) >> 8,
  2195. b: t & 255
  2196. };
  2197. }
  2198. var g2 = {
  2199. aliceblue: "#f0f8ff",
  2200. antiquewhite: "#faebd7",
  2201. aqua: "#00ffff",
  2202. aquamarine: "#7fffd4",
  2203. azure: "#f0ffff",
  2204. beige: "#f5f5dc",
  2205. bisque: "#ffe4c4",
  2206. black: "#000000",
  2207. blanchedalmond: "#ffebcd",
  2208. blue: "#0000ff",
  2209. blueviolet: "#8a2be2",
  2210. brown: "#a52a2a",
  2211. burlywood: "#deb887",
  2212. cadetblue: "#5f9ea0",
  2213. chartreuse: "#7fff00",
  2214. chocolate: "#d2691e",
  2215. coral: "#ff7f50",
  2216. cornflowerblue: "#6495ed",
  2217. cornsilk: "#fff8dc",
  2218. crimson: "#dc143c",
  2219. cyan: "#00ffff",
  2220. darkblue: "#00008b",
  2221. darkcyan: "#008b8b",
  2222. darkgoldenrod: "#b8860b",
  2223. darkgray: "#a9a9a9",
  2224. darkgreen: "#006400",
  2225. darkgrey: "#a9a9a9",
  2226. darkkhaki: "#bdb76b",
  2227. darkmagenta: "#8b008b",
  2228. darkolivegreen: "#556b2f",
  2229. darkorange: "#ff8c00",
  2230. darkorchid: "#9932cc",
  2231. darkred: "#8b0000",
  2232. darksalmon: "#e9967a",
  2233. darkseagreen: "#8fbc8f",
  2234. darkslateblue: "#483d8b",
  2235. darkslategray: "#2f4f4f",
  2236. darkslategrey: "#2f4f4f",
  2237. darkturquoise: "#00ced1",
  2238. darkviolet: "#9400d3",
  2239. deeppink: "#ff1493",
  2240. deepskyblue: "#00bfff",
  2241. dimgray: "#696969",
  2242. dimgrey: "#696969",
  2243. dodgerblue: "#1e90ff",
  2244. firebrick: "#b22222",
  2245. floralwhite: "#fffaf0",
  2246. forestgreen: "#228b22",
  2247. fuchsia: "#ff00ff",
  2248. gainsboro: "#dcdcdc",
  2249. ghostwhite: "#f8f8ff",
  2250. goldenrod: "#daa520",
  2251. gold: "#ffd700",
  2252. gray: "#808080",
  2253. green: "#008000",
  2254. greenyellow: "#adff2f",
  2255. grey: "#808080",
  2256. honeydew: "#f0fff0",
  2257. hotpink: "#ff69b4",
  2258. indianred: "#cd5c5c",
  2259. indigo: "#4b0082",
  2260. ivory: "#fffff0",
  2261. khaki: "#f0e68c",
  2262. lavenderblush: "#fff0f5",
  2263. lavender: "#e6e6fa",
  2264. lawngreen: "#7cfc00",
  2265. lemonchiffon: "#fffacd",
  2266. lightblue: "#add8e6",
  2267. lightcoral: "#f08080",
  2268. lightcyan: "#e0ffff",
  2269. lightgoldenrodyellow: "#fafad2",
  2270. lightgray: "#d3d3d3",
  2271. lightgreen: "#90ee90",
  2272. lightgrey: "#d3d3d3",
  2273. lightpink: "#ffb6c1",
  2274. lightsalmon: "#ffa07a",
  2275. lightseagreen: "#20b2aa",
  2276. lightskyblue: "#87cefa",
  2277. lightslategray: "#778899",
  2278. lightslategrey: "#778899",
  2279. lightsteelblue: "#b0c4de",
  2280. lightyellow: "#ffffe0",
  2281. lime: "#00ff00",
  2282. limegreen: "#32cd32",
  2283. linen: "#faf0e6",
  2284. magenta: "#ff00ff",
  2285. maroon: "#800000",
  2286. mediumaquamarine: "#66cdaa",
  2287. mediumblue: "#0000cd",
  2288. mediumorchid: "#ba55d3",
  2289. mediumpurple: "#9370db",
  2290. mediumseagreen: "#3cb371",
  2291. mediumslateblue: "#7b68ee",
  2292. mediumspringgreen: "#00fa9a",
  2293. mediumturquoise: "#48d1cc",
  2294. mediumvioletred: "#c71585",
  2295. midnightblue: "#191970",
  2296. mintcream: "#f5fffa",
  2297. mistyrose: "#ffe4e1",
  2298. moccasin: "#ffe4b5",
  2299. navajowhite: "#ffdead",
  2300. navy: "#000080",
  2301. oldlace: "#fdf5e6",
  2302. olive: "#808000",
  2303. olivedrab: "#6b8e23",
  2304. orange: "#ffa500",
  2305. orangered: "#ff4500",
  2306. orchid: "#da70d6",
  2307. palegoldenrod: "#eee8aa",
  2308. palegreen: "#98fb98",
  2309. paleturquoise: "#afeeee",
  2310. palevioletred: "#db7093",
  2311. papayawhip: "#ffefd5",
  2312. peachpuff: "#ffdab9",
  2313. peru: "#cd853f",
  2314. pink: "#ffc0cb",
  2315. plum: "#dda0dd",
  2316. powderblue: "#b0e0e6",
  2317. purple: "#800080",
  2318. rebeccapurple: "#663399",
  2319. red: "#ff0000",
  2320. rosybrown: "#bc8f8f",
  2321. royalblue: "#4169e1",
  2322. saddlebrown: "#8b4513",
  2323. salmon: "#fa8072",
  2324. sandybrown: "#f4a460",
  2325. seagreen: "#2e8b57",
  2326. seashell: "#fff5ee",
  2327. sienna: "#a0522d",
  2328. silver: "#c0c0c0",
  2329. skyblue: "#87ceeb",
  2330. slateblue: "#6a5acd",
  2331. slategray: "#708090",
  2332. slategrey: "#708090",
  2333. snow: "#fffafa",
  2334. springgreen: "#00ff7f",
  2335. steelblue: "#4682b4",
  2336. tan: "#d2b48c",
  2337. teal: "#008080",
  2338. thistle: "#d8bfd8",
  2339. tomato: "#ff6347",
  2340. turquoise: "#40e0d0",
  2341. violet: "#ee82ee",
  2342. wheat: "#f5deb3",
  2343. white: "#ffffff",
  2344. whitesmoke: "#f5f5f5",
  2345. yellow: "#ffff00",
  2346. yellowgreen: "#9acd32"
  2347. };
  2348. function Td(t) {
  2349. var e = { r: 0, g: 0, b: 0 }, n = 1, r = null, i = null, a = null, o = !1, s = !1;
  2350. return typeof t == "string" && (t = Jce(t)), typeof t == "object" && (vs(t.r) && vs(t.g) && vs(t.b) ? (e = Gce(t.r, t.g, t.b), o = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : vs(t.h) && vs(t.s) && vs(t.v) ? (r = by(t.s), i = by(t.v), e = Zce(t.h, r, i), o = !0, s = "hsv") : vs(t.h) && vs(t.s) && vs(t.l) && (r = by(t.s), a = by(t.l), e = jce(t.h, r, a), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (n = t.a)), n = Lj(n), {
  2351. ok: o,
  2352. format: t.format || s,
  2353. r: Math.min(255, Math.max(e.r, 0)),
  2354. g: Math.min(255, Math.max(e.g, 0)),
  2355. b: Math.min(255, Math.max(e.b, 0)),
  2356. a: n
  2357. };
  2358. }
  2359. var qce = "[-\\+]?\\d+%?", Kce = "[-\\+]?\\d*\\.\\d+%?", Il = "(?:".concat(Kce, ")|(?:").concat(qce, ")"), nC = "[\\s|\\(]+(".concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")\\s*\\)?"), rC = "[\\s|\\(]+(".concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")\\s*\\)?"), Ga = {
  2360. CSS_UNIT: new RegExp(Il),
  2361. rgb: new RegExp("rgb" + nC),
  2362. rgba: new RegExp("rgba" + rC),
  2363. hsl: new RegExp("hsl" + nC),
  2364. hsla: new RegExp("hsla" + rC),
  2365. hsv: new RegExp("hsv" + nC),
  2366. hsva: new RegExp("hsva" + rC),
  2367. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2368. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  2369. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2370. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  2371. };
  2372. function Jce(t) {
  2373. if (t = t.trim().toLowerCase(), t.length === 0)
  2374. return !1;
  2375. var e = !1;
  2376. if (g2[t])
  2377. t = g2[t], e = !0;
  2378. else if (t === "transparent")
  2379. return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  2380. var n = Ga.rgb.exec(t);
  2381. return n ? { r: n[1], g: n[2], b: n[3] } : (n = Ga.rgba.exec(t), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Ga.hsl.exec(t), n ? { h: n[1], s: n[2], l: n[3] } : (n = Ga.hsla.exec(t), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Ga.hsv.exec(t), n ? { h: n[1], s: n[2], v: n[3] } : (n = Ga.hsva.exec(t), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Ga.hex8.exec(t), n ? {
  2382. r: Di(n[1]),
  2383. g: Di(n[2]),
  2384. b: Di(n[3]),
  2385. a: g8(n[4]),
  2386. format: e ? "name" : "hex8"
  2387. } : (n = Ga.hex6.exec(t), n ? {
  2388. r: Di(n[1]),
  2389. g: Di(n[2]),
  2390. b: Di(n[3]),
  2391. format: e ? "name" : "hex"
  2392. } : (n = Ga.hex4.exec(t), n ? {
  2393. r: Di(n[1] + n[1]),
  2394. g: Di(n[2] + n[2]),
  2395. b: Di(n[3] + n[3]),
  2396. a: g8(n[4] + n[4]),
  2397. format: e ? "name" : "hex8"
  2398. } : (n = Ga.hex3.exec(t), n ? {
  2399. r: Di(n[1] + n[1]),
  2400. g: Di(n[2] + n[2]),
  2401. b: Di(n[3] + n[3]),
  2402. format: e ? "name" : "hex"
  2403. } : !1)))))))));
  2404. }
  2405. function vs(t) {
  2406. return !!Ga.CSS_UNIT.exec(String(t));
  2407. }
  2408. var en = (
  2409. /** @class */
  2410. function() {
  2411. function t(e, n) {
  2412. e === void 0 && (e = ""), n === void 0 && (n = {});
  2413. var r;
  2414. if (e instanceof t)
  2415. return e;
  2416. typeof e == "number" && (e = Yce(e)), this.originalInput = e;
  2417. var i = Td(e);
  2418. 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;
  2419. }
  2420. return t.prototype.isDark = function() {
  2421. return this.getBrightness() < 128;
  2422. }, t.prototype.isLight = function() {
  2423. return !this.isDark();
  2424. }, t.prototype.getBrightness = function() {
  2425. var e = this.toRgb();
  2426. return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
  2427. }, t.prototype.getLuminance = function() {
  2428. var e = this.toRgb(), n, r, i, a = e.r / 255, o = e.g / 255, s = e.b / 255;
  2429. 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;
  2430. }, t.prototype.getAlpha = function() {
  2431. return this.a;
  2432. }, t.prototype.setAlpha = function(e) {
  2433. return this.a = Lj(e), this.roundA = Math.round(100 * this.a) / 100, this;
  2434. }, t.prototype.isMonochrome = function() {
  2435. var e = this.toHsl().s;
  2436. return e === 0;
  2437. }, t.prototype.toHsv = function() {
  2438. var e = p2(this.r, this.g, this.b);
  2439. return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
  2440. }, t.prototype.toHsvString = function() {
  2441. var e = p2(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.v * 100);
  2442. return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
  2443. }, t.prototype.toHsl = function() {
  2444. var e = v8(this.r, this.g, this.b);
  2445. return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
  2446. }, t.prototype.toHslString = function() {
  2447. var e = v8(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.l * 100);
  2448. return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
  2449. }, t.prototype.toHex = function(e) {
  2450. return e === void 0 && (e = !1), v2(this.r, this.g, this.b, e);
  2451. }, t.prototype.toHexString = function(e) {
  2452. return e === void 0 && (e = !1), "#" + this.toHex(e);
  2453. }, t.prototype.toHex8 = function(e) {
  2454. return e === void 0 && (e = !1), Uce(this.r, this.g, this.b, this.a, e);
  2455. }, t.prototype.toHex8String = function(e) {
  2456. return e === void 0 && (e = !1), "#" + this.toHex8(e);
  2457. }, t.prototype.toHexShortString = function(e) {
  2458. return e === void 0 && (e = !1), this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
  2459. }, t.prototype.toRgb = function() {
  2460. return {
  2461. r: Math.round(this.r),
  2462. g: Math.round(this.g),
  2463. b: Math.round(this.b),
  2464. a: this.a
  2465. };
  2466. }, t.prototype.toRgbString = function() {
  2467. var e = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b);
  2468. return this.a === 1 ? "rgb(".concat(e, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(e, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")");
  2469. }, t.prototype.toPercentageRgb = function() {
  2470. var e = function(n) {
  2471. return "".concat(Math.round(Or(n, 255) * 100), "%");
  2472. };
  2473. return {
  2474. r: e(this.r),
  2475. g: e(this.g),
  2476. b: e(this.b),
  2477. a: this.a
  2478. };
  2479. }, t.prototype.toPercentageRgbString = function() {
  2480. var e = function(n) {
  2481. return Math.round(Or(n, 255) * 100);
  2482. };
  2483. 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, ")");
  2484. }, t.prototype.toName = function() {
  2485. if (this.a === 0)
  2486. return "transparent";
  2487. if (this.a < 1)
  2488. return !1;
  2489. for (var e = "#" + v2(this.r, this.g, this.b, !1), n = 0, r = Object.entries(g2); n < r.length; n++) {
  2490. var i = r[n], a = i[0], o = i[1];
  2491. if (e === o)
  2492. return a;
  2493. }
  2494. return !1;
  2495. }, t.prototype.toString = function(e) {
  2496. var n = !!e;
  2497. e = e ?? this.format;
  2498. var r = !1, i = this.a < 1 && this.a >= 0, a = !n && i && (e.startsWith("hex") || e === "name");
  2499. 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());
  2500. }, t.prototype.toNumber = function() {
  2501. return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
  2502. }, t.prototype.clone = function() {
  2503. return new t(this.toString());
  2504. }, t.prototype.lighten = function(e) {
  2505. e === void 0 && (e = 10);
  2506. var n = this.toHsl();
  2507. return n.l += e / 100, n.l = yy(n.l), new t(n);
  2508. }, t.prototype.brighten = function(e) {
  2509. e === void 0 && (e = 10);
  2510. var n = this.toRgb();
  2511. 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);
  2512. }, t.prototype.darken = function(e) {
  2513. e === void 0 && (e = 10);
  2514. var n = this.toHsl();
  2515. return n.l -= e / 100, n.l = yy(n.l), new t(n);
  2516. }, t.prototype.tint = function(e) {
  2517. return e === void 0 && (e = 10), this.mix("white", e);
  2518. }, t.prototype.shade = function(e) {
  2519. return e === void 0 && (e = 10), this.mix("black", e);
  2520. }, t.prototype.desaturate = function(e) {
  2521. e === void 0 && (e = 10);
  2522. var n = this.toHsl();
  2523. return n.s -= e / 100, n.s = yy(n.s), new t(n);
  2524. }, t.prototype.saturate = function(e) {
  2525. e === void 0 && (e = 10);
  2526. var n = this.toHsl();
  2527. return n.s += e / 100, n.s = yy(n.s), new t(n);
  2528. }, t.prototype.greyscale = function() {
  2529. return this.desaturate(100);
  2530. }, t.prototype.spin = function(e) {
  2531. var n = this.toHsl(), r = (n.h + e) % 360;
  2532. return n.h = r < 0 ? 360 + r : r, new t(n);
  2533. }, t.prototype.mix = function(e, n) {
  2534. n === void 0 && (n = 50);
  2535. var r = this.toRgb(), i = new t(e).toRgb(), a = n / 100, o = {
  2536. r: (i.r - r.r) * a + r.r,
  2537. g: (i.g - r.g) * a + r.g,
  2538. b: (i.b - r.b) * a + r.b,
  2539. a: (i.a - r.a) * a + r.a
  2540. };
  2541. return new t(o);
  2542. }, t.prototype.analogous = function(e, n) {
  2543. e === void 0 && (e = 6), n === void 0 && (n = 30);
  2544. var r = this.toHsl(), i = 360 / n, a = [this];
  2545. for (r.h = (r.h - (i * e >> 1) + 720) % 360; --e; )
  2546. r.h = (r.h + i) % 360, a.push(new t(r));
  2547. return a;
  2548. }, t.prototype.complement = function() {
  2549. var e = this.toHsl();
  2550. return e.h = (e.h + 180) % 360, new t(e);
  2551. }, t.prototype.monochromatic = function(e) {
  2552. e === void 0 && (e = 6);
  2553. for (var n = this.toHsv(), r = n.h, i = n.s, a = n.v, o = [], s = 1 / e; e--; )
  2554. o.push(new t({ h: r, s: i, v: a })), a = (a + s) % 1;
  2555. return o;
  2556. }, t.prototype.splitcomplement = function() {
  2557. var e = this.toHsl(), n = e.h;
  2558. return [
  2559. this,
  2560. new t({ h: (n + 72) % 360, s: e.s, l: e.l }),
  2561. new t({ h: (n + 216) % 360, s: e.s, l: e.l })
  2562. ];
  2563. }, t.prototype.onBackground = function(e) {
  2564. var n = this.toRgb(), r = new t(e).toRgb(), i = n.a + r.a * (1 - n.a);
  2565. return new t({
  2566. r: (n.r * n.a + r.r * r.a * (1 - n.a)) / i,
  2567. g: (n.g * n.a + r.g * r.a * (1 - n.a)) / i,
  2568. b: (n.b * n.a + r.b * r.a * (1 - n.a)) / i,
  2569. a: i
  2570. });
  2571. }, t.prototype.triad = function() {
  2572. return this.polyad(3);
  2573. }, t.prototype.tetrad = function() {
  2574. return this.polyad(4);
  2575. }, t.prototype.polyad = function(e) {
  2576. for (var n = this.toHsl(), r = n.h, i = [this], a = 360 / e, o = 1; o < e; o++)
  2577. i.push(new t({ h: (r + o * a) % 360, s: n.s, l: n.l }));
  2578. return i;
  2579. }, t.prototype.equals = function(e) {
  2580. return this.toRgbString() === new t(e).toRgbString();
  2581. }, t;
  2582. }()
  2583. ), _y = 2, m8 = 0.16, efe = 0.05, tfe = 0.05, nfe = 0.15, Nj = 5, Bj = 4, rfe = [{
  2584. index: 7,
  2585. opacity: 0.15
  2586. }, {
  2587. index: 6,
  2588. opacity: 0.25
  2589. }, {
  2590. index: 5,
  2591. opacity: 0.3
  2592. }, {
  2593. index: 5,
  2594. opacity: 0.45
  2595. }, {
  2596. index: 5,
  2597. opacity: 0.65
  2598. }, {
  2599. index: 5,
  2600. opacity: 0.85
  2601. }, {
  2602. index: 4,
  2603. opacity: 0.9
  2604. }, {
  2605. index: 3,
  2606. opacity: 0.95
  2607. }, {
  2608. index: 2,
  2609. opacity: 0.97
  2610. }, {
  2611. index: 1,
  2612. opacity: 0.98
  2613. }];
  2614. function y8(t) {
  2615. var e = t.r, n = t.g, r = t.b, i = p2(e, n, r);
  2616. return {
  2617. h: i.h * 360,
  2618. s: i.s,
  2619. v: i.v
  2620. };
  2621. }
  2622. function Oy(t) {
  2623. var e = t.r, n = t.g, r = t.b;
  2624. return "#".concat(v2(e, n, r, !1));
  2625. }
  2626. function ife(t, e, n) {
  2627. var r = n / 100, i = {
  2628. r: (e.r - t.r) * r + t.r,
  2629. g: (e.g - t.g) * r + t.g,
  2630. b: (e.b - t.b) * r + t.b
  2631. };
  2632. return i;
  2633. }
  2634. function b8(t, e, n) {
  2635. var r;
  2636. return Math.round(t.h) >= 60 && Math.round(t.h) <= 240 ? r = n ? Math.round(t.h) - _y * e : Math.round(t.h) + _y * e : r = n ? Math.round(t.h) + _y * e : Math.round(t.h) - _y * e, r < 0 ? r += 360 : r >= 360 && (r -= 360), r;
  2637. }
  2638. function _8(t, e, n) {
  2639. if (t.h === 0 && t.s === 0)
  2640. return t.s;
  2641. var r;
  2642. return n ? r = t.s - m8 * e : e === Bj ? r = t.s + m8 : r = t.s + efe * e, r > 1 && (r = 1), n && e === Nj && r > 0.1 && (r = 0.1), r < 0.06 && (r = 0.06), Number(r.toFixed(2));
  2643. }
  2644. function O8(t, e, n) {
  2645. var r;
  2646. return n ? r = t.v + tfe * e : r = t.v - nfe * e, r > 1 && (r = 1), Number(r.toFixed(2));
  2647. }
  2648. function df(t) {
  2649. for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], r = Td(t), i = Nj; i > 0; i -= 1) {
  2650. var a = y8(r), o = Oy(Td({
  2651. h: b8(a, i, !0),
  2652. s: _8(a, i, !0),
  2653. v: O8(a, i, !0)
  2654. }));
  2655. n.push(o);
  2656. }
  2657. n.push(Oy(r));
  2658. for (var s = 1; s <= Bj; s += 1) {
  2659. var l = y8(r), u = Oy(Td({
  2660. h: b8(l, s),
  2661. s: _8(l, s),
  2662. v: O8(l, s)
  2663. }));
  2664. n.push(u);
  2665. }
  2666. return e.theme === "dark" ? rfe.map(function(c) {
  2667. var f = c.index, d = c.opacity, h = Oy(ife(Td(e.backgroundColor || "#141414"), Td(n[f]), d * 100));
  2668. return h;
  2669. }) : n;
  2670. }
  2671. var iC = {
  2672. red: "#F5222D",
  2673. volcano: "#FA541C",
  2674. orange: "#FA8C16",
  2675. gold: "#FAAD14",
  2676. yellow: "#FADB14",
  2677. lime: "#A0D911",
  2678. green: "#52C41A",
  2679. cyan: "#13C2C2",
  2680. blue: "#1890FF",
  2681. geekblue: "#2F54EB",
  2682. purple: "#722ED1",
  2683. magenta: "#EB2F96",
  2684. grey: "#666666"
  2685. }, S_ = {}, aC = {};
  2686. Object.keys(iC).forEach(function(t) {
  2687. S_[t] = df(iC[t]), S_[t].primary = S_[t][5], aC[t] = df(iC[t], {
  2688. theme: "dark",
  2689. backgroundColor: "#141414"
  2690. }), aC[t].primary = aC[t][5];
  2691. });
  2692. var afe = S_.blue;
  2693. const ofe = (t) => {
  2694. const {
  2695. controlHeight: e
  2696. } = t;
  2697. return {
  2698. controlHeightSM: e * 0.75,
  2699. controlHeightXS: e * 0.5,
  2700. controlHeightLG: e * 1.25
  2701. };
  2702. };
  2703. function sfe(t) {
  2704. const {
  2705. sizeUnit: e,
  2706. sizeStep: n
  2707. } = t;
  2708. return {
  2709. sizeXXL: e * (n + 8),
  2710. sizeXL: e * (n + 4),
  2711. sizeLG: e * (n + 2),
  2712. sizeMD: e * (n + 1),
  2713. sizeMS: e * n,
  2714. size: e * n,
  2715. sizeSM: e * (n - 1),
  2716. sizeXS: e * (n - 2),
  2717. sizeXXS: e * (n - 3)
  2718. // 4
  2719. };
  2720. }
  2721. const zj = {
  2722. blue: "#1677ff",
  2723. purple: "#722ED1",
  2724. cyan: "#13C2C2",
  2725. green: "#52C41A",
  2726. magenta: "#EB2F96",
  2727. pink: "#eb2f96",
  2728. red: "#F5222D",
  2729. orange: "#FA8C16",
  2730. yellow: "#FADB14",
  2731. volcano: "#FA541C",
  2732. geekblue: "#2F54EB",
  2733. gold: "#FAAD14",
  2734. lime: "#A0D911"
  2735. }, FS = I(I({}, zj), {
  2736. // Color
  2737. colorPrimary: "#1677ff",
  2738. colorSuccess: "#52c41a",
  2739. colorWarning: "#faad14",
  2740. colorError: "#ff4d4f",
  2741. colorInfo: "#1677ff",
  2742. colorTextBase: "",
  2743. colorBgBase: "",
  2744. // Font
  2745. fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
  2746. 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
  2747. 'Noto Color Emoji'`,
  2748. fontSize: 14,
  2749. // Line
  2750. lineWidth: 1,
  2751. lineType: "solid",
  2752. // Motion
  2753. motionUnit: 0.1,
  2754. motionBase: 0,
  2755. motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
  2756. motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
  2757. motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
  2758. motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
  2759. motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
  2760. motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
  2761. motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
  2762. motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
  2763. // Radius
  2764. borderRadius: 6,
  2765. // Size
  2766. sizeUnit: 4,
  2767. sizeStep: 4,
  2768. sizePopupArrow: 16,
  2769. // Control Base
  2770. controlHeight: 32,
  2771. // zIndex
  2772. zIndexBase: 0,
  2773. zIndexPopupBase: 1e3,
  2774. // Image
  2775. opacityImage: 1,
  2776. // Wireframe
  2777. wireframe: !1
  2778. });
  2779. function lfe(t, e) {
  2780. let {
  2781. generateColorPalettes: n,
  2782. generateNeutralColorPalettes: r
  2783. } = e;
  2784. const {
  2785. colorSuccess: i,
  2786. colorWarning: a,
  2787. colorError: o,
  2788. colorInfo: s,
  2789. colorPrimary: l,
  2790. colorBgBase: u,
  2791. colorTextBase: c
  2792. } = t, f = n(l), d = n(i), h = n(a), p = n(o), v = n(s), g = r(u, c);
  2793. return I(I({}, g), {
  2794. colorPrimaryBg: f[1],
  2795. colorPrimaryBgHover: f[2],
  2796. colorPrimaryBorder: f[3],
  2797. colorPrimaryBorderHover: f[4],
  2798. colorPrimaryHover: f[5],
  2799. colorPrimary: f[6],
  2800. colorPrimaryActive: f[7],
  2801. colorPrimaryTextHover: f[8],
  2802. colorPrimaryText: f[9],
  2803. colorPrimaryTextActive: f[10],
  2804. colorSuccessBg: d[1],
  2805. colorSuccessBgHover: d[2],
  2806. colorSuccessBorder: d[3],
  2807. colorSuccessBorderHover: d[4],
  2808. colorSuccessHover: d[4],
  2809. colorSuccess: d[6],
  2810. colorSuccessActive: d[7],
  2811. colorSuccessTextHover: d[8],
  2812. colorSuccessText: d[9],
  2813. colorSuccessTextActive: d[10],
  2814. colorErrorBg: p[1],
  2815. colorErrorBgHover: p[2],
  2816. colorErrorBorder: p[3],
  2817. colorErrorBorderHover: p[4],
  2818. colorErrorHover: p[5],
  2819. colorError: p[6],
  2820. colorErrorActive: p[7],
  2821. colorErrorTextHover: p[8],
  2822. colorErrorText: p[9],
  2823. colorErrorTextActive: p[10],
  2824. colorWarningBg: h[1],
  2825. colorWarningBgHover: h[2],
  2826. colorWarningBorder: h[3],
  2827. colorWarningBorderHover: h[4],
  2828. colorWarningHover: h[4],
  2829. colorWarning: h[6],
  2830. colorWarningActive: h[7],
  2831. colorWarningTextHover: h[8],
  2832. colorWarningText: h[9],
  2833. colorWarningTextActive: h[10],
  2834. colorInfoBg: v[1],
  2835. colorInfoBgHover: v[2],
  2836. colorInfoBorder: v[3],
  2837. colorInfoBorderHover: v[4],
  2838. colorInfoHover: v[4],
  2839. colorInfo: v[6],
  2840. colorInfoActive: v[7],
  2841. colorInfoTextHover: v[8],
  2842. colorInfoText: v[9],
  2843. colorInfoTextActive: v[10],
  2844. colorBgMask: new en("#000").setAlpha(0.45).toRgbString(),
  2845. colorWhite: "#fff"
  2846. });
  2847. }
  2848. const ufe = (t) => {
  2849. let e = t, n = t, r = t, i = t;
  2850. 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), {
  2851. borderRadius: t > 16 ? 16 : t,
  2852. borderRadiusXS: r,
  2853. borderRadiusSM: n,
  2854. borderRadiusLG: e,
  2855. borderRadiusOuter: i
  2856. };
  2857. };
  2858. function cfe(t) {
  2859. const {
  2860. motionUnit: e,
  2861. motionBase: n,
  2862. borderRadius: r,
  2863. lineWidth: i
  2864. } = t;
  2865. return I({
  2866. // motion
  2867. motionDurationFast: `${(n + e).toFixed(1)}s`,
  2868. motionDurationMid: `${(n + e * 2).toFixed(1)}s`,
  2869. motionDurationSlow: `${(n + e * 3).toFixed(1)}s`,
  2870. // line
  2871. lineWidthBold: i + 1
  2872. }, ufe(r));
  2873. }
  2874. const gs = (t, e) => new en(t).setAlpha(e).toRgbString(), Up = (t, e) => new en(t).darken(e).toHexString(), ffe = (t) => {
  2875. const e = df(t);
  2876. return {
  2877. 1: e[0],
  2878. 2: e[1],
  2879. 3: e[2],
  2880. 4: e[3],
  2881. 5: e[4],
  2882. 6: e[5],
  2883. 7: e[6],
  2884. 8: e[4],
  2885. 9: e[5],
  2886. 10: e[6]
  2887. // 8: colors[7],
  2888. // 9: colors[8],
  2889. // 10: colors[9],
  2890. };
  2891. }, dfe = (t, e) => {
  2892. const n = t || "#fff", r = e || "#000";
  2893. return {
  2894. colorBgBase: n,
  2895. colorTextBase: r,
  2896. colorText: gs(r, 0.88),
  2897. colorTextSecondary: gs(r, 0.65),
  2898. colorTextTertiary: gs(r, 0.45),
  2899. colorTextQuaternary: gs(r, 0.25),
  2900. colorFill: gs(r, 0.15),
  2901. colorFillSecondary: gs(r, 0.06),
  2902. colorFillTertiary: gs(r, 0.04),
  2903. colorFillQuaternary: gs(r, 0.02),
  2904. colorBgLayout: Up(n, 4),
  2905. colorBgContainer: Up(n, 0),
  2906. colorBgElevated: Up(n, 0),
  2907. colorBgSpotlight: gs(r, 0.85),
  2908. colorBorder: Up(n, 15),
  2909. colorBorderSecondary: Up(n, 6)
  2910. };
  2911. };
  2912. function hfe(t) {
  2913. const e = new Array(10).fill(null).map((n, r) => {
  2914. const i = r - 1, a = t * Math.pow(2.71828, i / 5), o = r > 1 ? Math.floor(a) : Math.ceil(a);
  2915. return Math.floor(o / 2) * 2;
  2916. });
  2917. return e[1] = t, e.map((n) => {
  2918. const r = n + 8;
  2919. return {
  2920. size: n,
  2921. lineHeight: r / n
  2922. };
  2923. });
  2924. }
  2925. const pfe = (t) => {
  2926. const e = hfe(t), n = e.map((i) => i.size), r = e.map((i) => i.lineHeight);
  2927. return {
  2928. fontSizeSM: n[0],
  2929. fontSize: n[1],
  2930. fontSizeLG: n[2],
  2931. fontSizeXL: n[3],
  2932. fontSizeHeading1: n[6],
  2933. fontSizeHeading2: n[5],
  2934. fontSizeHeading3: n[4],
  2935. fontSizeHeading4: n[3],
  2936. fontSizeHeading5: n[2],
  2937. lineHeight: r[1],
  2938. lineHeightLG: r[2],
  2939. lineHeightSM: r[0],
  2940. lineHeightHeading1: r[6],
  2941. lineHeightHeading2: r[5],
  2942. lineHeightHeading3: r[4],
  2943. lineHeightHeading4: r[3],
  2944. lineHeightHeading5: r[2]
  2945. };
  2946. };
  2947. function vfe(t) {
  2948. const e = Object.keys(zj).map((n) => {
  2949. const r = df(t[n]);
  2950. return new Array(10).fill(1).reduce((i, a, o) => (i[`${n}-${o + 1}`] = r[o], i), {});
  2951. }).reduce((n, r) => (n = I(I({}, n), r), n), {});
  2952. return I(I(I(I(I(I(I({}, t), e), lfe(t, {
  2953. generateColorPalettes: ffe,
  2954. generateNeutralColorPalettes: dfe
  2955. })), pfe(t.fontSize)), sfe(t)), ofe(t)), cfe(t));
  2956. }
  2957. function oC(t) {
  2958. return t >= 0 && t <= 255;
  2959. }
  2960. function Sy(t, e) {
  2961. const {
  2962. r: n,
  2963. g: r,
  2964. b: i,
  2965. a
  2966. } = new en(t).toRgb();
  2967. if (a < 1)
  2968. return t;
  2969. const {
  2970. r: o,
  2971. g: s,
  2972. b: l
  2973. } = new en(e).toRgb();
  2974. for (let u = 0.01; u <= 1; u += 0.01) {
  2975. 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);
  2976. if (oC(c) && oC(f) && oC(d))
  2977. return new en({
  2978. r: c,
  2979. g: f,
  2980. b: d,
  2981. a: Math.round(u * 100) / 100
  2982. }).toRgbString();
  2983. }
  2984. return new en({
  2985. r: n,
  2986. g: r,
  2987. b: i,
  2988. a: 1
  2989. }).toRgbString();
  2990. }
  2991. var gfe = function(t, e) {
  2992. var n = {};
  2993. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  2994. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  2995. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  2996. return n;
  2997. };
  2998. function mfe(t) {
  2999. const {
  3000. override: e
  3001. } = t, n = gfe(t, ["override"]), r = I({}, e);
  3002. Object.keys(FS).forEach((h) => {
  3003. delete r[h];
  3004. });
  3005. const i = I(I({}, n), r), a = 480, o = 576, s = 768, l = 992, u = 1200, c = 1600, f = 2e3;
  3006. return I(I(I({}, i), {
  3007. colorLink: i.colorInfoText,
  3008. colorLinkHover: i.colorInfoHover,
  3009. colorLinkActive: i.colorInfoActive,
  3010. // ============== Background ============== //
  3011. colorFillContent: i.colorFillSecondary,
  3012. colorFillContentHover: i.colorFill,
  3013. colorFillAlter: i.colorFillQuaternary,
  3014. colorBgContainerDisabled: i.colorFillTertiary,
  3015. // ============== Split ============== //
  3016. colorBorderBg: i.colorBgContainer,
  3017. colorSplit: Sy(i.colorBorderSecondary, i.colorBgContainer),
  3018. // ============== Text ============== //
  3019. colorTextPlaceholder: i.colorTextQuaternary,
  3020. colorTextDisabled: i.colorTextQuaternary,
  3021. colorTextHeading: i.colorText,
  3022. colorTextLabel: i.colorTextSecondary,
  3023. colorTextDescription: i.colorTextTertiary,
  3024. colorTextLightSolid: i.colorWhite,
  3025. colorHighlight: i.colorError,
  3026. colorBgTextHover: i.colorFillSecondary,
  3027. colorBgTextActive: i.colorFill,
  3028. colorIcon: i.colorTextTertiary,
  3029. colorIconHover: i.colorText,
  3030. colorErrorOutline: Sy(i.colorErrorBg, i.colorBgContainer),
  3031. colorWarningOutline: Sy(i.colorWarningBg, i.colorBgContainer),
  3032. // Font
  3033. fontSizeIcon: i.fontSizeSM,
  3034. // Control
  3035. lineWidth: i.lineWidth,
  3036. controlOutlineWidth: i.lineWidth * 2,
  3037. // Checkbox size and expand icon size
  3038. controlInteractiveSize: i.controlHeight / 2,
  3039. controlItemBgHover: i.colorFillTertiary,
  3040. controlItemBgActive: i.colorPrimaryBg,
  3041. controlItemBgActiveHover: i.colorPrimaryBgHover,
  3042. controlItemBgActiveDisabled: i.colorFill,
  3043. controlTmpOutline: i.colorFillQuaternary,
  3044. controlOutline: Sy(i.colorPrimaryBg, i.colorBgContainer),
  3045. lineType: i.lineType,
  3046. borderRadius: i.borderRadius,
  3047. borderRadiusXS: i.borderRadiusXS,
  3048. borderRadiusSM: i.borderRadiusSM,
  3049. borderRadiusLG: i.borderRadiusLG,
  3050. fontWeightStrong: 600,
  3051. opacityLoading: 0.65,
  3052. linkDecoration: "none",
  3053. linkHoverDecoration: "none",
  3054. linkFocusDecoration: "none",
  3055. controlPaddingHorizontal: 12,
  3056. controlPaddingHorizontalSM: 8,
  3057. paddingXXS: i.sizeXXS,
  3058. paddingXS: i.sizeXS,
  3059. paddingSM: i.sizeSM,
  3060. padding: i.size,
  3061. paddingMD: i.sizeMD,
  3062. paddingLG: i.sizeLG,
  3063. paddingXL: i.sizeXL,
  3064. paddingContentHorizontalLG: i.sizeLG,
  3065. paddingContentVerticalLG: i.sizeMS,
  3066. paddingContentHorizontal: i.sizeMS,
  3067. paddingContentVertical: i.sizeSM,
  3068. paddingContentHorizontalSM: i.size,
  3069. paddingContentVerticalSM: i.sizeXS,
  3070. marginXXS: i.sizeXXS,
  3071. marginXS: i.sizeXS,
  3072. marginSM: i.sizeSM,
  3073. margin: i.size,
  3074. marginMD: i.sizeMD,
  3075. marginLG: i.sizeLG,
  3076. marginXL: i.sizeXL,
  3077. marginXXL: i.sizeXXL,
  3078. boxShadow: `
  3079. 0 1px 2px 0 rgba(0, 0, 0, 0.03),
  3080. 0 1px 6px -1px rgba(0, 0, 0, 0.02),
  3081. 0 2px 4px 0 rgba(0, 0, 0, 0.02)
  3082. `,
  3083. boxShadowSecondary: `
  3084. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  3085. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  3086. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  3087. `,
  3088. boxShadowTertiary: `
  3089. 0 1px 2px 0 rgba(0, 0, 0, 0.03),
  3090. 0 1px 6px -1px rgba(0, 0, 0, 0.02),
  3091. 0 2px 4px 0 rgba(0, 0, 0, 0.02)
  3092. `,
  3093. screenXS: a,
  3094. screenXSMin: a,
  3095. screenXSMax: o - 1,
  3096. screenSM: o,
  3097. screenSMMin: o,
  3098. screenSMMax: s - 1,
  3099. screenMD: s,
  3100. screenMDMin: s,
  3101. screenMDMax: l - 1,
  3102. screenLG: l,
  3103. screenLGMin: l,
  3104. screenLGMax: u - 1,
  3105. screenXL: u,
  3106. screenXLMin: u,
  3107. screenXLMax: c - 1,
  3108. screenXXL: c,
  3109. screenXXLMin: c,
  3110. screenXXLMax: f - 1,
  3111. screenXXXL: f,
  3112. screenXXXLMin: f,
  3113. // FIXME: component box-shadow, should be removed
  3114. boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
  3115. boxShadowCard: `
  3116. 0 1px 2px -2px ${new en("rgba(0, 0, 0, 0.16)").toRgbString()},
  3117. 0 3px 6px 0 ${new en("rgba(0, 0, 0, 0.12)").toRgbString()},
  3118. 0 5px 12px 4px ${new en("rgba(0, 0, 0, 0.09)").toRgbString()}
  3119. `,
  3120. boxShadowDrawerRight: `
  3121. -6px 0 16px 0 rgba(0, 0, 0, 0.08),
  3122. -3px 0 6px -4px rgba(0, 0, 0, 0.12),
  3123. -9px 0 28px 8px rgba(0, 0, 0, 0.05)
  3124. `,
  3125. boxShadowDrawerLeft: `
  3126. 6px 0 16px 0 rgba(0, 0, 0, 0.08),
  3127. 3px 0 6px -4px rgba(0, 0, 0, 0.12),
  3128. 9px 0 28px 8px rgba(0, 0, 0, 0.05)
  3129. `,
  3130. boxShadowDrawerUp: `
  3131. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  3132. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  3133. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  3134. `,
  3135. boxShadowDrawerDown: `
  3136. 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
  3137. 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
  3138. 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
  3139. `,
  3140. boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
  3141. boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
  3142. boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
  3143. boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
  3144. }), r);
  3145. }
  3146. const yfe = (t, e, n, r, i) => {
  3147. 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), b = n * (Math.sqrt(2) - 1);
  3148. return {
  3149. pointerEvents: "none",
  3150. width: t,
  3151. height: t,
  3152. overflow: "hidden",
  3153. "&::after": {
  3154. content: '""',
  3155. position: "absolute",
  3156. width: y,
  3157. height: y,
  3158. bottom: 0,
  3159. insetInline: 0,
  3160. margin: "auto",
  3161. borderRadius: {
  3162. _skip_check_: !0,
  3163. value: `0 0 ${e}px 0`
  3164. },
  3165. transform: "translateY(50%) rotate(-135deg)",
  3166. boxShadow: i,
  3167. zIndex: 0,
  3168. background: "transparent"
  3169. },
  3170. "&::before": {
  3171. position: "absolute",
  3172. bottom: 0,
  3173. insetInlineStart: 0,
  3174. width: t,
  3175. height: t / 2,
  3176. background: r,
  3177. clipPath: {
  3178. _multi_value_: !0,
  3179. value: [`polygon(${b}px 100%, 50% ${b}px, ${2 * a - b}px 100%, ${b}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')`]
  3180. },
  3181. content: '""'
  3182. }
  3183. };
  3184. };
  3185. function bfe(t, e) {
  3186. return O1.reduce((n, r) => {
  3187. const i = t[`${r}-1`], a = t[`${r}-3`], o = t[`${r}-6`], s = t[`${r}-7`];
  3188. return I(I({}, n), e(r, {
  3189. lightColor: i,
  3190. lightBorderColor: a,
  3191. darkColor: o,
  3192. textColor: s
  3193. }));
  3194. }, {});
  3195. }
  3196. const Sh = {
  3197. overflow: "hidden",
  3198. whiteSpace: "nowrap",
  3199. textOverflow: "ellipsis"
  3200. }, nn = (t) => ({
  3201. boxSizing: "border-box",
  3202. margin: 0,
  3203. padding: 0,
  3204. color: t.colorText,
  3205. fontSize: t.fontSize,
  3206. // font-variant: @font-variant-base;
  3207. lineHeight: t.lineHeight,
  3208. listStyle: "none",
  3209. // font-feature-settings: @font-feature-settings-base;
  3210. fontFamily: t.fontFamily
  3211. }), up = () => ({
  3212. display: "inline-flex",
  3213. alignItems: "center",
  3214. color: "inherit",
  3215. fontStyle: "normal",
  3216. lineHeight: 0,
  3217. textAlign: "center",
  3218. textTransform: "none",
  3219. // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  3220. verticalAlign: "-0.125em",
  3221. textRendering: "optimizeLegibility",
  3222. "-webkit-font-smoothing": "antialiased",
  3223. "-moz-osx-font-smoothing": "grayscale",
  3224. "> *": {
  3225. lineHeight: 1
  3226. },
  3227. svg: {
  3228. display: "inline-block"
  3229. }
  3230. }), S1 = () => ({
  3231. // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  3232. "&::before": {
  3233. display: "table",
  3234. content: '""'
  3235. },
  3236. "&::after": {
  3237. // https://github.com/ant-design/ant-design/issues/21864
  3238. display: "table",
  3239. clear: "both",
  3240. content: '""'
  3241. }
  3242. }), _fe = (t) => ({
  3243. a: {
  3244. color: t.colorLink,
  3245. textDecoration: t.linkDecoration,
  3246. backgroundColor: "transparent",
  3247. outline: "none",
  3248. cursor: "pointer",
  3249. transition: `color ${t.motionDurationSlow}`,
  3250. "-webkit-text-decoration-skip": "objects",
  3251. "&:hover": {
  3252. color: t.colorLinkHover
  3253. },
  3254. "&:active": {
  3255. color: t.colorLinkActive
  3256. },
  3257. "&:active,\n &:hover": {
  3258. textDecoration: t.linkHoverDecoration,
  3259. outline: 0
  3260. },
  3261. // https://github.com/ant-design/ant-design/issues/22503
  3262. "&:focus": {
  3263. textDecoration: t.linkFocusDecoration,
  3264. outline: 0
  3265. },
  3266. "&[disabled]": {
  3267. color: t.colorTextDisabled,
  3268. cursor: "not-allowed"
  3269. }
  3270. }
  3271. }), Ofe = (t, e) => {
  3272. const {
  3273. fontFamily: n,
  3274. fontSize: r
  3275. } = t, i = `[class^="${e}"], [class*=" ${e}"]`;
  3276. return {
  3277. [i]: {
  3278. fontFamily: n,
  3279. fontSize: r,
  3280. boxSizing: "border-box",
  3281. "&::before, &::after": {
  3282. boxSizing: "border-box"
  3283. },
  3284. [i]: {
  3285. boxSizing: "border-box",
  3286. "&::before, &::after": {
  3287. boxSizing: "border-box"
  3288. }
  3289. }
  3290. }
  3291. };
  3292. }, h0 = (t) => ({
  3293. outline: `${t.lineWidthBold}px solid ${t.colorPrimaryBorder}`,
  3294. outlineOffset: 1,
  3295. transition: "outline-offset 0s, outline 0s"
  3296. }), WS = (t) => ({
  3297. "&:focus-visible": I({}, h0(t))
  3298. });
  3299. function Sn(t, e, n) {
  3300. return (r) => {
  3301. const i = L(() => r == null ? void 0 : r.value), [a, o, s] = cp(), {
  3302. getPrefixCls: l,
  3303. iconPrefixCls: u
  3304. } = kS(), c = L(() => l()), f = L(() => ({
  3305. theme: a.value,
  3306. token: o.value,
  3307. hashId: s.value,
  3308. path: ["Shared", c.value]
  3309. }));
  3310. h2(f, () => [{
  3311. // Link
  3312. "&": _fe(o.value)
  3313. }]);
  3314. const d = L(() => ({
  3315. theme: a.value,
  3316. token: o.value,
  3317. hashId: s.value,
  3318. path: [t, i.value, u.value]
  3319. }));
  3320. return [h2(d, () => {
  3321. const {
  3322. token: h,
  3323. flush: p
  3324. } = xfe(o.value), v = typeof n == "function" ? n(h) : n, g = I(I({}, v), o.value[t]), m = `.${i.value}`, y = Bt(h, {
  3325. componentCls: m,
  3326. prefixCls: i.value,
  3327. iconCls: `.${u.value}`,
  3328. antCls: `.${c.value}`
  3329. }, g), b = e(y, {
  3330. hashId: s.value,
  3331. prefixCls: i.value,
  3332. rootPrefixCls: c.value,
  3333. iconPrefixCls: u.value,
  3334. overrideComponentToken: o.value[t]
  3335. });
  3336. return p(t, g), [Ofe(o.value, i.value), b];
  3337. }), s];
  3338. };
  3339. }
  3340. const Vj = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
  3341. let m2 = !0;
  3342. function Bt() {
  3343. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  3344. e[n] = arguments[n];
  3345. if (!Vj)
  3346. return I({}, ...e);
  3347. m2 = !1;
  3348. const r = {};
  3349. return e.forEach((i) => {
  3350. Object.keys(i).forEach((o) => {
  3351. Object.defineProperty(r, o, {
  3352. configurable: !0,
  3353. enumerable: !0,
  3354. get: () => i[o]
  3355. });
  3356. });
  3357. }), m2 = !0, r;
  3358. }
  3359. function Sfe() {
  3360. }
  3361. function xfe(t) {
  3362. let e, n = t, r = Sfe;
  3363. return Vj && (e = /* @__PURE__ */ new Set(), n = new Proxy(t, {
  3364. get(i, a) {
  3365. return m2 && e.add(a), i[a];
  3366. }
  3367. }), r = (i, a) => {
  3368. Array.from(e);
  3369. }), {
  3370. token: n,
  3371. keys: e,
  3372. flush: r
  3373. };
  3374. }
  3375. const wfe = wj(vfe), Fj = {
  3376. token: FS,
  3377. hashed: !0
  3378. }, Wj = Symbol("DesignTokenContext"), y2 = ae(), Cfe = (t) => {
  3379. pt(Wj, t), se(t, () => {
  3380. y2.value = z(t), Vle(y2);
  3381. }, {
  3382. immediate: !0,
  3383. deep: !0
  3384. });
  3385. }, Tfe = te({
  3386. props: {
  3387. value: $t()
  3388. },
  3389. setup(t, e) {
  3390. let {
  3391. slots: n
  3392. } = e;
  3393. return Cfe(L(() => t.value)), () => {
  3394. var r;
  3395. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  3396. };
  3397. }
  3398. });
  3399. function cp() {
  3400. const t = Ge(Wj, L(() => y2.value || Fj)), e = L(() => `${Wce}-${t.value.hashed || ""}`), n = L(() => t.value.theme || wfe), r = vce(n, L(() => [FS, t.value.token]), L(() => ({
  3401. salt: e.value,
  3402. override: I({
  3403. override: t.value.token
  3404. }, t.value.components),
  3405. formatToken: mfe
  3406. })));
  3407. return [n, L(() => r.value[0]), L(() => t.value.hashed ? r.value[1] : "")];
  3408. }
  3409. const Qj = te({
  3410. compatConfig: {
  3411. MODE: 3
  3412. },
  3413. setup() {
  3414. const [, t] = cp(), e = L(() => new en(t.value.colorBgBase).toHsl().l < 0.5 ? {
  3415. opacity: 0.65
  3416. } : {});
  3417. return () => M("svg", {
  3418. style: e.value,
  3419. width: "184",
  3420. height: "152",
  3421. viewBox: "0 0 184 152",
  3422. xmlns: "http://www.w3.org/2000/svg"
  3423. }, [M("g", {
  3424. fill: "none",
  3425. "fill-rule": "evenodd"
  3426. }, [M("g", {
  3427. transform: "translate(24 31.67)"
  3428. }, [M("ellipse", {
  3429. "fill-opacity": ".8",
  3430. fill: "#F5F5F7",
  3431. cx: "67.797",
  3432. cy: "106.89",
  3433. rx: "67.797",
  3434. ry: "12.668"
  3435. }, null), M("path", {
  3436. 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",
  3437. fill: "#AEB8C2"
  3438. }, null), M("path", {
  3439. 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",
  3440. fill: "url(#linearGradient-1)",
  3441. transform: "translate(13.56)"
  3442. }, null), M("path", {
  3443. 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",
  3444. fill: "#F5F5F7"
  3445. }, null), M("path", {
  3446. 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",
  3447. fill: "#DCE0E6"
  3448. }, null)]), M("path", {
  3449. 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",
  3450. fill: "#DCE0E6"
  3451. }, null), M("g", {
  3452. transform: "translate(149.65 15.383)",
  3453. fill: "#FFF"
  3454. }, [M("ellipse", {
  3455. cx: "20.654",
  3456. cy: "3.167",
  3457. rx: "2.849",
  3458. ry: "2.815"
  3459. }, null), M("path", {
  3460. d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
  3461. }, null)])])]);
  3462. }
  3463. });
  3464. Qj.PRESENTED_IMAGE_DEFAULT = !0;
  3465. const Hj = te({
  3466. compatConfig: {
  3467. MODE: 3
  3468. },
  3469. setup() {
  3470. const [, t] = cp(), e = L(() => {
  3471. const {
  3472. colorFill: n,
  3473. colorFillTertiary: r,
  3474. colorFillQuaternary: i,
  3475. colorBgContainer: a
  3476. } = t.value;
  3477. return {
  3478. borderColor: new en(n).onBackground(a).toHexString(),
  3479. shadowColor: new en(r).onBackground(a).toHexString(),
  3480. contentColor: new en(i).onBackground(a).toHexString()
  3481. };
  3482. });
  3483. return () => M("svg", {
  3484. width: "64",
  3485. height: "41",
  3486. viewBox: "0 0 64 41",
  3487. xmlns: "http://www.w3.org/2000/svg"
  3488. }, [M("g", {
  3489. transform: "translate(0 1)",
  3490. fill: "none",
  3491. "fill-rule": "evenodd"
  3492. }, [M("ellipse", {
  3493. fill: e.value.shadowColor,
  3494. cx: "32",
  3495. cy: "33",
  3496. rx: "32",
  3497. ry: "7"
  3498. }, null), M("g", {
  3499. "fill-rule": "nonzero",
  3500. stroke: e.value.borderColor
  3501. }, [M("path", {
  3502. 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"
  3503. }, null), M("path", {
  3504. 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",
  3505. fill: e.value.contentColor
  3506. }, null)])])]);
  3507. }
  3508. });
  3509. Hj.PRESENTED_IMAGE_SIMPLE = !0;
  3510. const Pfe = (t) => {
  3511. const {
  3512. componentCls: e,
  3513. margin: n,
  3514. marginXS: r,
  3515. marginXL: i,
  3516. fontSize: a,
  3517. lineHeight: o
  3518. } = t;
  3519. return {
  3520. [e]: {
  3521. marginInline: r,
  3522. fontSize: a,
  3523. lineHeight: o,
  3524. textAlign: "center",
  3525. // 原来 &-image 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
  3526. [`${e}-image`]: {
  3527. height: t.emptyImgHeight,
  3528. marginBottom: r,
  3529. opacity: t.opacityImage,
  3530. img: {
  3531. height: "100%"
  3532. },
  3533. svg: {
  3534. height: "100%",
  3535. margin: "auto"
  3536. }
  3537. },
  3538. // 原来 &-footer 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
  3539. [`${e}-footer`]: {
  3540. marginTop: n
  3541. },
  3542. "&-normal": {
  3543. marginBlock: i,
  3544. color: t.colorTextDisabled,
  3545. [`${e}-image`]: {
  3546. height: t.emptyImgHeightMD
  3547. }
  3548. },
  3549. "&-small": {
  3550. marginBlock: r,
  3551. color: t.colorTextDisabled,
  3552. [`${e}-image`]: {
  3553. height: t.emptyImgHeightSM
  3554. }
  3555. }
  3556. }
  3557. };
  3558. }, $fe = Sn("Empty", (t) => {
  3559. const {
  3560. componentCls: e,
  3561. controlHeightLG: n
  3562. } = t, r = Bt(t, {
  3563. emptyImgCls: `${e}-img`,
  3564. emptyImgHeight: n * 2.5,
  3565. emptyImgHeightMD: n,
  3566. emptyImgHeightSM: n * 0.875
  3567. });
  3568. return [Pfe(r)];
  3569. });
  3570. var Afe = function(t, e) {
  3571. var n = {};
  3572. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  3573. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  3574. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  3575. return n;
  3576. };
  3577. const Gj = M(Qj, null, null), jj = M(Hj, null, null), Efe = () => ({
  3578. prefixCls: String,
  3579. imageStyle: $t(),
  3580. image: ha(),
  3581. description: ha()
  3582. }), cI = te({
  3583. name: "AEmpty",
  3584. compatConfig: {
  3585. MODE: 3
  3586. },
  3587. inheritAttrs: !1,
  3588. props: Efe(),
  3589. setup(t, e) {
  3590. let {
  3591. slots: n = {},
  3592. attrs: r
  3593. } = e;
  3594. const {
  3595. direction: i,
  3596. prefixCls: a
  3597. } = It("empty", t), [o, s] = $fe(a);
  3598. return () => {
  3599. var l, u;
  3600. const c = a.value, f = I(I({}, t), r), {
  3601. image: d = ((l = n.image) === null || l === void 0 ? void 0 : l.call(n)) || Gj,
  3602. description: h = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
  3603. imageStyle: p,
  3604. class: v = ""
  3605. } = f, g = Afe(f, ["image", "description", "imageStyle", "class"]);
  3606. return o(M(hj, {
  3607. componentName: "Empty",
  3608. children: (m) => {
  3609. const y = typeof h < "u" ? h : m.description, b = typeof y == "string" ? y : "empty";
  3610. let _ = null;
  3611. return typeof d == "string" ? _ = M("img", {
  3612. alt: b,
  3613. src: d
  3614. }, null) : _ = d, M("div", j({
  3615. class: ye(c, v, s.value, {
  3616. [`${c}-normal`]: d === jj,
  3617. [`${c}-rtl`]: i.value === "rtl"
  3618. })
  3619. }, g), [M("div", {
  3620. class: `${c}-image`,
  3621. style: p
  3622. }, [_]), y && M("p", {
  3623. class: `${c}-description`
  3624. }, [y]), n.default && M("div", {
  3625. class: `${c}-footer`
  3626. }, [ss(n.default())])]);
  3627. }
  3628. }, null));
  3629. };
  3630. }
  3631. });
  3632. cI.PRESENTED_IMAGE_DEFAULT = Gj;
  3633. cI.PRESENTED_IMAGE_SIMPLE = jj;
  3634. const Xp = sp(cI), fI = (t) => {
  3635. const {
  3636. prefixCls: e
  3637. } = It("empty", t);
  3638. return ((r) => {
  3639. switch (r) {
  3640. case "Table":
  3641. case "List":
  3642. return M(Xp, {
  3643. image: Xp.PRESENTED_IMAGE_SIMPLE
  3644. }, null);
  3645. case "Select":
  3646. case "TreeSelect":
  3647. case "Cascader":
  3648. case "Transfer":
  3649. case "Mentions":
  3650. return M(Xp, {
  3651. image: Xp.PRESENTED_IMAGE_SIMPLE,
  3652. class: `${e.value}-small`
  3653. }, null);
  3654. default:
  3655. return M(Xp, null, null);
  3656. }
  3657. })(t.componentName);
  3658. };
  3659. function Mfe(t) {
  3660. return M(fI, {
  3661. componentName: t
  3662. }, null);
  3663. }
  3664. const Zj = Symbol("SizeContextKey"), Uj = () => Ge(Zj, U(void 0)), Xj = (t) => {
  3665. const e = Uj();
  3666. return pt(Zj, L(() => t.value || e.value)), t;
  3667. }, It = (t, e) => {
  3668. const n = Uj(), r = Jo(), i = Ge(oI, I(I({}, uj), {
  3669. renderEmpty: (x) => qg(fI, {
  3670. componentName: x
  3671. })
  3672. })), a = L(() => i.getPrefixCls(t, e.prefixCls)), o = L(() => {
  3673. var x, C;
  3674. return (x = e.direction) !== null && x !== void 0 ? x : (C = i.direction) === null || C === void 0 ? void 0 : C.value;
  3675. }), s = L(() => {
  3676. var x;
  3677. return (x = e.iconPrefixCls) !== null && x !== void 0 ? x : i.iconPrefixCls.value;
  3678. }), l = L(() => i.getPrefixCls()), u = L(() => {
  3679. var x;
  3680. return (x = i.autoInsertSpaceInButton) === null || x === void 0 ? void 0 : x.value;
  3681. }), c = i.renderEmpty, f = i.space, d = i.pageHeader, h = i.form, p = L(() => {
  3682. var x, C;
  3683. return (x = e.getTargetContainer) !== null && x !== void 0 ? x : (C = i.getTargetContainer) === null || C === void 0 ? void 0 : C.value;
  3684. }), v = L(() => {
  3685. var x, C, T;
  3686. return (C = (x = e.getContainer) !== null && x !== void 0 ? x : e.getPopupContainer) !== null && C !== void 0 ? C : (T = i.getPopupContainer) === null || T === void 0 ? void 0 : T.value;
  3687. }), g = L(() => {
  3688. var x, C;
  3689. return (x = e.dropdownMatchSelectWidth) !== null && x !== void 0 ? x : (C = i.dropdownMatchSelectWidth) === null || C === void 0 ? void 0 : C.value;
  3690. }), m = L(() => {
  3691. var x;
  3692. return (e.virtual === void 0 ? ((x = i.virtual) === null || x === void 0 ? void 0 : x.value) !== !1 : e.virtual !== !1) && g.value !== !1;
  3693. }), y = L(() => e.size || n.value), b = L(() => {
  3694. var x, C, T;
  3695. return (x = e.autocomplete) !== null && x !== void 0 ? x : (T = (C = i.input) === null || C === void 0 ? void 0 : C.value) === null || T === void 0 ? void 0 : T.autocomplete;
  3696. }), _ = L(() => {
  3697. var x;
  3698. return (x = e.disabled) !== null && x !== void 0 ? x : r.value;
  3699. }), O = L(() => {
  3700. var x;
  3701. return (x = e.csp) !== null && x !== void 0 ? x : i.csp;
  3702. }), S = L(() => {
  3703. var x, C;
  3704. return (x = e.wave) !== null && x !== void 0 ? x : (C = i.wave) === null || C === void 0 ? void 0 : C.value;
  3705. });
  3706. return {
  3707. configProvider: i,
  3708. prefixCls: a,
  3709. direction: o,
  3710. size: y,
  3711. getTargetContainer: p,
  3712. getPopupContainer: v,
  3713. space: f,
  3714. pageHeader: d,
  3715. form: h,
  3716. autoInsertSpaceInButton: u,
  3717. renderEmpty: c,
  3718. virtual: m,
  3719. dropdownMatchSelectWidth: g,
  3720. rootPrefixCls: l,
  3721. getPrefixCls: i.getPrefixCls,
  3722. autocomplete: b,
  3723. csp: O,
  3724. iconPrefixCls: s,
  3725. disabled: _,
  3726. select: i.select,
  3727. wave: S
  3728. };
  3729. };
  3730. function or(t, e) {
  3731. const n = I({}, t);
  3732. for (let r = 0; r < e.length; r += 1) {
  3733. const i = e[r];
  3734. delete n[i];
  3735. }
  3736. return n;
  3737. }
  3738. function S8(t) {
  3739. return typeof t == "object" && t != null && t.nodeType === 1;
  3740. }
  3741. function x8(t, e) {
  3742. return (!e || t !== "hidden") && t !== "visible" && t !== "clip";
  3743. }
  3744. function sC(t, e) {
  3745. if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
  3746. var n = getComputedStyle(t, null);
  3747. return x8(n.overflowY, e) || x8(n.overflowX, e) || function(r) {
  3748. var i = function(a) {
  3749. if (!a.ownerDocument || !a.ownerDocument.defaultView) return null;
  3750. try {
  3751. return a.ownerDocument.defaultView.frameElement;
  3752. } catch {
  3753. return null;
  3754. }
  3755. }(r);
  3756. return !!i && (i.clientHeight < r.scrollHeight || i.clientWidth < r.scrollWidth);
  3757. }(t);
  3758. }
  3759. return !1;
  3760. }
  3761. function xy(t, e, n, r, i, a, o, s) {
  3762. 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;
  3763. }
  3764. var w8 = function(t, e) {
  3765. var n = window, r = e.scrollMode, i = e.block, a = e.inline, o = e.boundary, s = e.skipOverflowHiddenElements, l = typeof o == "function" ? o : function(de) {
  3766. return de !== o;
  3767. };
  3768. if (!S8(t)) throw new TypeError("Invalid target");
  3769. for (var u, c, f = document.scrollingElement || document.documentElement, d = [], h = t; S8(h) && l(h); ) {
  3770. if ((h = (c = (u = h).parentElement) == null ? u.getRootNode().host || null : c) === f) {
  3771. d.push(h);
  3772. break;
  3773. }
  3774. h != null && h === document.body && sC(h) && !sC(document.documentElement) || h != null && sC(h, s) && d.push(h);
  3775. }
  3776. 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(), b = y.height, _ = y.width, O = y.top, S = y.right, x = y.bottom, C = y.left, T = i === "start" || i === "nearest" ? O : i === "end" ? x : O + b / 2, w = a === "center" ? C + _ / 2 : a === "end" ? S : C, P = [], $ = 0; $ < d.length; $++) {
  3777. var A = d[$], D = A.getBoundingClientRect(), E = D.height, R = D.width, N = D.top, V = D.right, B = D.bottom, W = D.left;
  3778. if (r === "if-needed" && O >= 0 && C >= 0 && x <= v && S <= p && O >= N && x <= B && C >= W && S <= V) return P;
  3779. var F = getComputedStyle(A), Q = parseInt(F.borderLeftWidth, 10), Z = parseInt(F.borderTopWidth, 10), ne = parseInt(F.borderRightWidth, 10), ee = parseInt(F.borderBottomWidth, 10), oe = 0, K = 0, ie = "offsetWidth" in A ? A.offsetWidth - A.clientWidth - Q - ne : 0, X = "offsetHeight" in A ? A.offsetHeight - A.clientHeight - Z - ee : 0, H = "offsetWidth" in A ? A.offsetWidth === 0 ? 0 : R / A.offsetWidth : 0, G = "offsetHeight" in A ? A.offsetHeight === 0 ? 0 : E / A.offsetHeight : 0;
  3780. if (f === A) oe = i === "start" ? T : i === "end" ? T - v : i === "nearest" ? xy(m, m + v, v, Z, ee, m + T, m + T + b, b) : T - v / 2, K = a === "start" ? w : a === "center" ? w - p / 2 : a === "end" ? w - p : xy(g, g + p, p, Q, ne, g + w, g + w + _, _), oe = Math.max(0, oe + m), K = Math.max(0, K + g);
  3781. else {
  3782. oe = i === "start" ? T - N - Z : i === "end" ? T - B + ee + X : i === "nearest" ? xy(N, B, E, Z, ee + X, T, T + b, b) : T - (N + E / 2) + X / 2, K = a === "start" ? w - W - Q : a === "center" ? w - (W + R / 2) + ie / 2 : a === "end" ? w - V + ne + ie : xy(W, V, R, Q, ne + ie, w, w + _, _);
  3783. var re = A.scrollLeft, fe = A.scrollTop;
  3784. T += fe - (oe = Math.max(0, Math.min(fe + oe / G, A.scrollHeight - E / G + X))), w += re - (K = Math.max(0, Math.min(re + K / H, A.scrollWidth - R / H + ie)));
  3785. }
  3786. P.push({ el: A, top: oe, left: K });
  3787. }
  3788. return P;
  3789. };
  3790. function Yj(t) {
  3791. return t === Object(t) && Object.keys(t).length !== 0;
  3792. }
  3793. function Ife(t, e) {
  3794. e === void 0 && (e = "auto");
  3795. var n = "scrollBehavior" in document.body.style;
  3796. t.forEach(function(r) {
  3797. var i = r.el, a = r.top, o = r.left;
  3798. i.scroll && n ? i.scroll({
  3799. top: a,
  3800. left: o,
  3801. behavior: e
  3802. }) : (i.scrollTop = a, i.scrollLeft = o);
  3803. });
  3804. }
  3805. function Dfe(t) {
  3806. return t === !1 ? {
  3807. block: "end",
  3808. inline: "nearest"
  3809. } : Yj(t) ? t : {
  3810. block: "start",
  3811. inline: "nearest"
  3812. };
  3813. }
  3814. function Rfe(t, e) {
  3815. var n = t.isConnected || t.ownerDocument.documentElement.contains(t);
  3816. if (Yj(e) && typeof e.behavior == "function")
  3817. return e.behavior(n ? w8(t, e) : []);
  3818. if (n) {
  3819. var r = Dfe(e);
  3820. return Ife(w8(t, r), r.behavior);
  3821. }
  3822. }
  3823. function kfe(t, e) {
  3824. for (var n = 0; n < e.length; n++) {
  3825. var r = e[n];
  3826. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
  3827. }
  3828. }
  3829. function qj(t, e, n) {
  3830. return n && kfe(t, n), t;
  3831. }
  3832. function x_() {
  3833. return (x_ = Object.assign || function(t) {
  3834. for (var e = 1; e < arguments.length; e++) {
  3835. var n = arguments[e];
  3836. for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
  3837. }
  3838. return t;
  3839. }).apply(this, arguments);
  3840. }
  3841. function Kj(t, e) {
  3842. t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
  3843. }
  3844. function Jj(t, e) {
  3845. if (t == null) return {};
  3846. var n, r, i = {}, a = Object.keys(t);
  3847. for (r = 0; r < a.length; r++) e.indexOf(n = a[r]) >= 0 || (i[n] = t[n]);
  3848. return i;
  3849. }
  3850. function C8(t) {
  3851. return ((e = t) != null && typeof e == "object" && Array.isArray(e) === !1) == 1 && Object.prototype.toString.call(t) === "[object Object]";
  3852. var e;
  3853. }
  3854. var eZ = Object.prototype, tZ = eZ.toString, Lfe = eZ.hasOwnProperty, nZ = /^\s*function (\w+)/;
  3855. function T8(t) {
  3856. var e, n = (e = t == null ? void 0 : t.type) !== null && e !== void 0 ? e : t;
  3857. if (n) {
  3858. var r = n.toString().match(nZ);
  3859. return r ? r[1] : "";
  3860. }
  3861. return "";
  3862. }
  3863. var hf = function(t) {
  3864. var e, n;
  3865. return C8(t) !== !1 && typeof (e = t.constructor) == "function" && C8(n = e.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
  3866. }, rZ = function(t) {
  3867. return t;
  3868. }, kr = rZ;
  3869. if (process.env.NODE_ENV !== "production") {
  3870. var Nfe = typeof console < "u";
  3871. kr = Nfe ? function(t) {
  3872. console.warn("[VueTypes warn]: " + t);
  3873. } : rZ;
  3874. }
  3875. var rm = function(t, e) {
  3876. return Lfe.call(t, e);
  3877. }, Bfe = Number.isInteger || function(t) {
  3878. return typeof t == "number" && isFinite(t) && Math.floor(t) === t;
  3879. }, xh = Array.isArray || function(t) {
  3880. return tZ.call(t) === "[object Array]";
  3881. }, wh = function(t) {
  3882. return tZ.call(t) === "[object Function]";
  3883. }, x1 = function(t) {
  3884. return hf(t) && rm(t, "_vueTypes_name");
  3885. }, iZ = function(t) {
  3886. return hf(t) && (rm(t, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(e) {
  3887. return rm(t, e);
  3888. }));
  3889. };
  3890. function dI(t, e) {
  3891. return Object.defineProperty(t.bind(e), "__original", { value: t });
  3892. }
  3893. function Ef(t, e, n) {
  3894. var r;
  3895. n === void 0 && (n = !1);
  3896. var i = !0, a = "";
  3897. r = hf(t) ? t : { type: t };
  3898. var o = x1(r) ? r._vueTypes_name + " - " : "";
  3899. if (iZ(r) && r.type !== null) {
  3900. if (r.type === void 0 || r.type === !0 || !r.required && e === void 0) return i;
  3901. xh(r.type) ? (i = r.type.some(function(f) {
  3902. return Ef(f, e, !0) === !0;
  3903. }), a = r.type.map(function(f) {
  3904. return T8(f);
  3905. }).join(" or ")) : i = (a = T8(r)) === "Array" ? xh(e) : a === "Object" ? hf(e) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(f) {
  3906. if (f == null) return "";
  3907. var d = f.constructor.toString().match(nZ);
  3908. return d ? d[1] : "";
  3909. }(e) === a : e instanceof r.type;
  3910. }
  3911. if (!i) {
  3912. var s = o + 'value "' + e + '" should be of type "' + a + '"';
  3913. return n === !1 ? (kr(s), !1) : s;
  3914. }
  3915. if (rm(r, "validator") && wh(r.validator)) {
  3916. var l = kr, u = [];
  3917. if (kr = function(f) {
  3918. u.push(f);
  3919. }, i = r.validator(e), kr = l, !i) {
  3920. var c = (u.length > 1 ? "* " : "") + u.join(`
  3921. * `);
  3922. return u.length = 0, n === !1 ? (kr(c), i) : c;
  3923. }
  3924. }
  3925. return i;
  3926. }
  3927. function qi(t, e) {
  3928. var n = Object.defineProperties(e, { _vueTypes_name: { value: t, writable: !0 }, isRequired: { get: function() {
  3929. return this.required = !0, this;
  3930. } }, def: { value: function(i) {
  3931. return i !== void 0 || this.default ? wh(i) || Ef(this, i, !0) === !0 ? (this.default = xh(i) ? function() {
  3932. return [].concat(i);
  3933. } : hf(i) ? function() {
  3934. return Object.assign({}, i);
  3935. } : i, this) : (kr(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
  3936. } } }), r = n.validator;
  3937. return wh(r) && (n.validator = dI(r, n)), n;
  3938. }
  3939. function es(t, e) {
  3940. var n = qi(t, e);
  3941. return Object.defineProperty(n, "validate", { value: function(r) {
  3942. return wh(this.validator) && kr(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
  3943. ` + JSON.stringify(this)), this.validator = dI(r, this), this;
  3944. } });
  3945. }
  3946. function P8(t, e, n) {
  3947. var r, i, a = (r = e, i = {}, Object.getOwnPropertyNames(r).forEach(function(f) {
  3948. i[f] = Object.getOwnPropertyDescriptor(r, f);
  3949. }), Object.defineProperties({}, i));
  3950. if (a._vueTypes_name = t, !hf(n)) return a;
  3951. var o, s, l = n.validator, u = Jj(n, ["validator"]);
  3952. if (wh(l)) {
  3953. var c = a.validator;
  3954. c && (c = (s = (o = c).__original) !== null && s !== void 0 ? s : o), a.validator = dI(c ? function(f) {
  3955. return c.call(this, f) && l.call(this, f);
  3956. } : l, a);
  3957. }
  3958. return Object.assign(a, u);
  3959. }
  3960. function QS(t) {
  3961. return t.replace(/^(?!\s*$)/gm, " ");
  3962. }
  3963. var zfe = function() {
  3964. return es("any", {});
  3965. }, Vfe = function() {
  3966. return es("function", { type: Function });
  3967. }, Ffe = function() {
  3968. return es("boolean", { type: Boolean });
  3969. }, Wfe = function() {
  3970. return es("string", { type: String });
  3971. }, Qfe = function() {
  3972. return es("number", { type: Number });
  3973. }, Hfe = function() {
  3974. return es("array", { type: Array });
  3975. }, Gfe = function() {
  3976. return es("object", { type: Object });
  3977. }, jfe = function() {
  3978. return qi("integer", { type: Number, validator: function(t) {
  3979. return Bfe(t);
  3980. } });
  3981. }, Zfe = function() {
  3982. return qi("symbol", { validator: function(t) {
  3983. return typeof t == "symbol";
  3984. } });
  3985. };
  3986. function Ufe(t, e) {
  3987. if (e === void 0 && (e = "custom validation failed"), typeof t != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
  3988. return qi(t.name || "<<anonymous function>>", { validator: function(n) {
  3989. var r = t(n);
  3990. return r || kr(this._vueTypes_name + " - " + e), r;
  3991. } });
  3992. }
  3993. function Xfe(t) {
  3994. if (!xh(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  3995. var e = 'oneOf - value should be one of "' + t.join('", "') + '".', n = t.reduce(function(r, i) {
  3996. if (i != null) {
  3997. var a = i.constructor;
  3998. r.indexOf(a) === -1 && r.push(a);
  3999. }
  4000. return r;
  4001. }, []);
  4002. return qi("oneOf", { type: n.length > 0 ? n : void 0, validator: function(r) {
  4003. var i = t.indexOf(r) !== -1;
  4004. return i || kr(e), i;
  4005. } });
  4006. }
  4007. function Yfe(t) {
  4008. if (!xh(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
  4009. for (var e = !1, n = [], r = 0; r < t.length; r += 1) {
  4010. var i = t[r];
  4011. if (iZ(i)) {
  4012. if (x1(i) && i._vueTypes_name === "oneOf") {
  4013. n = n.concat(i.type);
  4014. continue;
  4015. }
  4016. if (wh(i.validator) && (e = !0), i.type !== !0 && i.type) {
  4017. n = n.concat(i.type);
  4018. continue;
  4019. }
  4020. }
  4021. n.push(i);
  4022. }
  4023. return n = n.filter(function(a, o) {
  4024. return n.indexOf(a) === o;
  4025. }), qi("oneOfType", e ? { type: n, validator: function(a) {
  4026. var o = [], s = t.some(function(l) {
  4027. var u = Ef(x1(l) && l._vueTypes_name === "oneOf" ? l.type || null : l, a, !0);
  4028. return typeof u == "string" && o.push(u), u === !0;
  4029. });
  4030. return s || kr("oneOfType - provided value does not match any of the " + o.length + ` passed-in validators:
  4031. ` + QS(o.join(`
  4032. `))), s;
  4033. } } : { type: n });
  4034. }
  4035. function qfe(t) {
  4036. return qi("arrayOf", { type: Array, validator: function(e) {
  4037. var n, r = e.every(function(i) {
  4038. return (n = Ef(t, i, !0)) === !0;
  4039. });
  4040. return r || kr(`arrayOf - value validation error:
  4041. ` + QS(n)), r;
  4042. } });
  4043. }
  4044. function Kfe(t) {
  4045. return qi("instanceOf", { type: t });
  4046. }
  4047. function Jfe(t) {
  4048. return qi("objectOf", { type: Object, validator: function(e) {
  4049. var n, r = Object.keys(e).every(function(i) {
  4050. return (n = Ef(t, e[i], !0)) === !0;
  4051. });
  4052. return r || kr(`objectOf - value validation error:
  4053. ` + QS(n)), r;
  4054. } });
  4055. }
  4056. function ede(t) {
  4057. var e = Object.keys(t), n = e.filter(function(i) {
  4058. var a;
  4059. return !!(!((a = t[i]) === null || a === void 0) && a.required);
  4060. }), r = qi("shape", { type: Object, validator: function(i) {
  4061. var a = this;
  4062. if (!hf(i)) return !1;
  4063. var o = Object.keys(i);
  4064. if (n.length > 0 && n.some(function(l) {
  4065. return o.indexOf(l) === -1;
  4066. })) {
  4067. var s = n.filter(function(l) {
  4068. return o.indexOf(l) === -1;
  4069. });
  4070. return kr(s.length === 1 ? 'shape - required property "' + s[0] + '" is not defined.' : 'shape - required properties "' + s.join('", "') + '" are not defined.'), !1;
  4071. }
  4072. return o.every(function(l) {
  4073. if (e.indexOf(l) === -1) return a._vueTypes_isLoose === !0 || (kr('shape - shape definition does not include a "' + l + '" property. Allowed keys: "' + e.join('", "') + '".'), !1);
  4074. var u = Ef(t[l], i[l], !0);
  4075. return typeof u == "string" && kr('shape - "' + l + `" property validation error:
  4076. ` + QS(u)), u === !0;
  4077. });
  4078. } });
  4079. return Object.defineProperty(r, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(r, "loose", { get: function() {
  4080. return this._vueTypes_isLoose = !0, this;
  4081. } }), r;
  4082. }
  4083. var $o = function() {
  4084. function t() {
  4085. }
  4086. return t.extend = function(e) {
  4087. var n = this;
  4088. if (xh(e)) return e.forEach(function(f) {
  4089. return n.extend(f);
  4090. }), this;
  4091. var r = e.name, i = e.validate, a = i !== void 0 && i, o = e.getter, s = o !== void 0 && o, l = Jj(e, ["name", "validate", "getter"]);
  4092. if (rm(this, r)) throw new TypeError('[VueTypes error]: Type "' + r + '" already defined');
  4093. var u, c = l.type;
  4094. return x1(c) ? (delete l.type, Object.defineProperty(this, r, s ? { get: function() {
  4095. return P8(r, c, l);
  4096. } } : { value: function() {
  4097. var f, d = P8(r, c, l);
  4098. return d.validator && (d.validator = (f = d.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
  4099. } })) : (u = s ? { get: function() {
  4100. var f = Object.assign({}, l);
  4101. return a ? es(r, f) : qi(r, f);
  4102. }, enumerable: !0 } : { value: function() {
  4103. var f, d, h = Object.assign({}, l);
  4104. return f = a ? es(r, h) : qi(r, h), h.validator && (f.validator = (d = h.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
  4105. }, enumerable: !0 }, Object.defineProperty(this, r, u));
  4106. }, qj(t, null, [{ key: "any", get: function() {
  4107. return zfe();
  4108. } }, { key: "func", get: function() {
  4109. return Vfe().def(this.defaults.func);
  4110. } }, { key: "bool", get: function() {
  4111. return Ffe().def(this.defaults.bool);
  4112. } }, { key: "string", get: function() {
  4113. return Wfe().def(this.defaults.string);
  4114. } }, { key: "number", get: function() {
  4115. return Qfe().def(this.defaults.number);
  4116. } }, { key: "array", get: function() {
  4117. return Hfe().def(this.defaults.array);
  4118. } }, { key: "object", get: function() {
  4119. return Gfe().def(this.defaults.object);
  4120. } }, { key: "integer", get: function() {
  4121. return jfe().def(this.defaults.integer);
  4122. } }, { key: "symbol", get: function() {
  4123. return Zfe();
  4124. } }]), t;
  4125. }();
  4126. function aZ(t) {
  4127. var e;
  4128. return t === void 0 && (t = { func: function() {
  4129. }, bool: !0, string: "", number: 0, array: function() {
  4130. return [];
  4131. }, object: function() {
  4132. return {};
  4133. }, integer: 0 }), (e = function(n) {
  4134. function r() {
  4135. return n.apply(this, arguments) || this;
  4136. }
  4137. return Kj(r, n), qj(r, null, [{ key: "sensibleDefaults", get: function() {
  4138. return x_({}, this.defaults);
  4139. }, set: function(i) {
  4140. this.defaults = i !== !1 ? x_({}, i !== !0 ? i : t) : {};
  4141. } }]), r;
  4142. }($o)).defaults = x_({}, t), e;
  4143. }
  4144. $o.defaults = {}, $o.custom = Ufe, $o.oneOf = Xfe, $o.instanceOf = Kfe, $o.oneOfType = Yfe, $o.arrayOf = qfe, $o.objectOf = Jfe, $o.shape = ede, $o.utils = { validate: function(t, e) {
  4145. return Ef(e, t, !0) === !0;
  4146. }, toType: function(t, e, n) {
  4147. return n === void 0 && (n = !1), n ? es(t, e) : qi(t, e);
  4148. } };
  4149. (function(t) {
  4150. function e() {
  4151. return t.apply(this, arguments) || this;
  4152. }
  4153. return Kj(e, t), e;
  4154. })(aZ());
  4155. const Y = aZ({
  4156. func: void 0,
  4157. bool: void 0,
  4158. string: void 0,
  4159. number: void 0,
  4160. array: void 0,
  4161. object: void 0,
  4162. integer: void 0
  4163. });
  4164. Y.extend([{
  4165. name: "looseBool",
  4166. getter: !0,
  4167. type: Boolean,
  4168. default: void 0
  4169. }, {
  4170. name: "style",
  4171. getter: !0,
  4172. type: [String, Object],
  4173. default: void 0
  4174. }, {
  4175. name: "VueNode",
  4176. getter: !0,
  4177. type: null
  4178. }]);
  4179. function tde(t) {
  4180. return t.default = void 0, t;
  4181. }
  4182. const Gi = (t, e, n) => {
  4183. la(t, `[ant-design-vue: ${e}] ${n}`);
  4184. };
  4185. function $8(t, e) {
  4186. const {
  4187. key: n
  4188. } = t;
  4189. let r;
  4190. return "value" in t && ({
  4191. value: r
  4192. } = t), n ?? (r !== void 0 ? r : `rc-index-key-${e}`);
  4193. }
  4194. function oZ(t, e) {
  4195. const {
  4196. label: n,
  4197. value: r,
  4198. options: i
  4199. } = t || {};
  4200. return {
  4201. label: n || (e ? "children" : "label"),
  4202. value: r || "value",
  4203. options: i || "options"
  4204. };
  4205. }
  4206. function nde(t) {
  4207. let {
  4208. fieldNames: e,
  4209. childrenAsData: n
  4210. } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  4211. const r = [], {
  4212. label: i,
  4213. value: a,
  4214. options: o
  4215. } = oZ(e, !1);
  4216. function s(l, u) {
  4217. l.forEach((c) => {
  4218. const f = c[i];
  4219. if (u || !(o in c)) {
  4220. const d = c[a];
  4221. r.push({
  4222. key: $8(c, r.length),
  4223. groupOption: u,
  4224. data: c,
  4225. label: f,
  4226. value: d
  4227. });
  4228. } else {
  4229. let d = f;
  4230. d === void 0 && n && (d = c.label), r.push({
  4231. key: $8(c, r.length),
  4232. group: !0,
  4233. data: c,
  4234. label: d
  4235. }), s(c[o], !0);
  4236. }
  4237. });
  4238. }
  4239. return s(t, !1), r;
  4240. }
  4241. function b2(t) {
  4242. const e = I({}, t);
  4243. return "props" in e || Object.defineProperty(e, "props", {
  4244. get() {
  4245. return ff(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), e;
  4246. }
  4247. }), e;
  4248. }
  4249. function rde(t, e) {
  4250. if (!e || !e.length)
  4251. return null;
  4252. let n = !1;
  4253. function r(a, o) {
  4254. let [s, ...l] = o;
  4255. if (!s)
  4256. return [a];
  4257. const u = a.split(s);
  4258. return n = n || u.length > 1, u.reduce((c, f) => [...c, ...r(f, l)], []).filter((c) => c);
  4259. }
  4260. const i = r(t, e);
  4261. return n ? i : null;
  4262. }
  4263. function ide() {
  4264. return "";
  4265. }
  4266. function ade(t) {
  4267. return t ? t.ownerDocument : window.document;
  4268. }
  4269. function sZ() {
  4270. }
  4271. const ode = () => ({
  4272. action: Y.oneOfType([Y.string, Y.arrayOf(Y.string)]).def([]),
  4273. showAction: Y.any.def([]),
  4274. hideAction: Y.any.def([]),
  4275. getPopupClassNameFromAlign: Y.any.def(ide),
  4276. onPopupVisibleChange: Function,
  4277. afterPopupVisibleChange: Y.func.def(sZ),
  4278. popup: Y.any,
  4279. arrow: Y.bool.def(!0),
  4280. popupStyle: {
  4281. type: Object,
  4282. default: void 0
  4283. },
  4284. prefixCls: Y.string.def("rc-trigger-popup"),
  4285. popupClassName: Y.string.def(""),
  4286. popupPlacement: String,
  4287. builtinPlacements: Y.object,
  4288. popupTransitionName: String,
  4289. popupAnimation: Y.any,
  4290. mouseEnterDelay: Y.number.def(0),
  4291. mouseLeaveDelay: Y.number.def(0.1),
  4292. zIndex: Number,
  4293. focusDelay: Y.number.def(0),
  4294. blurDelay: Y.number.def(0.15),
  4295. getPopupContainer: Function,
  4296. getDocument: Y.func.def(ade),
  4297. forceRender: {
  4298. type: Boolean,
  4299. default: void 0
  4300. },
  4301. destroyPopupOnHide: {
  4302. type: Boolean,
  4303. default: !1
  4304. },
  4305. mask: {
  4306. type: Boolean,
  4307. default: !1
  4308. },
  4309. maskClosable: {
  4310. type: Boolean,
  4311. default: !0
  4312. },
  4313. // onPopupAlign: PropTypes.func.def(noop),
  4314. popupAlign: Y.object.def(() => ({})),
  4315. popupVisible: {
  4316. type: Boolean,
  4317. default: void 0
  4318. },
  4319. defaultPopupVisible: {
  4320. type: Boolean,
  4321. default: !1
  4322. },
  4323. maskTransitionName: String,
  4324. maskAnimation: String,
  4325. stretch: String,
  4326. alignPoint: {
  4327. type: Boolean,
  4328. default: void 0
  4329. },
  4330. autoDestroy: {
  4331. type: Boolean,
  4332. default: !1
  4333. },
  4334. mobile: Object,
  4335. getTriggerDOMNode: Function
  4336. }), hI = {
  4337. visible: Boolean,
  4338. prefixCls: String,
  4339. zIndex: Number,
  4340. destroyPopupOnHide: Boolean,
  4341. forceRender: Boolean,
  4342. arrow: {
  4343. type: Boolean,
  4344. default: !0
  4345. },
  4346. // Legacy Motion
  4347. animation: [String, Object],
  4348. transitionName: String,
  4349. // Measure
  4350. stretch: {
  4351. type: String
  4352. },
  4353. // Align
  4354. align: {
  4355. type: Object
  4356. },
  4357. point: {
  4358. type: Object
  4359. },
  4360. getRootDomNode: {
  4361. type: Function
  4362. },
  4363. getClassNameFromAlign: {
  4364. type: Function
  4365. },
  4366. onAlign: {
  4367. type: Function
  4368. },
  4369. onMouseenter: {
  4370. type: Function
  4371. },
  4372. onMouseleave: {
  4373. type: Function
  4374. },
  4375. onMousedown: {
  4376. type: Function
  4377. },
  4378. onTouchstart: {
  4379. type: Function
  4380. }
  4381. }, sde = I(I({}, hI), {
  4382. mobile: {
  4383. type: Object
  4384. }
  4385. }), lde = I(I({}, hI), {
  4386. mask: Boolean,
  4387. mobile: {
  4388. type: Object
  4389. },
  4390. maskAnimation: String,
  4391. maskTransitionName: String
  4392. });
  4393. function pI(t) {
  4394. let {
  4395. prefixCls: e,
  4396. animation: n,
  4397. transitionName: r
  4398. } = t;
  4399. return n ? {
  4400. name: `${e}-${n}`
  4401. } : r ? {
  4402. name: r
  4403. } : {};
  4404. }
  4405. function lZ(t) {
  4406. const {
  4407. prefixCls: e,
  4408. visible: n,
  4409. zIndex: r,
  4410. mask: i,
  4411. maskAnimation: a,
  4412. maskTransitionName: o
  4413. } = t;
  4414. if (!i)
  4415. return null;
  4416. let s = {};
  4417. return (o || a) && (s = pI({
  4418. prefixCls: e,
  4419. transitionName: o,
  4420. animation: a
  4421. })), M(ho, j({
  4422. appear: !0
  4423. }, s), {
  4424. default: () => [Oi(M("div", {
  4425. style: {
  4426. zIndex: r
  4427. },
  4428. class: `${e}-mask`
  4429. }, null), [[Fle("if"), n]])]
  4430. });
  4431. }
  4432. lZ.displayName = "Mask";
  4433. const ude = te({
  4434. compatConfig: {
  4435. MODE: 3
  4436. },
  4437. name: "MobilePopupInner",
  4438. inheritAttrs: !1,
  4439. props: sde,
  4440. emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  4441. setup(t, e) {
  4442. let {
  4443. expose: n,
  4444. slots: r
  4445. } = e;
  4446. const i = U();
  4447. return n({
  4448. forceAlign: () => {
  4449. },
  4450. getElement: () => i.value
  4451. }), () => {
  4452. var a;
  4453. const {
  4454. zIndex: o,
  4455. visible: s,
  4456. prefixCls: l,
  4457. mobile: {
  4458. popupClassName: u,
  4459. popupStyle: c,
  4460. popupMotion: f = {},
  4461. popupRender: d
  4462. } = {}
  4463. } = t, h = I({
  4464. zIndex: o
  4465. }, c);
  4466. let p = Yn((a = r.default) === null || a === void 0 ? void 0 : a.call(r));
  4467. p.length > 1 && (p = M("div", {
  4468. class: `${l}-content`
  4469. }, [p])), d && (p = d(p));
  4470. const v = ye(l, u);
  4471. return M(ho, j({
  4472. ref: i
  4473. }, f), {
  4474. default: () => [s ? M("div", {
  4475. class: v,
  4476. style: h
  4477. }, [p]) : null]
  4478. });
  4479. };
  4480. }
  4481. });
  4482. var cde = function(t, e, n, r) {
  4483. function i(a) {
  4484. return a instanceof n ? a : new n(function(o) {
  4485. o(a);
  4486. });
  4487. }
  4488. return new (n || (n = Promise))(function(a, o) {
  4489. function s(c) {
  4490. try {
  4491. u(r.next(c));
  4492. } catch (f) {
  4493. o(f);
  4494. }
  4495. }
  4496. function l(c) {
  4497. try {
  4498. u(r.throw(c));
  4499. } catch (f) {
  4500. o(f);
  4501. }
  4502. }
  4503. function u(c) {
  4504. c.done ? a(c.value) : i(c.value).then(s, l);
  4505. }
  4506. u((r = r.apply(t, e || [])).next());
  4507. });
  4508. };
  4509. const A8 = ["measure", "align", null, "motion"], fde = (t, e) => {
  4510. const n = ae(null), r = ae(), i = ae(!1);
  4511. function a(l) {
  4512. i.value || (n.value = l);
  4513. }
  4514. function o() {
  4515. xt.cancel(r.value);
  4516. }
  4517. function s(l) {
  4518. o(), r.value = xt(() => {
  4519. let u = n.value;
  4520. switch (n.value) {
  4521. case "align":
  4522. u = "motion";
  4523. break;
  4524. case "motion":
  4525. u = "stable";
  4526. break;
  4527. }
  4528. a(u), l == null || l();
  4529. });
  4530. }
  4531. return se(t, () => {
  4532. a("measure");
  4533. }, {
  4534. immediate: !0,
  4535. flush: "post"
  4536. }), it(() => {
  4537. se(n, () => {
  4538. switch (n.value) {
  4539. case "measure":
  4540. e();
  4541. break;
  4542. }
  4543. n.value && (r.value = xt(() => cde(void 0, void 0, void 0, function* () {
  4544. const l = A8.indexOf(n.value), u = A8[l + 1];
  4545. u && l !== -1 && a(u);
  4546. })));
  4547. }, {
  4548. immediate: !0,
  4549. flush: "post"
  4550. });
  4551. }), yt(() => {
  4552. i.value = !0, o();
  4553. }), [n, s];
  4554. }, dde = (t) => {
  4555. const e = ae({
  4556. width: 0,
  4557. height: 0
  4558. });
  4559. function n(i) {
  4560. e.value = {
  4561. width: i.offsetWidth,
  4562. height: i.offsetHeight
  4563. };
  4564. }
  4565. return [L(() => {
  4566. const i = {};
  4567. if (t.value) {
  4568. const {
  4569. width: a,
  4570. height: o
  4571. } = e.value;
  4572. 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`);
  4573. }
  4574. return i;
  4575. }), n];
  4576. };
  4577. function E8(t, e) {
  4578. var n = Object.keys(t);
  4579. if (Object.getOwnPropertySymbols) {
  4580. var r = Object.getOwnPropertySymbols(t);
  4581. e && (r = r.filter(function(i) {
  4582. return Object.getOwnPropertyDescriptor(t, i).enumerable;
  4583. })), n.push.apply(n, r);
  4584. }
  4585. return n;
  4586. }
  4587. function M8(t) {
  4588. for (var e = 1; e < arguments.length; e++) {
  4589. var n = arguments[e] != null ? arguments[e] : {};
  4590. e % 2 ? E8(Object(n), !0).forEach(function(r) {
  4591. hde(t, r, n[r]);
  4592. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : E8(Object(n)).forEach(function(r) {
  4593. Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
  4594. });
  4595. }
  4596. return t;
  4597. }
  4598. function _2(t) {
  4599. "@babel/helpers - typeof";
  4600. return _2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
  4601. return typeof e;
  4602. } : function(e) {
  4603. return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  4604. }, _2(t);
  4605. }
  4606. function hde(t, e, n) {
  4607. return e in t ? Object.defineProperty(t, e, {
  4608. value: n,
  4609. enumerable: !0,
  4610. configurable: !0,
  4611. writable: !0
  4612. }) : t[e] = n, t;
  4613. }
  4614. var Yp, pde = {
  4615. Webkit: "-webkit-",
  4616. Moz: "-moz-",
  4617. // IE did it wrong again ...
  4618. ms: "-ms-",
  4619. O: "-o-"
  4620. };
  4621. function w1() {
  4622. if (Yp !== void 0)
  4623. return Yp;
  4624. Yp = "";
  4625. var t = document.createElement("p").style, e = "Transform";
  4626. for (var n in pde)
  4627. n + e in t && (Yp = n);
  4628. return Yp;
  4629. }
  4630. function uZ() {
  4631. return w1() ? "".concat(w1(), "TransitionProperty") : "transitionProperty";
  4632. }
  4633. function HS() {
  4634. return w1() ? "".concat(w1(), "Transform") : "transform";
  4635. }
  4636. function I8(t, e) {
  4637. var n = uZ();
  4638. n && (t.style[n] = e, n !== "transitionProperty" && (t.style.transitionProperty = e));
  4639. }
  4640. function lC(t, e) {
  4641. var n = HS();
  4642. n && (t.style[n] = e, n !== "transform" && (t.style.transform = e));
  4643. }
  4644. function vde(t) {
  4645. return t.style.transitionProperty || t.style[uZ()];
  4646. }
  4647. function gde(t) {
  4648. var e = window.getComputedStyle(t, null), n = e.getPropertyValue("transform") || e.getPropertyValue(HS());
  4649. if (n && n !== "none") {
  4650. var r = n.replace(/[^0-9\-.,]/g, "").split(",");
  4651. return {
  4652. x: parseFloat(r[12] || r[4], 0),
  4653. y: parseFloat(r[13] || r[5], 0)
  4654. };
  4655. }
  4656. return {
  4657. x: 0,
  4658. y: 0
  4659. };
  4660. }
  4661. var mde = /matrix\((.*)\)/, yde = /matrix3d\((.*)\)/;
  4662. function bde(t, e) {
  4663. var n = window.getComputedStyle(t, null), r = n.getPropertyValue("transform") || n.getPropertyValue(HS());
  4664. if (r && r !== "none") {
  4665. var i, a = r.match(mde);
  4666. if (a)
  4667. a = a[1], i = a.split(",").map(function(s) {
  4668. return parseFloat(s, 10);
  4669. }), i[4] = e.x, i[5] = e.y, lC(t, "matrix(".concat(i.join(","), ")"));
  4670. else {
  4671. var o = r.match(yde)[1];
  4672. i = o.split(",").map(function(s) {
  4673. return parseFloat(s, 10);
  4674. }), i[12] = e.x, i[13] = e.y, lC(t, "matrix3d(".concat(i.join(","), ")"));
  4675. }
  4676. } else
  4677. lC(t, "translateX(".concat(e.x, "px) translateY(").concat(e.y, "px) translateZ(0)"));
  4678. }
  4679. var _de = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, p0;
  4680. function D8(t) {
  4681. var e = t.style.display;
  4682. t.style.display = "none", t.offsetHeight, t.style.display = e;
  4683. }
  4684. function Ud(t, e, n) {
  4685. var r = n;
  4686. if (_2(e) === "object") {
  4687. for (var i in e)
  4688. e.hasOwnProperty(i) && Ud(t, i, e[i]);
  4689. return;
  4690. }
  4691. if (typeof r < "u") {
  4692. typeof r == "number" && (r = "".concat(r, "px")), t.style[e] = r;
  4693. return;
  4694. }
  4695. return p0(t, e);
  4696. }
  4697. function Ode(t) {
  4698. var e, n, r, i = t.ownerDocument, a = i.body, o = i && i.documentElement;
  4699. 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, {
  4700. left: n,
  4701. top: r
  4702. };
  4703. }
  4704. function cZ(t, e) {
  4705. var n = t["page".concat(e ? "Y" : "X", "Offset")], r = "scroll".concat(e ? "Top" : "Left");
  4706. if (typeof n != "number") {
  4707. var i = t.document;
  4708. n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  4709. }
  4710. return n;
  4711. }
  4712. function fZ(t) {
  4713. return cZ(t);
  4714. }
  4715. function dZ(t) {
  4716. return cZ(t, !0);
  4717. }
  4718. function im(t) {
  4719. var e = Ode(t), n = t.ownerDocument, r = n.defaultView || n.parentWindow;
  4720. return e.left += fZ(r), e.top += dZ(r), e;
  4721. }
  4722. function vI(t) {
  4723. return t != null && t == t.window;
  4724. }
  4725. function hZ(t) {
  4726. return vI(t) ? t.document : t.nodeType === 9 ? t : t.ownerDocument;
  4727. }
  4728. function Sde(t, e, n) {
  4729. var r = n, i = "", a = hZ(t);
  4730. return r = r || a.defaultView.getComputedStyle(t, null), r && (i = r.getPropertyValue(e) || r[e]), i;
  4731. }
  4732. var xde = new RegExp("^(".concat(_de, ")(?!px)[a-z%]+$"), "i"), wde = /^(top|right|bottom|left)$/, uC = "currentStyle", cC = "runtimeStyle", Du = "left", Cde = "px";
  4733. function Tde(t, e) {
  4734. var n = t[uC] && t[uC][e];
  4735. if (xde.test(n) && !wde.test(e)) {
  4736. var r = t.style, i = r[Du], a = t[cC][Du];
  4737. t[cC][Du] = t[uC][Du], r[Du] = e === "fontSize" ? "1em" : n || 0, n = r.pixelLeft + Cde, r[Du] = i, t[cC][Du] = a;
  4738. }
  4739. return n === "" ? "auto" : n;
  4740. }
  4741. typeof window < "u" && (p0 = window.getComputedStyle ? Sde : Tde);
  4742. function wy(t, e) {
  4743. return t === "left" ? e.useCssRight ? "right" : t : e.useCssBottom ? "bottom" : t;
  4744. }
  4745. function R8(t) {
  4746. if (t === "left")
  4747. return "right";
  4748. if (t === "right")
  4749. return "left";
  4750. if (t === "top")
  4751. return "bottom";
  4752. if (t === "bottom")
  4753. return "top";
  4754. }
  4755. function k8(t, e, n) {
  4756. Ud(t, "position") === "static" && (t.style.position = "relative");
  4757. var r = -999, i = -999, a = wy("left", n), o = wy("top", n), s = R8(a), l = R8(o);
  4758. a !== "left" && (r = 999), o !== "top" && (i = 999);
  4759. var u = "", c = im(t);
  4760. ("left" in e || "top" in e) && (u = vde(t) || "", I8(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")), D8(t);
  4761. var f = im(t), d = {};
  4762. for (var h in e)
  4763. if (e.hasOwnProperty(h)) {
  4764. var p = wy(h, n), v = h === "left" ? r : i, g = c[h] - f[h];
  4765. p === h ? d[p] = v + g : d[p] = v - g;
  4766. }
  4767. Ud(t, d), D8(t), ("left" in e || "top" in e) && I8(t, u);
  4768. var m = {};
  4769. for (var y in e)
  4770. if (e.hasOwnProperty(y)) {
  4771. var b = wy(y, n), _ = e[y] - c[y];
  4772. y === b ? m[b] = d[b] + _ : m[b] = d[b] - _;
  4773. }
  4774. Ud(t, m);
  4775. }
  4776. function Pde(t, e) {
  4777. var n = im(t), r = gde(t), i = {
  4778. x: r.x,
  4779. y: r.y
  4780. };
  4781. "left" in e && (i.x = r.x + e.left - n.left), "top" in e && (i.y = r.y + e.top - n.top), bde(t, i);
  4782. }
  4783. function $de(t, e, n) {
  4784. if (n.ignoreShake) {
  4785. var r = im(t), i = r.left.toFixed(0), a = r.top.toFixed(0), o = e.left.toFixed(0), s = e.top.toFixed(0);
  4786. if (i === o && a === s)
  4787. return;
  4788. }
  4789. n.useCssRight || n.useCssBottom ? k8(t, e, n) : n.useCssTransform && HS() in document.body.style ? Pde(t, e) : k8(t, e, n);
  4790. }
  4791. function gI(t, e) {
  4792. for (var n = 0; n < t.length; n++)
  4793. e(t[n]);
  4794. }
  4795. function pZ(t) {
  4796. return p0(t, "boxSizing") === "border-box";
  4797. }
  4798. var Ade = ["margin", "border", "padding"], O2 = -1, Ede = 2, S2 = 1, Mde = 0;
  4799. function Ide(t, e, n) {
  4800. var r = {}, i = t.style, a;
  4801. for (a in e)
  4802. e.hasOwnProperty(a) && (r[a] = i[a], i[a] = e[a]);
  4803. n.call(t);
  4804. for (a in e)
  4805. e.hasOwnProperty(a) && (i[a] = r[a]);
  4806. }
  4807. function Fv(t, e, n) {
  4808. var r = 0, i, a, o;
  4809. for (a = 0; a < e.length; a++)
  4810. if (i = e[a], i)
  4811. for (o = 0; o < n.length; o++) {
  4812. var s = void 0;
  4813. i === "border" ? s = "".concat(i).concat(n[o], "Width") : s = i + n[o], r += parseFloat(p0(t, s)) || 0;
  4814. }
  4815. return r;
  4816. }
  4817. var Vo = {
  4818. getParent: function(e) {
  4819. var n = e;
  4820. do
  4821. n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
  4822. while (n && n.nodeType !== 1 && n.nodeType !== 9);
  4823. return n;
  4824. }
  4825. };
  4826. gI(["Width", "Height"], function(t) {
  4827. Vo["doc".concat(t)] = function(e) {
  4828. var n = e.document;
  4829. return Math.max(
  4830. // firefox chrome documentElement.scrollHeight< body.scrollHeight
  4831. // ie standard mode : documentElement.scrollHeight> body.scrollHeight
  4832. n.documentElement["scroll".concat(t)],
  4833. // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
  4834. n.body["scroll".concat(t)],
  4835. Vo["viewport".concat(t)](n)
  4836. );
  4837. }, Vo["viewport".concat(t)] = function(e) {
  4838. var n = "client".concat(t), r = e.document, i = r.body, a = r.documentElement, o = a[n];
  4839. return r.compatMode === "CSS1Compat" && o || i && i[n] || o;
  4840. };
  4841. });
  4842. function L8(t, e, n) {
  4843. var r = n;
  4844. if (vI(t))
  4845. return e === "width" ? Vo.viewportWidth(t) : Vo.viewportHeight(t);
  4846. if (t.nodeType === 9)
  4847. return e === "width" ? Vo.docWidth(t) : Vo.docHeight(t);
  4848. var i = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"], a = Math.floor(e === "width" ? t.getBoundingClientRect().width : t.getBoundingClientRect().height), o = pZ(t), s = 0;
  4849. (a == null || a <= 0) && (a = void 0, s = p0(t, e), (s == null || Number(s) < 0) && (s = t.style[e] || 0), s = Math.floor(parseFloat(s)) || 0), r === void 0 && (r = o ? S2 : O2);
  4850. var l = a !== void 0 || o, u = a || s;
  4851. return r === O2 ? l ? u - Fv(t, ["border", "padding"], i) : s : l ? r === S2 ? u : u + (r === Ede ? -Fv(t, ["border"], i) : Fv(t, ["margin"], i)) : s + Fv(t, Ade.slice(r), i);
  4852. }
  4853. var Dde = {
  4854. position: "absolute",
  4855. visibility: "hidden",
  4856. display: "block"
  4857. };
  4858. function N8() {
  4859. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  4860. e[n] = arguments[n];
  4861. var r, i = e[0];
  4862. return i.offsetWidth !== 0 ? r = L8.apply(void 0, e) : Ide(i, Dde, function() {
  4863. r = L8.apply(void 0, e);
  4864. }), r;
  4865. }
  4866. gI(["width", "height"], function(t) {
  4867. var e = t.charAt(0).toUpperCase() + t.slice(1);
  4868. Vo["outer".concat(e)] = function(r, i) {
  4869. return r && N8(r, t, i ? Mde : S2);
  4870. };
  4871. var n = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  4872. Vo[t] = function(r, i) {
  4873. var a = i;
  4874. if (a !== void 0) {
  4875. if (r) {
  4876. var o = pZ(r);
  4877. return o && (a += Fv(r, ["padding", "border"], n)), Ud(r, t, a);
  4878. }
  4879. return;
  4880. }
  4881. return r && N8(r, t, O2);
  4882. };
  4883. });
  4884. function vZ(t, e) {
  4885. for (var n in e)
  4886. e.hasOwnProperty(n) && (t[n] = e[n]);
  4887. return t;
  4888. }
  4889. var ft = {
  4890. getWindow: function(e) {
  4891. if (e && e.document && e.setTimeout)
  4892. return e;
  4893. var n = e.ownerDocument || e;
  4894. return n.defaultView || n.parentWindow;
  4895. },
  4896. getDocument: hZ,
  4897. offset: function(e, n, r) {
  4898. if (typeof n < "u")
  4899. $de(e, n, r || {});
  4900. else
  4901. return im(e);
  4902. },
  4903. isWindow: vI,
  4904. each: gI,
  4905. css: Ud,
  4906. clone: function(e) {
  4907. var n, r = {};
  4908. for (n in e)
  4909. e.hasOwnProperty(n) && (r[n] = e[n]);
  4910. var i = e.overflow;
  4911. if (i)
  4912. for (n in e)
  4913. e.hasOwnProperty(n) && (r.overflow[n] = e.overflow[n]);
  4914. return r;
  4915. },
  4916. mix: vZ,
  4917. getWindowScrollLeft: function(e) {
  4918. return fZ(e);
  4919. },
  4920. getWindowScrollTop: function(e) {
  4921. return dZ(e);
  4922. },
  4923. merge: function() {
  4924. for (var e = {}, n = 0; n < arguments.length; n++)
  4925. ft.mix(e, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
  4926. return e;
  4927. },
  4928. viewportWidth: 0,
  4929. viewportHeight: 0
  4930. };
  4931. vZ(ft, Vo);
  4932. var fC = ft.getParent;
  4933. function x2(t) {
  4934. if (ft.isWindow(t) || t.nodeType === 9)
  4935. return null;
  4936. var e = ft.getDocument(t), n = e.body, r, i = ft.css(t, "position"), a = i === "fixed" || i === "absolute";
  4937. if (!a)
  4938. return t.nodeName.toLowerCase() === "html" ? null : fC(t);
  4939. for (r = fC(t); r && r !== n && r.nodeType !== 9; r = fC(r))
  4940. if (i = ft.css(r, "position"), i !== "static")
  4941. return r;
  4942. return null;
  4943. }
  4944. var B8 = ft.getParent;
  4945. function Rde(t) {
  4946. if (ft.isWindow(t) || t.nodeType === 9)
  4947. return !1;
  4948. var e = ft.getDocument(t), n = e.body, r = null;
  4949. for (
  4950. r = B8(t);
  4951. // 修复元素位于 document.documentElement 下导致崩溃问题
  4952. r && r !== n && r !== e;
  4953. r = B8(r)
  4954. ) {
  4955. var i = ft.css(r, "position");
  4956. if (i === "fixed")
  4957. return !0;
  4958. }
  4959. return !1;
  4960. }
  4961. function mI(t, e) {
  4962. for (var n = {
  4963. left: 0,
  4964. right: 1 / 0,
  4965. top: 0,
  4966. bottom: 1 / 0
  4967. }, r = x2(t), i = ft.getDocument(t), a = i.defaultView || i.parentWindow, o = i.body, s = i.documentElement; r; ) {
  4968. if ((navigator.userAgent.indexOf("MSIE") === -1 || r.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
  4969. // viewport. In some browsers, el.offsetParent may be
  4970. // document.documentElement, so check for that too.
  4971. r !== o && r !== s && ft.css(r, "overflow") !== "visible") {
  4972. var l = ft.offset(r);
  4973. l.left += r.clientLeft, l.top += r.clientTop, n.top = Math.max(n.top, l.top), n.right = Math.min(
  4974. n.right,
  4975. // consider area without scrollBar
  4976. l.left + r.clientWidth
  4977. ), n.bottom = Math.min(n.bottom, l.top + r.clientHeight), n.left = Math.max(n.left, l.left);
  4978. } else if (r === o || r === s)
  4979. break;
  4980. r = x2(r);
  4981. }
  4982. var u = null;
  4983. if (!ft.isWindow(t) && t.nodeType !== 9) {
  4984. u = t.style.position;
  4985. var c = ft.css(t, "position");
  4986. c === "absolute" && (t.style.position = "fixed");
  4987. }
  4988. var f = ft.getWindowScrollLeft(a), d = ft.getWindowScrollTop(a), h = ft.viewportWidth(a), p = ft.viewportHeight(a), v = s.scrollWidth, g = s.scrollHeight, m = window.getComputedStyle(o);
  4989. if (m.overflowX === "hidden" && (v = a.innerWidth), m.overflowY === "hidden" && (g = a.innerHeight), t.style && (t.style.position = u), e || Rde(t))
  4990. 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);
  4991. else {
  4992. var y = Math.max(v, f + h);
  4993. n.right = Math.min(n.right, y);
  4994. var b = Math.max(g, d + p);
  4995. n.bottom = Math.min(n.bottom, b);
  4996. }
  4997. return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
  4998. }
  4999. function kde(t, e, n, r) {
  5000. var i = ft.clone(t), a = {
  5001. width: e.width,
  5002. height: e.height
  5003. };
  5004. 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)), ft.mix(i, a);
  5005. }
  5006. function yI(t) {
  5007. var e, n, r;
  5008. if (!ft.isWindow(t) && t.nodeType !== 9)
  5009. e = ft.offset(t), n = ft.outerWidth(t), r = ft.outerHeight(t);
  5010. else {
  5011. var i = ft.getWindow(t);
  5012. e = {
  5013. left: ft.getWindowScrollLeft(i),
  5014. top: ft.getWindowScrollTop(i)
  5015. }, n = ft.viewportWidth(i), r = ft.viewportHeight(i);
  5016. }
  5017. return e.width = n, e.height = r, e;
  5018. }
  5019. function z8(t, e) {
  5020. var n = e.charAt(0), r = e.charAt(1), i = t.width, a = t.height, o = t.left, s = t.top;
  5021. return n === "c" ? s += a / 2 : n === "b" && (s += a), r === "c" ? o += i / 2 : r === "r" && (o += i), {
  5022. left: o,
  5023. top: s
  5024. };
  5025. }
  5026. function Cy(t, e, n, r, i) {
  5027. var a = z8(e, n[1]), o = z8(t, n[0]), s = [o.left - a.left, o.top - a.top];
  5028. return {
  5029. left: Math.round(t.left - s[0] + r[0] - i[0]),
  5030. top: Math.round(t.top - s[1] + r[1] - i[1])
  5031. };
  5032. }
  5033. function V8(t, e, n) {
  5034. return t.left < n.left || t.left + e.width > n.right;
  5035. }
  5036. function F8(t, e, n) {
  5037. return t.top < n.top || t.top + e.height > n.bottom;
  5038. }
  5039. function Lde(t, e, n) {
  5040. return t.left > n.right || t.left + e.width < n.left;
  5041. }
  5042. function Nde(t, e, n) {
  5043. return t.top > n.bottom || t.top + e.height < n.top;
  5044. }
  5045. function Ty(t, e, n) {
  5046. var r = [];
  5047. return ft.each(t, function(i) {
  5048. r.push(i.replace(e, function(a) {
  5049. return n[a];
  5050. }));
  5051. }), r;
  5052. }
  5053. function Py(t, e) {
  5054. return t[e] = -t[e], t;
  5055. }
  5056. function W8(t, e) {
  5057. var n;
  5058. return /%$/.test(t) ? n = parseInt(t.substring(0, t.length - 1), 10) / 100 * e : n = parseInt(t, 10), n || 0;
  5059. }
  5060. function Q8(t, e) {
  5061. t[0] = W8(t[0], e.width), t[1] = W8(t[1], e.height);
  5062. }
  5063. function gZ(t, e, n, r) {
  5064. var i = n.points, a = n.offset || [0, 0], o = n.targetOffset || [0, 0], s = n.overflow, l = n.source || t;
  5065. a = [].concat(a), o = [].concat(o), s = s || {};
  5066. var u = {}, c = 0, f = !!(s && s.alwaysByViewport), d = mI(l, f), h = yI(l);
  5067. Q8(a, h), Q8(o, e);
  5068. var p = Cy(h, e, i, a, o), v = ft.merge(h, p);
  5069. if (d && (s.adjustX || s.adjustY) && r) {
  5070. if (s.adjustX && V8(p, h, d)) {
  5071. var g = Ty(i, /[lr]/gi, {
  5072. l: "r",
  5073. r: "l"
  5074. }), m = Py(a, 0), y = Py(o, 0), b = Cy(h, e, g, m, y);
  5075. Lde(b, h, d) || (c = 1, i = g, a = m, o = y);
  5076. }
  5077. if (s.adjustY && F8(p, h, d)) {
  5078. var _ = Ty(i, /[tb]/gi, {
  5079. t: "b",
  5080. b: "t"
  5081. }), O = Py(a, 1), S = Py(o, 1), x = Cy(h, e, _, O, S);
  5082. Nde(x, h, d) || (c = 1, i = _, a = O, o = S);
  5083. }
  5084. c && (p = Cy(h, e, i, a, o), ft.mix(v, p));
  5085. var C = V8(p, h, d), T = F8(p, h, d);
  5086. if (C || T) {
  5087. var w = i;
  5088. C && (w = Ty(i, /[lr]/gi, {
  5089. l: "r",
  5090. r: "l"
  5091. })), T && (w = Ty(i, /[tb]/gi, {
  5092. t: "b",
  5093. b: "t"
  5094. })), i = w, a = n.offset || [0, 0], o = n.targetOffset || [0, 0];
  5095. }
  5096. u.adjustX = s.adjustX && C, u.adjustY = s.adjustY && T, (u.adjustX || u.adjustY) && (v = kde(p, h, d, u));
  5097. }
  5098. return v.width !== h.width && ft.css(l, "width", ft.width(l) + v.width - h.width), v.height !== h.height && ft.css(l, "height", ft.height(l) + v.height - h.height), ft.offset(l, {
  5099. left: v.left,
  5100. top: v.top
  5101. }, {
  5102. useCssRight: n.useCssRight,
  5103. useCssBottom: n.useCssBottom,
  5104. useCssTransform: n.useCssTransform,
  5105. ignoreShake: n.ignoreShake
  5106. }), {
  5107. points: i,
  5108. offset: a,
  5109. targetOffset: o,
  5110. overflow: u
  5111. };
  5112. }
  5113. function Bde(t, e) {
  5114. var n = mI(t, e), r = yI(t);
  5115. return !n || r.left + r.width <= n.left || r.top + r.height <= n.top || r.left >= n.right || r.top >= n.bottom;
  5116. }
  5117. function bI(t, e, n) {
  5118. var r = n.target || e, i = yI(r), a = !Bde(r, n.overflow && n.overflow.alwaysByViewport);
  5119. return gZ(t, i, n, a);
  5120. }
  5121. bI.__getOffsetParent = x2;
  5122. bI.__getVisibleRectForElement = mI;
  5123. function zde(t, e, n) {
  5124. var r, i, a = ft.getDocument(t), o = a.defaultView || a.parentWindow, s = ft.getWindowScrollLeft(o), l = ft.getWindowScrollTop(o), u = ft.viewportWidth(o), c = ft.viewportHeight(o);
  5125. "pageX" in e ? r = e.pageX : r = s + e.clientX, "pageY" in e ? i = e.pageY : i = l + e.clientY;
  5126. var f = {
  5127. left: r,
  5128. top: i,
  5129. width: 0,
  5130. height: 0
  5131. }, d = r >= 0 && r <= s + u && i >= 0 && i <= l + c, h = [n.points[0], "cc"];
  5132. return gZ(t, f, M8(M8({}, n), {}, {
  5133. points: h
  5134. }), d);
  5135. }
  5136. function Pn(t) {
  5137. 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;
  5138. if (Array.isArray(t) && (i = ss(t)[0]), !i)
  5139. return null;
  5140. const a = Bs(i, e, r);
  5141. return a.props = n ? I(I({}, a.props), e) : a.props, Yr(typeof a.props.class != "object", "class must be string"), a;
  5142. }
  5143. function Vde(t, e, n) {
  5144. lf(Bs(t, I({}, e)), n);
  5145. }
  5146. const mZ = (t) => {
  5147. if (!t)
  5148. return !1;
  5149. if (t.offsetParent)
  5150. return !0;
  5151. if (t.getBBox) {
  5152. const e = t.getBBox();
  5153. if (e.width || e.height)
  5154. return !0;
  5155. }
  5156. if (t.getBoundingClientRect) {
  5157. const e = t.getBoundingClientRect();
  5158. if (e.width || e.height)
  5159. return !0;
  5160. }
  5161. return !1;
  5162. };
  5163. function Fde(t, e) {
  5164. 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;
  5165. }
  5166. function Wde(t, e) {
  5167. t !== document.activeElement && $l(e, t) && typeof t.focus == "function" && t.focus();
  5168. }
  5169. function H8(t, e) {
  5170. let n = null, r = null;
  5171. function i(o) {
  5172. let [{
  5173. target: s
  5174. }] = o;
  5175. if (!document.documentElement.contains(s)) return;
  5176. const {
  5177. width: l,
  5178. height: u
  5179. } = s.getBoundingClientRect(), c = Math.floor(l), f = Math.floor(u);
  5180. (n !== c || r !== f) && Promise.resolve().then(() => {
  5181. e({
  5182. width: c,
  5183. height: f
  5184. });
  5185. }), n = c, r = f;
  5186. }
  5187. const a = new nj(i);
  5188. return t && a.observe(t), () => {
  5189. a.disconnect();
  5190. };
  5191. }
  5192. const Qde = (t, e) => {
  5193. let n = !1, r = null;
  5194. function i() {
  5195. clearTimeout(r);
  5196. }
  5197. function a(o) {
  5198. if (!n || o === !0) {
  5199. if (t() === !1)
  5200. return;
  5201. n = !0, i(), r = setTimeout(() => {
  5202. n = !1;
  5203. }, e.value);
  5204. } else
  5205. i(), r = setTimeout(() => {
  5206. n = !1, a();
  5207. }, e.value);
  5208. }
  5209. return [a, () => {
  5210. n = !1, i();
  5211. }];
  5212. };
  5213. function Hde() {
  5214. this.__data__ = [], this.size = 0;
  5215. }
  5216. function v0(t, e) {
  5217. return t === e || t !== t && e !== e;
  5218. }
  5219. function GS(t, e) {
  5220. for (var n = t.length; n--; )
  5221. if (v0(t[n][0], e))
  5222. return n;
  5223. return -1;
  5224. }
  5225. var Gde = Array.prototype, jde = Gde.splice;
  5226. function Zde(t) {
  5227. var e = this.__data__, n = GS(e, t);
  5228. if (n < 0)
  5229. return !1;
  5230. var r = e.length - 1;
  5231. return n == r ? e.pop() : jde.call(e, n, 1), --this.size, !0;
  5232. }
  5233. function Ude(t) {
  5234. var e = this.__data__, n = GS(e, t);
  5235. return n < 0 ? void 0 : e[n][1];
  5236. }
  5237. function Xde(t) {
  5238. return GS(this.__data__, t) > -1;
  5239. }
  5240. function Yde(t, e) {
  5241. var n = this.__data__, r = GS(n, t);
  5242. return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
  5243. }
  5244. function il(t) {
  5245. var e = -1, n = t == null ? 0 : t.length;
  5246. for (this.clear(); ++e < n; ) {
  5247. var r = t[e];
  5248. this.set(r[0], r[1]);
  5249. }
  5250. }
  5251. il.prototype.clear = Hde;
  5252. il.prototype.delete = Zde;
  5253. il.prototype.get = Ude;
  5254. il.prototype.has = Xde;
  5255. il.prototype.set = Yde;
  5256. function qde() {
  5257. this.__data__ = new il(), this.size = 0;
  5258. }
  5259. function Kde(t) {
  5260. var e = this.__data__, n = e.delete(t);
  5261. return this.size = e.size, n;
  5262. }
  5263. function Jde(t) {
  5264. return this.__data__.get(t);
  5265. }
  5266. function ehe(t) {
  5267. return this.__data__.has(t);
  5268. }
  5269. var yZ = typeof global == "object" && global && global.Object === Object && global, the = typeof self == "object" && self && self.Object === Object && self, po = yZ || the || Function("return this")(), $a = po.Symbol, bZ = Object.prototype, nhe = bZ.hasOwnProperty, rhe = bZ.toString, qp = $a ? $a.toStringTag : void 0;
  5270. function ihe(t) {
  5271. var e = nhe.call(t, qp), n = t[qp];
  5272. try {
  5273. t[qp] = void 0;
  5274. var r = !0;
  5275. } catch {
  5276. }
  5277. var i = rhe.call(t);
  5278. return r && (e ? t[qp] = n : delete t[qp]), i;
  5279. }
  5280. var ahe = Object.prototype, ohe = ahe.toString;
  5281. function she(t) {
  5282. return ohe.call(t);
  5283. }
  5284. var lhe = "[object Null]", uhe = "[object Undefined]", G8 = $a ? $a.toStringTag : void 0;
  5285. function bu(t) {
  5286. return t == null ? t === void 0 ? uhe : lhe : G8 && G8 in Object(t) ? ihe(t) : she(t);
  5287. }
  5288. function xr(t) {
  5289. var e = typeof t;
  5290. return t != null && (e == "object" || e == "function");
  5291. }
  5292. var che = "[object AsyncFunction]", fhe = "[object Function]", dhe = "[object GeneratorFunction]", hhe = "[object Proxy]";
  5293. function _I(t) {
  5294. if (!xr(t))
  5295. return !1;
  5296. var e = bu(t);
  5297. return e == fhe || e == dhe || e == che || e == hhe;
  5298. }
  5299. var dC = po["__core-js_shared__"], j8 = function() {
  5300. var t = /[^.]+$/.exec(dC && dC.keys && dC.keys.IE_PROTO || "");
  5301. return t ? "Symbol(src)_1." + t : "";
  5302. }();
  5303. function phe(t) {
  5304. return !!j8 && j8 in t;
  5305. }
  5306. var vhe = Function.prototype, ghe = vhe.toString;
  5307. function Mf(t) {
  5308. if (t != null) {
  5309. try {
  5310. return ghe.call(t);
  5311. } catch {
  5312. }
  5313. try {
  5314. return t + "";
  5315. } catch {
  5316. }
  5317. }
  5318. return "";
  5319. }
  5320. var mhe = /[\\^$.*+?()[\]{}|]/g, yhe = /^\[object .+?Constructor\]$/, bhe = Function.prototype, _he = Object.prototype, Ohe = bhe.toString, She = _he.hasOwnProperty, xhe = RegExp(
  5321. "^" + Ohe.call(She).replace(mhe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  5322. );
  5323. function whe(t) {
  5324. if (!xr(t) || phe(t))
  5325. return !1;
  5326. var e = _I(t) ? xhe : yhe;
  5327. return e.test(Mf(t));
  5328. }
  5329. function Che(t, e) {
  5330. return t == null ? void 0 : t[e];
  5331. }
  5332. function If(t, e) {
  5333. var n = Che(t, e);
  5334. return whe(n) ? n : void 0;
  5335. }
  5336. var am = If(po, "Map"), om = If(Object, "create");
  5337. function The() {
  5338. this.__data__ = om ? om(null) : {}, this.size = 0;
  5339. }
  5340. function Phe(t) {
  5341. var e = this.has(t) && delete this.__data__[t];
  5342. return this.size -= e ? 1 : 0, e;
  5343. }
  5344. var $he = "__lodash_hash_undefined__", Ahe = Object.prototype, Ehe = Ahe.hasOwnProperty;
  5345. function Mhe(t) {
  5346. var e = this.__data__;
  5347. if (om) {
  5348. var n = e[t];
  5349. return n === $he ? void 0 : n;
  5350. }
  5351. return Ehe.call(e, t) ? e[t] : void 0;
  5352. }
  5353. var Ihe = Object.prototype, Dhe = Ihe.hasOwnProperty;
  5354. function Rhe(t) {
  5355. var e = this.__data__;
  5356. return om ? e[t] !== void 0 : Dhe.call(e, t);
  5357. }
  5358. var khe = "__lodash_hash_undefined__";
  5359. function Lhe(t, e) {
  5360. var n = this.__data__;
  5361. return this.size += this.has(t) ? 0 : 1, n[t] = om && e === void 0 ? khe : e, this;
  5362. }
  5363. function pf(t) {
  5364. var e = -1, n = t == null ? 0 : t.length;
  5365. for (this.clear(); ++e < n; ) {
  5366. var r = t[e];
  5367. this.set(r[0], r[1]);
  5368. }
  5369. }
  5370. pf.prototype.clear = The;
  5371. pf.prototype.delete = Phe;
  5372. pf.prototype.get = Mhe;
  5373. pf.prototype.has = Rhe;
  5374. pf.prototype.set = Lhe;
  5375. function Nhe() {
  5376. this.size = 0, this.__data__ = {
  5377. hash: new pf(),
  5378. map: new (am || il)(),
  5379. string: new pf()
  5380. };
  5381. }
  5382. function Bhe(t) {
  5383. var e = typeof t;
  5384. return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
  5385. }
  5386. function jS(t, e) {
  5387. var n = t.__data__;
  5388. return Bhe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
  5389. }
  5390. function zhe(t) {
  5391. var e = jS(this, t).delete(t);
  5392. return this.size -= e ? 1 : 0, e;
  5393. }
  5394. function Vhe(t) {
  5395. return jS(this, t).get(t);
  5396. }
  5397. function Fhe(t) {
  5398. return jS(this, t).has(t);
  5399. }
  5400. function Whe(t, e) {
  5401. var n = jS(this, t), r = n.size;
  5402. return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
  5403. }
  5404. function al(t) {
  5405. var e = -1, n = t == null ? 0 : t.length;
  5406. for (this.clear(); ++e < n; ) {
  5407. var r = t[e];
  5408. this.set(r[0], r[1]);
  5409. }
  5410. }
  5411. al.prototype.clear = Nhe;
  5412. al.prototype.delete = zhe;
  5413. al.prototype.get = Vhe;
  5414. al.prototype.has = Fhe;
  5415. al.prototype.set = Whe;
  5416. var Qhe = 200;
  5417. function Hhe(t, e) {
  5418. var n = this.__data__;
  5419. if (n instanceof il) {
  5420. var r = n.__data__;
  5421. if (!am || r.length < Qhe - 1)
  5422. return r.push([t, e]), this.size = ++n.size, this;
  5423. n = this.__data__ = new al(r);
  5424. }
  5425. return n.set(t, e), this.size = n.size, this;
  5426. }
  5427. function eo(t) {
  5428. var e = this.__data__ = new il(t);
  5429. this.size = e.size;
  5430. }
  5431. eo.prototype.clear = qde;
  5432. eo.prototype.delete = Kde;
  5433. eo.prototype.get = Jde;
  5434. eo.prototype.has = ehe;
  5435. eo.prototype.set = Hhe;
  5436. var Ghe = "__lodash_hash_undefined__";
  5437. function jhe(t) {
  5438. return this.__data__.set(t, Ghe), this;
  5439. }
  5440. function Zhe(t) {
  5441. return this.__data__.has(t);
  5442. }
  5443. function Ch(t) {
  5444. var e = -1, n = t == null ? 0 : t.length;
  5445. for (this.__data__ = new al(); ++e < n; )
  5446. this.add(t[e]);
  5447. }
  5448. Ch.prototype.add = Ch.prototype.push = jhe;
  5449. Ch.prototype.has = Zhe;
  5450. function Uhe(t, e) {
  5451. for (var n = -1, r = t == null ? 0 : t.length; ++n < r; )
  5452. if (e(t[n], n, t))
  5453. return !0;
  5454. return !1;
  5455. }
  5456. function C1(t, e) {
  5457. return t.has(e);
  5458. }
  5459. var Xhe = 1, Yhe = 2;
  5460. function _Z(t, e, n, r, i, a) {
  5461. var o = n & Xhe, s = t.length, l = e.length;
  5462. if (s != l && !(o && l > s))
  5463. return !1;
  5464. var u = a.get(t), c = a.get(e);
  5465. if (u && c)
  5466. return u == e && c == t;
  5467. var f = -1, d = !0, h = n & Yhe ? new Ch() : void 0;
  5468. for (a.set(t, e), a.set(e, t); ++f < s; ) {
  5469. var p = t[f], v = e[f];
  5470. if (r)
  5471. var g = o ? r(v, p, f, e, t, a) : r(p, v, f, t, e, a);
  5472. if (g !== void 0) {
  5473. if (g)
  5474. continue;
  5475. d = !1;
  5476. break;
  5477. }
  5478. if (h) {
  5479. if (!Uhe(e, function(m, y) {
  5480. if (!C1(h, y) && (p === m || i(p, m, n, r, a)))
  5481. return h.push(y);
  5482. })) {
  5483. d = !1;
  5484. break;
  5485. }
  5486. } else if (!(p === v || i(p, v, n, r, a))) {
  5487. d = !1;
  5488. break;
  5489. }
  5490. }
  5491. return a.delete(t), a.delete(e), d;
  5492. }
  5493. var T1 = po.Uint8Array;
  5494. function qhe(t) {
  5495. var e = -1, n = Array(t.size);
  5496. return t.forEach(function(r, i) {
  5497. n[++e] = [i, r];
  5498. }), n;
  5499. }
  5500. function OI(t) {
  5501. var e = -1, n = Array(t.size);
  5502. return t.forEach(function(r) {
  5503. n[++e] = r;
  5504. }), n;
  5505. }
  5506. var Khe = 1, Jhe = 2, epe = "[object Boolean]", tpe = "[object Date]", npe = "[object Error]", rpe = "[object Map]", ipe = "[object Number]", ape = "[object RegExp]", ope = "[object Set]", spe = "[object String]", lpe = "[object Symbol]", upe = "[object ArrayBuffer]", cpe = "[object DataView]", Z8 = $a ? $a.prototype : void 0, hC = Z8 ? Z8.valueOf : void 0;
  5507. function fpe(t, e, n, r, i, a, o) {
  5508. switch (n) {
  5509. case cpe:
  5510. if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
  5511. return !1;
  5512. t = t.buffer, e = e.buffer;
  5513. case upe:
  5514. return !(t.byteLength != e.byteLength || !a(new T1(t), new T1(e)));
  5515. case epe:
  5516. case tpe:
  5517. case ipe:
  5518. return v0(+t, +e);
  5519. case npe:
  5520. return t.name == e.name && t.message == e.message;
  5521. case ape:
  5522. case spe:
  5523. return t == e + "";
  5524. case rpe:
  5525. var s = qhe;
  5526. case ope:
  5527. var l = r & Khe;
  5528. if (s || (s = OI), t.size != e.size && !l)
  5529. return !1;
  5530. var u = o.get(t);
  5531. if (u)
  5532. return u == e;
  5533. r |= Jhe, o.set(t, e);
  5534. var c = _Z(s(t), s(e), r, i, a, o);
  5535. return o.delete(t), c;
  5536. case lpe:
  5537. if (hC)
  5538. return hC.call(t) == hC.call(e);
  5539. }
  5540. return !1;
  5541. }
  5542. function SI(t, e) {
  5543. for (var n = -1, r = e.length, i = t.length; ++n < r; )
  5544. t[i + n] = e[n];
  5545. return t;
  5546. }
  5547. var Ti = Array.isArray;
  5548. function OZ(t, e, n) {
  5549. var r = e(t);
  5550. return Ti(t) ? r : SI(r, n(t));
  5551. }
  5552. function dpe(t, e) {
  5553. for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
  5554. var o = t[n];
  5555. e(o, n, t) && (a[i++] = o);
  5556. }
  5557. return a;
  5558. }
  5559. function SZ() {
  5560. return [];
  5561. }
  5562. var hpe = Object.prototype, ppe = hpe.propertyIsEnumerable, U8 = Object.getOwnPropertySymbols, xI = U8 ? function(t) {
  5563. return t == null ? [] : (t = Object(t), dpe(U8(t), function(e) {
  5564. return ppe.call(t, e);
  5565. }));
  5566. } : SZ;
  5567. function vpe(t, e) {
  5568. for (var n = -1, r = Array(t); ++n < t; )
  5569. r[n] = e(n);
  5570. return r;
  5571. }
  5572. function io(t) {
  5573. return t != null && typeof t == "object";
  5574. }
  5575. var gpe = "[object Arguments]";
  5576. function X8(t) {
  5577. return io(t) && bu(t) == gpe;
  5578. }
  5579. var xZ = Object.prototype, mpe = xZ.hasOwnProperty, ype = xZ.propertyIsEnumerable, Th = X8(/* @__PURE__ */ function() {
  5580. return arguments;
  5581. }()) ? X8 : function(t) {
  5582. return io(t) && mpe.call(t, "callee") && !ype.call(t, "callee");
  5583. };
  5584. function bpe() {
  5585. return !1;
  5586. }
  5587. var wZ = typeof exports == "object" && exports && !exports.nodeType && exports, Y8 = wZ && typeof module == "object" && module && !module.nodeType && module, _pe = Y8 && Y8.exports === wZ, q8 = _pe ? po.Buffer : void 0, Ope = q8 ? q8.isBuffer : void 0, Ph = Ope || bpe, Spe = 9007199254740991, xpe = /^(?:0|[1-9]\d*)$/;
  5588. function ZS(t, e) {
  5589. var n = typeof t;
  5590. return e = e ?? Spe, !!e && (n == "number" || n != "symbol" && xpe.test(t)) && t > -1 && t % 1 == 0 && t < e;
  5591. }
  5592. var wpe = 9007199254740991;
  5593. function wI(t) {
  5594. return typeof t == "number" && t > -1 && t % 1 == 0 && t <= wpe;
  5595. }
  5596. var Cpe = "[object Arguments]", Tpe = "[object Array]", Ppe = "[object Boolean]", $pe = "[object Date]", Ape = "[object Error]", Epe = "[object Function]", Mpe = "[object Map]", Ipe = "[object Number]", Dpe = "[object Object]", Rpe = "[object RegExp]", kpe = "[object Set]", Lpe = "[object String]", Npe = "[object WeakMap]", Bpe = "[object ArrayBuffer]", zpe = "[object DataView]", Vpe = "[object Float32Array]", Fpe = "[object Float64Array]", Wpe = "[object Int8Array]", Qpe = "[object Int16Array]", Hpe = "[object Int32Array]", Gpe = "[object Uint8Array]", jpe = "[object Uint8ClampedArray]", Zpe = "[object Uint16Array]", Upe = "[object Uint32Array]", ln = {};
  5597. ln[Vpe] = ln[Fpe] = ln[Wpe] = ln[Qpe] = ln[Hpe] = ln[Gpe] = ln[jpe] = ln[Zpe] = ln[Upe] = !0;
  5598. ln[Cpe] = ln[Tpe] = ln[Bpe] = ln[Ppe] = ln[zpe] = ln[$pe] = ln[Ape] = ln[Epe] = ln[Mpe] = ln[Ipe] = ln[Dpe] = ln[Rpe] = ln[kpe] = ln[Lpe] = ln[Npe] = !1;
  5599. function Xpe(t) {
  5600. return io(t) && wI(t.length) && !!ln[bu(t)];
  5601. }
  5602. function US(t) {
  5603. return function(e) {
  5604. return t(e);
  5605. };
  5606. }
  5607. var CZ = typeof exports == "object" && exports && !exports.nodeType && exports, dg = CZ && typeof module == "object" && module && !module.nodeType && module, Ype = dg && dg.exports === CZ, pC = Ype && yZ.process, $h = function() {
  5608. try {
  5609. var t = dg && dg.require && dg.require("util").types;
  5610. return t || pC && pC.binding && pC.binding("util");
  5611. } catch {
  5612. }
  5613. }(), K8 = $h && $h.isTypedArray, XS = K8 ? US(K8) : Xpe, qpe = Object.prototype, Kpe = qpe.hasOwnProperty;
  5614. function TZ(t, e) {
  5615. var n = Ti(t), r = !n && Th(t), i = !n && !r && Ph(t), a = !n && !r && !i && XS(t), o = n || r || i || a, s = o ? vpe(t.length, String) : [], l = s.length;
  5616. for (var u in t)
  5617. (e || Kpe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
  5618. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  5619. i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  5620. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
  5621. ZS(u, l))) && s.push(u);
  5622. return s;
  5623. }
  5624. var Jpe = Object.prototype;
  5625. function YS(t) {
  5626. var e = t && t.constructor, n = typeof e == "function" && e.prototype || Jpe;
  5627. return t === n;
  5628. }
  5629. function PZ(t, e) {
  5630. return function(n) {
  5631. return t(e(n));
  5632. };
  5633. }
  5634. var eve = PZ(Object.keys, Object), tve = Object.prototype, nve = tve.hasOwnProperty;
  5635. function $Z(t) {
  5636. if (!YS(t))
  5637. return eve(t);
  5638. var e = [];
  5639. for (var n in Object(t))
  5640. nve.call(t, n) && n != "constructor" && e.push(n);
  5641. return e;
  5642. }
  5643. function fp(t) {
  5644. return t != null && wI(t.length) && !_I(t);
  5645. }
  5646. function g0(t) {
  5647. return fp(t) ? TZ(t) : $Z(t);
  5648. }
  5649. function w2(t) {
  5650. return OZ(t, g0, xI);
  5651. }
  5652. var rve = 1, ive = Object.prototype, ave = ive.hasOwnProperty;
  5653. function ove(t, e, n, r, i, a) {
  5654. var o = n & rve, s = w2(t), l = s.length, u = w2(e), c = u.length;
  5655. if (l != c && !o)
  5656. return !1;
  5657. for (var f = l; f--; ) {
  5658. var d = s[f];
  5659. if (!(o ? d in e : ave.call(e, d)))
  5660. return !1;
  5661. }
  5662. var h = a.get(t), p = a.get(e);
  5663. if (h && p)
  5664. return h == e && p == t;
  5665. var v = !0;
  5666. a.set(t, e), a.set(e, t);
  5667. for (var g = o; ++f < l; ) {
  5668. d = s[f];
  5669. var m = t[d], y = e[d];
  5670. if (r)
  5671. var b = o ? r(y, m, d, e, t, a) : r(m, y, d, t, e, a);
  5672. if (!(b === void 0 ? m === y || i(m, y, n, r, a) : b)) {
  5673. v = !1;
  5674. break;
  5675. }
  5676. g || (g = d == "constructor");
  5677. }
  5678. if (v && !g) {
  5679. var _ = t.constructor, O = e.constructor;
  5680. _ != O && "constructor" in t && "constructor" in e && !(typeof _ == "function" && _ instanceof _ && typeof O == "function" && O instanceof O) && (v = !1);
  5681. }
  5682. return a.delete(t), a.delete(e), v;
  5683. }
  5684. var C2 = If(po, "DataView"), T2 = If(po, "Promise"), Xd = If(po, "Set"), P2 = If(po, "WeakMap"), J8 = "[object Map]", sve = "[object Object]", eN = "[object Promise]", tN = "[object Set]", nN = "[object WeakMap]", rN = "[object DataView]", lve = Mf(C2), uve = Mf(am), cve = Mf(T2), fve = Mf(Xd), dve = Mf(P2), pa = bu;
  5685. (C2 && pa(new C2(new ArrayBuffer(1))) != rN || am && pa(new am()) != J8 || T2 && pa(T2.resolve()) != eN || Xd && pa(new Xd()) != tN || P2 && pa(new P2()) != nN) && (pa = function(t) {
  5686. var e = bu(t), n = e == sve ? t.constructor : void 0, r = n ? Mf(n) : "";
  5687. if (r)
  5688. switch (r) {
  5689. case lve:
  5690. return rN;
  5691. case uve:
  5692. return J8;
  5693. case cve:
  5694. return eN;
  5695. case fve:
  5696. return tN;
  5697. case dve:
  5698. return nN;
  5699. }
  5700. return e;
  5701. });
  5702. var hve = 1, iN = "[object Arguments]", aN = "[object Array]", $y = "[object Object]", pve = Object.prototype, oN = pve.hasOwnProperty;
  5703. function vve(t, e, n, r, i, a) {
  5704. var o = Ti(t), s = Ti(e), l = o ? aN : pa(t), u = s ? aN : pa(e);
  5705. l = l == iN ? $y : l, u = u == iN ? $y : u;
  5706. var c = l == $y, f = u == $y, d = l == u;
  5707. if (d && Ph(t)) {
  5708. if (!Ph(e))
  5709. return !1;
  5710. o = !0, c = !1;
  5711. }
  5712. if (d && !c)
  5713. return a || (a = new eo()), o || XS(t) ? _Z(t, e, n, r, i, a) : fpe(t, e, l, n, r, i, a);
  5714. if (!(n & hve)) {
  5715. var h = c && oN.call(t, "__wrapped__"), p = f && oN.call(e, "__wrapped__");
  5716. if (h || p) {
  5717. var v = h ? t.value() : t, g = p ? e.value() : e;
  5718. return a || (a = new eo()), i(v, g, n, r, a);
  5719. }
  5720. }
  5721. return d ? (a || (a = new eo()), ove(t, e, n, r, i, a)) : !1;
  5722. }
  5723. function qS(t, e, n, r, i) {
  5724. return t === e ? !0 : t == null || e == null || !io(t) && !io(e) ? t !== t && e !== e : vve(t, e, n, r, qS, i);
  5725. }
  5726. function KS(t, e) {
  5727. return qS(t, e);
  5728. }
  5729. const gve = {
  5730. align: Object,
  5731. target: [Object, Function],
  5732. onAlign: Function,
  5733. monitorBufferTime: Number,
  5734. monitorWindowResize: Boolean,
  5735. disabled: Boolean
  5736. };
  5737. function sN(t) {
  5738. return typeof t != "function" ? null : t();
  5739. }
  5740. function lN(t) {
  5741. return typeof t != "object" || !t ? null : t;
  5742. }
  5743. const mve = te({
  5744. compatConfig: {
  5745. MODE: 3
  5746. },
  5747. name: "Align",
  5748. props: gve,
  5749. emits: ["align"],
  5750. setup(t, e) {
  5751. let {
  5752. expose: n,
  5753. slots: r
  5754. } = e;
  5755. const i = U({}), a = U(), [o, s] = Qde(() => {
  5756. const {
  5757. disabled: d,
  5758. target: h,
  5759. align: p,
  5760. onAlign: v
  5761. } = t;
  5762. if (!d && h && a.value) {
  5763. const g = a.value;
  5764. let m;
  5765. const y = sN(h), b = lN(h);
  5766. i.value.element = y, i.value.point = b, i.value.align = p;
  5767. const {
  5768. activeElement: _
  5769. } = document;
  5770. return y && mZ(y) ? m = bI(g, y, p) : b && (m = zde(g, b, p)), Wde(_, g), v && m && v(g, m), !0;
  5771. }
  5772. return !1;
  5773. }, L(() => t.monitorBufferTime)), l = U({
  5774. cancel: () => {
  5775. }
  5776. }), u = U({
  5777. cancel: () => {
  5778. }
  5779. }), c = () => {
  5780. const d = t.target, h = sN(d), p = lN(d);
  5781. a.value !== u.value.element && (u.value.cancel(), u.value.element = a.value, u.value.cancel = H8(a.value, o)), (i.value.element !== h || !Fde(i.value.point, p) || !KS(i.value.align, t.align)) && (o(), l.value.element !== h && (l.value.cancel(), l.value.element = h, l.value.cancel = H8(h, o)));
  5782. };
  5783. it(() => {
  5784. Tt(() => {
  5785. c();
  5786. });
  5787. }), ap(() => {
  5788. Tt(() => {
  5789. c();
  5790. });
  5791. }), se(() => t.disabled, (d) => {
  5792. d ? s() : o();
  5793. }, {
  5794. immediate: !0,
  5795. flush: "post"
  5796. });
  5797. const f = U(null);
  5798. return se(() => t.monitorWindowResize, (d) => {
  5799. d ? f.value || (f.value = vr(window, "resize", o)) : f.value && (f.value.remove(), f.value = null);
  5800. }, {
  5801. flush: "post"
  5802. }), rl(() => {
  5803. l.value.cancel(), u.value.cancel(), f.value && f.value.remove(), s();
  5804. }), n({
  5805. forceAlign: () => o(!0)
  5806. }), () => {
  5807. const d = r == null ? void 0 : r.default();
  5808. return d ? Pn(d[0], {
  5809. ref: a
  5810. }, !0, !0) : null;
  5811. };
  5812. }
  5813. });
  5814. ru("bottomLeft", "bottomRight", "topLeft", "topRight");
  5815. const yve = (t) => t !== void 0 && (t === "topLeft" || t === "topRight") ? "slide-down" : "slide-up", m0 = function(t) {
  5816. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  5817. return I(t ? {
  5818. name: t,
  5819. appear: !0,
  5820. // type: 'animation',
  5821. // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
  5822. // appearActiveClass: `antdv-base-transtion`,
  5823. // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
  5824. enterFromClass: `${t}-enter ${t}-enter-prepare ${t}-enter-start`,
  5825. enterActiveClass: `${t}-enter ${t}-enter-prepare`,
  5826. enterToClass: `${t}-enter ${t}-enter-active`,
  5827. leaveFromClass: ` ${t}-leave`,
  5828. leaveActiveClass: `${t}-leave ${t}-leave-active`,
  5829. leaveToClass: `${t}-leave ${t}-leave-active`
  5830. } : {
  5831. css: !1
  5832. }, e);
  5833. }, CI = function(t) {
  5834. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  5835. return I(t ? {
  5836. name: t,
  5837. appear: !0,
  5838. // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
  5839. appearActiveClass: `${t}`,
  5840. appearToClass: `${t}-appear ${t}-appear-active`,
  5841. enterFromClass: `${t}-appear ${t}-enter ${t}-appear-prepare ${t}-enter-prepare`,
  5842. enterActiveClass: `${t}`,
  5843. enterToClass: `${t}-enter ${t}-appear ${t}-appear-active ${t}-enter-active`,
  5844. leaveActiveClass: `${t} ${t}-leave`,
  5845. leaveToClass: `${t}-leave-active`
  5846. } : {
  5847. css: !1
  5848. }, e);
  5849. }, ts = (t, e, n) => n !== void 0 ? n : `${t}-${e}`, bve = te({
  5850. compatConfig: {
  5851. MODE: 3
  5852. },
  5853. name: "PopupInner",
  5854. inheritAttrs: !1,
  5855. props: hI,
  5856. emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  5857. setup(t, e) {
  5858. let {
  5859. expose: n,
  5860. attrs: r,
  5861. slots: i
  5862. } = e;
  5863. const a = ae(), o = ae(), s = ae(), [l, u] = dde(Nn(t, "stretch")), c = () => {
  5864. t.stretch && u(t.getRootDomNode());
  5865. }, f = ae(!1);
  5866. let d;
  5867. se(() => t.visible, (S) => {
  5868. clearTimeout(d), S ? d = setTimeout(() => {
  5869. f.value = t.visible;
  5870. }) : f.value = !1;
  5871. }, {
  5872. immediate: !0
  5873. });
  5874. const [h, p] = fde(f, c), v = ae(), g = () => t.point ? t.point : t.getRootDomNode, m = () => {
  5875. var S;
  5876. (S = a.value) === null || S === void 0 || S.forceAlign();
  5877. }, y = (S, x) => {
  5878. var C;
  5879. const T = t.getClassNameFromAlign(x), w = s.value;
  5880. s.value !== T && (s.value = T), h.value === "align" && (w !== T ? Promise.resolve().then(() => {
  5881. m();
  5882. }) : p(() => {
  5883. var P;
  5884. (P = v.value) === null || P === void 0 || P.call(v);
  5885. }), (C = t.onAlign) === null || C === void 0 || C.call(t, S, x));
  5886. }, b = L(() => {
  5887. const S = typeof t.animation == "object" ? t.animation : pI(t);
  5888. return ["onAfterEnter", "onAfterLeave"].forEach((x) => {
  5889. const C = S[x];
  5890. S[x] = (T) => {
  5891. p(), h.value = "stable", C == null || C(T);
  5892. };
  5893. }), S;
  5894. }), _ = () => new Promise((S) => {
  5895. v.value = S;
  5896. });
  5897. se([b, h], () => {
  5898. !b.value && h.value === "motion" && p();
  5899. }, {
  5900. immediate: !0
  5901. }), n({
  5902. forceAlign: m,
  5903. getElement: () => o.value.$el || o.value
  5904. });
  5905. const O = L(() => {
  5906. var S;
  5907. return !(!((S = t.align) === null || S === void 0) && S.points && (h.value === "align" || h.value === "stable"));
  5908. });
  5909. return () => {
  5910. var S;
  5911. const {
  5912. zIndex: x,
  5913. align: C,
  5914. prefixCls: T,
  5915. destroyPopupOnHide: w,
  5916. onMouseenter: P,
  5917. onMouseleave: $,
  5918. onTouchstart: A = () => {
  5919. },
  5920. onMousedown: D
  5921. } = t, E = h.value, R = [I(I({}, l.value), {
  5922. zIndex: x,
  5923. opacity: E === "motion" || E === "stable" || !f.value ? null : 0,
  5924. // pointerEvents: statusValue === 'stable' ? null : 'none',
  5925. pointerEvents: !f.value && E !== "stable" ? "none" : null
  5926. }), r.style];
  5927. let N = Yn((S = i.default) === null || S === void 0 ? void 0 : S.call(i, {
  5928. visible: t.visible
  5929. }));
  5930. N.length > 1 && (N = M("div", {
  5931. class: `${T}-content`
  5932. }, [N]));
  5933. const V = ye(T, r.class, s.value, !t.arrow && `${T}-arrow-hidden`), W = f.value || !t.visible ? m0(b.value.name, b.value) : {};
  5934. return M(ho, j(j({
  5935. ref: o
  5936. }, W), {}, {
  5937. onBeforeEnter: _
  5938. }), {
  5939. default: () => !w || t.visible ? Oi(M(mve, {
  5940. target: g(),
  5941. key: "popup",
  5942. ref: a,
  5943. monitorWindowResize: !0,
  5944. disabled: O.value,
  5945. align: C,
  5946. onAlign: y
  5947. }, {
  5948. default: () => M("div", {
  5949. class: V,
  5950. onMouseenter: P,
  5951. onMouseleave: $,
  5952. onMousedown: uf(D, ["capture"]),
  5953. [pr ? "onTouchstartPassive" : "onTouchstart"]: uf(A, ["capture"]),
  5954. style: R
  5955. }, [N])
  5956. }), [[zs, f.value]]) : null
  5957. });
  5958. };
  5959. }
  5960. }), _ve = te({
  5961. compatConfig: {
  5962. MODE: 3
  5963. },
  5964. name: "Popup",
  5965. inheritAttrs: !1,
  5966. props: lde,
  5967. setup(t, e) {
  5968. let {
  5969. attrs: n,
  5970. slots: r,
  5971. expose: i
  5972. } = e;
  5973. const a = ae(!1), o = ae(!1), s = ae(), l = ae();
  5974. return se([() => t.visible, () => t.mobile], () => {
  5975. a.value = t.visible, t.visible && t.mobile && (o.value = !0);
  5976. }, {
  5977. immediate: !0,
  5978. flush: "post"
  5979. }), i({
  5980. forceAlign: () => {
  5981. var u;
  5982. (u = s.value) === null || u === void 0 || u.forceAlign();
  5983. },
  5984. getElement: () => {
  5985. var u;
  5986. return (u = s.value) === null || u === void 0 ? void 0 : u.getElement();
  5987. }
  5988. }), () => {
  5989. const u = I(I(I({}, t), n), {
  5990. visible: a.value
  5991. }), c = o.value ? M(ude, j(j({}, u), {}, {
  5992. mobile: t.mobile,
  5993. ref: s
  5994. }), {
  5995. default: r.default
  5996. }) : M(bve, j(j({}, u), {}, {
  5997. ref: s
  5998. }), {
  5999. default: r.default
  6000. });
  6001. return M("div", {
  6002. ref: l
  6003. }, [M(lZ, u, null), c]);
  6004. };
  6005. }
  6006. });
  6007. function Ove(t, e, n) {
  6008. return n ? t[0] === e[0] : t[0] === e[0] && t[1] === e[1];
  6009. }
  6010. function uN(t, e, n) {
  6011. const r = t[e] || {};
  6012. return I(I({}, r), n);
  6013. }
  6014. function Sve(t, e, n, r) {
  6015. const {
  6016. points: i
  6017. } = n, a = Object.keys(t);
  6018. for (let o = 0; o < a.length; o += 1) {
  6019. const s = a[o];
  6020. if (Ove(t[s].points, i, r))
  6021. return `${e}-placement-${s}`;
  6022. }
  6023. return "";
  6024. }
  6025. const JS = {
  6026. methods: {
  6027. setState() {
  6028. 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;
  6029. if (this.getDerivedStateFromProps) {
  6030. const r = this.getDerivedStateFromProps(Due(this), I(I({}, this.$data), n));
  6031. if (r === null)
  6032. return;
  6033. n = I(I({}, n), r || {});
  6034. }
  6035. I(this.$data, n), this._.isMounted && this.$forceUpdate(), Tt(() => {
  6036. e && e();
  6037. });
  6038. },
  6039. __emit() {
  6040. const t = [].slice.call(arguments, 0);
  6041. let e = t[0];
  6042. e = `on${e[0].toUpperCase()}${e.substring(1)}`;
  6043. const n = this.$props[e] || this.$attrs[e];
  6044. if (t.length && n)
  6045. if (Array.isArray(n))
  6046. for (let r = 0, i = n.length; r < i; r++)
  6047. n[r](...t.slice(1));
  6048. else
  6049. n(...t.slice(1));
  6050. }
  6051. }
  6052. }, AZ = Symbol("PortalContextKey"), TI = function(t) {
  6053. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
  6054. inTriggerContext: !0
  6055. };
  6056. pt(AZ, {
  6057. inTriggerContext: e.inTriggerContext,
  6058. shouldRender: L(() => {
  6059. const {
  6060. sPopupVisible: n,
  6061. popupRef: r,
  6062. forceRender: i,
  6063. autoDestroy: a
  6064. } = t || {};
  6065. let o = !1;
  6066. return (n || r || i) && (o = !0), !n && a && (o = !1), o;
  6067. })
  6068. });
  6069. }, xve = () => {
  6070. TI({}, {
  6071. inTriggerContext: !1
  6072. });
  6073. const t = Ge(AZ, {
  6074. shouldRender: L(() => !1),
  6075. inTriggerContext: !1
  6076. });
  6077. return {
  6078. shouldRender: L(() => t.shouldRender.value || t.inTriggerContext === !1)
  6079. };
  6080. }, EZ = te({
  6081. compatConfig: {
  6082. MODE: 3
  6083. },
  6084. name: "Portal",
  6085. inheritAttrs: !1,
  6086. props: {
  6087. getContainer: Y.func.isRequired,
  6088. didUpdate: Function
  6089. },
  6090. setup(t, e) {
  6091. let {
  6092. slots: n
  6093. } = e, r = !0, i;
  6094. const {
  6095. shouldRender: a
  6096. } = xve();
  6097. function o() {
  6098. a.value && (i = t.getContainer());
  6099. }
  6100. G9(() => {
  6101. r = !1, o();
  6102. }), it(() => {
  6103. i || o();
  6104. });
  6105. const s = se(a, () => {
  6106. a.value && !i && (i = t.getContainer()), i && s();
  6107. });
  6108. return ap(() => {
  6109. Tt(() => {
  6110. var l;
  6111. a.value && ((l = t.didUpdate) === null || l === void 0 || l.call(t, t));
  6112. });
  6113. }), () => {
  6114. var l;
  6115. return a.value ? r ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : i ? M(AS, {
  6116. to: i
  6117. }, n) : null : null;
  6118. };
  6119. }
  6120. });
  6121. let vC;
  6122. function wve(t) {
  6123. if (typeof document > "u")
  6124. return 0;
  6125. if (vC === void 0) {
  6126. const e = document.createElement("div");
  6127. e.style.width = "100%", e.style.height = "200px";
  6128. const n = document.createElement("div"), r = n.style;
  6129. 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);
  6130. const i = e.offsetWidth;
  6131. n.style.overflow = "scroll";
  6132. let a = e.offsetWidth;
  6133. i === a && (a = n.clientWidth), document.body.removeChild(n), vC = i - a;
  6134. }
  6135. return vC;
  6136. }
  6137. const Cve = `vc-util-locker-${Date.now()}`;
  6138. let cN = 0;
  6139. function Tve() {
  6140. return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
  6141. }
  6142. function Pve(t) {
  6143. const e = L(() => !!t && !!t.value);
  6144. cN += 1;
  6145. const n = `${Cve}_${cN}`;
  6146. ht((r) => {
  6147. if (Ta()) {
  6148. if (e.value) {
  6149. const i = wve(), a = Tve();
  6150. em(`
  6151. html body {
  6152. overflow-y: hidden;
  6153. ${a ? `width: calc(100% - ${i}px);` : ""}
  6154. }`, n);
  6155. } else
  6156. b1(n);
  6157. r(() => {
  6158. b1(n);
  6159. });
  6160. }
  6161. }, {
  6162. flush: "post"
  6163. });
  6164. }
  6165. let Ru = 0;
  6166. const w_ = Ta(), fN = (t) => {
  6167. if (!w_)
  6168. return null;
  6169. if (t) {
  6170. if (typeof t == "string")
  6171. return document.querySelectorAll(t)[0];
  6172. if (typeof t == "function")
  6173. return t();
  6174. if (typeof t == "object" && t instanceof window.HTMLElement)
  6175. return t;
  6176. }
  6177. return document.body;
  6178. }, MZ = te({
  6179. compatConfig: {
  6180. MODE: 3
  6181. },
  6182. name: "PortalWrapper",
  6183. inheritAttrs: !1,
  6184. props: {
  6185. wrapperClassName: String,
  6186. forceRender: {
  6187. type: Boolean,
  6188. default: void 0
  6189. },
  6190. getContainer: Y.any,
  6191. visible: {
  6192. type: Boolean,
  6193. default: void 0
  6194. },
  6195. autoLock: nt(),
  6196. didUpdate: Function
  6197. },
  6198. setup(t, e) {
  6199. let {
  6200. slots: n
  6201. } = e;
  6202. const r = ae(), i = ae(), a = ae(), o = ae(1), s = Ta() && document.createElement("div"), l = () => {
  6203. var h, p;
  6204. 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;
  6205. };
  6206. let u = null;
  6207. const c = function() {
  6208. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || r.value && !r.value.parentNode ? (u = fN(t.getContainer), u ? (u.appendChild(r.value), !0) : !1) : !0;
  6209. }, f = () => w_ ? (r.value || (r.value = s, c(!0)), d(), r.value) : null, d = () => {
  6210. const {
  6211. wrapperClassName: h
  6212. } = t;
  6213. r.value && h && h !== r.value.className && (r.value.className = h);
  6214. };
  6215. return ap(() => {
  6216. d(), c();
  6217. }), Pve(L(() => t.autoLock && t.visible && Ta() && (r.value === document.body || r.value === s))), it(() => {
  6218. let h = !1;
  6219. se([() => t.visible, () => t.getContainer], (p, v) => {
  6220. let [g, m] = p, [y, b] = v;
  6221. w_ && (u = fN(t.getContainer), u === document.body && (g && !y ? Ru += 1 : h && (Ru -= 1))), h && (typeof m == "function" && typeof b == "function" ? m.toString() !== b.toString() : m !== b) && l(), h = !0;
  6222. }, {
  6223. immediate: !0,
  6224. flush: "post"
  6225. }), Tt(() => {
  6226. c() || (a.value = xt(() => {
  6227. o.value += 1;
  6228. }));
  6229. });
  6230. }), yt(() => {
  6231. const {
  6232. visible: h
  6233. } = t;
  6234. w_ && u === document.body && (Ru = h && Ru ? Ru - 1 : Ru), l(), xt.cancel(a.value);
  6235. }), () => {
  6236. const {
  6237. forceRender: h,
  6238. visible: p
  6239. } = t;
  6240. let v = null;
  6241. const g = {
  6242. getOpenCount: () => Ru,
  6243. getContainer: f
  6244. };
  6245. return o.value && (h || p || i.value) && (v = M(EZ, {
  6246. getContainer: f,
  6247. ref: i,
  6248. didUpdate: t.didUpdate
  6249. }, {
  6250. default: () => {
  6251. var m;
  6252. return (m = n.default) === null || m === void 0 ? void 0 : m.call(n, g);
  6253. }
  6254. })), v;
  6255. };
  6256. }
  6257. }), $ve = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], ex = te({
  6258. compatConfig: {
  6259. MODE: 3
  6260. },
  6261. name: "Trigger",
  6262. mixins: [JS],
  6263. inheritAttrs: !1,
  6264. props: ode(),
  6265. setup(t) {
  6266. const e = L(() => {
  6267. const {
  6268. popupPlacement: i,
  6269. popupAlign: a,
  6270. builtinPlacements: o
  6271. } = t;
  6272. return i && o ? uN(o, i, a) : a;
  6273. }), n = ae(null), r = (i) => {
  6274. n.value = i;
  6275. };
  6276. return {
  6277. vcTriggerContext: Ge("vcTriggerContext", {}),
  6278. popupRef: n,
  6279. setPopupRef: r,
  6280. triggerRef: ae(null),
  6281. align: e,
  6282. focusTime: null,
  6283. clickOutsideHandler: null,
  6284. contextmenuOutsideHandler1: null,
  6285. contextmenuOutsideHandler2: null,
  6286. touchOutsideHandler: null,
  6287. attachId: null,
  6288. delayTimer: null,
  6289. hasPopupMouseDown: !1,
  6290. preClickTime: null,
  6291. preTouchTime: null,
  6292. mouseDownTimeout: null,
  6293. childOriginEvents: {}
  6294. };
  6295. },
  6296. data() {
  6297. const t = this.$props;
  6298. let e;
  6299. return this.popupVisible !== void 0 ? e = !!t.popupVisible : e = !!t.defaultPopupVisible, $ve.forEach((n) => {
  6300. this[`fire${n}`] = (r) => {
  6301. this.fireEvents(n, r);
  6302. };
  6303. }), {
  6304. prevPopupVisible: e,
  6305. sPopupVisible: e,
  6306. point: null
  6307. };
  6308. },
  6309. watch: {
  6310. popupVisible(t) {
  6311. t !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = t);
  6312. }
  6313. },
  6314. created() {
  6315. pt("vcTriggerContext", {
  6316. onPopupMouseDown: this.onPopupMouseDown,
  6317. onPopupMouseenter: this.onPopupMouseenter,
  6318. onPopupMouseleave: this.onPopupMouseleave
  6319. }), TI(this);
  6320. },
  6321. deactivated() {
  6322. this.setPopupVisible(!1);
  6323. },
  6324. mounted() {
  6325. this.$nextTick(() => {
  6326. this.updatedCal();
  6327. });
  6328. },
  6329. updated() {
  6330. this.$nextTick(() => {
  6331. this.updatedCal();
  6332. });
  6333. },
  6334. beforeUnmount() {
  6335. this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), xt.cancel(this.attachId);
  6336. },
  6337. methods: {
  6338. updatedCal() {
  6339. const t = this.$props;
  6340. if (this.$data.sPopupVisible) {
  6341. let n;
  6342. !this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow()) && (n = t.getDocument(this.getRootDomNode()), this.clickOutsideHandler = vr(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || t.getDocument(this.getRootDomNode()), this.touchOutsideHandler = vr(n, "touchstart", this.onDocumentClick, pr ? {
  6343. passive: !1
  6344. } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || t.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = vr(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = vr(window, "blur", this.onContextmenuClose));
  6345. } else
  6346. this.clearOutsideHandler();
  6347. },
  6348. onMouseenter(t) {
  6349. const {
  6350. mouseEnterDelay: e
  6351. } = this.$props;
  6352. this.fireEvents("onMouseenter", t), this.delaySetPopupVisible(!0, e, e ? null : t);
  6353. },
  6354. onMouseMove(t) {
  6355. this.fireEvents("onMousemove", t), this.setPoint(t);
  6356. },
  6357. onMouseleave(t) {
  6358. this.fireEvents("onMouseleave", t), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
  6359. },
  6360. onPopupMouseenter() {
  6361. const {
  6362. vcTriggerContext: t = {}
  6363. } = this;
  6364. t.onPopupMouseenter && t.onPopupMouseenter(), this.clearDelayTimer();
  6365. },
  6366. onPopupMouseleave(t) {
  6367. var e;
  6368. if (t && t.relatedTarget && !t.relatedTarget.setTimeout && $l((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement(), t.relatedTarget))
  6369. return;
  6370. this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
  6371. const {
  6372. vcTriggerContext: n = {}
  6373. } = this;
  6374. n.onPopupMouseleave && n.onPopupMouseleave(t);
  6375. },
  6376. onFocus(t) {
  6377. this.fireEvents("onFocus", t), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
  6378. },
  6379. onMousedown(t) {
  6380. this.fireEvents("onMousedown", t), this.preClickTime = Date.now();
  6381. },
  6382. onTouchstart(t) {
  6383. this.fireEvents("onTouchstart", t), this.preTouchTime = Date.now();
  6384. },
  6385. onBlur(t) {
  6386. $l(t.target, t.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", t), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
  6387. },
  6388. onContextmenu(t) {
  6389. t.preventDefault(), this.fireEvents("onContextmenu", t), this.setPopupVisible(!0, t);
  6390. },
  6391. onContextmenuClose() {
  6392. this.isContextmenuToShow() && this.close();
  6393. },
  6394. onClick(t) {
  6395. if (this.fireEvents("onClick", t), this.focusTime) {
  6396. let n;
  6397. 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)
  6398. return;
  6399. this.focusTime = 0;
  6400. }
  6401. this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && t && t.preventDefault && t.preventDefault(), t && t.domEvent && t.domEvent.preventDefault();
  6402. const e = !this.$data.sPopupVisible;
  6403. (this.isClickToHide() && !e || e && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, t);
  6404. },
  6405. onPopupMouseDown() {
  6406. const {
  6407. vcTriggerContext: t = {}
  6408. } = this;
  6409. this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
  6410. this.hasPopupMouseDown = !1;
  6411. }, 0), t.onPopupMouseDown && t.onPopupMouseDown(...arguments);
  6412. },
  6413. onDocumentClick(t) {
  6414. if (this.$props.mask && !this.$props.maskClosable)
  6415. return;
  6416. const e = t.target, n = this.getRootDomNode(), r = this.getPopupDomNode();
  6417. // mousedown on the target should also close popup when action is contextMenu.
  6418. // https://github.com/ant-design/ant-design/issues/29853
  6419. (!$l(n, e) || this.isContextMenuOnly()) && !$l(r, e) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
  6420. },
  6421. getPopupDomNode() {
  6422. var t;
  6423. return ((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement()) || null;
  6424. },
  6425. getRootDomNode() {
  6426. var t, e, n, r;
  6427. const {
  6428. getTriggerDOMNode: i
  6429. } = this.$props;
  6430. if (i) {
  6431. const a = ((e = (t = this.triggerRef) === null || t === void 0 ? void 0 : t.$el) === null || e === void 0 ? void 0 : e.nodeName) === "#comment" ? null : Ts(this.triggerRef);
  6432. return Ts(i(a));
  6433. }
  6434. try {
  6435. const a = ((r = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || r === void 0 ? void 0 : r.nodeName) === "#comment" ? null : Ts(this.triggerRef);
  6436. if (a)
  6437. return a;
  6438. } catch {
  6439. }
  6440. return Ts(this);
  6441. },
  6442. handleGetPopupClassFromAlign(t) {
  6443. const e = [], n = this.$props, {
  6444. popupPlacement: r,
  6445. builtinPlacements: i,
  6446. prefixCls: a,
  6447. alignPoint: o,
  6448. getPopupClassNameFromAlign: s
  6449. } = n;
  6450. return r && i && e.push(Sve(i, a, t, o)), s && e.push(s(t)), e.join(" ");
  6451. },
  6452. getPopupAlign() {
  6453. const t = this.$props, {
  6454. popupPlacement: e,
  6455. popupAlign: n,
  6456. builtinPlacements: r
  6457. } = t;
  6458. return e && r ? uN(r, e, n) : n;
  6459. },
  6460. getComponent() {
  6461. const t = {};
  6462. this.isMouseEnterToShow() && (t.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (t.onMouseleave = this.onPopupMouseleave), t.onMousedown = this.onPopupMouseDown, t[pr ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
  6463. const {
  6464. handleGetPopupClassFromAlign: e,
  6465. getRootDomNode: n,
  6466. $attrs: r
  6467. } = this, {
  6468. prefixCls: i,
  6469. destroyPopupOnHide: a,
  6470. popupClassName: o,
  6471. popupAnimation: s,
  6472. popupTransitionName: l,
  6473. popupStyle: u,
  6474. mask: c,
  6475. maskAnimation: f,
  6476. maskTransitionName: d,
  6477. zIndex: h,
  6478. stretch: p,
  6479. alignPoint: v,
  6480. mobile: g,
  6481. arrow: m,
  6482. forceRender: y
  6483. } = this.$props, {
  6484. sPopupVisible: b,
  6485. point: _
  6486. } = this.$data, O = I(I({
  6487. prefixCls: i,
  6488. arrow: m,
  6489. destroyPopupOnHide: a,
  6490. visible: b,
  6491. point: v ? _ : null,
  6492. align: this.align,
  6493. animation: s,
  6494. getClassNameFromAlign: e,
  6495. stretch: p,
  6496. getRootDomNode: n,
  6497. mask: c,
  6498. zIndex: h,
  6499. transitionName: l,
  6500. maskAnimation: f,
  6501. maskTransitionName: d,
  6502. class: o,
  6503. style: u,
  6504. onAlign: r.onPopupAlign || sZ
  6505. }, t), {
  6506. ref: this.setPopupRef,
  6507. mobile: g,
  6508. forceRender: y
  6509. });
  6510. return M(_ve, O, {
  6511. default: this.$slots.popup || (() => Rue(this, "popup"))
  6512. });
  6513. },
  6514. attachParent(t) {
  6515. xt.cancel(this.attachId);
  6516. const {
  6517. getPopupContainer: e,
  6518. getDocument: n
  6519. } = this.$props, r = this.getRootDomNode();
  6520. let i;
  6521. e ? (r || e.length === 0) && (i = e(r)) : i = n(this.getRootDomNode()).body, i ? i.appendChild(t) : this.attachId = xt(() => {
  6522. this.attachParent(t);
  6523. });
  6524. },
  6525. getContainer() {
  6526. const {
  6527. $props: t
  6528. } = this, {
  6529. getDocument: e
  6530. } = t, n = e(this.getRootDomNode()).createElement("div");
  6531. return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
  6532. },
  6533. setPopupVisible(t, e) {
  6534. const {
  6535. alignPoint: n,
  6536. sPopupVisible: r,
  6537. onPopupVisibleChange: i
  6538. } = this;
  6539. this.clearDelayTimer(), r !== t && (m1(this, "popupVisible") || this.setState({
  6540. sPopupVisible: t,
  6541. prevPopupVisible: r
  6542. }), i && i(t)), n && e && t && this.setPoint(e);
  6543. },
  6544. setPoint(t) {
  6545. const {
  6546. alignPoint: e
  6547. } = this.$props;
  6548. !e || !t || this.setState({
  6549. point: {
  6550. pageX: t.pageX,
  6551. pageY: t.pageY
  6552. }
  6553. });
  6554. },
  6555. handlePortalUpdate() {
  6556. this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
  6557. },
  6558. delaySetPopupVisible(t, e, n) {
  6559. const r = e * 1e3;
  6560. if (this.clearDelayTimer(), r) {
  6561. const i = n ? {
  6562. pageX: n.pageX,
  6563. pageY: n.pageY
  6564. } : null;
  6565. this.delayTimer = setTimeout(() => {
  6566. this.setPopupVisible(t, i), this.clearDelayTimer();
  6567. }, r);
  6568. } else
  6569. this.setPopupVisible(t, n);
  6570. },
  6571. clearDelayTimer() {
  6572. this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
  6573. },
  6574. clearOutsideHandler() {
  6575. 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);
  6576. },
  6577. createTwoChains(t) {
  6578. let e = () => {
  6579. };
  6580. const n = t8(this);
  6581. return this.childOriginEvents[t] && n[t] ? this[`fire${t}`] : (e = this.childOriginEvents[t] || n[t] || e, e);
  6582. },
  6583. isClickToShow() {
  6584. const {
  6585. action: t,
  6586. showAction: e
  6587. } = this.$props;
  6588. return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
  6589. },
  6590. isContextMenuOnly() {
  6591. const {
  6592. action: t
  6593. } = this.$props;
  6594. return t === "contextmenu" || t.length === 1 && t[0] === "contextmenu";
  6595. },
  6596. isContextmenuToShow() {
  6597. const {
  6598. action: t,
  6599. showAction: e
  6600. } = this.$props;
  6601. return t.indexOf("contextmenu") !== -1 || e.indexOf("contextmenu") !== -1;
  6602. },
  6603. isClickToHide() {
  6604. const {
  6605. action: t,
  6606. hideAction: e
  6607. } = this.$props;
  6608. return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
  6609. },
  6610. isMouseEnterToShow() {
  6611. const {
  6612. action: t,
  6613. showAction: e
  6614. } = this.$props;
  6615. return t.indexOf("hover") !== -1 || e.indexOf("mouseenter") !== -1;
  6616. },
  6617. isMouseLeaveToHide() {
  6618. const {
  6619. action: t,
  6620. hideAction: e
  6621. } = this.$props;
  6622. return t.indexOf("hover") !== -1 || e.indexOf("mouseleave") !== -1;
  6623. },
  6624. isFocusToShow() {
  6625. const {
  6626. action: t,
  6627. showAction: e
  6628. } = this.$props;
  6629. return t.indexOf("focus") !== -1 || e.indexOf("focus") !== -1;
  6630. },
  6631. isBlurToHide() {
  6632. const {
  6633. action: t,
  6634. hideAction: e
  6635. } = this.$props;
  6636. return t.indexOf("focus") !== -1 || e.indexOf("blur") !== -1;
  6637. },
  6638. forcePopupAlign() {
  6639. var t;
  6640. this.$data.sPopupVisible && ((t = this.popupRef) === null || t === void 0 || t.forceAlign());
  6641. },
  6642. fireEvents(t, e) {
  6643. this.childOriginEvents[t] && this.childOriginEvents[t](e);
  6644. const n = this.$props[t] || this.$attrs[t];
  6645. n && n(e);
  6646. },
  6647. close() {
  6648. this.setPopupVisible(!1);
  6649. }
  6650. },
  6651. render() {
  6652. const {
  6653. $attrs: t
  6654. } = this, e = ss(ij(this)), {
  6655. alignPoint: n,
  6656. getPopupContainer: r
  6657. } = this.$props, i = e[0];
  6658. this.childOriginEvents = t8(i);
  6659. const a = {
  6660. key: "trigger"
  6661. };
  6662. this.isContextmenuToShow() ? a.onContextmenu = this.onContextmenu : a.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (a.onClick = this.onClick, a.onMousedown = this.onMousedown, a[pr ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (a.onClick = this.createTwoChains("onClick"), a.onMousedown = this.createTwoChains("onMousedown"), a[pr ? "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) => {
  6663. u && (!u.relatedTarget || !$l(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
  6664. });
  6665. const o = ye(i && i.props && i.props.class, t.class);
  6666. o && (a.class = o);
  6667. const s = Pn(i, I(I({}, a), {
  6668. ref: "triggerRef"
  6669. }), !0, !0), l = M(MZ, {
  6670. key: "portal",
  6671. getContainer: r && (() => r(this.getRootDomNode())),
  6672. didUpdate: this.handlePortalUpdate,
  6673. visible: this.$data.sPopupVisible
  6674. }, {
  6675. default: this.getComponent
  6676. });
  6677. return M(wt, null, [s, l]);
  6678. }
  6679. });
  6680. var Ave = function(t, e) {
  6681. var n = {};
  6682. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  6683. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  6684. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  6685. return n;
  6686. };
  6687. const Eve = (t) => {
  6688. const e = t === !0 ? 0 : 1;
  6689. return {
  6690. bottomLeft: {
  6691. points: ["tl", "bl"],
  6692. offset: [0, 4],
  6693. overflow: {
  6694. adjustX: e,
  6695. adjustY: 1
  6696. }
  6697. },
  6698. bottomRight: {
  6699. points: ["tr", "br"],
  6700. offset: [0, 4],
  6701. overflow: {
  6702. adjustX: e,
  6703. adjustY: 1
  6704. }
  6705. },
  6706. topLeft: {
  6707. points: ["bl", "tl"],
  6708. offset: [0, -4],
  6709. overflow: {
  6710. adjustX: e,
  6711. adjustY: 1
  6712. }
  6713. },
  6714. topRight: {
  6715. points: ["br", "tr"],
  6716. offset: [0, -4],
  6717. overflow: {
  6718. adjustX: e,
  6719. adjustY: 1
  6720. }
  6721. }
  6722. };
  6723. }, Mve = te({
  6724. name: "SelectTrigger",
  6725. inheritAttrs: !1,
  6726. props: {
  6727. dropdownAlign: Object,
  6728. visible: {
  6729. type: Boolean,
  6730. default: void 0
  6731. },
  6732. disabled: {
  6733. type: Boolean,
  6734. default: void 0
  6735. },
  6736. dropdownClassName: String,
  6737. dropdownStyle: Y.object,
  6738. placement: String,
  6739. empty: {
  6740. type: Boolean,
  6741. default: void 0
  6742. },
  6743. prefixCls: String,
  6744. popupClassName: String,
  6745. animation: String,
  6746. transitionName: String,
  6747. getPopupContainer: Function,
  6748. dropdownRender: Function,
  6749. containerWidth: Number,
  6750. dropdownMatchSelectWidth: Y.oneOfType([Number, Boolean]).def(!0),
  6751. popupElement: Y.any,
  6752. direction: String,
  6753. getTriggerDOMNode: Function,
  6754. onPopupVisibleChange: Function,
  6755. onPopupMouseEnter: Function,
  6756. onPopupFocusin: Function,
  6757. onPopupFocusout: Function
  6758. },
  6759. setup(t, e) {
  6760. let {
  6761. slots: n,
  6762. attrs: r,
  6763. expose: i
  6764. } = e;
  6765. const a = L(() => {
  6766. const {
  6767. dropdownMatchSelectWidth: s
  6768. } = t;
  6769. return Eve(s);
  6770. }), o = U();
  6771. return i({
  6772. getPopupElement: () => o.value
  6773. }), () => {
  6774. const s = I(I({}, t), r), {
  6775. empty: l = !1
  6776. } = s, u = Ave(s, ["empty"]), {
  6777. visible: c,
  6778. dropdownAlign: f,
  6779. prefixCls: d,
  6780. popupElement: h,
  6781. dropdownClassName: p,
  6782. dropdownStyle: v,
  6783. direction: g = "ltr",
  6784. placement: m,
  6785. dropdownMatchSelectWidth: y,
  6786. containerWidth: b,
  6787. dropdownRender: _,
  6788. animation: O,
  6789. transitionName: S,
  6790. getPopupContainer: x,
  6791. getTriggerDOMNode: C,
  6792. onPopupVisibleChange: T,
  6793. onPopupMouseEnter: w,
  6794. onPopupFocusin: P,
  6795. onPopupFocusout: $
  6796. } = u, A = `${d}-dropdown`;
  6797. let D = h;
  6798. _ && (D = _({
  6799. menuNode: h,
  6800. props: t
  6801. }));
  6802. const E = O ? `${A}-${O}` : S, R = I({
  6803. minWidth: `${b}px`
  6804. }, v);
  6805. return typeof y == "number" ? R.width = `${y}px` : y && (R.width = `${b}px`), M(ex, j(j({}, t), {}, {
  6806. showAction: T ? ["click"] : [],
  6807. hideAction: T ? ["click"] : [],
  6808. popupPlacement: m || (g === "rtl" ? "bottomRight" : "bottomLeft"),
  6809. builtinPlacements: a.value,
  6810. prefixCls: A,
  6811. popupTransitionName: E,
  6812. popupAlign: f,
  6813. popupVisible: c,
  6814. getPopupContainer: x,
  6815. popupClassName: ye(p, {
  6816. [`${A}-empty`]: l
  6817. }),
  6818. popupStyle: R,
  6819. getTriggerDOMNode: C,
  6820. onPopupVisibleChange: T
  6821. }), {
  6822. default: n.default,
  6823. popup: () => M("div", {
  6824. ref: o,
  6825. onMouseenter: w,
  6826. onFocusin: P,
  6827. onFocusout: $
  6828. }, [D])
  6829. });
  6830. };
  6831. }
  6832. }), ge = {
  6833. /**
  6834. * MAC_ENTER
  6835. */
  6836. MAC_ENTER: 3,
  6837. /**
  6838. * BACKSPACE
  6839. */
  6840. BACKSPACE: 8,
  6841. /**
  6842. * TAB
  6843. */
  6844. TAB: 9,
  6845. /**
  6846. * NUMLOCK on FF/Safari Mac
  6847. */
  6848. NUM_CENTER: 12,
  6849. /**
  6850. * ENTER
  6851. */
  6852. ENTER: 13,
  6853. /**
  6854. * SHIFT
  6855. */
  6856. SHIFT: 16,
  6857. /**
  6858. * CTRL
  6859. */
  6860. CTRL: 17,
  6861. /**
  6862. * ALT
  6863. */
  6864. ALT: 18,
  6865. /**
  6866. * PAUSE
  6867. */
  6868. PAUSE: 19,
  6869. /**
  6870. * CAPS_LOCK
  6871. */
  6872. CAPS_LOCK: 20,
  6873. /**
  6874. * ESC
  6875. */
  6876. ESC: 27,
  6877. /**
  6878. * SPACE
  6879. */
  6880. SPACE: 32,
  6881. /**
  6882. * PAGE_UP
  6883. */
  6884. PAGE_UP: 33,
  6885. /**
  6886. * PAGE_DOWN
  6887. */
  6888. PAGE_DOWN: 34,
  6889. /**
  6890. * END
  6891. */
  6892. END: 35,
  6893. /**
  6894. * HOME
  6895. */
  6896. HOME: 36,
  6897. /**
  6898. * LEFT
  6899. */
  6900. LEFT: 37,
  6901. /**
  6902. * UP
  6903. */
  6904. UP: 38,
  6905. /**
  6906. * RIGHT
  6907. */
  6908. RIGHT: 39,
  6909. /**
  6910. * DOWN
  6911. */
  6912. DOWN: 40,
  6913. /**
  6914. * PRINT_SCREEN
  6915. */
  6916. PRINT_SCREEN: 44,
  6917. /**
  6918. * INSERT
  6919. */
  6920. INSERT: 45,
  6921. /**
  6922. * DELETE
  6923. */
  6924. DELETE: 46,
  6925. /**
  6926. * ZERO
  6927. */
  6928. ZERO: 48,
  6929. /**
  6930. * ONE
  6931. */
  6932. ONE: 49,
  6933. /**
  6934. * TWO
  6935. */
  6936. TWO: 50,
  6937. /**
  6938. * THREE
  6939. */
  6940. THREE: 51,
  6941. /**
  6942. * FOUR
  6943. */
  6944. FOUR: 52,
  6945. /**
  6946. * FIVE
  6947. */
  6948. FIVE: 53,
  6949. /**
  6950. * SIX
  6951. */
  6952. SIX: 54,
  6953. /**
  6954. * SEVEN
  6955. */
  6956. SEVEN: 55,
  6957. /**
  6958. * EIGHT
  6959. */
  6960. EIGHT: 56,
  6961. /**
  6962. * NINE
  6963. */
  6964. NINE: 57,
  6965. /**
  6966. * QUESTION_MARK
  6967. */
  6968. QUESTION_MARK: 63,
  6969. /**
  6970. * A
  6971. */
  6972. A: 65,
  6973. /**
  6974. * B
  6975. */
  6976. B: 66,
  6977. /**
  6978. * C
  6979. */
  6980. C: 67,
  6981. /**
  6982. * D
  6983. */
  6984. D: 68,
  6985. /**
  6986. * E
  6987. */
  6988. E: 69,
  6989. /**
  6990. * F
  6991. */
  6992. F: 70,
  6993. /**
  6994. * G
  6995. */
  6996. G: 71,
  6997. /**
  6998. * H
  6999. */
  7000. H: 72,
  7001. /**
  7002. * I
  7003. */
  7004. I: 73,
  7005. /**
  7006. * J
  7007. */
  7008. J: 74,
  7009. /**
  7010. * K
  7011. */
  7012. K: 75,
  7013. /**
  7014. * L
  7015. */
  7016. L: 76,
  7017. /**
  7018. * M
  7019. */
  7020. M: 77,
  7021. /**
  7022. * N
  7023. */
  7024. N: 78,
  7025. /**
  7026. * O
  7027. */
  7028. O: 79,
  7029. /**
  7030. * P
  7031. */
  7032. P: 80,
  7033. /**
  7034. * Q
  7035. */
  7036. Q: 81,
  7037. /**
  7038. * R
  7039. */
  7040. R: 82,
  7041. /**
  7042. * S
  7043. */
  7044. S: 83,
  7045. /**
  7046. * T
  7047. */
  7048. T: 84,
  7049. /**
  7050. * U
  7051. */
  7052. U: 85,
  7053. /**
  7054. * V
  7055. */
  7056. V: 86,
  7057. /**
  7058. * W
  7059. */
  7060. W: 87,
  7061. /**
  7062. * X
  7063. */
  7064. X: 88,
  7065. /**
  7066. * Y
  7067. */
  7068. Y: 89,
  7069. /**
  7070. * Z
  7071. */
  7072. Z: 90,
  7073. /**
  7074. * META
  7075. */
  7076. META: 91,
  7077. /**
  7078. * WIN_KEY_RIGHT
  7079. */
  7080. WIN_KEY_RIGHT: 92,
  7081. /**
  7082. * CONTEXT_MENU
  7083. */
  7084. CONTEXT_MENU: 93,
  7085. /**
  7086. * NUM_ZERO
  7087. */
  7088. NUM_ZERO: 96,
  7089. /**
  7090. * NUM_ONE
  7091. */
  7092. NUM_ONE: 97,
  7093. /**
  7094. * NUM_TWO
  7095. */
  7096. NUM_TWO: 98,
  7097. /**
  7098. * NUM_THREE
  7099. */
  7100. NUM_THREE: 99,
  7101. /**
  7102. * NUM_FOUR
  7103. */
  7104. NUM_FOUR: 100,
  7105. /**
  7106. * NUM_FIVE
  7107. */
  7108. NUM_FIVE: 101,
  7109. /**
  7110. * NUM_SIX
  7111. */
  7112. NUM_SIX: 102,
  7113. /**
  7114. * NUM_SEVEN
  7115. */
  7116. NUM_SEVEN: 103,
  7117. /**
  7118. * NUM_EIGHT
  7119. */
  7120. NUM_EIGHT: 104,
  7121. /**
  7122. * NUM_NINE
  7123. */
  7124. NUM_NINE: 105,
  7125. /**
  7126. * NUM_MULTIPLY
  7127. */
  7128. NUM_MULTIPLY: 106,
  7129. /**
  7130. * NUM_PLUS
  7131. */
  7132. NUM_PLUS: 107,
  7133. /**
  7134. * NUM_MINUS
  7135. */
  7136. NUM_MINUS: 109,
  7137. /**
  7138. * NUM_PERIOD
  7139. */
  7140. NUM_PERIOD: 110,
  7141. /**
  7142. * NUM_DIVISION
  7143. */
  7144. NUM_DIVISION: 111,
  7145. /**
  7146. * F1
  7147. */
  7148. F1: 112,
  7149. /**
  7150. * F2
  7151. */
  7152. F2: 113,
  7153. /**
  7154. * F3
  7155. */
  7156. F3: 114,
  7157. /**
  7158. * F4
  7159. */
  7160. F4: 115,
  7161. /**
  7162. * F5
  7163. */
  7164. F5: 116,
  7165. /**
  7166. * F6
  7167. */
  7168. F6: 117,
  7169. /**
  7170. * F7
  7171. */
  7172. F7: 118,
  7173. /**
  7174. * F8
  7175. */
  7176. F8: 119,
  7177. /**
  7178. * F9
  7179. */
  7180. F9: 120,
  7181. /**
  7182. * F10
  7183. */
  7184. F10: 121,
  7185. /**
  7186. * F11
  7187. */
  7188. F11: 122,
  7189. /**
  7190. * F12
  7191. */
  7192. F12: 123,
  7193. /**
  7194. * NUMLOCK
  7195. */
  7196. NUMLOCK: 144,
  7197. /**
  7198. * SEMICOLON
  7199. */
  7200. SEMICOLON: 186,
  7201. /**
  7202. * DASH
  7203. */
  7204. DASH: 189,
  7205. /**
  7206. * EQUALS
  7207. */
  7208. EQUALS: 187,
  7209. /**
  7210. * COMMA
  7211. */
  7212. COMMA: 188,
  7213. /**
  7214. * PERIOD
  7215. */
  7216. PERIOD: 190,
  7217. /**
  7218. * SLASH
  7219. */
  7220. SLASH: 191,
  7221. /**
  7222. * APOSTROPHE
  7223. */
  7224. APOSTROPHE: 192,
  7225. /**
  7226. * SINGLE_QUOTE
  7227. */
  7228. SINGLE_QUOTE: 222,
  7229. /**
  7230. * OPEN_SQUARE_BRACKET
  7231. */
  7232. OPEN_SQUARE_BRACKET: 219,
  7233. /**
  7234. * BACKSLASH
  7235. */
  7236. BACKSLASH: 220,
  7237. /**
  7238. * CLOSE_SQUARE_BRACKET
  7239. */
  7240. CLOSE_SQUARE_BRACKET: 221,
  7241. /**
  7242. * WIN_KEY
  7243. */
  7244. WIN_KEY: 224,
  7245. /**
  7246. * MAC_FF_META
  7247. */
  7248. MAC_FF_META: 224,
  7249. /**
  7250. * WIN_IME
  7251. */
  7252. WIN_IME: 229,
  7253. // ======================== Function ========================
  7254. /**
  7255. * whether text and modified key is entered at the same time.
  7256. */
  7257. isTextModifyingKeyEvent: function(e) {
  7258. const {
  7259. keyCode: n
  7260. } = e;
  7261. if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text
  7262. n >= ge.F1 && n <= ge.F12)
  7263. return !1;
  7264. switch (n) {
  7265. case ge.ALT:
  7266. case ge.CAPS_LOCK:
  7267. case ge.CONTEXT_MENU:
  7268. case ge.CTRL:
  7269. case ge.DOWN:
  7270. case ge.END:
  7271. case ge.ESC:
  7272. case ge.HOME:
  7273. case ge.INSERT:
  7274. case ge.LEFT:
  7275. case ge.MAC_FF_META:
  7276. case ge.META:
  7277. case ge.NUMLOCK:
  7278. case ge.NUM_CENTER:
  7279. case ge.PAGE_DOWN:
  7280. case ge.PAGE_UP:
  7281. case ge.PAUSE:
  7282. case ge.PRINT_SCREEN:
  7283. case ge.RIGHT:
  7284. case ge.SHIFT:
  7285. case ge.UP:
  7286. case ge.WIN_KEY:
  7287. case ge.WIN_KEY_RIGHT:
  7288. return !1;
  7289. default:
  7290. return !0;
  7291. }
  7292. },
  7293. /**
  7294. * whether character is entered.
  7295. */
  7296. isCharacterKey: function(e) {
  7297. if (e >= ge.ZERO && e <= ge.NINE || e >= ge.NUM_ZERO && e <= ge.NUM_MULTIPLY || e >= ge.A && e <= ge.Z || window.navigator.userAgent.indexOf("WebKit") !== -1 && e === 0)
  7298. return !0;
  7299. switch (e) {
  7300. case ge.SPACE:
  7301. case ge.QUESTION_MARK:
  7302. case ge.NUM_PLUS:
  7303. case ge.NUM_MINUS:
  7304. case ge.NUM_PERIOD:
  7305. case ge.NUM_DIVISION:
  7306. case ge.SEMICOLON:
  7307. case ge.DASH:
  7308. case ge.EQUALS:
  7309. case ge.COMMA:
  7310. case ge.PERIOD:
  7311. case ge.SLASH:
  7312. case ge.APOSTROPHE:
  7313. case ge.SINGLE_QUOTE:
  7314. case ge.OPEN_SQUARE_BRACKET:
  7315. case ge.BACKSLASH:
  7316. case ge.CLOSE_SQUARE_BRACKET:
  7317. return !0;
  7318. default:
  7319. return !1;
  7320. }
  7321. }
  7322. }, vf = (t, e) => {
  7323. let {
  7324. slots: n
  7325. } = e;
  7326. var r;
  7327. const {
  7328. class: i,
  7329. customizeIcon: a,
  7330. customizeIconProps: o,
  7331. onMousedown: s,
  7332. onClick: l
  7333. } = t;
  7334. let u;
  7335. return typeof a == "function" ? u = a(o) : u = nu(a) ? Bs(a) : a, M("span", {
  7336. class: i,
  7337. onMousedown: (c) => {
  7338. c.preventDefault(), s && s(c);
  7339. },
  7340. style: {
  7341. userSelect: "none",
  7342. WebkitUserSelect: "none"
  7343. },
  7344. unselectable: "on",
  7345. onClick: l,
  7346. "aria-hidden": !0
  7347. }, [u !== void 0 ? u : M("span", {
  7348. class: i.split(/\s+/).map((c) => `${c}-icon`)
  7349. }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
  7350. };
  7351. vf.inheritAttrs = !1;
  7352. vf.displayName = "TransBtn";
  7353. vf.props = {
  7354. class: String,
  7355. customizeIcon: Y.any,
  7356. customizeIconProps: Y.any,
  7357. onMousedown: Function,
  7358. onClick: Function
  7359. };
  7360. var Ive = function(t, e) {
  7361. var n = {};
  7362. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7363. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7364. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7365. return n;
  7366. };
  7367. const Dve = te({
  7368. compatConfig: {
  7369. MODE: 3
  7370. },
  7371. // inheritAttrs: false,
  7372. props: {
  7373. disabled: Y.looseBool,
  7374. type: Y.string,
  7375. value: Y.any,
  7376. tag: {
  7377. type: String,
  7378. default: "input"
  7379. },
  7380. size: Y.string,
  7381. onChange: Function,
  7382. onInput: Function,
  7383. onBlur: Function,
  7384. onFocus: Function,
  7385. onKeydown: Function,
  7386. onCompositionstart: Function,
  7387. onCompositionend: Function,
  7388. onKeyup: Function,
  7389. onPaste: Function,
  7390. onMousedown: Function
  7391. },
  7392. emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  7393. setup(t, e) {
  7394. let {
  7395. expose: n
  7396. } = e;
  7397. const r = ae(null);
  7398. return n({
  7399. focus: () => {
  7400. r.value && r.value.focus();
  7401. },
  7402. blur: () => {
  7403. r.value && r.value.blur();
  7404. },
  7405. input: r,
  7406. setSelectionRange: (l, u, c) => {
  7407. var f;
  7408. (f = r.value) === null || f === void 0 || f.setSelectionRange(l, u, c);
  7409. },
  7410. select: () => {
  7411. var l;
  7412. (l = r.value) === null || l === void 0 || l.select();
  7413. },
  7414. getSelectionStart: () => {
  7415. var l;
  7416. return (l = r.value) === null || l === void 0 ? void 0 : l.selectionStart;
  7417. },
  7418. getSelectionEnd: () => {
  7419. var l;
  7420. return (l = r.value) === null || l === void 0 ? void 0 : l.selectionEnd;
  7421. },
  7422. getScrollTop: () => {
  7423. var l;
  7424. return (l = r.value) === null || l === void 0 ? void 0 : l.scrollTop;
  7425. }
  7426. }), () => {
  7427. const {
  7428. tag: l,
  7429. value: u
  7430. } = t, c = Ive(t, ["tag", "value"]);
  7431. return M(l, j(j({}, c), {}, {
  7432. ref: r,
  7433. value: u
  7434. }), null);
  7435. };
  7436. }
  7437. });
  7438. function Rve() {
  7439. const t = document.documentElement.clientWidth, e = window.innerHeight || document.documentElement.clientHeight;
  7440. return {
  7441. width: t,
  7442. height: e
  7443. };
  7444. }
  7445. function IZ(t) {
  7446. const e = t.getBoundingClientRect(), n = document.documentElement;
  7447. return {
  7448. left: e.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
  7449. top: e.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
  7450. };
  7451. }
  7452. function kve(t) {
  7453. return Object.keys(t).reduce((e, n) => {
  7454. const r = t[n];
  7455. return typeof r > "u" || r === null || (e += `${n}: ${t[n]};`), e;
  7456. }, "");
  7457. }
  7458. var Lve = function(t, e) {
  7459. var n = {};
  7460. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7461. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7462. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7463. return n;
  7464. };
  7465. const PI = te({
  7466. compatConfig: {
  7467. MODE: 3
  7468. },
  7469. inheritAttrs: !1,
  7470. props: {
  7471. disabled: Y.looseBool,
  7472. type: Y.string,
  7473. value: Y.any,
  7474. lazy: Y.bool.def(!0),
  7475. tag: {
  7476. type: String,
  7477. default: "input"
  7478. },
  7479. size: Y.string,
  7480. style: Y.oneOfType([String, Object]),
  7481. class: Y.string
  7482. },
  7483. emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  7484. setup(t, e) {
  7485. let {
  7486. emit: n,
  7487. attrs: r,
  7488. expose: i
  7489. } = e;
  7490. const a = ae(null), o = U(), s = U(!1);
  7491. se([() => t.value, s], () => {
  7492. s.value || (o.value = t.value);
  7493. }, {
  7494. immediate: !0
  7495. });
  7496. const l = (x) => {
  7497. n("change", x);
  7498. }, u = (x) => {
  7499. s.value = !0, x.target.composing = !0, n("compositionstart", x);
  7500. }, c = (x) => {
  7501. s.value = !1, x.target.composing = !1, n("compositionend", x);
  7502. const C = document.createEvent("HTMLEvents");
  7503. C.initEvent("input", !0, !0), x.target.dispatchEvent(C), l(x);
  7504. }, f = (x) => {
  7505. if (s.value && t.lazy) {
  7506. o.value = x.target.value;
  7507. return;
  7508. }
  7509. n("input", x);
  7510. }, d = (x) => {
  7511. n("blur", x);
  7512. }, h = (x) => {
  7513. n("focus", x);
  7514. }, p = () => {
  7515. a.value && a.value.focus();
  7516. }, v = () => {
  7517. a.value && a.value.blur();
  7518. }, g = (x) => {
  7519. n("keydown", x);
  7520. }, m = (x) => {
  7521. n("keyup", x);
  7522. }, y = (x, C, T) => {
  7523. var w;
  7524. (w = a.value) === null || w === void 0 || w.setSelectionRange(x, C, T);
  7525. }, b = () => {
  7526. var x;
  7527. (x = a.value) === null || x === void 0 || x.select();
  7528. };
  7529. i({
  7530. focus: p,
  7531. blur: v,
  7532. input: L(() => {
  7533. var x;
  7534. return (x = a.value) === null || x === void 0 ? void 0 : x.input;
  7535. }),
  7536. setSelectionRange: y,
  7537. select: b,
  7538. getSelectionStart: () => {
  7539. var x;
  7540. return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionStart();
  7541. },
  7542. getSelectionEnd: () => {
  7543. var x;
  7544. return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionEnd();
  7545. },
  7546. getScrollTop: () => {
  7547. var x;
  7548. return (x = a.value) === null || x === void 0 ? void 0 : x.getScrollTop();
  7549. }
  7550. });
  7551. const _ = (x) => {
  7552. n("mousedown", x);
  7553. }, O = (x) => {
  7554. n("paste", x);
  7555. }, S = L(() => t.style && typeof t.style != "string" ? kve(t.style) : t.style);
  7556. return () => {
  7557. const x = Lve(t, ["style", "lazy"]);
  7558. return M(Dve, j(j(j({}, x), r), {}, {
  7559. style: S.value,
  7560. onInput: f,
  7561. onChange: l,
  7562. onBlur: d,
  7563. onFocus: h,
  7564. ref: a,
  7565. value: o.value,
  7566. onCompositionstart: u,
  7567. onCompositionend: c,
  7568. onKeyup: m,
  7569. onKeydown: g,
  7570. onPaste: O,
  7571. onMousedown: _
  7572. }), null);
  7573. };
  7574. }
  7575. }), Nve = {
  7576. inputRef: Y.any,
  7577. prefixCls: String,
  7578. id: String,
  7579. inputElement: Y.VueNode,
  7580. disabled: {
  7581. type: Boolean,
  7582. default: void 0
  7583. },
  7584. autofocus: {
  7585. type: Boolean,
  7586. default: void 0
  7587. },
  7588. autocomplete: String,
  7589. editable: {
  7590. type: Boolean,
  7591. default: void 0
  7592. },
  7593. activeDescendantId: String,
  7594. value: String,
  7595. open: {
  7596. type: Boolean,
  7597. default: void 0
  7598. },
  7599. tabindex: Y.oneOfType([Y.number, Y.string]),
  7600. /** Pass accessibility props to input */
  7601. attrs: Y.object,
  7602. onKeydown: {
  7603. type: Function
  7604. },
  7605. onMousedown: {
  7606. type: Function
  7607. },
  7608. onChange: {
  7609. type: Function
  7610. },
  7611. onPaste: {
  7612. type: Function
  7613. },
  7614. onCompositionstart: {
  7615. type: Function
  7616. },
  7617. onCompositionend: {
  7618. type: Function
  7619. },
  7620. onFocus: {
  7621. type: Function
  7622. },
  7623. onBlur: {
  7624. type: Function
  7625. }
  7626. }, DZ = te({
  7627. compatConfig: {
  7628. MODE: 3
  7629. },
  7630. name: "SelectInput",
  7631. inheritAttrs: !1,
  7632. props: Nve,
  7633. setup(t) {
  7634. let e = null;
  7635. const n = Ge("VCSelectContainerEvent");
  7636. return () => {
  7637. var r;
  7638. const {
  7639. prefixCls: i,
  7640. id: a,
  7641. inputElement: o,
  7642. disabled: s,
  7643. tabindex: l,
  7644. autofocus: u,
  7645. autocomplete: c,
  7646. editable: f,
  7647. activeDescendantId: d,
  7648. value: h,
  7649. onKeydown: p,
  7650. onMousedown: v,
  7651. onChange: g,
  7652. onPaste: m,
  7653. onCompositionstart: y,
  7654. onCompositionend: b,
  7655. onFocus: _,
  7656. onBlur: O,
  7657. open: S,
  7658. inputRef: x,
  7659. attrs: C
  7660. } = t;
  7661. let T = o || M(PI, null, null);
  7662. const w = T.props || {}, {
  7663. onKeydown: P,
  7664. onInput: $,
  7665. onFocus: A,
  7666. onBlur: D,
  7667. onMousedown: E,
  7668. onCompositionstart: R,
  7669. onCompositionend: N,
  7670. style: V
  7671. } = w;
  7672. return T = Pn(T, I(I(I(I(I({
  7673. type: "search"
  7674. }, w), {
  7675. id: a,
  7676. ref: x,
  7677. disabled: s,
  7678. tabindex: l,
  7679. lazy: !1,
  7680. autocomplete: c || "off",
  7681. autofocus: u,
  7682. class: ye(`${i}-selection-search-input`, (r = T == null ? void 0 : T.props) === null || r === void 0 ? void 0 : r.class),
  7683. role: "combobox",
  7684. "aria-expanded": S,
  7685. "aria-haspopup": "listbox",
  7686. "aria-owns": `${a}_list`,
  7687. "aria-autocomplete": "list",
  7688. "aria-controls": `${a}_list`,
  7689. "aria-activedescendant": d
  7690. }), C), {
  7691. value: f ? h : "",
  7692. readonly: !f,
  7693. unselectable: f ? null : "on",
  7694. style: I(I({}, V), {
  7695. opacity: f ? null : 0
  7696. }),
  7697. onKeydown: (B) => {
  7698. p(B), P && P(B);
  7699. },
  7700. onMousedown: (B) => {
  7701. v(B), E && E(B);
  7702. },
  7703. onInput: (B) => {
  7704. g(B), $ && $(B);
  7705. },
  7706. onCompositionstart(B) {
  7707. y(B), R && R(B);
  7708. },
  7709. onCompositionend(B) {
  7710. b(B), N && N(B);
  7711. },
  7712. onPaste: m,
  7713. onFocus: function() {
  7714. clearTimeout(e), A && A(arguments.length <= 0 ? void 0 : arguments[0]), _ && _(arguments.length <= 0 ? void 0 : arguments[0]), n == null || n.focus(arguments.length <= 0 ? void 0 : arguments[0]);
  7715. },
  7716. onBlur: function() {
  7717. for (var B = arguments.length, W = new Array(B), F = 0; F < B; F++)
  7718. W[F] = arguments[F];
  7719. e = setTimeout(() => {
  7720. D && D(W[0]), O && O(W[0]), n == null || n.blur(W[0]);
  7721. }, 100);
  7722. }
  7723. }), T.type === "textarea" ? {} : {
  7724. type: "search"
  7725. }), !0, !0), T;
  7726. };
  7727. }
  7728. }), Bve = `accept acceptcharset accesskey action allowfullscreen allowtransparency
  7729. alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
  7730. charset checked classid classname colspan cols content contenteditable contextmenu
  7731. controls coords crossorigin data datetime default defer dir disabled download draggable
  7732. enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
  7733. headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
  7734. is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
  7735. mediagroup method min minlength multiple muted name novalidate nonce open
  7736. optimum pattern placeholder poster preload radiogroup readonly rel required
  7737. reversed role rowspan rows sandbox scope scoped scrolling seamless selected
  7738. shape size sizes span spellcheck src srcdoc srclang srcset start step style
  7739. summary tabindex target title type usemap value width wmode wrap`, zve = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
  7740. onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
  7741. onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
  7742. onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
  7743. onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
  7744. onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
  7745. onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, dN = `${Bve} ${zve}`.split(/[\s\n]+/), Vve = "aria-", Fve = "data-";
  7746. function hN(t, e) {
  7747. return t.indexOf(e) === 0;
  7748. }
  7749. function tx(t) {
  7750. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  7751. e === !1 ? n = {
  7752. aria: !0,
  7753. data: !0,
  7754. attr: !0
  7755. } : e === !0 ? n = {
  7756. aria: !0
  7757. } : n = I({}, e);
  7758. const r = {};
  7759. return Object.keys(t).forEach((i) => {
  7760. // Aria
  7761. (n.aria && (i === "role" || hN(i, Vve)) || // Data
  7762. n.data && hN(i, Fve) || // Attr
  7763. n.attr && (dN.includes(i) || dN.includes(i.toLowerCase()))) && (r[i] = t[i]);
  7764. }), r;
  7765. }
  7766. const RZ = Symbol("OverflowContextProviderKey"), $2 = te({
  7767. compatConfig: {
  7768. MODE: 3
  7769. },
  7770. name: "OverflowContextProvider",
  7771. inheritAttrs: !1,
  7772. props: {
  7773. value: {
  7774. type: Object
  7775. }
  7776. },
  7777. setup(t, e) {
  7778. let {
  7779. slots: n
  7780. } = e;
  7781. return pt(RZ, L(() => t.value)), () => {
  7782. var r;
  7783. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  7784. };
  7785. }
  7786. }), Wve = () => Ge(RZ, L(() => null));
  7787. var Qve = function(t, e) {
  7788. var n = {};
  7789. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7790. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7791. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7792. return n;
  7793. };
  7794. const Uf = void 0, C_ = te({
  7795. compatConfig: {
  7796. MODE: 3
  7797. },
  7798. name: "Item",
  7799. props: {
  7800. prefixCls: String,
  7801. item: Y.any,
  7802. renderItem: Function,
  7803. responsive: Boolean,
  7804. itemKey: {
  7805. type: [String, Number]
  7806. },
  7807. registerSize: Function,
  7808. display: Boolean,
  7809. order: Number,
  7810. component: Y.any,
  7811. invalidate: Boolean
  7812. },
  7813. setup(t, e) {
  7814. let {
  7815. slots: n,
  7816. expose: r
  7817. } = e;
  7818. const i = L(() => t.responsive && !t.display), a = U();
  7819. r({
  7820. itemNodeRef: a
  7821. });
  7822. function o(s) {
  7823. t.registerSize(t.itemKey, s);
  7824. }
  7825. return rl(() => {
  7826. o(null);
  7827. }), () => {
  7828. var s;
  7829. const {
  7830. prefixCls: l,
  7831. invalidate: u,
  7832. item: c,
  7833. renderItem: f,
  7834. responsive: d,
  7835. registerSize: h,
  7836. itemKey: p,
  7837. display: v,
  7838. order: g,
  7839. component: m = "div"
  7840. } = t, y = Qve(t, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), b = (s = n.default) === null || s === void 0 ? void 0 : s.call(n), _ = f && c !== Uf ? f(c) : b;
  7841. let O;
  7842. u || (O = {
  7843. opacity: i.value ? 0 : 1,
  7844. height: i.value ? 0 : Uf,
  7845. overflowY: i.value ? "hidden" : Uf,
  7846. order: d ? g : Uf,
  7847. pointerEvents: i.value ? "none" : Uf,
  7848. position: i.value ? "absolute" : Uf
  7849. });
  7850. const S = {};
  7851. return i.value && (S["aria-hidden"] = !0), M(bh, {
  7852. disabled: !d,
  7853. onResize: (x) => {
  7854. let {
  7855. offsetWidth: C
  7856. } = x;
  7857. o(C);
  7858. }
  7859. }, {
  7860. default: () => M(m, j(j(j({
  7861. class: ye(!u && l),
  7862. style: O
  7863. }, S), y), {}, {
  7864. ref: a
  7865. }), {
  7866. default: () => [_]
  7867. })
  7868. });
  7869. };
  7870. }
  7871. });
  7872. var gC = function(t, e) {
  7873. var n = {};
  7874. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7875. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7876. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7877. return n;
  7878. };
  7879. const Hve = te({
  7880. compatConfig: {
  7881. MODE: 3
  7882. },
  7883. name: "RawItem",
  7884. inheritAttrs: !1,
  7885. props: {
  7886. component: Y.any,
  7887. title: Y.any,
  7888. id: String,
  7889. onMouseenter: {
  7890. type: Function
  7891. },
  7892. onMouseleave: {
  7893. type: Function
  7894. },
  7895. onClick: {
  7896. type: Function
  7897. },
  7898. onKeydown: {
  7899. type: Function
  7900. },
  7901. onFocus: {
  7902. type: Function
  7903. },
  7904. role: String,
  7905. tabindex: Number
  7906. },
  7907. setup(t, e) {
  7908. let {
  7909. slots: n,
  7910. attrs: r
  7911. } = e;
  7912. const i = Wve();
  7913. return () => {
  7914. var a;
  7915. if (!i.value) {
  7916. const {
  7917. component: f = "div"
  7918. } = t, d = gC(t, ["component"]);
  7919. return M(f, j(j({}, d), r), {
  7920. default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
  7921. });
  7922. }
  7923. const o = i.value, {
  7924. className: s
  7925. } = o, l = gC(o, ["className"]), {
  7926. class: u
  7927. } = r, c = gC(r, ["class"]);
  7928. return M($2, {
  7929. value: null
  7930. }, {
  7931. default: () => [M(C_, j(j(j({
  7932. class: ye(s, u)
  7933. }, l), c), t), n)]
  7934. });
  7935. };
  7936. }
  7937. });
  7938. var Gve = function(t, e) {
  7939. var n = {};
  7940. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7941. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7942. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7943. return n;
  7944. };
  7945. const kZ = "responsive", LZ = "invalidate";
  7946. function jve(t) {
  7947. return `+ ${t.length} ...`;
  7948. }
  7949. const Zve = () => ({
  7950. id: String,
  7951. prefixCls: String,
  7952. data: Array,
  7953. itemKey: [String, Number, Function],
  7954. /** Used for `responsive`. It will limit render node to avoid perf issue */
  7955. itemWidth: {
  7956. type: Number,
  7957. default: 10
  7958. },
  7959. renderItem: Function,
  7960. /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  7961. renderRawItem: Function,
  7962. maxCount: [Number, String],
  7963. renderRest: Function,
  7964. /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  7965. renderRawRest: Function,
  7966. suffix: Y.any,
  7967. component: String,
  7968. itemComponent: Y.any,
  7969. /** @private This API may be refactor since not well design */
  7970. onVisibleChange: Function,
  7971. /** When set to `full`, ssr will render full items by default and remove at client side */
  7972. ssr: String,
  7973. onMousedown: Function
  7974. }), Is = te({
  7975. name: "Overflow",
  7976. inheritAttrs: !1,
  7977. props: Zve(),
  7978. emits: ["visibleChange"],
  7979. setup(t, e) {
  7980. let {
  7981. attrs: n,
  7982. emit: r,
  7983. slots: i
  7984. } = e;
  7985. const a = L(() => t.ssr === "full"), o = ae(null), s = L(() => o.value || 0), l = ae(/* @__PURE__ */ new Map()), u = ae(0), c = ae(0), f = ae(0), d = ae(null), h = ae(null), p = L(() => h.value === null && a.value ? Number.MAX_SAFE_INTEGER : h.value || 0), v = ae(!1), g = L(() => `${t.prefixCls}-item`), m = L(() => Math.max(u.value, c.value)), y = L(() => !!(t.data.length && t.maxCount === kZ)), b = L(() => t.maxCount === LZ), _ = L(() => y.value || typeof t.maxCount == "number" && t.data.length > t.maxCount), O = L(() => {
  7986. let E = t.data;
  7987. return y.value ? o.value === null && a.value ? E = t.data : E = t.data.slice(0, Math.min(t.data.length, s.value / t.itemWidth)) : typeof t.maxCount == "number" && (E = t.data.slice(0, t.maxCount)), E;
  7988. }), S = L(() => y.value ? t.data.slice(p.value + 1) : t.data.slice(O.value.length)), x = (E, R) => {
  7989. var N;
  7990. return typeof t.itemKey == "function" ? t.itemKey(E) : (N = t.itemKey && (E == null ? void 0 : E[t.itemKey])) !== null && N !== void 0 ? N : R;
  7991. }, C = L(() => t.renderItem || ((E) => E)), T = (E, R) => {
  7992. h.value = E, R || (v.value = E < t.data.length - 1, r("visibleChange", E));
  7993. }, w = (E, R) => {
  7994. o.value = R.clientWidth;
  7995. }, P = (E, R) => {
  7996. const N = new Map(l.value);
  7997. R === null ? N.delete(E) : N.set(E, R), l.value = N;
  7998. }, $ = (E, R) => {
  7999. u.value = c.value, c.value = R;
  8000. }, A = (E, R) => {
  8001. f.value = R;
  8002. }, D = (E) => l.value.get(x(O.value[E], E));
  8003. return se([s, l, c, f, () => t.itemKey, O], () => {
  8004. if (s.value && m.value && O.value) {
  8005. let E = f.value;
  8006. const R = O.value.length, N = R - 1;
  8007. if (!R) {
  8008. T(0), d.value = null;
  8009. return;
  8010. }
  8011. for (let V = 0; V < R; V += 1) {
  8012. const B = D(V);
  8013. if (B === void 0) {
  8014. T(V - 1, !0);
  8015. break;
  8016. }
  8017. if (E += B, // Only one means `totalWidth` is the final width
  8018. N === 0 && E <= s.value || // Last two width will be the final width
  8019. V === N - 1 && E + D(N) <= s.value) {
  8020. T(N), d.value = null;
  8021. break;
  8022. } else if (E + m.value > s.value) {
  8023. T(V - 1), d.value = E - B - f.value + c.value;
  8024. break;
  8025. }
  8026. }
  8027. t.suffix && D(0) + f.value > s.value && (d.value = null);
  8028. }
  8029. }), () => {
  8030. const E = v.value && !!S.value.length, {
  8031. itemComponent: R,
  8032. renderRawItem: N,
  8033. renderRawRest: V,
  8034. renderRest: B,
  8035. prefixCls: W = "rc-overflow",
  8036. suffix: F,
  8037. component: Q = "div",
  8038. id: Z,
  8039. onMousedown: ne
  8040. } = t, {
  8041. class: ee,
  8042. style: oe
  8043. } = n, K = Gve(n, ["class", "style"]);
  8044. let ie = {};
  8045. d.value !== null && y.value && (ie = {
  8046. position: "absolute",
  8047. left: `${d.value}px`,
  8048. top: 0
  8049. });
  8050. const X = {
  8051. prefixCls: g.value,
  8052. responsive: y.value,
  8053. component: R,
  8054. invalidate: b.value
  8055. }, H = N ? (de, Ee) => {
  8056. const $e = x(de, Ee);
  8057. return M($2, {
  8058. key: $e,
  8059. value: I(I({}, X), {
  8060. order: Ee,
  8061. item: de,
  8062. itemKey: $e,
  8063. registerSize: P,
  8064. display: Ee <= p.value
  8065. })
  8066. }, {
  8067. default: () => [N(de, Ee)]
  8068. });
  8069. } : (de, Ee) => {
  8070. const $e = x(de, Ee);
  8071. return M(C_, j(j({}, X), {}, {
  8072. order: Ee,
  8073. key: $e,
  8074. item: de,
  8075. renderItem: C.value,
  8076. itemKey: $e,
  8077. registerSize: P,
  8078. display: Ee <= p.value
  8079. }), null);
  8080. };
  8081. let G = () => null;
  8082. const re = {
  8083. order: E ? p.value : Number.MAX_SAFE_INTEGER,
  8084. className: `${g.value} ${g.value}-rest`,
  8085. registerSize: $,
  8086. display: E
  8087. };
  8088. if (V)
  8089. V && (G = () => M($2, {
  8090. value: I(I({}, X), re)
  8091. }, {
  8092. default: () => [V(S.value)]
  8093. }));
  8094. else {
  8095. const de = B || jve;
  8096. G = () => M(C_, j(j({}, X), re), {
  8097. default: () => typeof de == "function" ? de(S.value) : de
  8098. });
  8099. }
  8100. const fe = () => {
  8101. var de;
  8102. return M(Q, j({
  8103. id: Z,
  8104. class: ye(!b.value && W, ee),
  8105. style: oe,
  8106. onMousedown: ne
  8107. }, K), {
  8108. default: () => [O.value.map(H), _.value ? G() : null, F && M(C_, j(j({}, X), {}, {
  8109. order: p.value,
  8110. class: `${g.value}-suffix`,
  8111. registerSize: A,
  8112. display: !0,
  8113. style: ie
  8114. }), {
  8115. default: () => F
  8116. }), (de = i.default) === null || de === void 0 ? void 0 : de.call(i)]
  8117. });
  8118. };
  8119. return M(bh, {
  8120. disabled: !y.value,
  8121. onResize: w
  8122. }, {
  8123. default: fe
  8124. });
  8125. };
  8126. }
  8127. });
  8128. Is.Item = Hve;
  8129. Is.RESPONSIVE = kZ;
  8130. Is.INVALIDATE = LZ;
  8131. const Uve = Symbol("TreeSelectLegacyContextPropsKey");
  8132. function $I() {
  8133. return Ge(Uve, {});
  8134. }
  8135. const Xve = {
  8136. id: String,
  8137. prefixCls: String,
  8138. values: Y.array,
  8139. open: {
  8140. type: Boolean,
  8141. default: void 0
  8142. },
  8143. searchValue: String,
  8144. inputRef: Y.any,
  8145. placeholder: Y.any,
  8146. disabled: {
  8147. type: Boolean,
  8148. default: void 0
  8149. },
  8150. mode: String,
  8151. showSearch: {
  8152. type: Boolean,
  8153. default: void 0
  8154. },
  8155. autofocus: {
  8156. type: Boolean,
  8157. default: void 0
  8158. },
  8159. autocomplete: String,
  8160. activeDescendantId: String,
  8161. tabindex: Y.oneOfType([Y.number, Y.string]),
  8162. compositionStatus: Boolean,
  8163. removeIcon: Y.any,
  8164. choiceTransitionName: String,
  8165. maxTagCount: Y.oneOfType([Y.number, Y.string]),
  8166. maxTagTextLength: Number,
  8167. maxTagPlaceholder: Y.any.def(() => (t) => `+ ${t.length} ...`),
  8168. tagRender: Function,
  8169. onToggleOpen: {
  8170. type: Function
  8171. },
  8172. onRemove: Function,
  8173. onInputChange: Function,
  8174. onInputPaste: Function,
  8175. onInputKeyDown: Function,
  8176. onInputMouseDown: Function,
  8177. onInputCompositionStart: Function,
  8178. onInputCompositionEnd: Function
  8179. }, pN = (t) => {
  8180. t.preventDefault(), t.stopPropagation();
  8181. }, Yve = te({
  8182. name: "MultipleSelectSelector",
  8183. inheritAttrs: !1,
  8184. props: Xve,
  8185. setup(t) {
  8186. const e = ae(), n = ae(0), r = ae(!1), i = $I(), a = L(() => `${t.prefixCls}-selection`), o = L(() => t.open || t.mode === "tags" ? t.searchValue : ""), s = L(() => t.mode === "tags" || t.showSearch && (t.open || r.value)), l = U("");
  8187. ht(() => {
  8188. l.value = o.value;
  8189. }), it(() => {
  8190. se(l, () => {
  8191. n.value = e.value.scrollWidth;
  8192. }, {
  8193. flush: "post",
  8194. immediate: !0
  8195. });
  8196. });
  8197. function u(p, v, g, m, y) {
  8198. return M("span", {
  8199. class: ye(`${a.value}-item`, {
  8200. [`${a.value}-item-disabled`]: g
  8201. }),
  8202. title: typeof p == "string" || typeof p == "number" ? p.toString() : void 0
  8203. }, [M("span", {
  8204. class: `${a.value}-item-content`
  8205. }, [v]), m && M(vf, {
  8206. class: `${a.value}-item-remove`,
  8207. onMousedown: pN,
  8208. onClick: y,
  8209. customizeIcon: t.removeIcon
  8210. }, {
  8211. default: () => [Kt("×")]
  8212. })]);
  8213. }
  8214. function c(p, v, g, m, y, b) {
  8215. var _;
  8216. const O = (x) => {
  8217. pN(x), t.onToggleOpen(!open);
  8218. };
  8219. let S = b;
  8220. return i.keyEntities && (S = ((_ = i.keyEntities[p]) === null || _ === void 0 ? void 0 : _.node) || {}), M("span", {
  8221. key: p,
  8222. onMousedown: O
  8223. }, [t.tagRender({
  8224. label: v,
  8225. value: p,
  8226. disabled: g,
  8227. closable: m,
  8228. onClose: y,
  8229. option: S
  8230. })]);
  8231. }
  8232. function f(p) {
  8233. const {
  8234. disabled: v,
  8235. label: g,
  8236. value: m,
  8237. option: y
  8238. } = p, b = !t.disabled && !v;
  8239. let _ = g;
  8240. if (typeof t.maxTagTextLength == "number" && (typeof g == "string" || typeof g == "number")) {
  8241. const S = String(_);
  8242. S.length > t.maxTagTextLength && (_ = `${S.slice(0, t.maxTagTextLength)}...`);
  8243. }
  8244. const O = (S) => {
  8245. var x;
  8246. S && S.stopPropagation(), (x = t.onRemove) === null || x === void 0 || x.call(t, p);
  8247. };
  8248. return typeof t.tagRender == "function" ? c(m, _, v, b, O, y) : u(g, _, v, b, O);
  8249. }
  8250. function d(p) {
  8251. const {
  8252. maxTagPlaceholder: v = (m) => `+ ${m.length} ...`
  8253. } = t, g = typeof v == "function" ? v(p) : v;
  8254. return u(g, g, !1);
  8255. }
  8256. const h = (p) => {
  8257. const v = p.target.composing;
  8258. l.value = p.target.value, v || t.onInputChange(p);
  8259. };
  8260. return () => {
  8261. const {
  8262. id: p,
  8263. prefixCls: v,
  8264. values: g,
  8265. open: m,
  8266. inputRef: y,
  8267. placeholder: b,
  8268. disabled: _,
  8269. autofocus: O,
  8270. autocomplete: S,
  8271. activeDescendantId: x,
  8272. tabindex: C,
  8273. compositionStatus: T,
  8274. onInputPaste: w,
  8275. onInputKeyDown: P,
  8276. onInputMouseDown: $,
  8277. onInputCompositionStart: A,
  8278. onInputCompositionEnd: D
  8279. } = t, E = M("div", {
  8280. class: `${a.value}-search`,
  8281. style: {
  8282. width: n.value + "px"
  8283. },
  8284. key: "input"
  8285. }, [M(DZ, {
  8286. inputRef: y,
  8287. open: m,
  8288. prefixCls: v,
  8289. id: p,
  8290. inputElement: null,
  8291. disabled: _,
  8292. autofocus: O,
  8293. autocomplete: S,
  8294. editable: s.value,
  8295. activeDescendantId: x,
  8296. value: l.value,
  8297. onKeydown: P,
  8298. onMousedown: $,
  8299. onChange: h,
  8300. onPaste: w,
  8301. onCompositionstart: A,
  8302. onCompositionend: D,
  8303. tabindex: C,
  8304. attrs: tx(t, !0),
  8305. onFocus: () => r.value = !0,
  8306. onBlur: () => r.value = !1
  8307. }, null), M("span", {
  8308. ref: e,
  8309. class: `${a.value}-search-mirror`,
  8310. "aria-hidden": !0
  8311. }, [l.value, Kt(" ")])]), R = M(Is, {
  8312. prefixCls: `${a.value}-overflow`,
  8313. data: g,
  8314. renderItem: f,
  8315. renderRest: d,
  8316. suffix: E,
  8317. itemKey: "key",
  8318. maxCount: t.maxTagCount,
  8319. key: "overflow"
  8320. }, null);
  8321. return M(wt, null, [R, !g.length && !o.value && !T && M("span", {
  8322. class: `${a.value}-placeholder`
  8323. }, [b])]);
  8324. };
  8325. }
  8326. }), qve = {
  8327. inputElement: Y.any,
  8328. id: String,
  8329. prefixCls: String,
  8330. values: Y.array,
  8331. open: {
  8332. type: Boolean,
  8333. default: void 0
  8334. },
  8335. searchValue: String,
  8336. inputRef: Y.any,
  8337. placeholder: Y.any,
  8338. compositionStatus: {
  8339. type: Boolean,
  8340. default: void 0
  8341. },
  8342. disabled: {
  8343. type: Boolean,
  8344. default: void 0
  8345. },
  8346. mode: String,
  8347. showSearch: {
  8348. type: Boolean,
  8349. default: void 0
  8350. },
  8351. autofocus: {
  8352. type: Boolean,
  8353. default: void 0
  8354. },
  8355. autocomplete: String,
  8356. activeDescendantId: String,
  8357. tabindex: Y.oneOfType([Y.number, Y.string]),
  8358. activeValue: String,
  8359. backfill: {
  8360. type: Boolean,
  8361. default: void 0
  8362. },
  8363. optionLabelRender: Function,
  8364. onInputChange: Function,
  8365. onInputPaste: Function,
  8366. onInputKeyDown: Function,
  8367. onInputMouseDown: Function,
  8368. onInputCompositionStart: Function,
  8369. onInputCompositionEnd: Function
  8370. }, AI = te({
  8371. name: "SingleSelector",
  8372. setup(t) {
  8373. const e = ae(!1), n = L(() => t.mode === "combobox"), r = L(() => n.value || t.showSearch), i = L(() => {
  8374. let c = t.searchValue || "";
  8375. return n.value && t.activeValue && !e.value && (c = t.activeValue), c;
  8376. }), a = $I();
  8377. se([n, () => t.activeValue], () => {
  8378. n.value && (e.value = !1);
  8379. }, {
  8380. immediate: !0
  8381. });
  8382. const o = L(() => t.mode !== "combobox" && !t.open && !t.showSearch ? !1 : !!i.value || t.compositionStatus), s = L(() => {
  8383. const c = t.values[0];
  8384. return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
  8385. }), l = () => {
  8386. if (t.values[0])
  8387. return null;
  8388. const c = o.value ? {
  8389. visibility: "hidden"
  8390. } : void 0;
  8391. return M("span", {
  8392. class: `${t.prefixCls}-selection-placeholder`,
  8393. style: c
  8394. }, [t.placeholder]);
  8395. }, u = (c) => {
  8396. c.target.composing || (e.value = !0, t.onInputChange(c));
  8397. };
  8398. return () => {
  8399. var c, f, d, h;
  8400. const {
  8401. inputElement: p,
  8402. prefixCls: v,
  8403. id: g,
  8404. values: m,
  8405. inputRef: y,
  8406. disabled: b,
  8407. autofocus: _,
  8408. autocomplete: O,
  8409. activeDescendantId: S,
  8410. open: x,
  8411. tabindex: C,
  8412. optionLabelRender: T,
  8413. onInputKeyDown: w,
  8414. onInputMouseDown: P,
  8415. onInputPaste: $,
  8416. onInputCompositionStart: A,
  8417. onInputCompositionEnd: D
  8418. } = t, E = m[0];
  8419. let R = null;
  8420. if (E && a.customSlots) {
  8421. const N = (c = E.key) !== null && c !== void 0 ? c : E.value, V = ((f = a.keyEntities[N]) === null || f === void 0 ? void 0 : f.node) || {};
  8422. R = a.customSlots[(d = V.slots) === null || d === void 0 ? void 0 : d.title] || a.customSlots.title || E.label, typeof R == "function" && (R = R(V));
  8423. } else
  8424. R = T && E ? T(E.option) : E == null ? void 0 : E.label;
  8425. return M(wt, null, [M("span", {
  8426. class: `${v}-selection-search`
  8427. }, [M(DZ, {
  8428. inputRef: y,
  8429. prefixCls: v,
  8430. id: g,
  8431. open: x,
  8432. inputElement: p,
  8433. disabled: b,
  8434. autofocus: _,
  8435. autocomplete: O,
  8436. editable: r.value,
  8437. activeDescendantId: S,
  8438. value: i.value,
  8439. onKeydown: w,
  8440. onMousedown: P,
  8441. onChange: u,
  8442. onPaste: $,
  8443. onCompositionstart: A,
  8444. onCompositionend: D,
  8445. tabindex: C,
  8446. attrs: tx(t, !0)
  8447. }, null)]), !n.value && E && !o.value && M("span", {
  8448. class: `${v}-selection-item`,
  8449. title: s.value
  8450. }, [M(wt, {
  8451. key: (h = E.key) !== null && h !== void 0 ? h : E.value
  8452. }, [R])]), l()]);
  8453. };
  8454. }
  8455. });
  8456. AI.props = qve;
  8457. AI.inheritAttrs = !1;
  8458. function Kve(t) {
  8459. return ![
  8460. // System function button
  8461. ge.ESC,
  8462. ge.SHIFT,
  8463. ge.BACKSPACE,
  8464. ge.TAB,
  8465. ge.WIN_KEY,
  8466. ge.ALT,
  8467. ge.META,
  8468. ge.WIN_KEY_RIGHT,
  8469. ge.CTRL,
  8470. ge.SEMICOLON,
  8471. ge.EQUALS,
  8472. ge.CAPS_LOCK,
  8473. ge.CONTEXT_MENU,
  8474. // F1-F12
  8475. ge.F1,
  8476. ge.F2,
  8477. ge.F3,
  8478. ge.F4,
  8479. ge.F5,
  8480. ge.F6,
  8481. ge.F7,
  8482. ge.F8,
  8483. ge.F9,
  8484. ge.F10,
  8485. ge.F11,
  8486. ge.F12
  8487. ].includes(t);
  8488. }
  8489. function NZ() {
  8490. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, e = null, n;
  8491. yt(() => {
  8492. clearTimeout(n);
  8493. });
  8494. function r(i) {
  8495. (i || e === null) && (e = i), clearTimeout(n), n = setTimeout(() => {
  8496. e = null;
  8497. }, t);
  8498. }
  8499. return [() => e, r];
  8500. }
  8501. function sm() {
  8502. const t = (e) => {
  8503. t.current = e;
  8504. };
  8505. return t;
  8506. }
  8507. const Jve = te({
  8508. name: "Selector",
  8509. inheritAttrs: !1,
  8510. props: {
  8511. id: String,
  8512. prefixCls: String,
  8513. showSearch: {
  8514. type: Boolean,
  8515. default: void 0
  8516. },
  8517. open: {
  8518. type: Boolean,
  8519. default: void 0
  8520. },
  8521. /** Display in the Selector value, it's not same as `value` prop */
  8522. values: Y.array,
  8523. multiple: {
  8524. type: Boolean,
  8525. default: void 0
  8526. },
  8527. mode: String,
  8528. searchValue: String,
  8529. activeValue: String,
  8530. inputElement: Y.any,
  8531. autofocus: {
  8532. type: Boolean,
  8533. default: void 0
  8534. },
  8535. activeDescendantId: String,
  8536. tabindex: Y.oneOfType([Y.number, Y.string]),
  8537. disabled: {
  8538. type: Boolean,
  8539. default: void 0
  8540. },
  8541. placeholder: Y.any,
  8542. removeIcon: Y.any,
  8543. // Tags
  8544. maxTagCount: Y.oneOfType([Y.number, Y.string]),
  8545. maxTagTextLength: Number,
  8546. maxTagPlaceholder: Y.any,
  8547. tagRender: Function,
  8548. optionLabelRender: Function,
  8549. /** Check if `tokenSeparators` contains `\n` or `\r\n` */
  8550. tokenWithEnter: {
  8551. type: Boolean,
  8552. default: void 0
  8553. },
  8554. // Motion
  8555. choiceTransitionName: String,
  8556. onToggleOpen: {
  8557. type: Function
  8558. },
  8559. /** `onSearch` returns go next step boolean to check if need do toggle open */
  8560. onSearch: Function,
  8561. onSearchSubmit: Function,
  8562. onRemove: Function,
  8563. onInputKeyDown: {
  8564. type: Function
  8565. },
  8566. /**
  8567. * @private get real dom for trigger align.
  8568. * This may be removed after React provides replacement of `findDOMNode`
  8569. */
  8570. domRef: Function
  8571. },
  8572. setup(t, e) {
  8573. let {
  8574. expose: n
  8575. } = e;
  8576. const r = sm(), i = U(!1), [a, o] = NZ(0), s = (m) => {
  8577. const {
  8578. which: y
  8579. } = m;
  8580. (y === ge.UP || y === ge.DOWN) && m.preventDefault(), t.onInputKeyDown && t.onInputKeyDown(m), y === ge.ENTER && t.mode === "tags" && !i.value && !t.open && t.onSearchSubmit(m.target.value), Kve(y) && t.onToggleOpen(!0);
  8581. }, l = () => {
  8582. o(!0);
  8583. };
  8584. let u = null;
  8585. const c = (m) => {
  8586. t.onSearch(m, !0, i.value) !== !1 && t.onToggleOpen(!0);
  8587. }, f = () => {
  8588. i.value = !0;
  8589. }, d = (m) => {
  8590. i.value = !1, t.mode !== "combobox" && c(m.target.value);
  8591. }, h = (m) => {
  8592. let {
  8593. target: {
  8594. value: y
  8595. }
  8596. } = m;
  8597. if (t.tokenWithEnter && u && /[\r\n]/.test(u)) {
  8598. const b = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
  8599. y = y.replace(b, u);
  8600. }
  8601. u = null, c(y);
  8602. }, p = (m) => {
  8603. const {
  8604. clipboardData: y
  8605. } = m;
  8606. u = y.getData("text");
  8607. }, v = (m) => {
  8608. let {
  8609. target: y
  8610. } = m;
  8611. y !== r.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
  8612. r.current.focus();
  8613. }) : r.current.focus());
  8614. }, g = (m) => {
  8615. const y = a();
  8616. m.target !== r.current && !y && m.preventDefault(), (t.mode !== "combobox" && (!t.showSearch || !y) || !t.open) && (t.open && t.onSearch("", !0, !1), t.onToggleOpen());
  8617. };
  8618. return n({
  8619. focus: () => {
  8620. r.current.focus();
  8621. },
  8622. blur: () => {
  8623. r.current.blur();
  8624. }
  8625. }), () => {
  8626. const {
  8627. prefixCls: m,
  8628. domRef: y,
  8629. mode: b
  8630. } = t, _ = {
  8631. inputRef: r,
  8632. onInputKeyDown: s,
  8633. onInputMouseDown: l,
  8634. onInputChange: h,
  8635. onInputPaste: p,
  8636. compositionStatus: i.value,
  8637. onInputCompositionStart: f,
  8638. onInputCompositionEnd: d
  8639. }, O = b === "multiple" || b === "tags" ? M(Yve, j(j({}, t), _), null) : M(AI, j(j({}, t), _), null);
  8640. return M("div", {
  8641. ref: y,
  8642. class: `${m}-selector`,
  8643. onClick: v,
  8644. onMousedown: g
  8645. }, [O]);
  8646. };
  8647. }
  8648. });
  8649. function ege(t, e, n) {
  8650. function r(i) {
  8651. var a, o, s;
  8652. let l = i.target;
  8653. l.shadowRoot && i.composed && (l = i.composedPath()[0] || l);
  8654. 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()];
  8655. e.value && u.every((c) => c && !c.contains(l) && c !== l) && n(!1);
  8656. }
  8657. it(() => {
  8658. window.addEventListener("mousedown", r);
  8659. }), yt(() => {
  8660. window.removeEventListener("mousedown", r);
  8661. });
  8662. }
  8663. function tge() {
  8664. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  8665. const e = ae(!1);
  8666. let n;
  8667. const r = () => {
  8668. clearTimeout(n);
  8669. };
  8670. return it(() => {
  8671. r();
  8672. }), [e, (a, o) => {
  8673. r(), n = setTimeout(() => {
  8674. e.value = a, o && o();
  8675. }, t);
  8676. }, r];
  8677. }
  8678. const BZ = Symbol("BaseSelectContextKey");
  8679. function nge(t) {
  8680. return pt(BZ, t);
  8681. }
  8682. function rge() {
  8683. return Ge(BZ, {});
  8684. }
  8685. const EI = () => {
  8686. if (typeof navigator > "u" || typeof window > "u")
  8687. return !1;
  8688. const t = navigator.userAgent || navigator.vendor || window.opera;
  8689. 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));
  8690. };
  8691. function zZ(t) {
  8692. if (!op(t)) return tn(t);
  8693. const e = new Proxy({}, {
  8694. get(n, r, i) {
  8695. return Reflect.get(t.value, r, i);
  8696. },
  8697. set(n, r, i) {
  8698. return t.value[r] = i, !0;
  8699. },
  8700. deleteProperty(n, r) {
  8701. return Reflect.deleteProperty(t.value, r);
  8702. },
  8703. has(n, r) {
  8704. return Reflect.has(t.value, r);
  8705. },
  8706. ownKeys() {
  8707. return Object.keys(t.value);
  8708. },
  8709. getOwnPropertyDescriptor() {
  8710. return {
  8711. enumerable: !0,
  8712. configurable: !0
  8713. };
  8714. }
  8715. });
  8716. return tn(e);
  8717. }
  8718. var ige = function(t, e) {
  8719. var n = {};
  8720. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  8721. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  8722. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  8723. return n;
  8724. };
  8725. const age = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], oge = () => ({
  8726. prefixCls: String,
  8727. id: String,
  8728. omitDomProps: Array,
  8729. // >>> Value
  8730. displayValues: Array,
  8731. onDisplayValuesChange: Function,
  8732. // >>> Active
  8733. /** Current dropdown list active item string value */
  8734. activeValue: String,
  8735. /** Link search input with target element */
  8736. activeDescendantId: String,
  8737. onActiveValueChange: Function,
  8738. // >>> Search
  8739. searchValue: String,
  8740. /** Trigger onSearch, return false to prevent trigger open event */
  8741. onSearch: Function,
  8742. /** Trigger when search text match the `tokenSeparators`. Will provide split content */
  8743. onSearchSplit: Function,
  8744. maxLength: Number,
  8745. OptionList: Y.any,
  8746. /** Tell if provided `options` is empty */
  8747. emptyOptions: Boolean
  8748. }), VZ = () => ({
  8749. showSearch: {
  8750. type: Boolean,
  8751. default: void 0
  8752. },
  8753. tagRender: {
  8754. type: Function
  8755. },
  8756. optionLabelRender: {
  8757. type: Function
  8758. },
  8759. direction: {
  8760. type: String
  8761. },
  8762. // MISC
  8763. tabindex: Number,
  8764. autofocus: Boolean,
  8765. notFoundContent: Y.any,
  8766. placeholder: Y.any,
  8767. onClear: Function,
  8768. choiceTransitionName: String,
  8769. // >>> Mode
  8770. mode: String,
  8771. // >>> Status
  8772. disabled: {
  8773. type: Boolean,
  8774. default: void 0
  8775. },
  8776. loading: {
  8777. type: Boolean,
  8778. default: void 0
  8779. },
  8780. // >>> Open
  8781. open: {
  8782. type: Boolean,
  8783. default: void 0
  8784. },
  8785. defaultOpen: {
  8786. type: Boolean,
  8787. default: void 0
  8788. },
  8789. onDropdownVisibleChange: {
  8790. type: Function
  8791. },
  8792. // >>> Customize Input
  8793. /** @private Internal usage. Do not use in your production. */
  8794. getInputElement: {
  8795. type: Function
  8796. },
  8797. /** @private Internal usage. Do not use in your production. */
  8798. getRawInputElement: {
  8799. type: Function
  8800. },
  8801. // >>> Selector
  8802. maxTagTextLength: Number,
  8803. maxTagCount: {
  8804. type: [String, Number]
  8805. },
  8806. maxTagPlaceholder: Y.any,
  8807. // >>> Search
  8808. tokenSeparators: {
  8809. type: Array
  8810. },
  8811. // >>> Icons
  8812. allowClear: {
  8813. type: Boolean,
  8814. default: void 0
  8815. },
  8816. showArrow: {
  8817. type: Boolean,
  8818. default: void 0
  8819. },
  8820. inputIcon: Y.any,
  8821. /** Clear all icon */
  8822. clearIcon: Y.any,
  8823. /** Selector remove icon */
  8824. removeIcon: Y.any,
  8825. // >>> Dropdown
  8826. animation: String,
  8827. transitionName: String,
  8828. dropdownStyle: {
  8829. type: Object
  8830. },
  8831. dropdownClassName: String,
  8832. dropdownMatchSelectWidth: {
  8833. type: [Boolean, Number],
  8834. default: void 0
  8835. },
  8836. dropdownRender: {
  8837. type: Function
  8838. },
  8839. dropdownAlign: Object,
  8840. placement: {
  8841. type: String
  8842. },
  8843. getPopupContainer: {
  8844. type: Function
  8845. },
  8846. // >>> Focus
  8847. showAction: {
  8848. type: Array
  8849. },
  8850. onBlur: {
  8851. type: Function
  8852. },
  8853. onFocus: {
  8854. type: Function
  8855. },
  8856. // >>> Rest Events
  8857. onKeyup: Function,
  8858. onKeydown: Function,
  8859. onMousedown: Function,
  8860. onPopupScroll: Function,
  8861. onInputKeyDown: Function,
  8862. onMouseenter: Function,
  8863. onMouseleave: Function,
  8864. onClick: Function
  8865. }), sge = () => I(I({}, oge()), VZ());
  8866. function MI(t) {
  8867. return t === "tags" || t === "multiple";
  8868. }
  8869. const lge = te({
  8870. compatConfig: {
  8871. MODE: 3
  8872. },
  8873. name: "BaseSelect",
  8874. inheritAttrs: !1,
  8875. props: sr(sge(), {
  8876. showAction: [],
  8877. notFoundContent: "Not Found"
  8878. }),
  8879. setup(t, e) {
  8880. let {
  8881. attrs: n,
  8882. expose: r,
  8883. slots: i
  8884. } = e;
  8885. const a = L(() => MI(t.mode)), o = L(() => t.showSearch !== void 0 ? t.showSearch : a.value || t.mode === "combobox"), s = ae(!1);
  8886. it(() => {
  8887. s.value = EI();
  8888. });
  8889. const l = $I(), u = ae(null), c = sm(), f = ae(null), d = ae(null), h = ae(null), p = U(!1), [v, g, m] = tge();
  8890. r({
  8891. focus: () => {
  8892. var H;
  8893. (H = d.value) === null || H === void 0 || H.focus();
  8894. },
  8895. blur: () => {
  8896. var H;
  8897. (H = d.value) === null || H === void 0 || H.blur();
  8898. },
  8899. scrollTo: (H) => {
  8900. var G;
  8901. return (G = h.value) === null || G === void 0 ? void 0 : G.scrollTo(H);
  8902. }
  8903. });
  8904. const _ = L(() => {
  8905. var H;
  8906. if (t.mode !== "combobox")
  8907. return t.searchValue;
  8908. const G = (H = t.displayValues[0]) === null || H === void 0 ? void 0 : H.value;
  8909. return typeof G == "string" || typeof G == "number" ? String(G) : "";
  8910. }), O = t.open !== void 0 ? t.open : t.defaultOpen, S = ae(O), x = ae(O), C = (H) => {
  8911. S.value = t.open !== void 0 ? t.open : H, x.value = S.value;
  8912. };
  8913. se(() => t.open, () => {
  8914. C(t.open);
  8915. });
  8916. const T = L(() => !t.notFoundContent && t.emptyOptions);
  8917. ht(() => {
  8918. x.value = S.value, (t.disabled || T.value && x.value && t.mode === "combobox") && (x.value = !1);
  8919. });
  8920. const w = L(() => T.value ? !1 : x.value), P = (H) => {
  8921. const G = H !== void 0 ? H : !x.value;
  8922. x.value !== G && !t.disabled && (C(G), t.onDropdownVisibleChange && t.onDropdownVisibleChange(G));
  8923. }, $ = L(() => (t.tokenSeparators || []).some((H) => [`
  8924. `, `\r
  8925. `].includes(H))), A = (H, G, re) => {
  8926. var fe, de;
  8927. let Ee = !0, $e = H;
  8928. (fe = t.onActiveValueChange) === null || fe === void 0 || fe.call(t, null);
  8929. const Se = re ? null : rde(H, t.tokenSeparators);
  8930. return t.mode !== "combobox" && Se && ($e = "", (de = t.onSearchSplit) === null || de === void 0 || de.call(t, Se), P(!1), Ee = !1), t.onSearch && _.value !== $e && t.onSearch($e, {
  8931. source: G ? "typing" : "effect"
  8932. }), Ee;
  8933. }, D = (H) => {
  8934. var G;
  8935. !H || !H.trim() || (G = t.onSearch) === null || G === void 0 || G.call(t, H, {
  8936. source: "submit"
  8937. });
  8938. };
  8939. se(x, () => {
  8940. !x.value && !a.value && t.mode !== "combobox" && A("", !1, !1);
  8941. }, {
  8942. immediate: !0,
  8943. flush: "post"
  8944. }), se(() => t.disabled, () => {
  8945. S.value && t.disabled && C(!1), t.disabled && !p.value && g(!1);
  8946. }, {
  8947. immediate: !0
  8948. });
  8949. const [E, R] = NZ(), N = function(H) {
  8950. var G;
  8951. const re = E(), {
  8952. which: fe
  8953. } = H;
  8954. if (fe === ge.ENTER && (t.mode !== "combobox" && H.preventDefault(), x.value || P(!0)), R(!!_.value), fe === ge.BACKSPACE && !re && a.value && !_.value && t.displayValues.length) {
  8955. const Se = [...t.displayValues];
  8956. let be = null;
  8957. for (let he = Se.length - 1; he >= 0; he -= 1) {
  8958. const Te = Se[he];
  8959. if (!Te.disabled) {
  8960. Se.splice(he, 1), be = Te;
  8961. break;
  8962. }
  8963. }
  8964. be && t.onDisplayValuesChange(Se, {
  8965. type: "remove",
  8966. values: [be]
  8967. });
  8968. }
  8969. for (var de = arguments.length, Ee = new Array(de > 1 ? de - 1 : 0), $e = 1; $e < de; $e++)
  8970. Ee[$e - 1] = arguments[$e];
  8971. x.value && h.value && h.value.onKeydown(H, ...Ee), (G = t.onKeydown) === null || G === void 0 || G.call(t, H, ...Ee);
  8972. }, V = function(H) {
  8973. for (var G = arguments.length, re = new Array(G > 1 ? G - 1 : 0), fe = 1; fe < G; fe++)
  8974. re[fe - 1] = arguments[fe];
  8975. x.value && h.value && h.value.onKeyup(H, ...re), t.onKeyup && t.onKeyup(H, ...re);
  8976. }, B = (H) => {
  8977. const G = t.displayValues.filter((re) => re !== H);
  8978. t.onDisplayValuesChange(G, {
  8979. type: "remove",
  8980. values: [H]
  8981. });
  8982. }, W = ae(!1), F = function() {
  8983. g(!0), t.disabled || (t.onFocus && !W.value && t.onFocus(...arguments), t.showAction && t.showAction.includes("focus") && P(!0)), W.value = !0;
  8984. }, Q = U(!1), Z = function() {
  8985. if (Q.value || (p.value = !0, g(!1, () => {
  8986. W.value = !1, p.value = !1, P(!1);
  8987. }), t.disabled))
  8988. return;
  8989. const H = _.value;
  8990. H && (t.mode === "tags" ? t.onSearch(H, {
  8991. source: "submit"
  8992. }) : t.mode === "multiple" && t.onSearch("", {
  8993. source: "blur"
  8994. })), t.onBlur && t.onBlur(...arguments);
  8995. }, ne = () => {
  8996. Q.value = !0;
  8997. }, ee = () => {
  8998. Q.value = !1;
  8999. };
  9000. pt("VCSelectContainerEvent", {
  9001. focus: F,
  9002. blur: Z
  9003. });
  9004. const oe = [];
  9005. it(() => {
  9006. oe.forEach((H) => clearTimeout(H)), oe.splice(0, oe.length);
  9007. }), yt(() => {
  9008. oe.forEach((H) => clearTimeout(H)), oe.splice(0, oe.length);
  9009. });
  9010. const K = function(H) {
  9011. var G, re;
  9012. const {
  9013. target: fe
  9014. } = H, de = (G = f.value) === null || G === void 0 ? void 0 : G.getPopupElement();
  9015. if (de && de.contains(fe)) {
  9016. const be = setTimeout(() => {
  9017. var he;
  9018. const Te = oe.indexOf(be);
  9019. Te !== -1 && oe.splice(Te, 1), m(), !s.value && !de.contains(document.activeElement) && ((he = d.value) === null || he === void 0 || he.focus());
  9020. });
  9021. oe.push(be);
  9022. }
  9023. for (var Ee = arguments.length, $e = new Array(Ee > 1 ? Ee - 1 : 0), Se = 1; Se < Ee; Se++)
  9024. $e[Se - 1] = arguments[Se];
  9025. (re = t.onMousedown) === null || re === void 0 || re.call(t, H, ...$e);
  9026. }, ie = ae(null), X = () => {
  9027. };
  9028. return it(() => {
  9029. se(w, () => {
  9030. var H;
  9031. if (w.value) {
  9032. const G = Math.ceil((H = u.value) === null || H === void 0 ? void 0 : H.offsetWidth);
  9033. ie.value !== G && !Number.isNaN(G) && (ie.value = G);
  9034. }
  9035. }, {
  9036. immediate: !0,
  9037. flush: "post"
  9038. });
  9039. }), ege([u, f], w, P), nge(zZ(I(I({}, ES(t)), {
  9040. open: x,
  9041. triggerOpen: w,
  9042. showSearch: o,
  9043. multiple: a,
  9044. toggleOpen: P
  9045. }))), () => {
  9046. const H = I(I({}, t), n), {
  9047. prefixCls: G,
  9048. id: re,
  9049. open: fe,
  9050. defaultOpen: de,
  9051. mode: Ee,
  9052. // Search related
  9053. showSearch: $e,
  9054. searchValue: Se,
  9055. onSearch: be,
  9056. // Icons
  9057. allowClear: he,
  9058. clearIcon: Te,
  9059. showArrow: ze,
  9060. inputIcon: ut,
  9061. // Others
  9062. disabled: ct,
  9063. loading: Dt,
  9064. getInputElement: ve,
  9065. getPopupContainer: Xe,
  9066. placement: Rt,
  9067. // Dropdown
  9068. animation: An,
  9069. transitionName: sn,
  9070. dropdownStyle: Ar,
  9071. dropdownClassName: Wa,
  9072. dropdownMatchSelectWidth: Qp,
  9073. dropdownRender: Hp,
  9074. dropdownAlign: vy,
  9075. showAction: Gw,
  9076. direction: jf,
  9077. // Tags
  9078. tokenSeparators: jw,
  9079. tagRender: Gp,
  9080. optionLabelRender: Zw,
  9081. // Events
  9082. onPopupScroll: Zf,
  9083. onDropdownVisibleChange: W4,
  9084. onFocus: xpt,
  9085. onBlur: wpt,
  9086. onKeyup: Cpt,
  9087. onKeydown: Tpt,
  9088. onMousedown: Ppt,
  9089. onClear: Uw,
  9090. omitDomProps: Xw,
  9091. getRawInputElement: Q4,
  9092. displayValues: gy,
  9093. onDisplayValuesChange: Ele,
  9094. emptyOptions: Mle,
  9095. activeDescendantId: Ile,
  9096. activeValue: Dle,
  9097. OptionList: Rle
  9098. } = H, kle = ige(H, ["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"]), H4 = Ee === "combobox" && ve && ve() || null, jp = typeof Q4 == "function" && Q4(), Yw = I({}, kle);
  9099. let G4;
  9100. jp && (G4 = (Iu) => {
  9101. P(Iu);
  9102. }), age.forEach((Iu) => {
  9103. delete Yw[Iu];
  9104. }), Xw == null || Xw.forEach((Iu) => {
  9105. delete Yw[Iu];
  9106. });
  9107. const j4 = ze !== void 0 ? ze : Dt || !a.value && Ee !== "combobox";
  9108. let Z4;
  9109. j4 && (Z4 = M(vf, {
  9110. class: ye(`${G}-arrow`, {
  9111. [`${G}-arrow-loading`]: Dt
  9112. }),
  9113. customizeIcon: ut,
  9114. customizeIconProps: {
  9115. loading: Dt,
  9116. searchValue: _.value,
  9117. open: x.value,
  9118. focused: v.value,
  9119. showSearch: o.value
  9120. }
  9121. }, null));
  9122. let U4;
  9123. const Lle = () => {
  9124. Uw == null || Uw(), Ele([], {
  9125. type: "clear",
  9126. values: gy
  9127. }), A("", !1, !1);
  9128. };
  9129. !ct && he && (gy.length || _.value) && (U4 = M(vf, {
  9130. class: `${G}-clear`,
  9131. onMousedown: Lle,
  9132. customizeIcon: Te
  9133. }, {
  9134. default: () => [Kt("×")]
  9135. }));
  9136. const Nle = M(Rle, {
  9137. ref: h
  9138. }, I(I({}, l.customSlots), {
  9139. option: i.option
  9140. })), Ble = ye(G, n.class, {
  9141. [`${G}-focused`]: v.value,
  9142. [`${G}-multiple`]: a.value,
  9143. [`${G}-single`]: !a.value,
  9144. [`${G}-allow-clear`]: he,
  9145. [`${G}-show-arrow`]: j4,
  9146. [`${G}-disabled`]: ct,
  9147. [`${G}-loading`]: Dt,
  9148. [`${G}-open`]: x.value,
  9149. [`${G}-customize-input`]: H4,
  9150. [`${G}-show-search`]: o.value
  9151. }), X4 = M(Mve, {
  9152. ref: f,
  9153. disabled: ct,
  9154. prefixCls: G,
  9155. visible: w.value,
  9156. popupElement: Nle,
  9157. containerWidth: ie.value,
  9158. animation: An,
  9159. transitionName: sn,
  9160. dropdownStyle: Ar,
  9161. dropdownClassName: Wa,
  9162. direction: jf,
  9163. dropdownMatchSelectWidth: Qp,
  9164. dropdownRender: Hp,
  9165. dropdownAlign: vy,
  9166. placement: Rt,
  9167. getPopupContainer: Xe,
  9168. empty: Mle,
  9169. getTriggerDOMNode: () => c.current,
  9170. onPopupVisibleChange: G4,
  9171. onPopupMouseEnter: X,
  9172. onPopupFocusin: ne,
  9173. onPopupFocusout: ee
  9174. }, {
  9175. default: () => jp ? Yi(jp) && Pn(jp, {
  9176. ref: c
  9177. }, !1, !0) : M(Jve, j(j({}, t), {}, {
  9178. domRef: c,
  9179. prefixCls: G,
  9180. inputElement: H4,
  9181. ref: d,
  9182. id: re,
  9183. showSearch: o.value,
  9184. mode: Ee,
  9185. activeDescendantId: Ile,
  9186. tagRender: Gp,
  9187. optionLabelRender: Zw,
  9188. values: gy,
  9189. open: x.value,
  9190. onToggleOpen: P,
  9191. activeValue: Dle,
  9192. searchValue: _.value,
  9193. onSearch: A,
  9194. onSearchSubmit: D,
  9195. onRemove: B,
  9196. tokenWithEnter: $.value
  9197. }), null)
  9198. });
  9199. let qw;
  9200. return jp ? qw = X4 : qw = M("div", j(j({}, Yw), {}, {
  9201. class: Ble,
  9202. ref: u,
  9203. onMousedown: K,
  9204. onKeydown: N,
  9205. onKeyup: V
  9206. }), [v.value && !x.value && M("span", {
  9207. style: {
  9208. width: 0,
  9209. height: 0,
  9210. position: "absolute",
  9211. overflow: "hidden",
  9212. opacity: 0
  9213. },
  9214. "aria-live": "polite"
  9215. }, [`${gy.map((Iu) => {
  9216. let {
  9217. label: Y4,
  9218. value: zle
  9219. } = Iu;
  9220. return ["number", "string"].includes(typeof Y4) ? Y4 : zle;
  9221. }).join(", ")}`]), X4, Z4, U4]), qw;
  9222. };
  9223. }
  9224. }), nx = (t, e) => {
  9225. let {
  9226. height: n,
  9227. offset: r,
  9228. prefixCls: i,
  9229. onInnerResize: a
  9230. } = t, {
  9231. slots: o
  9232. } = e;
  9233. var s;
  9234. let l = {}, u = {
  9235. display: "flex",
  9236. flexDirection: "column"
  9237. };
  9238. return r !== void 0 && (l = {
  9239. height: `${n}px`,
  9240. position: "relative",
  9241. overflow: "hidden"
  9242. }, u = I(I({}, u), {
  9243. transform: `translateY(${r}px)`,
  9244. position: "absolute",
  9245. left: 0,
  9246. right: 0,
  9247. top: 0
  9248. })), M("div", {
  9249. style: l
  9250. }, [M(bh, {
  9251. onResize: (c) => {
  9252. let {
  9253. offsetHeight: f
  9254. } = c;
  9255. f && a && a();
  9256. }
  9257. }, {
  9258. default: () => [M("div", {
  9259. style: u,
  9260. class: ye({
  9261. [`${i}-holder-inner`]: i
  9262. })
  9263. }, [(s = o.default) === null || s === void 0 ? void 0 : s.call(o)])]
  9264. })]);
  9265. };
  9266. nx.displayName = "Filter";
  9267. nx.inheritAttrs = !1;
  9268. nx.props = {
  9269. prefixCls: String,
  9270. /** Virtual filler height. Should be `count * itemMinHeight` */
  9271. height: Number,
  9272. /** Set offset of visible items. Should be the top of start item position */
  9273. offset: Number,
  9274. onInnerResize: Function
  9275. };
  9276. const FZ = (t, e) => {
  9277. let {
  9278. setRef: n
  9279. } = t, {
  9280. slots: r
  9281. } = e;
  9282. var i;
  9283. const a = Yn((i = r.default) === null || i === void 0 ? void 0 : i.call(r));
  9284. return a && a.length ? Bs(a[0], {
  9285. ref: n
  9286. }) : a;
  9287. };
  9288. FZ.props = {
  9289. setRef: {
  9290. type: Function,
  9291. default: () => {
  9292. }
  9293. }
  9294. };
  9295. const uge = 20;
  9296. function vN(t) {
  9297. return "touches" in t ? t.touches[0].pageY : t.pageY;
  9298. }
  9299. const cge = te({
  9300. compatConfig: {
  9301. MODE: 3
  9302. },
  9303. name: "ScrollBar",
  9304. inheritAttrs: !1,
  9305. props: {
  9306. prefixCls: String,
  9307. scrollTop: Number,
  9308. scrollHeight: Number,
  9309. height: Number,
  9310. count: Number,
  9311. onScroll: {
  9312. type: Function
  9313. },
  9314. onStartMove: {
  9315. type: Function
  9316. },
  9317. onStopMove: {
  9318. type: Function
  9319. }
  9320. },
  9321. setup() {
  9322. return {
  9323. moveRaf: null,
  9324. scrollbarRef: sm(),
  9325. thumbRef: sm(),
  9326. visibleTimeout: null,
  9327. state: tn({
  9328. dragging: !1,
  9329. pageY: null,
  9330. startTop: null,
  9331. visible: !1
  9332. })
  9333. };
  9334. },
  9335. watch: {
  9336. scrollTop: {
  9337. handler() {
  9338. this.delayHidden();
  9339. },
  9340. flush: "post"
  9341. }
  9342. },
  9343. mounted() {
  9344. var t, e;
  9345. (t = this.scrollbarRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onScrollbarTouchStart, pr ? {
  9346. passive: !1
  9347. } : !1), (e = this.thumbRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onMouseDown, pr ? {
  9348. passive: !1
  9349. } : !1);
  9350. },
  9351. beforeUnmount() {
  9352. this.removeEvents(), clearTimeout(this.visibleTimeout);
  9353. },
  9354. methods: {
  9355. delayHidden() {
  9356. clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
  9357. this.state.visible = !1;
  9358. }, 2e3);
  9359. },
  9360. onScrollbarTouchStart(t) {
  9361. t.preventDefault();
  9362. },
  9363. onContainerMouseDown(t) {
  9364. t.stopPropagation(), t.preventDefault();
  9365. },
  9366. // ======================= Clean =======================
  9367. patchEvents() {
  9368. window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, pr ? {
  9369. passive: !1
  9370. } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
  9371. },
  9372. removeEvents() {
  9373. window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, pr ? {
  9374. passive: !1
  9375. } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, pr ? {
  9376. passive: !1
  9377. } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, pr ? {
  9378. passive: !1
  9379. } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), xt.cancel(this.moveRaf);
  9380. },
  9381. // ======================= Thumb =======================
  9382. onMouseDown(t) {
  9383. const {
  9384. onStartMove: e
  9385. } = this.$props;
  9386. I(this.state, {
  9387. dragging: !0,
  9388. pageY: vN(t),
  9389. startTop: this.getTop()
  9390. }), e(), this.patchEvents(), t.stopPropagation(), t.preventDefault();
  9391. },
  9392. onMouseMove(t) {
  9393. const {
  9394. dragging: e,
  9395. pageY: n,
  9396. startTop: r
  9397. } = this.state, {
  9398. onScroll: i
  9399. } = this.$props;
  9400. if (xt.cancel(this.moveRaf), e) {
  9401. const a = vN(t) - n, o = r + a, s = this.getEnableScrollRange(), l = this.getEnableHeightRange(), u = l ? o / l : 0, c = Math.ceil(u * s);
  9402. this.moveRaf = xt(() => {
  9403. i(c);
  9404. });
  9405. }
  9406. },
  9407. onMouseUp() {
  9408. const {
  9409. onStopMove: t
  9410. } = this.$props;
  9411. this.state.dragging = !1, t(), this.removeEvents();
  9412. },
  9413. // ===================== Calculate =====================
  9414. getSpinHeight() {
  9415. const {
  9416. height: t,
  9417. scrollHeight: e
  9418. } = this.$props;
  9419. let n = t / e * 100;
  9420. return n = Math.max(n, uge), n = Math.min(n, t / 2), Math.floor(n);
  9421. },
  9422. getEnableScrollRange() {
  9423. const {
  9424. scrollHeight: t,
  9425. height: e
  9426. } = this.$props;
  9427. return t - e || 0;
  9428. },
  9429. getEnableHeightRange() {
  9430. const {
  9431. height: t
  9432. } = this.$props, e = this.getSpinHeight();
  9433. return t - e || 0;
  9434. },
  9435. getTop() {
  9436. const {
  9437. scrollTop: t
  9438. } = this.$props, e = this.getEnableScrollRange(), n = this.getEnableHeightRange();
  9439. return t === 0 || e === 0 ? 0 : t / e * n;
  9440. },
  9441. // Not show scrollbar when height is large than scrollHeight
  9442. showScroll() {
  9443. const {
  9444. height: t,
  9445. scrollHeight: e
  9446. } = this.$props;
  9447. return e > t;
  9448. }
  9449. },
  9450. render() {
  9451. const {
  9452. dragging: t,
  9453. visible: e
  9454. } = this.state, {
  9455. prefixCls: n
  9456. } = this.$props, r = this.getSpinHeight() + "px", i = this.getTop() + "px", a = this.showScroll(), o = a && e;
  9457. return M("div", {
  9458. ref: this.scrollbarRef,
  9459. class: ye(`${n}-scrollbar`, {
  9460. [`${n}-scrollbar-show`]: a
  9461. }),
  9462. style: {
  9463. width: "8px",
  9464. top: 0,
  9465. bottom: 0,
  9466. right: 0,
  9467. position: "absolute",
  9468. display: o ? void 0 : "none"
  9469. },
  9470. onMousedown: this.onContainerMouseDown,
  9471. onMousemove: this.delayHidden
  9472. }, [M("div", {
  9473. ref: this.thumbRef,
  9474. class: ye(`${n}-scrollbar-thumb`, {
  9475. [`${n}-scrollbar-thumb-moving`]: t
  9476. }),
  9477. style: {
  9478. width: "100%",
  9479. height: r,
  9480. top: i,
  9481. left: 0,
  9482. position: "absolute",
  9483. background: "rgba(0, 0, 0, 0.5)",
  9484. borderRadius: "99px",
  9485. cursor: "pointer",
  9486. userSelect: "none"
  9487. },
  9488. onMousedown: this.onMouseDown
  9489. }, null)]);
  9490. }
  9491. });
  9492. function fge(t, e, n, r) {
  9493. const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = U(Symbol("update"));
  9494. se(t, () => {
  9495. o.value = Symbol("update");
  9496. });
  9497. let s;
  9498. function l() {
  9499. xt.cancel(s);
  9500. }
  9501. function u() {
  9502. l(), s = xt(() => {
  9503. i.forEach((f, d) => {
  9504. if (f && f.offsetParent) {
  9505. const {
  9506. offsetHeight: h
  9507. } = f;
  9508. a.get(d) !== h && (o.value = Symbol("update"), a.set(d, f.offsetHeight));
  9509. }
  9510. });
  9511. });
  9512. }
  9513. function c(f, d) {
  9514. const h = e(f);
  9515. i.get(h), d ? (i.set(h, d.$el || d), u()) : i.delete(h);
  9516. }
  9517. return rl(() => {
  9518. l();
  9519. }), [c, u, a, o];
  9520. }
  9521. function dge(t, e, n, r, i, a, o, s) {
  9522. let l;
  9523. return (u) => {
  9524. if (u == null) {
  9525. s();
  9526. return;
  9527. }
  9528. xt.cancel(l);
  9529. const c = e.value, f = r.itemHeight;
  9530. if (typeof u == "number")
  9531. o(u);
  9532. else if (u && typeof u == "object") {
  9533. let d;
  9534. const {
  9535. align: h
  9536. } = u;
  9537. "index" in u ? {
  9538. index: d
  9539. } = u : d = c.findIndex((g) => i(g) === u.key);
  9540. const {
  9541. offset: p = 0
  9542. } = u, v = (g, m) => {
  9543. if (g < 0 || !t.value) return;
  9544. const y = t.value.clientHeight;
  9545. let b = !1, _ = m;
  9546. if (y) {
  9547. const O = m || h;
  9548. let S = 0, x = 0, C = 0;
  9549. const T = Math.min(c.length, d);
  9550. for (let $ = 0; $ <= T; $ += 1) {
  9551. const A = i(c[$]);
  9552. x = S;
  9553. const D = n.get(A);
  9554. C = x + (D === void 0 ? f : D), S = C, $ === d && D === void 0 && (b = !0);
  9555. }
  9556. const w = t.value.scrollTop;
  9557. let P = null;
  9558. switch (O) {
  9559. case "top":
  9560. P = x - p;
  9561. break;
  9562. case "bottom":
  9563. P = C - y + p;
  9564. break;
  9565. default: {
  9566. const $ = w + y;
  9567. x < w ? _ = "top" : C > $ && (_ = "bottom");
  9568. }
  9569. }
  9570. P !== null && P !== w && o(P);
  9571. }
  9572. l = xt(() => {
  9573. b && a(), v(g - 1, _);
  9574. }, 2);
  9575. };
  9576. v(5);
  9577. }
  9578. };
  9579. }
  9580. const hge = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), WZ = (t, e) => {
  9581. let n = !1, r = null;
  9582. function i() {
  9583. clearTimeout(r), n = !0, r = setTimeout(() => {
  9584. n = !1;
  9585. }, 50);
  9586. }
  9587. return function(a) {
  9588. let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  9589. const s = (
  9590. // Pass origin wheel when on the top
  9591. a < 0 && t.value || // Pass origin wheel when on the bottom
  9592. a > 0 && e.value
  9593. );
  9594. return o && s ? (clearTimeout(r), n = !1) : (!s || n) && i(), !n && s;
  9595. };
  9596. };
  9597. function pge(t, e, n, r) {
  9598. let i = 0, a = null, o = null, s = !1;
  9599. const l = WZ(e, n);
  9600. function u(f) {
  9601. if (!t.value) return;
  9602. xt.cancel(a);
  9603. const {
  9604. deltaY: d
  9605. } = f;
  9606. i += d, o = d, !l(d) && (hge || f.preventDefault(), a = xt(() => {
  9607. r(i * (s ? 10 : 1)), i = 0;
  9608. }));
  9609. }
  9610. function c(f) {
  9611. t.value && (s = f.detail === o);
  9612. }
  9613. return [u, c];
  9614. }
  9615. const vge = 14 / 15;
  9616. function gge(t, e, n) {
  9617. let r = !1, i = 0, a = null, o = null;
  9618. const s = () => {
  9619. a && (a.removeEventListener("touchmove", l), a.removeEventListener("touchend", u));
  9620. }, l = (d) => {
  9621. if (r) {
  9622. const h = Math.ceil(d.touches[0].pageY);
  9623. let p = i - h;
  9624. i = h, n(p) && d.preventDefault(), clearInterval(o), o = setInterval(() => {
  9625. p *= vge, (!n(p, !0) || Math.abs(p) <= 0.1) && clearInterval(o);
  9626. }, 16);
  9627. }
  9628. }, u = () => {
  9629. r = !1, s();
  9630. }, c = (d) => {
  9631. s(), d.touches.length === 1 && !r && (r = !0, i = Math.ceil(d.touches[0].pageY), a = d.target, a.addEventListener("touchmove", l, {
  9632. passive: !1
  9633. }), a.addEventListener("touchend", u));
  9634. }, f = () => {
  9635. };
  9636. it(() => {
  9637. document.addEventListener("touchmove", f, {
  9638. passive: !1
  9639. }), se(t, (d) => {
  9640. e.value.removeEventListener("touchstart", c), s(), clearInterval(o), d && e.value.addEventListener("touchstart", c, {
  9641. passive: !1
  9642. });
  9643. }, {
  9644. immediate: !0
  9645. });
  9646. }), yt(() => {
  9647. document.removeEventListener("touchmove", f);
  9648. });
  9649. }
  9650. var mge = function(t, e) {
  9651. var n = {};
  9652. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  9653. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  9654. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  9655. return n;
  9656. };
  9657. const yge = [], bge = {
  9658. overflowY: "auto",
  9659. overflowAnchor: "none"
  9660. };
  9661. function _ge(t, e, n, r, i, a) {
  9662. let {
  9663. getKey: o
  9664. } = a;
  9665. return t.slice(e, n + 1).map((s, l) => {
  9666. const u = e + l, c = i(s, u, {
  9667. // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
  9668. }), f = o(s);
  9669. return M(FZ, {
  9670. key: f,
  9671. setRef: (d) => r(s, d)
  9672. }, {
  9673. default: () => [c]
  9674. });
  9675. });
  9676. }
  9677. const Oge = te({
  9678. compatConfig: {
  9679. MODE: 3
  9680. },
  9681. name: "List",
  9682. inheritAttrs: !1,
  9683. props: {
  9684. prefixCls: String,
  9685. data: Y.array,
  9686. height: Number,
  9687. itemHeight: Number,
  9688. /** If not match virtual scroll condition, Set List still use height of container. */
  9689. fullHeight: {
  9690. type: Boolean,
  9691. default: void 0
  9692. },
  9693. itemKey: {
  9694. type: [String, Number, Function],
  9695. required: !0
  9696. },
  9697. component: {
  9698. type: [String, Object]
  9699. },
  9700. /** Set `false` will always use real scroll instead of virtual one */
  9701. virtual: {
  9702. type: Boolean,
  9703. default: void 0
  9704. },
  9705. children: Function,
  9706. onScroll: Function,
  9707. onMousedown: Function,
  9708. onMouseenter: Function,
  9709. onVisibleChange: Function
  9710. },
  9711. setup(t, e) {
  9712. let {
  9713. expose: n
  9714. } = e;
  9715. const r = L(() => {
  9716. const {
  9717. height: B,
  9718. itemHeight: W,
  9719. virtual: F
  9720. } = t;
  9721. return !!(F !== !1 && B && W);
  9722. }), i = L(() => {
  9723. const {
  9724. height: B,
  9725. itemHeight: W,
  9726. data: F
  9727. } = t;
  9728. return r.value && F && W * F.length > B;
  9729. }), a = tn({
  9730. scrollTop: 0,
  9731. scrollMoving: !1
  9732. }), o = L(() => t.data || yge), s = ae([]);
  9733. se(o, () => {
  9734. s.value = Ko(o.value).slice();
  9735. }, {
  9736. immediate: !0
  9737. });
  9738. const l = ae((B) => {
  9739. });
  9740. se(() => t.itemKey, (B) => {
  9741. typeof B == "function" ? l.value = B : l.value = (W) => W == null ? void 0 : W[B];
  9742. }, {
  9743. immediate: !0
  9744. });
  9745. const u = ae(), c = ae(), f = ae(), d = (B) => l.value(B), h = {
  9746. getKey: d
  9747. };
  9748. function p(B) {
  9749. let W;
  9750. typeof B == "function" ? W = B(a.scrollTop) : W = B;
  9751. const F = S(W);
  9752. u.value && (u.value.scrollTop = F), a.scrollTop = F;
  9753. }
  9754. const [v, g, m, y] = fge(s, d), b = tn({
  9755. scrollHeight: void 0,
  9756. start: 0,
  9757. end: 0,
  9758. offset: void 0
  9759. }), _ = ae(0);
  9760. it(() => {
  9761. Tt(() => {
  9762. var B;
  9763. _.value = ((B = c.value) === null || B === void 0 ? void 0 : B.offsetHeight) || 0;
  9764. });
  9765. }), ap(() => {
  9766. Tt(() => {
  9767. var B;
  9768. _.value = ((B = c.value) === null || B === void 0 ? void 0 : B.offsetHeight) || 0;
  9769. });
  9770. }), se([r, s], () => {
  9771. r.value || I(b, {
  9772. scrollHeight: void 0,
  9773. start: 0,
  9774. end: s.value.length - 1,
  9775. offset: void 0
  9776. });
  9777. }, {
  9778. immediate: !0
  9779. }), se([r, s, _, i], () => {
  9780. r.value && !i.value && I(b, {
  9781. scrollHeight: _.value,
  9782. start: 0,
  9783. end: s.value.length - 1,
  9784. offset: void 0
  9785. }), u.value && (a.scrollTop = u.value.scrollTop);
  9786. }, {
  9787. immediate: !0
  9788. }), se([i, r, () => a.scrollTop, s, y, () => t.height, _], () => {
  9789. if (!r.value || !i.value)
  9790. return;
  9791. let B = 0, W, F, Q;
  9792. const Z = s.value.length, ne = s.value, ee = a.scrollTop, {
  9793. itemHeight: oe,
  9794. height: K
  9795. } = t, ie = ee + K;
  9796. for (let X = 0; X < Z; X += 1) {
  9797. const H = ne[X], G = d(H);
  9798. let re = m.get(G);
  9799. re === void 0 && (re = oe);
  9800. const fe = B + re;
  9801. W === void 0 && fe >= ee && (W = X, F = B), Q === void 0 && fe > ie && (Q = X), B = fe;
  9802. }
  9803. W === void 0 && (W = 0, F = 0, Q = Math.ceil(K / oe)), Q === void 0 && (Q = Z - 1), Q = Math.min(Q + 1, Z), I(b, {
  9804. scrollHeight: B,
  9805. start: W,
  9806. end: Q,
  9807. offset: F
  9808. });
  9809. }, {
  9810. immediate: !0
  9811. });
  9812. const O = L(() => b.scrollHeight - t.height);
  9813. function S(B) {
  9814. let W = B;
  9815. return Number.isNaN(O.value) || (W = Math.min(W, O.value)), W = Math.max(W, 0), W;
  9816. }
  9817. const x = L(() => a.scrollTop <= 0), C = L(() => a.scrollTop >= O.value), T = WZ(x, C);
  9818. function w(B) {
  9819. p(B);
  9820. }
  9821. function P(B) {
  9822. var W;
  9823. const {
  9824. scrollTop: F
  9825. } = B.currentTarget;
  9826. F !== a.scrollTop && p(F), (W = t.onScroll) === null || W === void 0 || W.call(t, B);
  9827. }
  9828. const [$, A] = pge(r, x, C, (B) => {
  9829. p((W) => W + B);
  9830. });
  9831. gge(r, u, (B, W) => T(B, W) ? !1 : ($({
  9832. preventDefault() {
  9833. },
  9834. deltaY: B
  9835. }), !0));
  9836. function D(B) {
  9837. r.value && B.preventDefault();
  9838. }
  9839. const E = () => {
  9840. u.value && (u.value.removeEventListener("wheel", $, pr ? {
  9841. passive: !1
  9842. } : !1), u.value.removeEventListener("DOMMouseScroll", A), u.value.removeEventListener("MozMousePixelScroll", D));
  9843. };
  9844. ht(() => {
  9845. Tt(() => {
  9846. u.value && (E(), u.value.addEventListener("wheel", $, pr ? {
  9847. passive: !1
  9848. } : !1), u.value.addEventListener("DOMMouseScroll", A), u.value.addEventListener("MozMousePixelScroll", D));
  9849. });
  9850. }), yt(() => {
  9851. E();
  9852. });
  9853. const R = dge(u, s, m, t, d, g, p, () => {
  9854. var B;
  9855. (B = f.value) === null || B === void 0 || B.delayHidden();
  9856. });
  9857. n({
  9858. scrollTo: R
  9859. });
  9860. const N = L(() => {
  9861. let B = null;
  9862. return t.height && (B = I({
  9863. [t.fullHeight ? "height" : "maxHeight"]: t.height + "px"
  9864. }, bge), r.value && (B.overflowY = "hidden", a.scrollMoving && (B.pointerEvents = "none"))), B;
  9865. });
  9866. return se([() => b.start, () => b.end, s], () => {
  9867. if (t.onVisibleChange) {
  9868. const B = s.value.slice(b.start, b.end + 1);
  9869. t.onVisibleChange(B, s.value);
  9870. }
  9871. }, {
  9872. flush: "post"
  9873. }), {
  9874. state: a,
  9875. mergedData: s,
  9876. componentStyle: N,
  9877. onFallbackScroll: P,
  9878. onScrollBar: w,
  9879. componentRef: u,
  9880. useVirtual: r,
  9881. calRes: b,
  9882. collectHeight: g,
  9883. setInstance: v,
  9884. sharedConfig: h,
  9885. scrollBarRef: f,
  9886. fillerInnerRef: c,
  9887. delayHideScrollBar: () => {
  9888. var B;
  9889. (B = f.value) === null || B === void 0 || B.delayHidden();
  9890. }
  9891. };
  9892. },
  9893. render() {
  9894. const t = I(I({}, this.$props), this.$attrs), {
  9895. prefixCls: e = "rc-virtual-list",
  9896. height: n,
  9897. itemHeight: r,
  9898. // eslint-disable-next-line no-unused-vars
  9899. fullHeight: i,
  9900. data: a,
  9901. itemKey: o,
  9902. virtual: s,
  9903. component: l = "div",
  9904. onScroll: u,
  9905. children: c = this.$slots.default,
  9906. style: f,
  9907. class: d
  9908. } = t, h = mge(t, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), p = ye(e, d), {
  9909. scrollTop: v
  9910. } = this.state, {
  9911. scrollHeight: g,
  9912. offset: m,
  9913. start: y,
  9914. end: b
  9915. } = this.calRes, {
  9916. componentStyle: _,
  9917. onFallbackScroll: O,
  9918. onScrollBar: S,
  9919. useVirtual: x,
  9920. collectHeight: C,
  9921. sharedConfig: T,
  9922. setInstance: w,
  9923. mergedData: P,
  9924. delayHideScrollBar: $
  9925. } = this;
  9926. return M("div", j({
  9927. style: I(I({}, f), {
  9928. position: "relative"
  9929. }),
  9930. class: p
  9931. }, h), [M(l, {
  9932. class: `${e}-holder`,
  9933. style: _,
  9934. ref: "componentRef",
  9935. onScroll: O,
  9936. onMouseenter: $
  9937. }, {
  9938. default: () => [M(nx, {
  9939. prefixCls: e,
  9940. height: g,
  9941. offset: m,
  9942. onInnerResize: C,
  9943. ref: "fillerInnerRef"
  9944. }, {
  9945. default: () => _ge(P, y, b, w, c, T)
  9946. })]
  9947. }), x && M(cge, {
  9948. ref: "scrollBarRef",
  9949. prefixCls: e,
  9950. scrollTop: v,
  9951. height: n,
  9952. scrollHeight: g,
  9953. count: P.length,
  9954. onScroll: S,
  9955. onStartMove: () => {
  9956. this.state.scrollMoving = !0;
  9957. },
  9958. onStopMove: () => {
  9959. this.state.scrollMoving = !1;
  9960. }
  9961. }, null)]);
  9962. }
  9963. });
  9964. function Sge(t, e, n) {
  9965. const r = U(t());
  9966. return se(e, (i, a) => {
  9967. n ? n(i, a) && (r.value = t()) : r.value = t();
  9968. }), r;
  9969. }
  9970. function xge() {
  9971. return /(mac\sos|macintosh)/i.test(navigator.appVersion);
  9972. }
  9973. const QZ = Symbol("SelectContextKey");
  9974. function wge(t) {
  9975. return pt(QZ, t);
  9976. }
  9977. function Cge() {
  9978. return Ge(QZ, {});
  9979. }
  9980. var Tge = function(t, e) {
  9981. var n = {};
  9982. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  9983. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  9984. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  9985. return n;
  9986. };
  9987. function gN(t) {
  9988. return typeof t == "string" || typeof t == "number";
  9989. }
  9990. const Pge = te({
  9991. compatConfig: {
  9992. MODE: 3
  9993. },
  9994. name: "OptionList",
  9995. inheritAttrs: !1,
  9996. setup(t, e) {
  9997. let {
  9998. expose: n,
  9999. slots: r
  10000. } = e;
  10001. const i = rge(), a = Cge(), o = L(() => `${i.prefixCls}-item`), s = Sge(() => a.flattenOptions, [() => i.open, () => a.flattenOptions], (O) => O[0]), l = sm(), u = (O) => {
  10002. O.preventDefault();
  10003. }, c = (O) => {
  10004. l.current && l.current.scrollTo(typeof O == "number" ? {
  10005. index: O
  10006. } : O);
  10007. }, f = function(O) {
  10008. let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  10009. const x = s.value.length;
  10010. for (let C = 0; C < x; C += 1) {
  10011. const T = (O + C * S + x) % x, {
  10012. group: w,
  10013. data: P
  10014. } = s.value[T];
  10015. if (!w && !P.disabled)
  10016. return T;
  10017. }
  10018. return -1;
  10019. }, d = tn({
  10020. activeIndex: f(0)
  10021. }), h = function(O) {
  10022. let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10023. d.activeIndex = O;
  10024. const x = {
  10025. source: S ? "keyboard" : "mouse"
  10026. }, C = s.value[O];
  10027. if (!C) {
  10028. a.onActiveValue(null, -1, x);
  10029. return;
  10030. }
  10031. a.onActiveValue(C.value, O, x);
  10032. };
  10033. se([() => s.value.length, () => i.searchValue], () => {
  10034. h(a.defaultActiveFirstOption !== !1 ? f(0) : -1);
  10035. }, {
  10036. immediate: !0
  10037. });
  10038. const p = (O) => a.rawValues.has(O) && i.mode !== "combobox";
  10039. se([() => i.open, () => i.searchValue], () => {
  10040. if (!i.multiple && i.open && a.rawValues.size === 1) {
  10041. const O = Array.from(a.rawValues)[0], S = Ko(s.value).findIndex((x) => {
  10042. let {
  10043. data: C
  10044. } = x;
  10045. return C[a.fieldNames.value] === O;
  10046. });
  10047. S !== -1 && (h(S), Tt(() => {
  10048. c(S);
  10049. }));
  10050. }
  10051. i.open && Tt(() => {
  10052. var O;
  10053. (O = l.current) === null || O === void 0 || O.scrollTo(void 0);
  10054. });
  10055. }, {
  10056. immediate: !0,
  10057. flush: "post"
  10058. });
  10059. const v = (O) => {
  10060. O !== void 0 && a.onSelect(O, {
  10061. selected: !a.rawValues.has(O)
  10062. }), i.multiple || i.toggleOpen(!1);
  10063. }, g = (O) => typeof O.label == "function" ? O.label() : O.label;
  10064. function m(O) {
  10065. const S = s.value[O];
  10066. if (!S) return null;
  10067. const x = S.data || {}, {
  10068. value: C
  10069. } = x, {
  10070. group: T
  10071. } = S, w = tx(x, !0), P = g(S);
  10072. return S ? M("div", j(j({
  10073. "aria-label": typeof P == "string" && !T ? P : null
  10074. }, w), {}, {
  10075. key: O,
  10076. role: T ? "presentation" : "option",
  10077. id: `${i.id}_list_${O}`,
  10078. "aria-selected": p(C)
  10079. }), [C]) : null;
  10080. }
  10081. return n({
  10082. onKeydown: (O) => {
  10083. const {
  10084. which: S,
  10085. ctrlKey: x
  10086. } = O;
  10087. switch (S) {
  10088. case ge.N:
  10089. case ge.P:
  10090. case ge.UP:
  10091. case ge.DOWN: {
  10092. let C = 0;
  10093. if (S === ge.UP ? C = -1 : S === ge.DOWN ? C = 1 : xge() && x && (S === ge.N ? C = 1 : S === ge.P && (C = -1)), C !== 0) {
  10094. const T = f(d.activeIndex + C, C);
  10095. c(T), h(T, !0);
  10096. }
  10097. break;
  10098. }
  10099. case ge.ENTER: {
  10100. const C = s.value[d.activeIndex];
  10101. C && !C.data.disabled ? v(C.value) : v(void 0), i.open && O.preventDefault();
  10102. break;
  10103. }
  10104. case ge.ESC:
  10105. i.toggleOpen(!1), i.open && O.stopPropagation();
  10106. }
  10107. },
  10108. onKeyup: () => {
  10109. },
  10110. scrollTo: (O) => {
  10111. c(O);
  10112. }
  10113. }), () => {
  10114. const {
  10115. id: O,
  10116. notFoundContent: S,
  10117. onPopupScroll: x
  10118. } = i, {
  10119. menuItemSelectedIcon: C,
  10120. fieldNames: T,
  10121. virtual: w,
  10122. listHeight: P,
  10123. listItemHeight: $
  10124. } = a, A = r.option, {
  10125. activeIndex: D
  10126. } = d, E = Object.keys(T).map((R) => T[R]);
  10127. return s.value.length === 0 ? M("div", {
  10128. role: "listbox",
  10129. id: `${O}_list`,
  10130. class: `${o.value}-empty`,
  10131. onMousedown: u
  10132. }, [S]) : M(wt, null, [M("div", {
  10133. role: "listbox",
  10134. id: `${O}_list`,
  10135. style: {
  10136. height: 0,
  10137. width: 0,
  10138. overflow: "hidden"
  10139. }
  10140. }, [m(D - 1), m(D), m(D + 1)]), M(Oge, {
  10141. itemKey: "key",
  10142. ref: l,
  10143. data: s.value,
  10144. height: P,
  10145. itemHeight: $,
  10146. fullHeight: !1,
  10147. onMousedown: u,
  10148. onScroll: x,
  10149. virtual: w
  10150. }, {
  10151. default: (R, N) => {
  10152. var V;
  10153. const {
  10154. group: B,
  10155. groupOption: W,
  10156. data: F,
  10157. value: Q
  10158. } = R, {
  10159. key: Z
  10160. } = F, ne = typeof R.label == "function" ? R.label() : R.label;
  10161. if (B) {
  10162. const Te = (V = F.title) !== null && V !== void 0 ? V : gN(ne) && ne;
  10163. return M("div", {
  10164. class: ye(o.value, `${o.value}-group`),
  10165. title: Te
  10166. }, [A ? A(F) : ne !== void 0 ? ne : Z]);
  10167. }
  10168. const {
  10169. disabled: ee,
  10170. title: oe,
  10171. children: K,
  10172. style: ie,
  10173. class: X,
  10174. className: H
  10175. } = F, G = Tge(F, ["disabled", "title", "children", "style", "class", "className"]), re = or(G, E), fe = p(Q), de = `${o.value}-option`, Ee = ye(o.value, de, X, H, {
  10176. [`${de}-grouped`]: W,
  10177. [`${de}-active`]: D === N && !ee,
  10178. [`${de}-disabled`]: ee,
  10179. [`${de}-selected`]: fe
  10180. }), $e = g(R), Se = !C || typeof C == "function" || fe, be = typeof $e == "number" ? $e : $e || Q;
  10181. let he = gN(be) ? be.toString() : void 0;
  10182. return oe !== void 0 && (he = oe), M("div", j(j({}, re), {}, {
  10183. "aria-selected": fe,
  10184. class: Ee,
  10185. title: he,
  10186. onMousemove: (Te) => {
  10187. G.onMousemove && G.onMousemove(Te), !(D === N || ee) && h(N);
  10188. },
  10189. onClick: (Te) => {
  10190. ee || v(Q), G.onClick && G.onClick(Te);
  10191. },
  10192. style: ie
  10193. }), [M("div", {
  10194. class: `${de}-content`
  10195. }, [A ? A(F) : be]), Yi(C) || fe, Se && M(vf, {
  10196. class: `${o.value}-option-state`,
  10197. customizeIcon: C,
  10198. customizeIconProps: {
  10199. isSelected: fe
  10200. }
  10201. }, {
  10202. default: () => [fe ? "✓" : null]
  10203. })]);
  10204. }
  10205. })]);
  10206. };
  10207. }
  10208. });
  10209. var $ge = function(t, e) {
  10210. var n = {};
  10211. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  10212. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  10213. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  10214. return n;
  10215. };
  10216. function Age(t) {
  10217. const e = t, {
  10218. key: n,
  10219. children: r
  10220. } = e, i = e.props, {
  10221. value: a,
  10222. disabled: o
  10223. } = i, s = $ge(i, ["value", "disabled"]), l = r == null ? void 0 : r.default;
  10224. return I({
  10225. key: n,
  10226. value: a !== void 0 ? a : n,
  10227. children: l,
  10228. disabled: o || o === ""
  10229. }, s);
  10230. }
  10231. function II(t) {
  10232. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10233. return Yn(t).map((r, i) => {
  10234. var a;
  10235. if (!Yi(r) || !r.type)
  10236. return null;
  10237. const {
  10238. type: {
  10239. isSelectOptGroup: o
  10240. },
  10241. key: s,
  10242. children: l,
  10243. props: u
  10244. } = r;
  10245. if (e || !o)
  10246. return Age(r);
  10247. 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;
  10248. return I(I({
  10249. key: `__RC_SELECT_GRP__${s === null ? i : String(s)}__`
  10250. }, u), {
  10251. label: f,
  10252. options: II(c || [])
  10253. });
  10254. }).filter((r) => r);
  10255. }
  10256. function Ege(t, e, n) {
  10257. const r = ae(), i = ae(), a = ae(), o = ae([]);
  10258. return se([t, e], () => {
  10259. t.value ? o.value = Ko(t.value).slice() : o.value = II(e.value);
  10260. }, {
  10261. immediate: !0,
  10262. deep: !0
  10263. }), ht(() => {
  10264. const s = o.value, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
  10265. function f(d) {
  10266. let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10267. for (let p = 0; p < d.length; p += 1) {
  10268. const v = d[p];
  10269. !v[c.options] || h ? (l.set(v[c.value], v), u.set(v[c.label], v)) : f(v[c.options], !0);
  10270. }
  10271. }
  10272. f(s), r.value = s, i.value = l, a.value = u;
  10273. }), {
  10274. options: r,
  10275. valueOptions: i,
  10276. labelOptions: a
  10277. };
  10278. }
  10279. let mN = 0;
  10280. const Mge = process.env.NODE_ENV !== "test" && Ta();
  10281. function Ige() {
  10282. let t;
  10283. return Mge ? (t = mN, mN += 1) : t = "TEST_OR_SSR", t;
  10284. }
  10285. function Dge() {
  10286. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : U("");
  10287. const e = `rc_select_${Ige()}`;
  10288. return t.value || e;
  10289. }
  10290. function DI(t) {
  10291. return Array.isArray(t) ? t : t !== void 0 ? [t] : [];
  10292. }
  10293. const Rge = typeof window < "u" && window.document && window.document.documentElement;
  10294. process.env.NODE_ENV;
  10295. function kge(t) {
  10296. const {
  10297. mode: e,
  10298. options: n,
  10299. children: r,
  10300. backfill: i,
  10301. allowClear: a,
  10302. placeholder: o,
  10303. getInputElement: s,
  10304. showSearch: l,
  10305. onSearch: u,
  10306. defaultOpen: c,
  10307. autofocus: f,
  10308. labelInValue: d,
  10309. value: h,
  10310. inputValue: p,
  10311. optionLabelProp: v
  10312. } = t, g = MI(e), m = l !== void 0 ? l : g || e === "combobox", y = n || II(r);
  10313. if (la(e !== "tags" || y.every((b) => !b.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), la(e !== "combobox" || !v, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), la(e === "combobox" || !i, "`backfill` only works with `combobox` mode."), la(e === "combobox" || !s, "`getInputElement` only work with `combobox` mode."), o8(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" && la(!1, "`onSearch` should work with `showSearch` instead of use alone."), o8(!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) {
  10314. const b = DI(h);
  10315. la(!d || b.every((_) => typeof _ == "object" && ("key" in _ || "value" in _)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), la(!g || Array.isArray(h), "`value` should be array when `mode` is `multiple` or `tags`");
  10316. }
  10317. if (r) {
  10318. let b = null;
  10319. r.some((_) => {
  10320. var O;
  10321. if (!Yi(_) || !_.type)
  10322. return !1;
  10323. const {
  10324. type: S
  10325. } = _;
  10326. return S.isSelectOption ? !1 : S.isSelectOptGroup ? !(((O = _.children) === null || O === void 0 ? void 0 : O.default()) || []).every((T) => !Yi(T) || !_.type || T.type.isSelectOption ? !0 : (b = T.type, !1)) : (b = S, !0);
  10327. }), b && la(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${b.displayName || b.name || b}\`.`), la(p === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  10328. }
  10329. }
  10330. function mC(t, e) {
  10331. return DI(t).join("").toUpperCase().includes(e);
  10332. }
  10333. const Lge = (t, e, n, r, i) => L(() => {
  10334. const a = n.value, o = i == null ? void 0 : i.value, s = r == null ? void 0 : r.value;
  10335. if (!a || s === !1)
  10336. return t.value;
  10337. const {
  10338. options: l,
  10339. label: u,
  10340. value: c
  10341. } = e.value, f = [], d = typeof s == "function", h = a.toUpperCase(), p = d ? s : (g, m) => o ? mC(m[o], h) : m[l] ? mC(m[u !== "children" ? u : "label"], h) : mC(m[c], h), v = d ? (g) => b2(g) : (g) => g;
  10342. return t.value.forEach((g) => {
  10343. if (g[l]) {
  10344. if (p(a, v(g)))
  10345. f.push(g);
  10346. else {
  10347. const y = g[l].filter((b) => p(a, v(b)));
  10348. y.length && f.push(I(I({}, g), {
  10349. [l]: y
  10350. }));
  10351. }
  10352. return;
  10353. }
  10354. p(a, v(g)) && f.push(g);
  10355. }), f;
  10356. }), Nge = (t, e) => {
  10357. const n = ae({
  10358. values: /* @__PURE__ */ new Map(),
  10359. options: /* @__PURE__ */ new Map()
  10360. });
  10361. return [L(() => {
  10362. const {
  10363. values: a,
  10364. options: o
  10365. } = n.value, s = t.value.map((c) => {
  10366. var f;
  10367. return c.label === void 0 ? I(I({}, c), {
  10368. label: (f = a.get(c.value)) === null || f === void 0 ? void 0 : f.label
  10369. }) : c;
  10370. }), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
  10371. return s.forEach((c) => {
  10372. l.set(c.value, c), u.set(c.value, e.value.get(c.value) || o.get(c.value));
  10373. }), n.value.values = l, n.value.options = u, s;
  10374. }), (a) => e.value.get(a) || n.value.options.get(a)];
  10375. };
  10376. function Ah(t, e) {
  10377. const {
  10378. defaultValue: n,
  10379. value: r = U()
  10380. } = e || {};
  10381. let i = typeof t == "function" ? t() : t;
  10382. r.value !== void 0 && (i = z(r)), n !== void 0 && (i = typeof n == "function" ? n() : n);
  10383. const a = U(i), o = U(i);
  10384. ht(() => {
  10385. let l = r.value !== void 0 ? r.value : a.value;
  10386. e.postState && (l = e.postState(l)), o.value = l;
  10387. });
  10388. function s(l) {
  10389. const u = o.value;
  10390. a.value = l, Ko(o.value) !== l && e.onChange && e.onChange(l, u);
  10391. }
  10392. return se(r, () => {
  10393. a.value = r.value;
  10394. }), [o, s];
  10395. }
  10396. function fn(t) {
  10397. const e = typeof t == "function" ? t() : t, n = U(e);
  10398. function r(i) {
  10399. n.value = i;
  10400. }
  10401. return [n, r];
  10402. }
  10403. const Bge = ["inputValue"];
  10404. function HZ() {
  10405. return I(I({}, VZ()), {
  10406. prefixCls: String,
  10407. id: String,
  10408. backfill: {
  10409. type: Boolean,
  10410. default: void 0
  10411. },
  10412. // >>> Field Names
  10413. fieldNames: Object,
  10414. // >>> Search
  10415. /** @deprecated Use `searchValue` instead */
  10416. inputValue: String,
  10417. searchValue: String,
  10418. onSearch: Function,
  10419. autoClearSearchValue: {
  10420. type: Boolean,
  10421. default: void 0
  10422. },
  10423. // >>> Select
  10424. onSelect: Function,
  10425. onDeselect: Function,
  10426. // >>> Options
  10427. /**
  10428. * In Select, `false` means do nothing.
  10429. * In TreeSelect, `false` will highlight match item.
  10430. * It's by design.
  10431. */
  10432. filterOption: {
  10433. type: [Boolean, Function],
  10434. default: void 0
  10435. },
  10436. filterSort: Function,
  10437. optionFilterProp: String,
  10438. optionLabelProp: String,
  10439. options: Array,
  10440. defaultActiveFirstOption: {
  10441. type: Boolean,
  10442. default: void 0
  10443. },
  10444. virtual: {
  10445. type: Boolean,
  10446. default: void 0
  10447. },
  10448. listHeight: Number,
  10449. listItemHeight: Number,
  10450. // >>> Icon
  10451. menuItemSelectedIcon: Y.any,
  10452. mode: String,
  10453. labelInValue: {
  10454. type: Boolean,
  10455. default: void 0
  10456. },
  10457. value: Y.any,
  10458. defaultValue: Y.any,
  10459. onChange: Function,
  10460. children: Array
  10461. });
  10462. }
  10463. function zge(t) {
  10464. return !t || typeof t != "object";
  10465. }
  10466. const Vge = te({
  10467. compatConfig: {
  10468. MODE: 3
  10469. },
  10470. name: "VcSelect",
  10471. inheritAttrs: !1,
  10472. props: sr(HZ(), {
  10473. prefixCls: "vc-select",
  10474. autoClearSearchValue: !0,
  10475. listHeight: 200,
  10476. listItemHeight: 20,
  10477. dropdownMatchSelectWidth: !0
  10478. }),
  10479. setup(t, e) {
  10480. let {
  10481. expose: n,
  10482. attrs: r,
  10483. slots: i
  10484. } = e;
  10485. const a = Dge(Nn(t, "id")), o = L(() => MI(t.mode)), s = L(() => !!(!t.options && t.children)), l = L(() => t.filterOption === void 0 && t.mode === "combobox" ? !1 : t.filterOption), u = L(() => oZ(t.fieldNames, s.value)), [c, f] = Ah("", {
  10486. value: L(() => t.searchValue !== void 0 ? t.searchValue : t.inputValue),
  10487. postState: (X) => X || ""
  10488. }), d = Ege(Nn(t, "options"), Nn(t, "children"), u), {
  10489. valueOptions: h,
  10490. labelOptions: p,
  10491. options: v
  10492. } = d, g = (X) => DI(X).map((G) => {
  10493. var re, fe;
  10494. let de, Ee, $e, Se;
  10495. zge(G) ? de = G : ($e = G.key, Ee = G.label, de = (re = G.value) !== null && re !== void 0 ? re : $e);
  10496. const be = h.value.get(de);
  10497. return be && (Ee === void 0 && (Ee = be == null ? void 0 : be[t.optionLabelProp || u.value.label]), $e === void 0 && ($e = (fe = be == null ? void 0 : be.key) !== null && fe !== void 0 ? fe : de), Se = be == null ? void 0 : be.disabled), {
  10498. label: Ee,
  10499. value: de,
  10500. key: $e,
  10501. disabled: Se,
  10502. option: be
  10503. };
  10504. }), [m, y] = Ah(t.defaultValue, {
  10505. value: Nn(t, "value")
  10506. }), b = L(() => {
  10507. var X;
  10508. const H = g(m.value);
  10509. return t.mode === "combobox" && !(!((X = H[0]) === null || X === void 0) && X.value) ? [] : H;
  10510. }), [_, O] = Nge(b, h), S = L(() => {
  10511. if (!t.mode && _.value.length === 1) {
  10512. const X = _.value[0];
  10513. if (X.value === null && (X.label === null || X.label === void 0))
  10514. return [];
  10515. }
  10516. return _.value.map((X) => {
  10517. var H;
  10518. return I(I({}, X), {
  10519. label: (H = typeof X.label == "function" ? X.label() : X.label) !== null && H !== void 0 ? H : X.value
  10520. });
  10521. });
  10522. }), x = L(() => new Set(_.value.map((X) => X.value)));
  10523. ht(() => {
  10524. var X;
  10525. if (t.mode === "combobox") {
  10526. const H = (X = _.value[0]) === null || X === void 0 ? void 0 : X.value;
  10527. H != null && f(String(H));
  10528. }
  10529. }, {
  10530. flush: "post"
  10531. });
  10532. const C = (X, H) => {
  10533. const G = H ?? X;
  10534. return {
  10535. [u.value.value]: X,
  10536. [u.value.label]: G
  10537. };
  10538. }, T = ae();
  10539. ht(() => {
  10540. if (t.mode !== "tags") {
  10541. T.value = v.value;
  10542. return;
  10543. }
  10544. const X = v.value.slice(), H = (G) => h.value.has(G);
  10545. [..._.value].sort((G, re) => G.value < re.value ? -1 : 1).forEach((G) => {
  10546. const re = G.value;
  10547. H(re) || X.push(C(re, G.label));
  10548. }), T.value = X;
  10549. });
  10550. const w = Lge(T, u, c, l, Nn(t, "optionFilterProp")), P = L(() => t.mode !== "tags" || !c.value || w.value.some((X) => X[t.optionFilterProp || "value"] === c.value) ? w.value : [C(c.value), ...w.value]), $ = L(() => t.filterSort ? [...P.value].sort((X, H) => t.filterSort(X, H)) : P.value), A = L(() => nde($.value, {
  10551. fieldNames: u.value,
  10552. childrenAsData: s.value
  10553. })), D = (X) => {
  10554. const H = g(X);
  10555. if (y(H), t.onChange && // Trigger event only when value changed
  10556. (H.length !== _.value.length || H.some((G, re) => {
  10557. var fe;
  10558. return ((fe = _.value[re]) === null || fe === void 0 ? void 0 : fe.value) !== (G == null ? void 0 : G.value);
  10559. }))) {
  10560. const G = t.labelInValue ? H.map((fe) => I(I({}, fe), {
  10561. originLabel: fe.label,
  10562. label: typeof fe.label == "function" ? fe.label() : fe.label
  10563. })) : H.map((fe) => fe.value), re = H.map((fe) => b2(O(fe.value)));
  10564. t.onChange(
  10565. // Value
  10566. o.value ? G : G[0],
  10567. // Option
  10568. o.value ? re : re[0]
  10569. );
  10570. }
  10571. }, [E, R] = fn(null), [N, V] = fn(0), B = L(() => t.defaultActiveFirstOption !== void 0 ? t.defaultActiveFirstOption : t.mode !== "combobox"), W = function(X, H) {
  10572. let {
  10573. source: G = "keyboard"
  10574. } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  10575. V(H), t.backfill && t.mode === "combobox" && X !== null && G === "keyboard" && R(String(X));
  10576. }, F = (X, H) => {
  10577. const G = () => {
  10578. var re;
  10579. const fe = O(X), de = fe == null ? void 0 : fe[u.value.label];
  10580. return [t.labelInValue ? {
  10581. label: typeof de == "function" ? de() : de,
  10582. originLabel: de,
  10583. value: X,
  10584. key: (re = fe == null ? void 0 : fe.key) !== null && re !== void 0 ? re : X
  10585. } : X, b2(fe)];
  10586. };
  10587. if (H && t.onSelect) {
  10588. const [re, fe] = G();
  10589. t.onSelect(re, fe);
  10590. } else if (!H && t.onDeselect) {
  10591. const [re, fe] = G();
  10592. t.onDeselect(re, fe);
  10593. }
  10594. }, Q = (X, H) => {
  10595. let G;
  10596. const re = o.value ? H.selected : !0;
  10597. re ? G = o.value ? [..._.value, X] : [X] : G = _.value.filter((fe) => fe.value !== X), D(G), F(X, re), t.mode === "combobox" ? R("") : (!o.value || t.autoClearSearchValue) && (f(""), R(""));
  10598. }, Z = (X, H) => {
  10599. D(X), (H.type === "remove" || H.type === "clear") && H.values.forEach((G) => {
  10600. F(G.value, !1);
  10601. });
  10602. }, ne = (X, H) => {
  10603. var G;
  10604. if (f(X), R(null), H.source === "submit") {
  10605. const re = (X || "").trim();
  10606. if (re) {
  10607. const fe = Array.from(/* @__PURE__ */ new Set([...x.value, re]));
  10608. D(fe), F(re, !0), f("");
  10609. }
  10610. return;
  10611. }
  10612. H.source !== "blur" && (t.mode === "combobox" && D(X), (G = t.onSearch) === null || G === void 0 || G.call(t, X));
  10613. }, ee = (X) => {
  10614. let H = X;
  10615. t.mode !== "tags" && (H = X.map((re) => {
  10616. const fe = p.value.get(re);
  10617. return fe == null ? void 0 : fe.value;
  10618. }).filter((re) => re !== void 0));
  10619. const G = Array.from(/* @__PURE__ */ new Set([...x.value, ...H]));
  10620. D(G), G.forEach((re) => {
  10621. F(re, !0);
  10622. });
  10623. }, oe = L(() => t.virtual !== !1 && t.dropdownMatchSelectWidth !== !1);
  10624. wge(zZ(I(I({}, d), {
  10625. flattenOptions: A,
  10626. onActiveValue: W,
  10627. defaultActiveFirstOption: B,
  10628. onSelect: Q,
  10629. menuItemSelectedIcon: Nn(t, "menuItemSelectedIcon"),
  10630. rawValues: x,
  10631. fieldNames: u,
  10632. virtual: oe,
  10633. listHeight: Nn(t, "listHeight"),
  10634. listItemHeight: Nn(t, "listItemHeight"),
  10635. childrenAsData: s
  10636. }))), process.env.NODE_ENV !== "production" && ht(() => {
  10637. kge(t);
  10638. }, {
  10639. flush: "post"
  10640. });
  10641. const K = U();
  10642. n({
  10643. focus() {
  10644. var X;
  10645. (X = K.value) === null || X === void 0 || X.focus();
  10646. },
  10647. blur() {
  10648. var X;
  10649. (X = K.value) === null || X === void 0 || X.blur();
  10650. },
  10651. scrollTo(X) {
  10652. var H;
  10653. (H = K.value) === null || H === void 0 || H.scrollTo(X);
  10654. }
  10655. });
  10656. const ie = L(() => or(t, [
  10657. "id",
  10658. "mode",
  10659. "prefixCls",
  10660. "backfill",
  10661. "fieldNames",
  10662. // Search
  10663. "inputValue",
  10664. "searchValue",
  10665. "onSearch",
  10666. "autoClearSearchValue",
  10667. // Select
  10668. "onSelect",
  10669. "onDeselect",
  10670. "dropdownMatchSelectWidth",
  10671. // Options
  10672. "filterOption",
  10673. "filterSort",
  10674. "optionFilterProp",
  10675. "optionLabelProp",
  10676. "options",
  10677. "children",
  10678. "defaultActiveFirstOption",
  10679. "menuItemSelectedIcon",
  10680. "virtual",
  10681. "listHeight",
  10682. "listItemHeight",
  10683. // Value
  10684. "value",
  10685. "defaultValue",
  10686. "labelInValue",
  10687. "onChange"
  10688. ]));
  10689. return () => M(lge, j(j(j({}, ie.value), r), {}, {
  10690. id: a,
  10691. prefixCls: t.prefixCls,
  10692. ref: K,
  10693. omitDomProps: Bge,
  10694. mode: t.mode,
  10695. displayValues: S.value,
  10696. onDisplayValuesChange: Z,
  10697. searchValue: c.value,
  10698. onSearch: ne,
  10699. onSearchSplit: ee,
  10700. dropdownMatchSelectWidth: t.dropdownMatchSelectWidth,
  10701. OptionList: Pge,
  10702. emptyOptions: !A.value.length,
  10703. activeValue: E.value,
  10704. activeDescendantId: `${a}_list_${N.value}`
  10705. }), i);
  10706. }
  10707. }), RI = () => null;
  10708. RI.isSelectOption = !0;
  10709. RI.displayName = "ASelectOption";
  10710. const kI = () => null;
  10711. kI.isSelectOptGroup = !0;
  10712. kI.displayName = "ASelectOptGroup";
  10713. var Fge = { 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" }, Wge = Symbol("iconContext"), GZ = function() {
  10714. return Ge(Wge, {
  10715. prefixCls: U("anticon"),
  10716. rootClassName: U(""),
  10717. csp: U()
  10718. });
  10719. };
  10720. function LI() {
  10721. return !!(typeof window < "u" && window.document && window.document.createElement);
  10722. }
  10723. function Qge(t, e) {
  10724. return t && t.contains ? t.contains(e) : !1;
  10725. }
  10726. var yN = "data-vc-order", Hge = "vc-icon-key", A2 = /* @__PURE__ */ new Map();
  10727. function jZ() {
  10728. var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.mark;
  10729. return e ? e.startsWith("data-") ? e : "data-".concat(e) : Hge;
  10730. }
  10731. function NI(t) {
  10732. if (t.attachTo)
  10733. return t.attachTo;
  10734. var e = document.querySelector("head");
  10735. return e || document.body;
  10736. }
  10737. function Gge(t) {
  10738. return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
  10739. }
  10740. function ZZ(t) {
  10741. return Array.from((A2.get(t) || t).children).filter(function(e) {
  10742. return e.tagName === "STYLE";
  10743. });
  10744. }
  10745. function UZ(t) {
  10746. var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  10747. if (!LI())
  10748. return null;
  10749. var n = e.csp, r = e.prepend, i = document.createElement("style");
  10750. i.setAttribute(yN, Gge(r)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = t;
  10751. var a = NI(e), o = a.firstChild;
  10752. if (r) {
  10753. if (r === "queue") {
  10754. var s = ZZ(a).filter(function(l) {
  10755. return ["prepend", "prependQueue"].includes(l.getAttribute(yN));
  10756. });
  10757. if (s.length)
  10758. return a.insertBefore(i, s[s.length - 1].nextSibling), i;
  10759. }
  10760. a.insertBefore(i, o);
  10761. } else
  10762. a.appendChild(i);
  10763. return i;
  10764. }
  10765. function jge(t) {
  10766. var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = NI(e);
  10767. return ZZ(n).find(function(r) {
  10768. return r.getAttribute(jZ(e)) === t;
  10769. });
  10770. }
  10771. function Zge(t, e) {
  10772. var n = A2.get(t);
  10773. if (!n || !Qge(document, n)) {
  10774. var r = UZ("", e), i = r.parentNode;
  10775. A2.set(t, i), t.removeChild(r);
  10776. }
  10777. }
  10778. function Uge(t, e) {
  10779. var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = NI(n);
  10780. Zge(r, n);
  10781. var i = jge(e, n);
  10782. if (i)
  10783. return n.csp && n.csp.nonce && i.nonce !== n.csp.nonce && (i.nonce = n.csp.nonce), i.innerHTML !== t && (i.innerHTML = t), i;
  10784. var a = UZ(t, n);
  10785. return a.setAttribute(jZ(n), e), a;
  10786. }
  10787. function bN(t) {
  10788. for (var e = 1; e < arguments.length; e++) {
  10789. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  10790. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  10791. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  10792. }))), r.forEach(function(i) {
  10793. Xge(t, i, n[i]);
  10794. });
  10795. }
  10796. return t;
  10797. }
  10798. function Xge(t, e, n) {
  10799. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  10800. }
  10801. function Yge(t, e) {
  10802. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error("Warning: ".concat(e));
  10803. }
  10804. function qge(t, e) {
  10805. Yge(t, "[@ant-design/icons-vue] ".concat(e));
  10806. }
  10807. function _N(t) {
  10808. return typeof t == "object" && typeof t.name == "string" && typeof t.theme == "string" && (typeof t.icon == "object" || typeof t.icon == "function");
  10809. }
  10810. function E2(t, e, n) {
  10811. return n ? qg(t.tag, bN({
  10812. key: e
  10813. }, n, t.attrs), (t.children || []).map(function(r, i) {
  10814. return E2(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  10815. })) : qg(t.tag, bN({
  10816. key: e
  10817. }, t.attrs), (t.children || []).map(function(r, i) {
  10818. return E2(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  10819. }));
  10820. }
  10821. function XZ(t) {
  10822. return df(t)[0];
  10823. }
  10824. function YZ(t) {
  10825. return t ? Array.isArray(t) ? t : [t] : [];
  10826. }
  10827. var Kge = `
  10828. .anticon {
  10829. display: inline-block;
  10830. color: inherit;
  10831. font-style: normal;
  10832. line-height: 0;
  10833. text-align: center;
  10834. text-transform: none;
  10835. vertical-align: -0.125em;
  10836. text-rendering: optimizeLegibility;
  10837. -webkit-font-smoothing: antialiased;
  10838. -moz-osx-font-smoothing: grayscale;
  10839. }
  10840. .anticon > * {
  10841. line-height: 1;
  10842. }
  10843. .anticon svg {
  10844. display: inline-block;
  10845. }
  10846. .anticon::before {
  10847. display: none;
  10848. }
  10849. .anticon .anticon-icon {
  10850. display: block;
  10851. }
  10852. .anticon[tabindex] {
  10853. cursor: pointer;
  10854. }
  10855. .anticon-spin::before,
  10856. .anticon-spin {
  10857. display: inline-block;
  10858. -webkit-animation: loadingCircle 1s infinite linear;
  10859. animation: loadingCircle 1s infinite linear;
  10860. }
  10861. @-webkit-keyframes loadingCircle {
  10862. 100% {
  10863. -webkit-transform: rotate(360deg);
  10864. transform: rotate(360deg);
  10865. }
  10866. }
  10867. @keyframes loadingCircle {
  10868. 100% {
  10869. -webkit-transform: rotate(360deg);
  10870. transform: rotate(360deg);
  10871. }
  10872. }
  10873. `;
  10874. function qZ(t) {
  10875. return t && t.getRootNode && t.getRootNode();
  10876. }
  10877. function Jge(t) {
  10878. return LI() ? qZ(t) instanceof ShadowRoot : !1;
  10879. }
  10880. function eme(t) {
  10881. return Jge(t) ? qZ(t) : null;
  10882. }
  10883. var tme = function() {
  10884. var e = GZ(), n = e.prefixCls, r = e.csp, i = vn(), a = Kge;
  10885. n && (a = a.replace(/anticon/g, n.value)), Tt(function() {
  10886. if (LI()) {
  10887. var o = i.vnode.el, s = eme(o);
  10888. Uge(a, "@ant-design-vue-icons", {
  10889. prepend: !0,
  10890. csp: r.value,
  10891. attachTo: s
  10892. });
  10893. }
  10894. });
  10895. }, nme = ["icon", "primaryColor", "secondaryColor"];
  10896. function rme(t, e) {
  10897. if (t == null) return {};
  10898. var n = ime(t, e), r, i;
  10899. if (Object.getOwnPropertySymbols) {
  10900. var a = Object.getOwnPropertySymbols(t);
  10901. for (i = 0; i < a.length; i++)
  10902. r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  10903. }
  10904. return n;
  10905. }
  10906. function ime(t, e) {
  10907. if (t == null) return {};
  10908. var n = {}, r = Object.keys(t), i, a;
  10909. for (a = 0; a < r.length; a++)
  10910. i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  10911. return n;
  10912. }
  10913. function T_(t) {
  10914. for (var e = 1; e < arguments.length; e++) {
  10915. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  10916. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  10917. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  10918. }))), r.forEach(function(i) {
  10919. ame(t, i, n[i]);
  10920. });
  10921. }
  10922. return t;
  10923. }
  10924. function ame(t, e, n) {
  10925. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  10926. }
  10927. var hg = tn({
  10928. primaryColor: "#333",
  10929. secondaryColor: "#E6E6E6",
  10930. calculated: !1
  10931. });
  10932. function ome(t) {
  10933. var e = t.primaryColor, n = t.secondaryColor;
  10934. hg.primaryColor = e, hg.secondaryColor = n || XZ(e), hg.calculated = !!n;
  10935. }
  10936. function sme() {
  10937. return T_({}, hg);
  10938. }
  10939. var _u = function(e, n) {
  10940. var r = T_({}, e, n.attrs), i = r.icon, a = r.primaryColor, o = r.secondaryColor, s = rme(r, nme), l = hg;
  10941. if (a && (l = {
  10942. primaryColor: a,
  10943. secondaryColor: o || XZ(a)
  10944. }), qge(_N(i), "icon should be icon definiton, but got ".concat(i)), !_N(i))
  10945. return null;
  10946. var u = i;
  10947. return u && typeof u.icon == "function" && (u = T_({}, u, {
  10948. icon: u.icon(l.primaryColor, l.secondaryColor)
  10949. })), E2(u.icon, "svg-".concat(u.name), T_({}, s, {
  10950. "data-icon": u.name,
  10951. width: "1em",
  10952. height: "1em",
  10953. fill: "currentColor",
  10954. "aria-hidden": "true"
  10955. }));
  10956. };
  10957. _u.props = {
  10958. icon: Object,
  10959. primaryColor: String,
  10960. secondaryColor: String,
  10961. focusable: String
  10962. };
  10963. _u.inheritAttrs = !1;
  10964. _u.displayName = "IconBase";
  10965. _u.getTwoToneColors = sme;
  10966. _u.setTwoToneColors = ome;
  10967. function lme(t, e) {
  10968. return dme(t) || fme(t, e) || cme(t, e) || ume();
  10969. }
  10970. function ume() {
  10971. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  10972. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  10973. }
  10974. function cme(t, e) {
  10975. if (t) {
  10976. if (typeof t == "string") return ON(t, e);
  10977. var n = Object.prototype.toString.call(t).slice(8, -1);
  10978. if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
  10979. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ON(t, e);
  10980. }
  10981. }
  10982. function ON(t, e) {
  10983. (e == null || e > t.length) && (e = t.length);
  10984. for (var n = 0, r = new Array(e); n < e; n++)
  10985. r[n] = t[n];
  10986. return r;
  10987. }
  10988. function fme(t, e) {
  10989. var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  10990. if (n != null) {
  10991. var r = [], i = !0, a = !1, o, s;
  10992. try {
  10993. for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
  10994. ;
  10995. } catch (l) {
  10996. a = !0, s = l;
  10997. } finally {
  10998. try {
  10999. !i && n.return != null && n.return();
  11000. } finally {
  11001. if (a) throw s;
  11002. }
  11003. }
  11004. return r;
  11005. }
  11006. }
  11007. function dme(t) {
  11008. if (Array.isArray(t)) return t;
  11009. }
  11010. function KZ(t) {
  11011. var e = YZ(t), n = lme(e, 2), r = n[0], i = n[1];
  11012. return _u.setTwoToneColors({
  11013. primaryColor: r,
  11014. secondaryColor: i
  11015. });
  11016. }
  11017. function hme() {
  11018. var t = _u.getTwoToneColors();
  11019. return t.calculated ? [t.primaryColor, t.secondaryColor] : t.primaryColor;
  11020. }
  11021. var pme = te({
  11022. name: "InsertStyles",
  11023. setup: function() {
  11024. return tme(), function() {
  11025. return null;
  11026. };
  11027. }
  11028. }), vme = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
  11029. function gme(t, e) {
  11030. return _me(t) || bme(t, e) || yme(t, e) || mme();
  11031. }
  11032. function mme() {
  11033. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  11034. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  11035. }
  11036. function yme(t, e) {
  11037. if (t) {
  11038. if (typeof t == "string") return SN(t, e);
  11039. var n = Object.prototype.toString.call(t).slice(8, -1);
  11040. if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
  11041. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return SN(t, e);
  11042. }
  11043. }
  11044. function SN(t, e) {
  11045. (e == null || e > t.length) && (e = t.length);
  11046. for (var n = 0, r = new Array(e); n < e; n++)
  11047. r[n] = t[n];
  11048. return r;
  11049. }
  11050. function bme(t, e) {
  11051. var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  11052. if (n != null) {
  11053. var r = [], i = !0, a = !1, o, s;
  11054. try {
  11055. for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
  11056. ;
  11057. } catch (l) {
  11058. a = !0, s = l;
  11059. } finally {
  11060. try {
  11061. !i && n.return != null && n.return();
  11062. } finally {
  11063. if (a) throw s;
  11064. }
  11065. }
  11066. return r;
  11067. }
  11068. }
  11069. function _me(t) {
  11070. if (Array.isArray(t)) return t;
  11071. }
  11072. function xN(t) {
  11073. for (var e = 1; e < arguments.length; e++) {
  11074. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11075. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11076. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11077. }))), r.forEach(function(i) {
  11078. Wv(t, i, n[i]);
  11079. });
  11080. }
  11081. return t;
  11082. }
  11083. function Wv(t, e, n) {
  11084. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11085. }
  11086. function Ome(t, e) {
  11087. if (t == null) return {};
  11088. var n = Sme(t, e), r, i;
  11089. if (Object.getOwnPropertySymbols) {
  11090. var a = Object.getOwnPropertySymbols(t);
  11091. for (i = 0; i < a.length; i++)
  11092. r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  11093. }
  11094. return n;
  11095. }
  11096. function Sme(t, e) {
  11097. if (t == null) return {};
  11098. var n = {}, r = Object.keys(t), i, a;
  11099. for (a = 0; a < r.length; a++)
  11100. i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  11101. return n;
  11102. }
  11103. KZ(afe.primary);
  11104. var lt = function(e, n) {
  11105. var r, i = xN({}, 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 = Ome(i, vme), h = GZ(), p = h.prefixCls, v = h.rootClassName, g = (r = {}, Wv(r, v.value, !!v.value), Wv(r, p.value, !0), Wv(r, "".concat(p.value, "-").concat(o.name), !!o.name), Wv(r, "".concat(p.value, "-spin"), !!s || o.name === "loading"), r), m = u;
  11106. m === void 0 && f && (m = -1);
  11107. var y = l ? {
  11108. msTransform: "rotate(".concat(l, "deg)"),
  11109. transform: "rotate(".concat(l, "deg)")
  11110. } : void 0, b = YZ(c), _ = gme(b, 2), O = _[0], S = _[1];
  11111. return M("span", xN({
  11112. role: "img",
  11113. "aria-label": o.name
  11114. }, d, {
  11115. onClick: f,
  11116. class: [g, a],
  11117. tabindex: m
  11118. }), [M(_u, {
  11119. icon: o,
  11120. primaryColor: O,
  11121. secondaryColor: S,
  11122. style: y
  11123. }, null), M(pme, null, null)]);
  11124. };
  11125. lt.props = {
  11126. spin: Boolean,
  11127. rotate: Number,
  11128. icon: Object,
  11129. twoToneColor: [String, Array]
  11130. };
  11131. lt.displayName = "AntdIcon";
  11132. lt.inheritAttrs = !1;
  11133. lt.getTwoToneColor = hme;
  11134. lt.setTwoToneColor = KZ;
  11135. function wN(t) {
  11136. for (var e = 1; e < arguments.length; e++) {
  11137. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11138. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11139. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11140. }))), r.forEach(function(i) {
  11141. xme(t, i, n[i]);
  11142. });
  11143. }
  11144. return t;
  11145. }
  11146. function xme(t, e, n) {
  11147. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11148. }
  11149. var rx = function(e, n) {
  11150. var r = wN({}, e, n.attrs);
  11151. return M(lt, wN({}, r, {
  11152. icon: Fge
  11153. }), null);
  11154. };
  11155. rx.displayName = "DownOutlined";
  11156. rx.inheritAttrs = !1;
  11157. var wme = { 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" };
  11158. function CN(t) {
  11159. for (var e = 1; e < arguments.length; e++) {
  11160. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11161. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11162. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11163. }))), r.forEach(function(i) {
  11164. Cme(t, i, n[i]);
  11165. });
  11166. }
  11167. return t;
  11168. }
  11169. function Cme(t, e, n) {
  11170. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11171. }
  11172. var ns = function(e, n) {
  11173. var r = CN({}, e, n.attrs);
  11174. return M(lt, CN({}, r, {
  11175. icon: wme
  11176. }), null);
  11177. };
  11178. ns.displayName = "LoadingOutlined";
  11179. ns.inheritAttrs = !1;
  11180. var Tme = { 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" };
  11181. function TN(t) {
  11182. for (var e = 1; e < arguments.length; e++) {
  11183. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11184. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11185. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11186. }))), r.forEach(function(i) {
  11187. Pme(t, i, n[i]);
  11188. });
  11189. }
  11190. return t;
  11191. }
  11192. function Pme(t, e, n) {
  11193. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11194. }
  11195. var BI = function(e, n) {
  11196. var r = TN({}, e, n.attrs);
  11197. return M(lt, TN({}, r, {
  11198. icon: Tme
  11199. }), null);
  11200. };
  11201. BI.displayName = "CheckOutlined";
  11202. BI.inheritAttrs = !1;
  11203. var $me = { 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" };
  11204. function PN(t) {
  11205. for (var e = 1; e < arguments.length; e++) {
  11206. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11207. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11208. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11209. }))), r.forEach(function(i) {
  11210. Ame(t, i, n[i]);
  11211. });
  11212. }
  11213. return t;
  11214. }
  11215. function Ame(t, e, n) {
  11216. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11217. }
  11218. var ol = function(e, n) {
  11219. var r = PN({}, e, n.attrs);
  11220. return M(lt, PN({}, r, {
  11221. icon: $me
  11222. }), null);
  11223. };
  11224. ol.displayName = "CloseOutlined";
  11225. ol.inheritAttrs = !1;
  11226. var Eme = { 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" };
  11227. function $N(t) {
  11228. for (var e = 1; e < arguments.length; e++) {
  11229. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11230. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11231. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11232. }))), r.forEach(function(i) {
  11233. Mme(t, i, n[i]);
  11234. });
  11235. }
  11236. return t;
  11237. }
  11238. function Mme(t, e, n) {
  11239. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11240. }
  11241. var ka = function(e, n) {
  11242. var r = $N({}, e, n.attrs);
  11243. return M(lt, $N({}, r, {
  11244. icon: Eme
  11245. }), null);
  11246. };
  11247. ka.displayName = "CloseCircleFilled";
  11248. ka.inheritAttrs = !1;
  11249. var Ime = { 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" };
  11250. function AN(t) {
  11251. for (var e = 1; e < arguments.length; e++) {
  11252. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11253. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11254. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11255. }))), r.forEach(function(i) {
  11256. Dme(t, i, n[i]);
  11257. });
  11258. }
  11259. return t;
  11260. }
  11261. function Dme(t, e, n) {
  11262. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11263. }
  11264. var ix = function(e, n) {
  11265. var r = AN({}, e, n.attrs);
  11266. return M(lt, AN({}, r, {
  11267. icon: Ime
  11268. }), null);
  11269. };
  11270. ix.displayName = "SearchOutlined";
  11271. ix.inheritAttrs = !1;
  11272. function Rme(t) {
  11273. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  11274. const {
  11275. loading: n,
  11276. multiple: r,
  11277. prefixCls: i,
  11278. hasFeedback: a,
  11279. feedbackIcon: o,
  11280. showArrow: s
  11281. } = 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 ?? M(ka, null, null), h = (m) => M(wt, null, [s !== !1 && m, a && o]);
  11282. let p = null;
  11283. if (l !== void 0)
  11284. p = h(l);
  11285. else if (n)
  11286. p = h(M(ns, {
  11287. spin: !0
  11288. }, null));
  11289. else {
  11290. const m = `${i}-suffix`;
  11291. p = (y) => {
  11292. let {
  11293. open: b,
  11294. showSearch: _
  11295. } = y;
  11296. return h(b && _ ? M(ix, {
  11297. class: m
  11298. }, null) : M(rx, {
  11299. class: m
  11300. }, null));
  11301. };
  11302. }
  11303. let v = null;
  11304. c !== void 0 ? v = c : r ? v = M(BI, null, null) : v = null;
  11305. let g = null;
  11306. return f !== void 0 ? g = f : g = M(ol, null, null), {
  11307. clearIcon: d,
  11308. suffixIcon: p,
  11309. itemIcon: v,
  11310. removeIcon: g
  11311. };
  11312. }
  11313. function zI(t) {
  11314. const e = Symbol("contextKey");
  11315. return {
  11316. useProvide: (i, a) => {
  11317. const o = tn({});
  11318. return pt(e, o), ht(() => {
  11319. I(o, i, a || {});
  11320. }), o;
  11321. },
  11322. useInject: () => Ge(e, t) || {}
  11323. };
  11324. }
  11325. const P1 = Symbol("ContextProps"), $1 = Symbol("InternalContextProps"), kme = function(t) {
  11326. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : L(() => !0);
  11327. const n = U(/* @__PURE__ */ new Map()), r = (o, s) => {
  11328. n.value.set(o, s), n.value = new Map(n.value);
  11329. }, i = (o) => {
  11330. n.value.delete(o), n.value = new Map(n.value);
  11331. }, a = vn();
  11332. se([e, n], () => {
  11333. if (process.env.NODE_ENV !== "production" && e.value && n.value.size > 1) {
  11334. Gi(!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.
  11335. You can set not need to be collected fields into \`a-form-item-rest\``);
  11336. let o = a;
  11337. for (; o.parent; )
  11338. console.warn("at", o.type), o = o.parent;
  11339. }
  11340. }), pt(P1, t), pt($1, {
  11341. addFormItemField: r,
  11342. removeFormItemField: i
  11343. });
  11344. }, M2 = {
  11345. id: L(() => {
  11346. }),
  11347. onFieldBlur: () => {
  11348. },
  11349. onFieldChange: () => {
  11350. },
  11351. clearValidate: () => {
  11352. }
  11353. }, I2 = {
  11354. addFormItemField: () => {
  11355. },
  11356. removeFormItemField: () => {
  11357. }
  11358. }, ls = () => {
  11359. const t = Ge($1, I2), e = Symbol("FormItemFieldKey"), n = vn();
  11360. return t.addFormItemField(e, n.type), yt(() => {
  11361. t.removeFormItemField(e);
  11362. }), pt($1, I2), pt(P1, M2), Ge(P1, M2);
  11363. }, lm = te({
  11364. compatConfig: {
  11365. MODE: 3
  11366. },
  11367. name: "AFormItemRest",
  11368. setup(t, e) {
  11369. let {
  11370. slots: n
  11371. } = e;
  11372. return pt($1, I2), pt(P1, M2), () => {
  11373. var r;
  11374. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  11375. };
  11376. }
  11377. }), ao = zI({}), A1 = te({
  11378. name: "NoFormStatus",
  11379. setup(t, e) {
  11380. let {
  11381. slots: n
  11382. } = e;
  11383. return ao.useProvide({}), () => {
  11384. var r;
  11385. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  11386. };
  11387. }
  11388. });
  11389. function Ds(t, e, n) {
  11390. return ye({
  11391. [`${t}-status-success`]: e === "success",
  11392. [`${t}-status-warning`]: e === "warning",
  11393. [`${t}-status-error`]: e === "error",
  11394. [`${t}-status-validating`]: e === "validating",
  11395. [`${t}-has-feedback`]: n
  11396. });
  11397. }
  11398. const y0 = (t, e) => e || t, Lme = (t) => {
  11399. const {
  11400. componentCls: e
  11401. } = t;
  11402. return {
  11403. [e]: {
  11404. display: "inline-flex",
  11405. "&-block": {
  11406. display: "flex",
  11407. width: "100%"
  11408. },
  11409. "&-vertical": {
  11410. flexDirection: "column"
  11411. }
  11412. }
  11413. };
  11414. }, Nme = (t) => {
  11415. const {
  11416. componentCls: e
  11417. } = t;
  11418. return {
  11419. [e]: {
  11420. display: "inline-flex",
  11421. "&-rtl": {
  11422. direction: "rtl"
  11423. },
  11424. "&-vertical": {
  11425. flexDirection: "column"
  11426. },
  11427. "&-align": {
  11428. flexDirection: "column",
  11429. "&-center": {
  11430. alignItems: "center"
  11431. },
  11432. "&-start": {
  11433. alignItems: "flex-start"
  11434. },
  11435. "&-end": {
  11436. alignItems: "flex-end"
  11437. },
  11438. "&-baseline": {
  11439. alignItems: "baseline"
  11440. }
  11441. },
  11442. [`${e}-item`]: {
  11443. "&:empty": {
  11444. display: "none"
  11445. }
  11446. }
  11447. }
  11448. };
  11449. }, Bme = Sn("Space", (t) => [Nme(t), Lme(t)]);
  11450. var zme = "[object Symbol]";
  11451. function ax(t) {
  11452. return typeof t == "symbol" || io(t) && bu(t) == zme;
  11453. }
  11454. function ox(t, e) {
  11455. for (var n = -1, r = t == null ? 0 : t.length, i = Array(r); ++n < r; )
  11456. i[n] = e(t[n], n, t);
  11457. return i;
  11458. }
  11459. var Vme = 1 / 0, EN = $a ? $a.prototype : void 0, MN = EN ? EN.toString : void 0;
  11460. function JZ(t) {
  11461. if (typeof t == "string")
  11462. return t;
  11463. if (Ti(t))
  11464. return ox(t, JZ) + "";
  11465. if (ax(t))
  11466. return MN ? MN.call(t) : "";
  11467. var e = t + "";
  11468. return e == "0" && 1 / t == -Vme ? "-0" : e;
  11469. }
  11470. var Fme = /\s/;
  11471. function Wme(t) {
  11472. for (var e = t.length; e-- && Fme.test(t.charAt(e)); )
  11473. ;
  11474. return e;
  11475. }
  11476. var Qme = /^\s+/;
  11477. function Hme(t) {
  11478. return t && t.slice(0, Wme(t) + 1).replace(Qme, "");
  11479. }
  11480. var IN = NaN, Gme = /^[-+]0x[0-9a-f]+$/i, jme = /^0b[01]+$/i, Zme = /^0o[0-7]+$/i, Ume = parseInt;
  11481. function D2(t) {
  11482. if (typeof t == "number")
  11483. return t;
  11484. if (ax(t))
  11485. return IN;
  11486. if (xr(t)) {
  11487. var e = typeof t.valueOf == "function" ? t.valueOf() : t;
  11488. t = xr(e) ? e + "" : e;
  11489. }
  11490. if (typeof t != "string")
  11491. return t === 0 ? t : +t;
  11492. t = Hme(t);
  11493. var n = jme.test(t);
  11494. return n || Zme.test(t) ? Ume(t.slice(2), n ? 2 : 8) : Gme.test(t) ? IN : +t;
  11495. }
  11496. var DN = 1 / 0, Xme = 17976931348623157e292;
  11497. function Yme(t) {
  11498. if (!t)
  11499. return t === 0 ? t : 0;
  11500. if (t = D2(t), t === DN || t === -DN) {
  11501. var e = t < 0 ? -1 : 1;
  11502. return e * Xme;
  11503. }
  11504. return t === t ? t : 0;
  11505. }
  11506. function qme(t) {
  11507. var e = Yme(t), n = e % 1;
  11508. return e === e ? n ? e - n : e : 0;
  11509. }
  11510. function VI(t) {
  11511. return t;
  11512. }
  11513. var RN = Object.create, Kme = /* @__PURE__ */ function() {
  11514. function t() {
  11515. }
  11516. return function(e) {
  11517. if (!xr(e))
  11518. return {};
  11519. if (RN)
  11520. return RN(e);
  11521. t.prototype = e;
  11522. var n = new t();
  11523. return t.prototype = void 0, n;
  11524. };
  11525. }();
  11526. function eU(t, e, n) {
  11527. switch (n.length) {
  11528. case 0:
  11529. return t.call(e);
  11530. case 1:
  11531. return t.call(e, n[0]);
  11532. case 2:
  11533. return t.call(e, n[0], n[1]);
  11534. case 3:
  11535. return t.call(e, n[0], n[1], n[2]);
  11536. }
  11537. return t.apply(e, n);
  11538. }
  11539. function Jme() {
  11540. }
  11541. function tU(t, e) {
  11542. var n = -1, r = t.length;
  11543. for (e || (e = Array(r)); ++n < r; )
  11544. e[n] = t[n];
  11545. return e;
  11546. }
  11547. var e0e = 800, t0e = 16, n0e = Date.now;
  11548. function r0e(t) {
  11549. var e = 0, n = 0;
  11550. return function() {
  11551. var r = n0e(), i = t0e - (r - n);
  11552. if (n = r, i > 0) {
  11553. if (++e >= e0e)
  11554. return arguments[0];
  11555. } else
  11556. e = 0;
  11557. return t.apply(void 0, arguments);
  11558. };
  11559. }
  11560. function i0e(t) {
  11561. return function() {
  11562. return t;
  11563. };
  11564. }
  11565. var E1 = function() {
  11566. try {
  11567. var t = If(Object, "defineProperty");
  11568. return t({}, "", {}), t;
  11569. } catch {
  11570. }
  11571. }(), a0e = E1 ? function(t, e) {
  11572. return E1(t, "toString", {
  11573. configurable: !0,
  11574. enumerable: !1,
  11575. value: i0e(e),
  11576. writable: !0
  11577. });
  11578. } : VI, nU = r0e(a0e);
  11579. function o0e(t, e) {
  11580. for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
  11581. ;
  11582. return t;
  11583. }
  11584. function rU(t, e, n, r) {
  11585. for (var i = t.length, a = n + -1; ++a < i; )
  11586. if (e(t[a], a, t))
  11587. return a;
  11588. return -1;
  11589. }
  11590. function s0e(t) {
  11591. return t !== t;
  11592. }
  11593. function l0e(t, e, n) {
  11594. for (var r = n - 1, i = t.length; ++r < i; )
  11595. if (t[r] === e)
  11596. return r;
  11597. return -1;
  11598. }
  11599. function u0e(t, e, n) {
  11600. return e === e ? l0e(t, e, n) : rU(t, s0e, n);
  11601. }
  11602. function iU(t, e) {
  11603. var n = t == null ? 0 : t.length;
  11604. return !!n && u0e(t, e, 0) > -1;
  11605. }
  11606. function FI(t, e, n) {
  11607. e == "__proto__" && E1 ? E1(t, e, {
  11608. configurable: !0,
  11609. enumerable: !0,
  11610. value: n,
  11611. writable: !0
  11612. }) : t[e] = n;
  11613. }
  11614. var c0e = Object.prototype, f0e = c0e.hasOwnProperty;
  11615. function WI(t, e, n) {
  11616. var r = t[e];
  11617. (!(f0e.call(t, e) && v0(r, n)) || n === void 0 && !(e in t)) && FI(t, e, n);
  11618. }
  11619. function dp(t, e, n, r) {
  11620. var i = !n;
  11621. n || (n = {});
  11622. for (var a = -1, o = e.length; ++a < o; ) {
  11623. var s = e[a], l = void 0;
  11624. l === void 0 && (l = t[s]), i ? FI(n, s, l) : WI(n, s, l);
  11625. }
  11626. return n;
  11627. }
  11628. var kN = Math.max;
  11629. function aU(t, e, n) {
  11630. return e = kN(e === void 0 ? t.length - 1 : e, 0), function() {
  11631. for (var r = arguments, i = -1, a = kN(r.length - e, 0), o = Array(a); ++i < a; )
  11632. o[i] = r[e + i];
  11633. i = -1;
  11634. for (var s = Array(e + 1); ++i < e; )
  11635. s[i] = r[i];
  11636. return s[e] = n(o), eU(t, this, s);
  11637. };
  11638. }
  11639. function QI(t, e) {
  11640. return nU(aU(t, e, VI), t + "");
  11641. }
  11642. function d0e(t, e, n) {
  11643. if (!xr(n))
  11644. return !1;
  11645. var r = typeof e;
  11646. return (r == "number" ? fp(n) && ZS(e, n.length) : r == "string" && e in n) ? v0(n[e], t) : !1;
  11647. }
  11648. function h0e(t) {
  11649. return QI(function(e, n) {
  11650. var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
  11651. for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && d0e(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
  11652. var s = n[r];
  11653. s && t(e, s, r, a);
  11654. }
  11655. return e;
  11656. });
  11657. }
  11658. function p0e(t) {
  11659. var e = [];
  11660. if (t != null)
  11661. for (var n in Object(t))
  11662. e.push(n);
  11663. return e;
  11664. }
  11665. var v0e = Object.prototype, g0e = v0e.hasOwnProperty;
  11666. function m0e(t) {
  11667. if (!xr(t))
  11668. return p0e(t);
  11669. var e = YS(t), n = [];
  11670. for (var r in t)
  11671. r == "constructor" && (e || !g0e.call(t, r)) || n.push(r);
  11672. return n;
  11673. }
  11674. function b0(t) {
  11675. return fp(t) ? TZ(t, !0) : m0e(t);
  11676. }
  11677. var y0e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, b0e = /^\w*$/;
  11678. function HI(t, e) {
  11679. if (Ti(t))
  11680. return !1;
  11681. var n = typeof t;
  11682. return n == "number" || n == "symbol" || n == "boolean" || t == null || ax(t) ? !0 : b0e.test(t) || !y0e.test(t) || e != null && t in Object(e);
  11683. }
  11684. var _0e = "Expected a function";
  11685. function GI(t, e) {
  11686. if (typeof t != "function" || e != null && typeof e != "function")
  11687. throw new TypeError(_0e);
  11688. var n = function() {
  11689. var r = arguments, i = e ? e.apply(this, r) : r[0], a = n.cache;
  11690. if (a.has(i))
  11691. return a.get(i);
  11692. var o = t.apply(this, r);
  11693. return n.cache = a.set(i, o) || a, o;
  11694. };
  11695. return n.cache = new (GI.Cache || al)(), n;
  11696. }
  11697. GI.Cache = al;
  11698. var O0e = 500;
  11699. function S0e(t) {
  11700. var e = GI(t, function(r) {
  11701. return n.size === O0e && n.clear(), r;
  11702. }), n = e.cache;
  11703. return e;
  11704. }
  11705. var x0e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, w0e = /\\(\\)?/g, C0e = S0e(function(t) {
  11706. var e = [];
  11707. return t.charCodeAt(0) === 46 && e.push(""), t.replace(x0e, function(n, r, i, a) {
  11708. e.push(i ? a.replace(w0e, "$1") : r || n);
  11709. }), e;
  11710. });
  11711. function T0e(t) {
  11712. return t == null ? "" : JZ(t);
  11713. }
  11714. function hp(t, e) {
  11715. return Ti(t) ? t : HI(t, e) ? [t] : C0e(T0e(t));
  11716. }
  11717. var P0e = 1 / 0;
  11718. function pp(t) {
  11719. if (typeof t == "string" || ax(t))
  11720. return t;
  11721. var e = t + "";
  11722. return e == "0" && 1 / t == -P0e ? "-0" : e;
  11723. }
  11724. function sx(t, e) {
  11725. e = hp(e, t);
  11726. for (var n = 0, r = e.length; t != null && n < r; )
  11727. t = t[pp(e[n++])];
  11728. return n && n == r ? t : void 0;
  11729. }
  11730. function kt(t, e, n) {
  11731. var r = t == null ? void 0 : sx(t, e);
  11732. return r === void 0 ? n : r;
  11733. }
  11734. var LN = $a ? $a.isConcatSpreadable : void 0;
  11735. function $0e(t) {
  11736. return Ti(t) || Th(t) || !!(LN && t && t[LN]);
  11737. }
  11738. function A0e(t, e, n, r, i) {
  11739. var a = -1, o = t.length;
  11740. for (n || (n = $0e), i || (i = []); ++a < o; ) {
  11741. var s = t[a];
  11742. n(s) ? SI(i, s) : i[i.length] = s;
  11743. }
  11744. return i;
  11745. }
  11746. function E0e(t) {
  11747. var e = t == null ? 0 : t.length;
  11748. return e ? A0e(t) : [];
  11749. }
  11750. function oU(t) {
  11751. return nU(aU(t, void 0, E0e), t + "");
  11752. }
  11753. var jI = PZ(Object.getPrototypeOf, Object), M0e = "[object Object]", I0e = Function.prototype, D0e = Object.prototype, sU = I0e.toString, R0e = D0e.hasOwnProperty, k0e = sU.call(Object);
  11754. function ZI(t) {
  11755. if (!io(t) || bu(t) != M0e)
  11756. return !1;
  11757. var e = jI(t);
  11758. if (e === null)
  11759. return !0;
  11760. var n = R0e.call(e, "constructor") && e.constructor;
  11761. return typeof n == "function" && n instanceof n && sU.call(n) == k0e;
  11762. }
  11763. function L0e(t, e, n) {
  11764. var r = -1, i = t.length;
  11765. 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;
  11766. for (var a = Array(i); ++r < i; )
  11767. a[r] = t[r + e];
  11768. return a;
  11769. }
  11770. function N0e(t, e) {
  11771. return t && dp(e, g0(e), t);
  11772. }
  11773. function B0e(t, e) {
  11774. return t && dp(e, b0(e), t);
  11775. }
  11776. var lU = typeof exports == "object" && exports && !exports.nodeType && exports, NN = lU && typeof module == "object" && module && !module.nodeType && module, z0e = NN && NN.exports === lU, BN = z0e ? po.Buffer : void 0, zN = BN ? BN.allocUnsafe : void 0;
  11777. function uU(t, e) {
  11778. if (e)
  11779. return t.slice();
  11780. var n = t.length, r = zN ? zN(n) : new t.constructor(n);
  11781. return t.copy(r), r;
  11782. }
  11783. function V0e(t, e) {
  11784. return dp(t, xI(t), e);
  11785. }
  11786. var F0e = Object.getOwnPropertySymbols, cU = F0e ? function(t) {
  11787. for (var e = []; t; )
  11788. SI(e, xI(t)), t = jI(t);
  11789. return e;
  11790. } : SZ;
  11791. function W0e(t, e) {
  11792. return dp(t, cU(t), e);
  11793. }
  11794. function fU(t) {
  11795. return OZ(t, b0, cU);
  11796. }
  11797. var Q0e = Object.prototype, H0e = Q0e.hasOwnProperty;
  11798. function G0e(t) {
  11799. var e = t.length, n = new t.constructor(e);
  11800. return e && typeof t[0] == "string" && H0e.call(t, "index") && (n.index = t.index, n.input = t.input), n;
  11801. }
  11802. function UI(t) {
  11803. var e = new t.constructor(t.byteLength);
  11804. return new T1(e).set(new T1(t)), e;
  11805. }
  11806. function j0e(t, e) {
  11807. var n = e ? UI(t.buffer) : t.buffer;
  11808. return new t.constructor(n, t.byteOffset, t.byteLength);
  11809. }
  11810. var Z0e = /\w*$/;
  11811. function U0e(t) {
  11812. var e = new t.constructor(t.source, Z0e.exec(t));
  11813. return e.lastIndex = t.lastIndex, e;
  11814. }
  11815. var VN = $a ? $a.prototype : void 0, FN = VN ? VN.valueOf : void 0;
  11816. function X0e(t) {
  11817. return FN ? Object(FN.call(t)) : {};
  11818. }
  11819. function dU(t, e) {
  11820. var n = e ? UI(t.buffer) : t.buffer;
  11821. return new t.constructor(n, t.byteOffset, t.length);
  11822. }
  11823. var Y0e = "[object Boolean]", q0e = "[object Date]", K0e = "[object Map]", J0e = "[object Number]", eye = "[object RegExp]", tye = "[object Set]", nye = "[object String]", rye = "[object Symbol]", iye = "[object ArrayBuffer]", aye = "[object DataView]", oye = "[object Float32Array]", sye = "[object Float64Array]", lye = "[object Int8Array]", uye = "[object Int16Array]", cye = "[object Int32Array]", fye = "[object Uint8Array]", dye = "[object Uint8ClampedArray]", hye = "[object Uint16Array]", pye = "[object Uint32Array]";
  11824. function vye(t, e, n) {
  11825. var r = t.constructor;
  11826. switch (e) {
  11827. case iye:
  11828. return UI(t);
  11829. case Y0e:
  11830. case q0e:
  11831. return new r(+t);
  11832. case aye:
  11833. return j0e(t, n);
  11834. case oye:
  11835. case sye:
  11836. case lye:
  11837. case uye:
  11838. case cye:
  11839. case fye:
  11840. case dye:
  11841. case hye:
  11842. case pye:
  11843. return dU(t, n);
  11844. case K0e:
  11845. return new r();
  11846. case J0e:
  11847. case nye:
  11848. return new r(t);
  11849. case eye:
  11850. return U0e(t);
  11851. case tye:
  11852. return new r();
  11853. case rye:
  11854. return X0e(t);
  11855. }
  11856. }
  11857. function hU(t) {
  11858. return typeof t.constructor == "function" && !YS(t) ? Kme(jI(t)) : {};
  11859. }
  11860. var gye = "[object Map]";
  11861. function mye(t) {
  11862. return io(t) && pa(t) == gye;
  11863. }
  11864. var WN = $h && $h.isMap, yye = WN ? US(WN) : mye, bye = "[object Set]";
  11865. function _ye(t) {
  11866. return io(t) && pa(t) == bye;
  11867. }
  11868. var QN = $h && $h.isSet, Oye = QN ? US(QN) : _ye, Sye = 1, xye = 2, wye = 4, pU = "[object Arguments]", Cye = "[object Array]", Tye = "[object Boolean]", Pye = "[object Date]", $ye = "[object Error]", vU = "[object Function]", Aye = "[object GeneratorFunction]", Eye = "[object Map]", Mye = "[object Number]", gU = "[object Object]", Iye = "[object RegExp]", Dye = "[object Set]", Rye = "[object String]", kye = "[object Symbol]", Lye = "[object WeakMap]", Nye = "[object ArrayBuffer]", Bye = "[object DataView]", zye = "[object Float32Array]", Vye = "[object Float64Array]", Fye = "[object Int8Array]", Wye = "[object Int16Array]", Qye = "[object Int32Array]", Hye = "[object Uint8Array]", Gye = "[object Uint8ClampedArray]", jye = "[object Uint16Array]", Zye = "[object Uint32Array]", rn = {};
  11869. rn[pU] = rn[Cye] = rn[Nye] = rn[Bye] = rn[Tye] = rn[Pye] = rn[zye] = rn[Vye] = rn[Fye] = rn[Wye] = rn[Qye] = rn[Eye] = rn[Mye] = rn[gU] = rn[Iye] = rn[Dye] = rn[Rye] = rn[kye] = rn[Hye] = rn[Gye] = rn[jye] = rn[Zye] = !0;
  11870. rn[$ye] = rn[vU] = rn[Lye] = !1;
  11871. function pg(t, e, n, r, i, a) {
  11872. var o, s = e & Sye, l = e & xye, u = e & wye;
  11873. if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
  11874. return o;
  11875. if (!xr(t))
  11876. return t;
  11877. var c = Ti(t);
  11878. if (c) {
  11879. if (o = G0e(t), !s)
  11880. return tU(t, o);
  11881. } else {
  11882. var f = pa(t), d = f == vU || f == Aye;
  11883. if (Ph(t))
  11884. return uU(t, s);
  11885. if (f == gU || f == pU || d && !i) {
  11886. if (o = l || d ? {} : hU(t), !s)
  11887. return l ? W0e(t, B0e(o, t)) : V0e(t, N0e(o, t));
  11888. } else {
  11889. if (!rn[f])
  11890. return i ? t : {};
  11891. o = vye(t, f, s);
  11892. }
  11893. }
  11894. a || (a = new eo());
  11895. var h = a.get(t);
  11896. if (h)
  11897. return h;
  11898. a.set(t, o), Oye(t) ? t.forEach(function(g) {
  11899. o.add(pg(g, e, n, g, t, a));
  11900. }) : yye(t) && t.forEach(function(g, m) {
  11901. o.set(m, pg(g, e, n, m, t, a));
  11902. });
  11903. var p = u ? l ? fU : w2 : l ? b0 : g0, v = c ? void 0 : p(t);
  11904. return o0e(v || t, function(g, m) {
  11905. v && (m = g, g = t[m]), WI(o, m, pg(g, e, n, m, t, a));
  11906. }), o;
  11907. }
  11908. var Uye = 1, Xye = 4;
  11909. function Zc(t) {
  11910. return pg(t, Uye | Xye);
  11911. }
  11912. var Yye = 1, qye = 2;
  11913. function Kye(t, e, n, r) {
  11914. var i = n.length, a = i;
  11915. if (t == null)
  11916. return !a;
  11917. for (t = Object(t); i--; ) {
  11918. var o = n[i];
  11919. if (o[2] ? o[1] !== t[o[0]] : !(o[0] in t))
  11920. return !1;
  11921. }
  11922. for (; ++i < a; ) {
  11923. o = n[i];
  11924. var s = o[0], l = t[s], u = o[1];
  11925. if (o[2]) {
  11926. if (l === void 0 && !(s in t))
  11927. return !1;
  11928. } else {
  11929. var c = new eo(), f;
  11930. if (!(f === void 0 ? qS(u, l, Yye | qye, r, c) : f))
  11931. return !1;
  11932. }
  11933. }
  11934. return !0;
  11935. }
  11936. function mU(t) {
  11937. return t === t && !xr(t);
  11938. }
  11939. function Jye(t) {
  11940. for (var e = g0(t), n = e.length; n--; ) {
  11941. var r = e[n], i = t[r];
  11942. e[n] = [r, i, mU(i)];
  11943. }
  11944. return e;
  11945. }
  11946. function yU(t, e) {
  11947. return function(n) {
  11948. return n == null ? !1 : n[t] === e && (e !== void 0 || t in Object(n));
  11949. };
  11950. }
  11951. function ebe(t) {
  11952. var e = Jye(t);
  11953. return e.length == 1 && e[0][2] ? yU(e[0][0], e[0][1]) : function(n) {
  11954. return n === t || Kye(n, t, e);
  11955. };
  11956. }
  11957. function tbe(t, e) {
  11958. return t != null && e in Object(t);
  11959. }
  11960. function nbe(t, e, n) {
  11961. e = hp(e, t);
  11962. for (var r = -1, i = e.length, a = !1; ++r < i; ) {
  11963. var o = pp(e[r]);
  11964. if (!(a = t != null && n(t, o)))
  11965. break;
  11966. t = t[o];
  11967. }
  11968. return a || ++r != i ? a : (i = t == null ? 0 : t.length, !!i && wI(i) && ZS(o, i) && (Ti(t) || Th(t)));
  11969. }
  11970. function bU(t, e) {
  11971. return t != null && nbe(t, e, tbe);
  11972. }
  11973. var rbe = 1, ibe = 2;
  11974. function abe(t, e) {
  11975. return HI(t) && mU(e) ? yU(pp(t), e) : function(n) {
  11976. var r = kt(n, t);
  11977. return r === void 0 && r === e ? bU(n, t) : qS(e, r, rbe | ibe);
  11978. };
  11979. }
  11980. function obe(t) {
  11981. return function(e) {
  11982. return e == null ? void 0 : e[t];
  11983. };
  11984. }
  11985. function sbe(t) {
  11986. return function(e) {
  11987. return sx(e, t);
  11988. };
  11989. }
  11990. function lbe(t) {
  11991. return HI(t) ? obe(pp(t)) : sbe(t);
  11992. }
  11993. function _U(t) {
  11994. return typeof t == "function" ? t : t == null ? VI : typeof t == "object" ? Ti(t) ? abe(t[0], t[1]) : ebe(t) : lbe(t);
  11995. }
  11996. function ube(t) {
  11997. return function(e, n, r) {
  11998. for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
  11999. var l = o[++i];
  12000. if (n(a[l], l, a) === !1)
  12001. break;
  12002. }
  12003. return e;
  12004. };
  12005. }
  12006. var cbe = ube(), yC = function() {
  12007. return po.Date.now();
  12008. }, fbe = "Expected a function", dbe = Math.max, hbe = Math.min;
  12009. function XI(t, e, n) {
  12010. var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  12011. if (typeof t != "function")
  12012. throw new TypeError(fbe);
  12013. e = D2(e) || 0, xr(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? dbe(D2(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  12014. function h(S) {
  12015. var x = r, C = i;
  12016. return r = i = void 0, u = S, o = t.apply(C, x), o;
  12017. }
  12018. function p(S) {
  12019. return u = S, s = setTimeout(m, e), c ? h(S) : o;
  12020. }
  12021. function v(S) {
  12022. var x = S - l, C = S - u, T = e - x;
  12023. return f ? hbe(T, a - C) : T;
  12024. }
  12025. function g(S) {
  12026. var x = S - l, C = S - u;
  12027. return l === void 0 || x >= e || x < 0 || f && C >= a;
  12028. }
  12029. function m() {
  12030. var S = yC();
  12031. if (g(S))
  12032. return y(S);
  12033. s = setTimeout(m, v(S));
  12034. }
  12035. function y(S) {
  12036. return s = void 0, d && r ? h(S) : (r = i = void 0, o);
  12037. }
  12038. function b() {
  12039. s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  12040. }
  12041. function _() {
  12042. return s === void 0 ? o : y(yC());
  12043. }
  12044. function O() {
  12045. var S = yC(), x = g(S);
  12046. if (r = arguments, i = this, l = S, x) {
  12047. if (s === void 0)
  12048. return p(l);
  12049. if (f)
  12050. return clearTimeout(s), s = setTimeout(m, e), h(l);
  12051. }
  12052. return s === void 0 && (s = setTimeout(m, e)), o;
  12053. }
  12054. return O.cancel = b, O.flush = _, O;
  12055. }
  12056. function R2(t, e, n) {
  12057. (n !== void 0 && !v0(t[e], n) || n === void 0 && !(e in t)) && FI(t, e, n);
  12058. }
  12059. function OU(t) {
  12060. return io(t) && fp(t);
  12061. }
  12062. function k2(t, e) {
  12063. if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
  12064. return t[e];
  12065. }
  12066. function pbe(t) {
  12067. return dp(t, b0(t));
  12068. }
  12069. function vbe(t, e, n, r, i, a, o) {
  12070. var s = k2(t, n), l = k2(e, n), u = o.get(l);
  12071. if (u) {
  12072. R2(t, n, u);
  12073. return;
  12074. }
  12075. var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  12076. if (f) {
  12077. var d = Ti(l), h = !d && Ph(l), p = !d && !h && XS(l);
  12078. c = l, d || h || p ? Ti(s) ? c = s : OU(s) ? c = tU(s) : h ? (f = !1, c = uU(l, !0)) : p ? (f = !1, c = dU(l, !0)) : c = [] : ZI(l) || Th(l) ? (c = s, Th(s) ? c = pbe(s) : (!xr(s) || _I(s)) && (c = hU(l))) : f = !1;
  12079. }
  12080. f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), R2(t, n, c);
  12081. }
  12082. function YI(t, e, n, r, i) {
  12083. t !== e && cbe(e, function(a, o) {
  12084. if (i || (i = new eo()), xr(a))
  12085. vbe(t, e, o, n, YI, r, i);
  12086. else {
  12087. var s = r ? r(k2(t, o), a, o + "", t, e, i) : void 0;
  12088. s === void 0 && (s = a), R2(t, o, s);
  12089. }
  12090. }, b0);
  12091. }
  12092. function SU(t, e, n, r, i, a) {
  12093. return xr(t) && xr(e) && (a.set(e, t), YI(t, e, void 0, SU, a), a.delete(e)), t;
  12094. }
  12095. var gbe = h0e(function(t, e, n, r) {
  12096. YI(t, e, n, r);
  12097. }), xU = QI(function(t) {
  12098. return t.push(void 0, SU), eU(gbe, void 0, t);
  12099. });
  12100. function mbe(t) {
  12101. var e = t == null ? 0 : t.length;
  12102. return e ? t[e - 1] : void 0;
  12103. }
  12104. function ybe(t) {
  12105. return function(e, n, r) {
  12106. var i = Object(e);
  12107. if (!fp(e)) {
  12108. var a = _U(n);
  12109. e = g0(e), n = function(s) {
  12110. return a(i[s], s, i);
  12111. };
  12112. }
  12113. var o = t(e, n, r);
  12114. return o > -1 ? i[a ? e[o] : o] : void 0;
  12115. };
  12116. }
  12117. var bbe = Math.max;
  12118. function _be(t, e, n) {
  12119. var r = t == null ? 0 : t.length;
  12120. if (!r)
  12121. return -1;
  12122. var i = n == null ? 0 : qme(n);
  12123. return i < 0 && (i = bbe(r + i, 0)), rU(t, _U(e), i);
  12124. }
  12125. var Obe = ybe(_be);
  12126. function M1(t) {
  12127. for (var e = -1, n = t == null ? 0 : t.length, r = {}; ++e < n; ) {
  12128. var i = t[e];
  12129. r[i[0]] = i[1];
  12130. }
  12131. return r;
  12132. }
  12133. var Sbe = Math.min;
  12134. function xbe(t, e, n) {
  12135. for (var r = iU, i = t[0].length, a = t.length, o = a, s = Array(a), l = 1 / 0, u = []; o--; ) {
  12136. var c = t[o];
  12137. o && e && (c = ox(c, US(e))), l = Sbe(c.length, l), s[o] = i >= 120 && c.length >= 120 ? new Ch(o && c) : void 0;
  12138. }
  12139. c = t[0];
  12140. var f = -1, d = s[0];
  12141. e:
  12142. for (; ++f < i && u.length < l; ) {
  12143. var h = c[f], p = h;
  12144. if (h = h !== 0 ? h : 0, !(d ? C1(d, p) : r(u, p))) {
  12145. for (o = a; --o; ) {
  12146. var v = s[o];
  12147. if (!(v ? C1(v, p) : r(t[o], p)))
  12148. continue e;
  12149. }
  12150. d && d.push(p), u.push(h);
  12151. }
  12152. }
  12153. return u;
  12154. }
  12155. function wbe(t) {
  12156. return OU(t) ? t : [];
  12157. }
  12158. var Cbe = QI(function(t) {
  12159. var e = ox(t, wbe);
  12160. return e.length && e[0] === t[0] ? xbe(e) : [];
  12161. });
  12162. function Tbe(t, e) {
  12163. return e.length < 2 ? t : sx(t, L0e(e, 0, -1));
  12164. }
  12165. var Pbe = "[object Map]", $be = "[object Set]", Abe = Object.prototype, Ebe = Abe.hasOwnProperty;
  12166. function wU(t) {
  12167. if (t == null)
  12168. return !0;
  12169. if (fp(t) && (Ti(t) || typeof t == "string" || typeof t.splice == "function" || Ph(t) || XS(t) || Th(t)))
  12170. return !t.length;
  12171. var e = pa(t);
  12172. if (e == Pbe || e == $be)
  12173. return !t.size;
  12174. if (YS(t))
  12175. return !$Z(t).length;
  12176. for (var n in t)
  12177. if (Ebe.call(t, n))
  12178. return !1;
  12179. return !0;
  12180. }
  12181. var Mbe = "[object Number]";
  12182. function Ibe(t) {
  12183. return typeof t == "number" || io(t) && bu(t) == Mbe;
  12184. }
  12185. function Gl(t) {
  12186. return t == null;
  12187. }
  12188. function Dbe(t) {
  12189. return t === void 0;
  12190. }
  12191. function Rbe(t, e) {
  12192. return e = hp(e, t), t = Tbe(t, e), t == null || delete t[pp(mbe(e))];
  12193. }
  12194. function kbe(t) {
  12195. return ZI(t) ? void 0 : t;
  12196. }
  12197. var Lbe = 1, Nbe = 2, Bbe = 4, CU = oU(function(t, e) {
  12198. var n = {};
  12199. if (t == null)
  12200. return n;
  12201. var r = !1;
  12202. e = ox(e, function(a) {
  12203. return a = hp(a, t), r || (r = a.length > 1), a;
  12204. }), dp(t, fU(t), n), r && (n = pg(n, Lbe | Nbe | Bbe, kbe));
  12205. for (var i = e.length; i--; )
  12206. Rbe(n, e[i]);
  12207. return n;
  12208. });
  12209. function TU(t, e, n, r) {
  12210. if (!xr(t))
  12211. return t;
  12212. e = hp(e, t);
  12213. for (var i = -1, a = e.length, o = a - 1, s = t; s != null && ++i < a; ) {
  12214. var l = pp(e[i]), u = n;
  12215. if (l === "__proto__" || l === "constructor" || l === "prototype")
  12216. return t;
  12217. if (i != o) {
  12218. var c = s[l];
  12219. u = void 0, u === void 0 && (u = xr(c) ? c : ZS(e[i + 1]) ? [] : {});
  12220. }
  12221. WI(s, l, u), s = s[l];
  12222. }
  12223. return t;
  12224. }
  12225. function zbe(t, e, n) {
  12226. for (var r = -1, i = e.length, a = {}; ++r < i; ) {
  12227. var o = e[r], s = sx(t, o);
  12228. n(s, o) && TU(a, hp(o, t), s);
  12229. }
  12230. return a;
  12231. }
  12232. function Vbe(t, e) {
  12233. return zbe(t, e, function(n, r) {
  12234. return bU(t, r);
  12235. });
  12236. }
  12237. var um = oU(function(t, e) {
  12238. return t == null ? {} : Vbe(t, e);
  12239. });
  12240. function qI(t, e, n) {
  12241. return t == null ? t : TU(t, e, n);
  12242. }
  12243. var Fbe = "Expected a function";
  12244. function Wbe(t, e, n) {
  12245. var r = !0, i = !0;
  12246. if (typeof t != "function")
  12247. throw new TypeError(Fbe);
  12248. return xr(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), XI(t, e, {
  12249. leading: r,
  12250. maxWait: e,
  12251. trailing: i
  12252. });
  12253. }
  12254. var Qbe = 1 / 0, Hbe = Xd && 1 / OI(new Xd([, -0]))[1] == Qbe ? function(t) {
  12255. return new Xd(t);
  12256. } : Jme, Gbe = 200;
  12257. function jbe(t, e, n) {
  12258. var r = -1, i = iU, a = t.length, o = !0, s = [], l = s;
  12259. if (a >= Gbe) {
  12260. var u = Hbe(t);
  12261. if (u)
  12262. return OI(u);
  12263. o = !1, i = C1, l = new Ch();
  12264. } else
  12265. l = s;
  12266. e:
  12267. for (; ++r < a; ) {
  12268. var c = t[r], f = c;
  12269. if (c = c !== 0 ? c : 0, o && f === f) {
  12270. for (var d = l.length; d--; )
  12271. if (l[d] === f)
  12272. continue e;
  12273. s.push(c);
  12274. } else i(l, f, n) || (l !== s && l.push(f), s.push(c));
  12275. }
  12276. return s;
  12277. }
  12278. function bC(t) {
  12279. return t && t.length ? jbe(t) : [];
  12280. }
  12281. const Zbe = () => ({
  12282. compactSize: String,
  12283. compactDirection: Y.oneOf(ru("horizontal", "vertical")).def("horizontal"),
  12284. isFirstItem: nt(),
  12285. isLastItem: nt()
  12286. }), lx = zI(null), ux = (t, e) => {
  12287. const n = lx.useInject(), r = L(() => {
  12288. if (!n || wU(n)) return "";
  12289. const {
  12290. compactDirection: i,
  12291. isFirstItem: a,
  12292. isLastItem: o
  12293. } = n, s = i === "vertical" ? "-vertical-" : "-";
  12294. return ye({
  12295. [`${t.value}-compact${s}item`]: !0,
  12296. [`${t.value}-compact${s}first-item`]: a,
  12297. [`${t.value}-compact${s}last-item`]: o,
  12298. [`${t.value}-compact${s}item-rtl`]: e.value === "rtl"
  12299. });
  12300. });
  12301. return {
  12302. compactSize: L(() => n == null ? void 0 : n.compactSize),
  12303. compactDirection: L(() => n == null ? void 0 : n.compactDirection),
  12304. compactItemClassnames: r
  12305. };
  12306. }, I1 = te({
  12307. name: "NoCompactStyle",
  12308. setup(t, e) {
  12309. let {
  12310. slots: n
  12311. } = e;
  12312. return lx.useProvide(null), () => {
  12313. var r;
  12314. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  12315. };
  12316. }
  12317. }), Ube = () => ({
  12318. prefixCls: String,
  12319. size: {
  12320. type: String
  12321. },
  12322. direction: Y.oneOf(ru("horizontal", "vertical")).def("horizontal"),
  12323. align: Y.oneOf(ru("start", "end", "center", "baseline")),
  12324. block: {
  12325. type: Boolean,
  12326. default: void 0
  12327. }
  12328. }), Xbe = te({
  12329. name: "CompactItem",
  12330. props: Zbe(),
  12331. setup(t, e) {
  12332. let {
  12333. slots: n
  12334. } = e;
  12335. return lx.useProvide(t), () => {
  12336. var r;
  12337. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  12338. };
  12339. }
  12340. });
  12341. te({
  12342. name: "ASpaceCompact",
  12343. inheritAttrs: !1,
  12344. props: Ube(),
  12345. setup(t, e) {
  12346. let {
  12347. attrs: n,
  12348. slots: r
  12349. } = e;
  12350. const {
  12351. prefixCls: i,
  12352. direction: a
  12353. } = It("space-compact", t), o = lx.useInject(), [s, l] = Bme(i), u = L(() => ye(i.value, l.value, {
  12354. [`${i.value}-rtl`]: a.value === "rtl",
  12355. [`${i.value}-block`]: t.block,
  12356. [`${i.value}-vertical`]: t.direction === "vertical"
  12357. }));
  12358. return () => {
  12359. var c;
  12360. const f = Yn(((c = r.default) === null || c === void 0 ? void 0 : c.call(r)) || []);
  12361. return f.length === 0 ? null : s(M("div", j(j({}, n), {}, {
  12362. class: [u.value, n.class]
  12363. }), [f.map((d, h) => {
  12364. var p;
  12365. const v = d && d.key || `${i.value}-item-${h}`, g = !o || wU(o);
  12366. return M(Xbe, {
  12367. key: v,
  12368. compactSize: (p = t.size) !== null && p !== void 0 ? p : "middle",
  12369. compactDirection: t.direction,
  12370. isFirstItem: h === 0 && (g || (o == null ? void 0 : o.isFirstItem)),
  12371. isLastItem: h === f.length - 1 && (g || (o == null ? void 0 : o.isLastItem))
  12372. }, {
  12373. default: () => [d]
  12374. });
  12375. })]));
  12376. };
  12377. }
  12378. });
  12379. const Ybe = (t) => ({
  12380. animationDuration: t,
  12381. animationFillMode: "both"
  12382. }), qbe = (t) => ({
  12383. animationDuration: t,
  12384. animationFillMode: "both"
  12385. }), cx = function(t, e, n, r) {
  12386. const a = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  12387. return {
  12388. [`
  12389. ${a}${t}-enter,
  12390. ${a}${t}-appear
  12391. `]: I(I({}, Ybe(r)), {
  12392. animationPlayState: "paused"
  12393. }),
  12394. [`${a}${t}-leave`]: I(I({}, qbe(r)), {
  12395. animationPlayState: "paused"
  12396. }),
  12397. [`
  12398. ${a}${t}-enter${t}-enter-active,
  12399. ${a}${t}-appear${t}-appear-active
  12400. `]: {
  12401. animationName: e,
  12402. animationPlayState: "running"
  12403. },
  12404. [`${a}${t}-leave${t}-leave-active`]: {
  12405. animationName: n,
  12406. animationPlayState: "running",
  12407. pointerEvents: "none"
  12408. }
  12409. };
  12410. }, Kbe = new Ot("antFadeIn", {
  12411. "0%": {
  12412. opacity: 0
  12413. },
  12414. "100%": {
  12415. opacity: 1
  12416. }
  12417. }), Jbe = new Ot("antFadeOut", {
  12418. "0%": {
  12419. opacity: 1
  12420. },
  12421. "100%": {
  12422. opacity: 0
  12423. }
  12424. }), PU = function(t) {
  12425. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  12426. const {
  12427. antCls: n
  12428. } = t, r = `${n}-fade`, i = e ? "&" : "";
  12429. return [cx(r, Kbe, Jbe, t.motionDurationMid, e), {
  12430. [`
  12431. ${i}${r}-enter,
  12432. ${i}${r}-appear
  12433. `]: {
  12434. opacity: 0,
  12435. animationTimingFunction: "linear"
  12436. },
  12437. [`${i}${r}-leave`]: {
  12438. animationTimingFunction: "linear"
  12439. }
  12440. }];
  12441. }, e_e = new Ot("antMoveDownIn", {
  12442. "0%": {
  12443. transform: "translate3d(0, 100%, 0)",
  12444. transformOrigin: "0 0",
  12445. opacity: 0
  12446. },
  12447. "100%": {
  12448. transform: "translate3d(0, 0, 0)",
  12449. transformOrigin: "0 0",
  12450. opacity: 1
  12451. }
  12452. }), t_e = new Ot("antMoveDownOut", {
  12453. "0%": {
  12454. transform: "translate3d(0, 0, 0)",
  12455. transformOrigin: "0 0",
  12456. opacity: 1
  12457. },
  12458. "100%": {
  12459. transform: "translate3d(0, 100%, 0)",
  12460. transformOrigin: "0 0",
  12461. opacity: 0
  12462. }
  12463. }), n_e = new Ot("antMoveLeftIn", {
  12464. "0%": {
  12465. transform: "translate3d(-100%, 0, 0)",
  12466. transformOrigin: "0 0",
  12467. opacity: 0
  12468. },
  12469. "100%": {
  12470. transform: "translate3d(0, 0, 0)",
  12471. transformOrigin: "0 0",
  12472. opacity: 1
  12473. }
  12474. }), r_e = new Ot("antMoveLeftOut", {
  12475. "0%": {
  12476. transform: "translate3d(0, 0, 0)",
  12477. transformOrigin: "0 0",
  12478. opacity: 1
  12479. },
  12480. "100%": {
  12481. transform: "translate3d(-100%, 0, 0)",
  12482. transformOrigin: "0 0",
  12483. opacity: 0
  12484. }
  12485. }), i_e = new Ot("antMoveRightIn", {
  12486. "0%": {
  12487. transform: "translate3d(100%, 0, 0)",
  12488. transformOrigin: "0 0",
  12489. opacity: 0
  12490. },
  12491. "100%": {
  12492. transform: "translate3d(0, 0, 0)",
  12493. transformOrigin: "0 0",
  12494. opacity: 1
  12495. }
  12496. }), a_e = new Ot("antMoveRightOut", {
  12497. "0%": {
  12498. transform: "translate3d(0, 0, 0)",
  12499. transformOrigin: "0 0",
  12500. opacity: 1
  12501. },
  12502. "100%": {
  12503. transform: "translate3d(100%, 0, 0)",
  12504. transformOrigin: "0 0",
  12505. opacity: 0
  12506. }
  12507. }), o_e = new Ot("antMoveUpIn", {
  12508. "0%": {
  12509. transform: "translate3d(0, -100%, 0)",
  12510. transformOrigin: "0 0",
  12511. opacity: 0
  12512. },
  12513. "100%": {
  12514. transform: "translate3d(0, 0, 0)",
  12515. transformOrigin: "0 0",
  12516. opacity: 1
  12517. }
  12518. }), s_e = new Ot("antMoveUpOut", {
  12519. "0%": {
  12520. transform: "translate3d(0, 0, 0)",
  12521. transformOrigin: "0 0",
  12522. opacity: 1
  12523. },
  12524. "100%": {
  12525. transform: "translate3d(0, -100%, 0)",
  12526. transformOrigin: "0 0",
  12527. opacity: 0
  12528. }
  12529. }), l_e = {
  12530. "move-up": {
  12531. inKeyframes: o_e,
  12532. outKeyframes: s_e
  12533. },
  12534. "move-down": {
  12535. inKeyframes: e_e,
  12536. outKeyframes: t_e
  12537. },
  12538. "move-left": {
  12539. inKeyframes: n_e,
  12540. outKeyframes: r_e
  12541. },
  12542. "move-right": {
  12543. inKeyframes: i_e,
  12544. outKeyframes: a_e
  12545. }
  12546. }, HN = (t, e) => {
  12547. const {
  12548. antCls: n
  12549. } = t, r = `${n}-${e}`, {
  12550. inKeyframes: i,
  12551. outKeyframes: a
  12552. } = l_e[e];
  12553. return [cx(r, i, a, t.motionDurationMid), {
  12554. [`
  12555. ${r}-enter,
  12556. ${r}-appear
  12557. `]: {
  12558. opacity: 0,
  12559. animationTimingFunction: t.motionEaseOutCirc
  12560. },
  12561. [`${r}-leave`]: {
  12562. animationTimingFunction: t.motionEaseInOutCirc
  12563. }
  12564. }];
  12565. }, $U = new Ot("antSlideUpIn", {
  12566. "0%": {
  12567. transform: "scaleY(0.8)",
  12568. transformOrigin: "0% 0%",
  12569. opacity: 0
  12570. },
  12571. "100%": {
  12572. transform: "scaleY(1)",
  12573. transformOrigin: "0% 0%",
  12574. opacity: 1
  12575. }
  12576. }), AU = new Ot("antSlideUpOut", {
  12577. "0%": {
  12578. transform: "scaleY(1)",
  12579. transformOrigin: "0% 0%",
  12580. opacity: 1
  12581. },
  12582. "100%": {
  12583. transform: "scaleY(0.8)",
  12584. transformOrigin: "0% 0%",
  12585. opacity: 0
  12586. }
  12587. }), EU = new Ot("antSlideDownIn", {
  12588. "0%": {
  12589. transform: "scaleY(0.8)",
  12590. transformOrigin: "100% 100%",
  12591. opacity: 0
  12592. },
  12593. "100%": {
  12594. transform: "scaleY(1)",
  12595. transformOrigin: "100% 100%",
  12596. opacity: 1
  12597. }
  12598. }), MU = new Ot("antSlideDownOut", {
  12599. "0%": {
  12600. transform: "scaleY(1)",
  12601. transformOrigin: "100% 100%",
  12602. opacity: 1
  12603. },
  12604. "100%": {
  12605. transform: "scaleY(0.8)",
  12606. transformOrigin: "100% 100%",
  12607. opacity: 0
  12608. }
  12609. }), u_e = new Ot("antSlideLeftIn", {
  12610. "0%": {
  12611. transform: "scaleX(0.8)",
  12612. transformOrigin: "0% 0%",
  12613. opacity: 0
  12614. },
  12615. "100%": {
  12616. transform: "scaleX(1)",
  12617. transformOrigin: "0% 0%",
  12618. opacity: 1
  12619. }
  12620. }), c_e = new Ot("antSlideLeftOut", {
  12621. "0%": {
  12622. transform: "scaleX(1)",
  12623. transformOrigin: "0% 0%",
  12624. opacity: 1
  12625. },
  12626. "100%": {
  12627. transform: "scaleX(0.8)",
  12628. transformOrigin: "0% 0%",
  12629. opacity: 0
  12630. }
  12631. }), f_e = new Ot("antSlideRightIn", {
  12632. "0%": {
  12633. transform: "scaleX(0.8)",
  12634. transformOrigin: "100% 0%",
  12635. opacity: 0
  12636. },
  12637. "100%": {
  12638. transform: "scaleX(1)",
  12639. transformOrigin: "100% 0%",
  12640. opacity: 1
  12641. }
  12642. }), d_e = new Ot("antSlideRightOut", {
  12643. "0%": {
  12644. transform: "scaleX(1)",
  12645. transformOrigin: "100% 0%",
  12646. opacity: 1
  12647. },
  12648. "100%": {
  12649. transform: "scaleX(0.8)",
  12650. transformOrigin: "100% 0%",
  12651. opacity: 0
  12652. }
  12653. }), h_e = {
  12654. "slide-up": {
  12655. inKeyframes: $U,
  12656. outKeyframes: AU
  12657. },
  12658. "slide-down": {
  12659. inKeyframes: EU,
  12660. outKeyframes: MU
  12661. },
  12662. "slide-left": {
  12663. inKeyframes: u_e,
  12664. outKeyframes: c_e
  12665. },
  12666. "slide-right": {
  12667. inKeyframes: f_e,
  12668. outKeyframes: d_e
  12669. }
  12670. }, Eh = (t, e) => {
  12671. const {
  12672. antCls: n
  12673. } = t, r = `${n}-${e}`, {
  12674. inKeyframes: i,
  12675. outKeyframes: a
  12676. } = h_e[e];
  12677. return [cx(r, i, a, t.motionDurationMid), {
  12678. [`
  12679. ${r}-enter,
  12680. ${r}-appear
  12681. `]: {
  12682. transform: "scale(0)",
  12683. transformOrigin: "0% 0%",
  12684. opacity: 0,
  12685. animationTimingFunction: t.motionEaseOutQuint
  12686. },
  12687. [`${r}-leave`]: {
  12688. animationTimingFunction: t.motionEaseInQuint
  12689. }
  12690. }];
  12691. }, KI = new Ot("antZoomIn", {
  12692. "0%": {
  12693. transform: "scale(0.2)",
  12694. opacity: 0
  12695. },
  12696. "100%": {
  12697. transform: "scale(1)",
  12698. opacity: 1
  12699. }
  12700. }), p_e = new Ot("antZoomOut", {
  12701. "0%": {
  12702. transform: "scale(1)"
  12703. },
  12704. "100%": {
  12705. transform: "scale(0.2)",
  12706. opacity: 0
  12707. }
  12708. }), GN = new Ot("antZoomBigIn", {
  12709. "0%": {
  12710. transform: "scale(0.8)",
  12711. opacity: 0
  12712. },
  12713. "100%": {
  12714. transform: "scale(1)",
  12715. opacity: 1
  12716. }
  12717. }), jN = new Ot("antZoomBigOut", {
  12718. "0%": {
  12719. transform: "scale(1)"
  12720. },
  12721. "100%": {
  12722. transform: "scale(0.8)",
  12723. opacity: 0
  12724. }
  12725. }), v_e = new Ot("antZoomUpIn", {
  12726. "0%": {
  12727. transform: "scale(0.8)",
  12728. transformOrigin: "50% 0%",
  12729. opacity: 0
  12730. },
  12731. "100%": {
  12732. transform: "scale(1)",
  12733. transformOrigin: "50% 0%"
  12734. }
  12735. }), g_e = new Ot("antZoomUpOut", {
  12736. "0%": {
  12737. transform: "scale(1)",
  12738. transformOrigin: "50% 0%"
  12739. },
  12740. "100%": {
  12741. transform: "scale(0.8)",
  12742. transformOrigin: "50% 0%",
  12743. opacity: 0
  12744. }
  12745. }), m_e = new Ot("antZoomLeftIn", {
  12746. "0%": {
  12747. transform: "scale(0.8)",
  12748. transformOrigin: "0% 50%",
  12749. opacity: 0
  12750. },
  12751. "100%": {
  12752. transform: "scale(1)",
  12753. transformOrigin: "0% 50%"
  12754. }
  12755. }), y_e = new Ot("antZoomLeftOut", {
  12756. "0%": {
  12757. transform: "scale(1)",
  12758. transformOrigin: "0% 50%"
  12759. },
  12760. "100%": {
  12761. transform: "scale(0.8)",
  12762. transformOrigin: "0% 50%",
  12763. opacity: 0
  12764. }
  12765. }), b_e = new Ot("antZoomRightIn", {
  12766. "0%": {
  12767. transform: "scale(0.8)",
  12768. transformOrigin: "100% 50%",
  12769. opacity: 0
  12770. },
  12771. "100%": {
  12772. transform: "scale(1)",
  12773. transformOrigin: "100% 50%"
  12774. }
  12775. }), __e = new Ot("antZoomRightOut", {
  12776. "0%": {
  12777. transform: "scale(1)",
  12778. transformOrigin: "100% 50%"
  12779. },
  12780. "100%": {
  12781. transform: "scale(0.8)",
  12782. transformOrigin: "100% 50%",
  12783. opacity: 0
  12784. }
  12785. }), O_e = new Ot("antZoomDownIn", {
  12786. "0%": {
  12787. transform: "scale(0.8)",
  12788. transformOrigin: "50% 100%",
  12789. opacity: 0
  12790. },
  12791. "100%": {
  12792. transform: "scale(1)",
  12793. transformOrigin: "50% 100%"
  12794. }
  12795. }), S_e = new Ot("antZoomDownOut", {
  12796. "0%": {
  12797. transform: "scale(1)",
  12798. transformOrigin: "50% 100%"
  12799. },
  12800. "100%": {
  12801. transform: "scale(0.8)",
  12802. transformOrigin: "50% 100%",
  12803. opacity: 0
  12804. }
  12805. }), x_e = {
  12806. zoom: {
  12807. inKeyframes: KI,
  12808. outKeyframes: p_e
  12809. },
  12810. "zoom-big": {
  12811. inKeyframes: GN,
  12812. outKeyframes: jN
  12813. },
  12814. "zoom-big-fast": {
  12815. inKeyframes: GN,
  12816. outKeyframes: jN
  12817. },
  12818. "zoom-left": {
  12819. inKeyframes: m_e,
  12820. outKeyframes: y_e
  12821. },
  12822. "zoom-right": {
  12823. inKeyframes: b_e,
  12824. outKeyframes: __e
  12825. },
  12826. "zoom-up": {
  12827. inKeyframes: v_e,
  12828. outKeyframes: g_e
  12829. },
  12830. "zoom-down": {
  12831. inKeyframes: O_e,
  12832. outKeyframes: S_e
  12833. }
  12834. }, fx = (t, e) => {
  12835. const {
  12836. antCls: n
  12837. } = t, r = `${n}-${e}`, {
  12838. inKeyframes: i,
  12839. outKeyframes: a
  12840. } = x_e[e];
  12841. return [cx(r, i, a, e === "zoom-big-fast" ? t.motionDurationFast : t.motionDurationMid), {
  12842. [`
  12843. ${r}-enter,
  12844. ${r}-appear
  12845. `]: {
  12846. transform: "scale(0)",
  12847. opacity: 0,
  12848. animationTimingFunction: t.motionEaseOutCirc,
  12849. "&-prepare": {
  12850. transform: "none"
  12851. }
  12852. },
  12853. [`${r}-leave`]: {
  12854. animationTimingFunction: t.motionEaseInOutCirc
  12855. }
  12856. }];
  12857. }, JI = (t) => ({
  12858. [t.componentCls]: {
  12859. // For common/openAnimation
  12860. [`${t.antCls}-motion-collapse-legacy`]: {
  12861. overflow: "hidden",
  12862. "&-active": {
  12863. transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
  12864. opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
  12865. }
  12866. },
  12867. [`${t.antCls}-motion-collapse`]: {
  12868. overflow: "hidden",
  12869. transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
  12870. opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
  12871. }
  12872. }
  12873. }), ZN = (t) => {
  12874. const {
  12875. controlPaddingHorizontal: e
  12876. } = t;
  12877. return {
  12878. position: "relative",
  12879. display: "block",
  12880. minHeight: t.controlHeight,
  12881. padding: `${(t.controlHeight - t.fontSize * t.lineHeight) / 2}px ${e}px`,
  12882. color: t.colorText,
  12883. fontWeight: "normal",
  12884. fontSize: t.fontSize,
  12885. lineHeight: t.lineHeight,
  12886. boxSizing: "border-box"
  12887. };
  12888. }, w_e = (t) => {
  12889. const {
  12890. antCls: e,
  12891. componentCls: n
  12892. } = t, r = `${n}-item`;
  12893. return [
  12894. {
  12895. [`${n}-dropdown`]: I(I({}, nn(t)), {
  12896. position: "absolute",
  12897. top: -9999,
  12898. zIndex: t.zIndexPopup,
  12899. boxSizing: "border-box",
  12900. padding: t.paddingXXS,
  12901. overflow: "hidden",
  12902. fontSize: t.fontSize,
  12903. // Fix select render lag of long text in chrome
  12904. // https://github.com/ant-design/ant-design/issues/11456
  12905. // https://github.com/ant-design/ant-design/issues/11843
  12906. fontVariant: "initial",
  12907. backgroundColor: t.colorBgElevated,
  12908. borderRadius: t.borderRadiusLG,
  12909. outline: "none",
  12910. boxShadow: t.boxShadowSecondary,
  12911. [`
  12912. &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
  12913. &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
  12914. `]: {
  12915. animationName: $U
  12916. },
  12917. [`
  12918. &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topLeft,
  12919. &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topLeft
  12920. `]: {
  12921. animationName: EU
  12922. },
  12923. [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
  12924. animationName: AU
  12925. },
  12926. [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
  12927. animationName: MU
  12928. },
  12929. "&-hidden": {
  12930. display: "none"
  12931. },
  12932. "&-empty": {
  12933. color: t.colorTextDisabled
  12934. },
  12935. // ========================= Options =========================
  12936. [`${r}-empty`]: I(I({}, ZN(t)), {
  12937. color: t.colorTextDisabled
  12938. }),
  12939. [`${r}`]: I(I({}, ZN(t)), {
  12940. cursor: "pointer",
  12941. transition: `background ${t.motionDurationSlow} ease`,
  12942. borderRadius: t.borderRadiusSM,
  12943. // =========== Group ============
  12944. "&-group": {
  12945. color: t.colorTextDescription,
  12946. fontSize: t.fontSizeSM,
  12947. cursor: "default"
  12948. },
  12949. // =========== Option ===========
  12950. "&-option": {
  12951. display: "flex",
  12952. "&-content": I({
  12953. flex: "auto"
  12954. }, Sh),
  12955. "&-state": {
  12956. flex: "none"
  12957. },
  12958. [`&-active:not(${r}-option-disabled)`]: {
  12959. backgroundColor: t.controlItemBgHover
  12960. },
  12961. [`&-selected:not(${r}-option-disabled)`]: {
  12962. color: t.colorText,
  12963. fontWeight: t.fontWeightStrong,
  12964. backgroundColor: t.controlItemBgActive,
  12965. [`${r}-option-state`]: {
  12966. color: t.colorPrimary
  12967. }
  12968. },
  12969. "&-disabled": {
  12970. [`&${r}-option-selected`]: {
  12971. backgroundColor: t.colorBgContainerDisabled
  12972. },
  12973. color: t.colorTextDisabled,
  12974. cursor: "not-allowed"
  12975. },
  12976. "&-grouped": {
  12977. paddingInlineStart: t.controlPaddingHorizontal * 2
  12978. }
  12979. }
  12980. }),
  12981. // =========================== RTL ===========================
  12982. "&-rtl": {
  12983. direction: "rtl"
  12984. }
  12985. })
  12986. },
  12987. // Follow code may reuse in other components
  12988. Eh(t, "slide-up"),
  12989. Eh(t, "slide-down"),
  12990. HN(t, "move-up"),
  12991. HN(t, "move-down")
  12992. ];
  12993. }, Xf = 2;
  12994. function IU(t) {
  12995. let {
  12996. controlHeightSM: e,
  12997. controlHeight: n,
  12998. lineWidth: r
  12999. } = t;
  13000. const i = (n - e) / 2 - r, a = Math.ceil(i / 2);
  13001. return [i, a];
  13002. }
  13003. function _C(t, e) {
  13004. const {
  13005. componentCls: n,
  13006. iconCls: r
  13007. } = t, i = `${n}-selection-overflow`, a = t.controlHeightSM, [o] = IU(t), s = e ? `${n}-${e}` : "";
  13008. return {
  13009. [`${n}-multiple${s}`]: {
  13010. fontSize: t.fontSize,
  13011. /**
  13012. * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
  13013. * may update to redesign with its align logic.
  13014. */
  13015. // =========================== Overflow ===========================
  13016. [i]: {
  13017. position: "relative",
  13018. display: "flex",
  13019. flex: "auto",
  13020. flexWrap: "wrap",
  13021. maxWidth: "100%",
  13022. "&-item": {
  13023. flex: "none",
  13024. alignSelf: "center",
  13025. maxWidth: "100%",
  13026. display: "inline-flex"
  13027. }
  13028. },
  13029. // ========================= Selector =========================
  13030. [`${n}-selector`]: {
  13031. display: "flex",
  13032. flexWrap: "wrap",
  13033. alignItems: "center",
  13034. // Multiple is little different that horizontal is follow the vertical
  13035. padding: `${o - Xf}px ${Xf * 2}px`,
  13036. borderRadius: t.borderRadius,
  13037. [`${n}-show-search&`]: {
  13038. cursor: "text"
  13039. },
  13040. [`${n}-disabled&`]: {
  13041. background: t.colorBgContainerDisabled,
  13042. cursor: "not-allowed"
  13043. },
  13044. "&:after": {
  13045. display: "inline-block",
  13046. width: 0,
  13047. margin: `${Xf}px 0`,
  13048. lineHeight: `${a}px`,
  13049. content: '"\\a0"'
  13050. }
  13051. },
  13052. [`
  13053. &${n}-show-arrow ${n}-selector,
  13054. &${n}-allow-clear ${n}-selector
  13055. `]: {
  13056. paddingInlineEnd: t.fontSizeIcon + t.controlPaddingHorizontal
  13057. },
  13058. // ======================== Selections ========================
  13059. [`${n}-selection-item`]: {
  13060. position: "relative",
  13061. display: "flex",
  13062. flex: "none",
  13063. boxSizing: "border-box",
  13064. maxWidth: "100%",
  13065. height: a,
  13066. marginTop: Xf,
  13067. marginBottom: Xf,
  13068. lineHeight: `${a - t.lineWidth * 2}px`,
  13069. background: t.colorFillSecondary,
  13070. border: `${t.lineWidth}px solid ${t.colorSplit}`,
  13071. borderRadius: t.borderRadiusSM,
  13072. cursor: "default",
  13073. transition: `font-size ${t.motionDurationSlow}, line-height ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,
  13074. userSelect: "none",
  13075. marginInlineEnd: Xf * 2,
  13076. paddingInlineStart: t.paddingXS,
  13077. paddingInlineEnd: t.paddingXS / 2,
  13078. [`${n}-disabled&`]: {
  13079. color: t.colorTextDisabled,
  13080. borderColor: t.colorBorder,
  13081. cursor: "not-allowed"
  13082. },
  13083. // It's ok not to do this, but 24px makes bottom narrow in view should adjust
  13084. "&-content": {
  13085. display: "inline-block",
  13086. marginInlineEnd: t.paddingXS / 2,
  13087. overflow: "hidden",
  13088. whiteSpace: "pre",
  13089. textOverflow: "ellipsis"
  13090. },
  13091. "&-remove": I(I({}, up()), {
  13092. display: "inline-block",
  13093. color: t.colorIcon,
  13094. fontWeight: "bold",
  13095. fontSize: 10,
  13096. lineHeight: "inherit",
  13097. cursor: "pointer",
  13098. [`> ${r}`]: {
  13099. verticalAlign: "-0.2em"
  13100. },
  13101. "&:hover": {
  13102. color: t.colorIconHover
  13103. }
  13104. })
  13105. },
  13106. // ========================== Input ==========================
  13107. [`${i}-item + ${i}-item`]: {
  13108. [`${n}-selection-search`]: {
  13109. marginInlineStart: 0
  13110. }
  13111. },
  13112. [`${n}-selection-search`]: {
  13113. display: "inline-flex",
  13114. position: "relative",
  13115. maxWidth: "100%",
  13116. marginInlineStart: t.inputPaddingHorizontalBase - o,
  13117. "\n &-input,\n &-mirror\n ": {
  13118. height: a,
  13119. fontFamily: t.fontFamily,
  13120. lineHeight: `${a}px`,
  13121. transition: `all ${t.motionDurationSlow}`
  13122. },
  13123. "&-input": {
  13124. width: "100%",
  13125. minWidth: 4.1
  13126. // fix search cursor missing
  13127. },
  13128. "&-mirror": {
  13129. position: "absolute",
  13130. top: 0,
  13131. insetInlineStart: 0,
  13132. insetInlineEnd: "auto",
  13133. zIndex: 999,
  13134. whiteSpace: "pre",
  13135. visibility: "hidden"
  13136. }
  13137. },
  13138. // ======================= Placeholder =======================
  13139. [`${n}-selection-placeholder `]: {
  13140. position: "absolute",
  13141. top: "50%",
  13142. insetInlineStart: t.inputPaddingHorizontalBase,
  13143. insetInlineEnd: t.inputPaddingHorizontalBase,
  13144. transform: "translateY(-50%)",
  13145. transition: `all ${t.motionDurationSlow}`
  13146. }
  13147. }
  13148. };
  13149. }
  13150. function C_e(t) {
  13151. const {
  13152. componentCls: e
  13153. } = t, n = Bt(t, {
  13154. controlHeight: t.controlHeightSM,
  13155. controlHeightSM: t.controlHeightXS,
  13156. borderRadius: t.borderRadiusSM,
  13157. borderRadiusSM: t.borderRadiusXS
  13158. }), [, r] = IU(t);
  13159. return [
  13160. _C(t),
  13161. // ======================== Small ========================
  13162. // Shared
  13163. _C(n, "sm"),
  13164. // Padding
  13165. {
  13166. [`${e}-multiple${e}-sm`]: {
  13167. [`${e}-selection-placeholder`]: {
  13168. insetInlineStart: t.controlPaddingHorizontalSM - t.lineWidth,
  13169. insetInlineEnd: "auto"
  13170. },
  13171. // https://github.com/ant-design/ant-design/issues/29559
  13172. [`${e}-selection-search`]: {
  13173. marginInlineStart: r
  13174. }
  13175. }
  13176. },
  13177. // ======================== Large ========================
  13178. // Shared
  13179. _C(Bt(t, {
  13180. fontSize: t.fontSizeLG,
  13181. controlHeight: t.controlHeightLG,
  13182. controlHeightSM: t.controlHeight,
  13183. borderRadius: t.borderRadiusLG,
  13184. borderRadiusSM: t.borderRadius
  13185. }), "lg")
  13186. ];
  13187. }
  13188. function OC(t, e) {
  13189. const {
  13190. componentCls: n,
  13191. inputPaddingHorizontalBase: r,
  13192. borderRadius: i
  13193. } = t, a = t.controlHeight - t.lineWidth * 2, o = Math.ceil(t.fontSize * 1.25), s = e ? `${n}-${e}` : "";
  13194. return {
  13195. [`${n}-single${s}`]: {
  13196. fontSize: t.fontSize,
  13197. // ========================= Selector =========================
  13198. [`${n}-selector`]: I(I({}, nn(t)), {
  13199. display: "flex",
  13200. borderRadius: i,
  13201. [`${n}-selection-search`]: {
  13202. position: "absolute",
  13203. top: 0,
  13204. insetInlineStart: r,
  13205. insetInlineEnd: r,
  13206. bottom: 0,
  13207. "&-input": {
  13208. width: "100%"
  13209. }
  13210. },
  13211. [`
  13212. ${n}-selection-item,
  13213. ${n}-selection-placeholder
  13214. `]: {
  13215. padding: 0,
  13216. lineHeight: `${a}px`,
  13217. transition: `all ${t.motionDurationSlow}`,
  13218. // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
  13219. "@supports (-moz-appearance: meterbar)": {
  13220. lineHeight: `${a}px`
  13221. }
  13222. },
  13223. [`${n}-selection-item`]: {
  13224. position: "relative",
  13225. userSelect: "none"
  13226. },
  13227. [`${n}-selection-placeholder`]: {
  13228. transition: "none",
  13229. pointerEvents: "none"
  13230. },
  13231. // For common baseline align
  13232. [[
  13233. "&:after",
  13234. /* For '' value baseline align */
  13235. `${n}-selection-item:after`,
  13236. /* For undefined value baseline align */
  13237. `${n}-selection-placeholder:after`
  13238. ].join(",")]: {
  13239. display: "inline-block",
  13240. width: 0,
  13241. visibility: "hidden",
  13242. content: '"\\a0"'
  13243. }
  13244. }),
  13245. [`
  13246. &${n}-show-arrow ${n}-selection-item,
  13247. &${n}-show-arrow ${n}-selection-placeholder
  13248. `]: {
  13249. paddingInlineEnd: o
  13250. },
  13251. // Opacity selection if open
  13252. [`&${n}-open ${n}-selection-item`]: {
  13253. color: t.colorTextPlaceholder
  13254. },
  13255. // ========================== Input ==========================
  13256. // We only change the style of non-customize input which is only support by `combobox` mode.
  13257. // Not customize
  13258. [`&:not(${n}-customize-input)`]: {
  13259. [`${n}-selector`]: {
  13260. width: "100%",
  13261. height: t.controlHeight,
  13262. padding: `0 ${r}px`,
  13263. [`${n}-selection-search-input`]: {
  13264. height: a
  13265. },
  13266. "&:after": {
  13267. lineHeight: `${a}px`
  13268. }
  13269. }
  13270. },
  13271. [`&${n}-customize-input`]: {
  13272. [`${n}-selector`]: {
  13273. "&:after": {
  13274. display: "none"
  13275. },
  13276. [`${n}-selection-search`]: {
  13277. position: "static",
  13278. width: "100%"
  13279. },
  13280. [`${n}-selection-placeholder`]: {
  13281. position: "absolute",
  13282. insetInlineStart: 0,
  13283. insetInlineEnd: 0,
  13284. padding: `0 ${r}px`,
  13285. "&:after": {
  13286. display: "none"
  13287. }
  13288. }
  13289. }
  13290. }
  13291. }
  13292. };
  13293. }
  13294. function T_e(t) {
  13295. const {
  13296. componentCls: e
  13297. } = t, n = t.controlPaddingHorizontalSM - t.lineWidth;
  13298. return [
  13299. OC(t),
  13300. // ======================== Small ========================
  13301. // Shared
  13302. OC(Bt(t, {
  13303. controlHeight: t.controlHeightSM,
  13304. borderRadius: t.borderRadiusSM
  13305. }), "sm"),
  13306. // padding
  13307. {
  13308. [`${e}-single${e}-sm`]: {
  13309. [`&:not(${e}-customize-input)`]: {
  13310. [`${e}-selection-search`]: {
  13311. insetInlineStart: n,
  13312. insetInlineEnd: n
  13313. },
  13314. [`${e}-selector`]: {
  13315. padding: `0 ${n}px`
  13316. },
  13317. // With arrow should provides `padding-right` to show the arrow
  13318. [`&${e}-show-arrow ${e}-selection-search`]: {
  13319. insetInlineEnd: n + t.fontSize * 1.5
  13320. },
  13321. [`
  13322. &${e}-show-arrow ${e}-selection-item,
  13323. &${e}-show-arrow ${e}-selection-placeholder
  13324. `]: {
  13325. paddingInlineEnd: t.fontSize * 1.5
  13326. }
  13327. }
  13328. }
  13329. },
  13330. // ======================== Large ========================
  13331. // Shared
  13332. OC(Bt(t, {
  13333. controlHeight: t.controlHeightLG,
  13334. fontSize: t.fontSizeLG,
  13335. borderRadius: t.borderRadiusLG
  13336. }), "lg")
  13337. ];
  13338. }
  13339. function P_e(t, e, n) {
  13340. const {
  13341. focusElCls: r,
  13342. focus: i,
  13343. borderElCls: a
  13344. } = n, o = a ? "> *" : "", s = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((l) => `&:${l} ${o}`).join(",");
  13345. return {
  13346. [`&-item:not(${e}-last-item)`]: {
  13347. marginInlineEnd: -t.lineWidth
  13348. },
  13349. "&-item": I(I({
  13350. [s]: {
  13351. zIndex: 2
  13352. }
  13353. }, r ? {
  13354. [`&${r}`]: {
  13355. zIndex: 2
  13356. }
  13357. } : {}), {
  13358. [`&[disabled] ${o}`]: {
  13359. zIndex: 0
  13360. }
  13361. })
  13362. };
  13363. }
  13364. function $_e(t, e, n) {
  13365. const {
  13366. borderElCls: r
  13367. } = n, i = r ? `> ${r}` : "";
  13368. return {
  13369. [`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]: {
  13370. borderRadius: 0
  13371. },
  13372. [`&-item:not(${e}-last-item)${e}-first-item`]: {
  13373. [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
  13374. borderStartEndRadius: 0,
  13375. borderEndEndRadius: 0
  13376. }
  13377. },
  13378. [`&-item:not(${e}-first-item)${e}-last-item`]: {
  13379. [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
  13380. borderStartStartRadius: 0,
  13381. borderEndStartRadius: 0
  13382. }
  13383. }
  13384. };
  13385. }
  13386. function dx(t) {
  13387. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
  13388. focus: !0
  13389. };
  13390. const {
  13391. componentCls: n
  13392. } = t, r = `${n}-compact`;
  13393. return {
  13394. [r]: I(I({}, P_e(t, r, e)), $_e(n, r, e))
  13395. };
  13396. }
  13397. const A_e = (t) => {
  13398. const {
  13399. componentCls: e
  13400. } = t;
  13401. return {
  13402. position: "relative",
  13403. backgroundColor: t.colorBgContainer,
  13404. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  13405. transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
  13406. input: {
  13407. cursor: "pointer"
  13408. },
  13409. [`${e}-show-search&`]: {
  13410. cursor: "text",
  13411. input: {
  13412. cursor: "auto",
  13413. color: "inherit"
  13414. }
  13415. },
  13416. [`${e}-disabled&`]: {
  13417. color: t.colorTextDisabled,
  13418. background: t.colorBgContainerDisabled,
  13419. cursor: "not-allowed",
  13420. [`${e}-multiple&`]: {
  13421. background: t.colorBgContainerDisabled
  13422. },
  13423. input: {
  13424. cursor: "not-allowed"
  13425. }
  13426. }
  13427. };
  13428. }, SC = function(t, e) {
  13429. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  13430. const {
  13431. componentCls: r,
  13432. borderHoverColor: i,
  13433. outlineColor: a,
  13434. antCls: o
  13435. } = e, s = n ? {
  13436. [`${r}-selector`]: {
  13437. borderColor: i
  13438. }
  13439. } : {};
  13440. return {
  13441. [t]: {
  13442. [`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]: I(I({}, s), {
  13443. [`${r}-focused& ${r}-selector`]: {
  13444. borderColor: i,
  13445. boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${a}`,
  13446. borderInlineEndWidth: `${e.controlLineWidth}px !important`,
  13447. outline: 0
  13448. },
  13449. [`&:hover ${r}-selector`]: {
  13450. borderColor: i,
  13451. borderInlineEndWidth: `${e.controlLineWidth}px !important`
  13452. }
  13453. })
  13454. }
  13455. };
  13456. }, E_e = (t) => {
  13457. const {
  13458. componentCls: e
  13459. } = t;
  13460. return {
  13461. [`${e}-selection-search-input`]: {
  13462. margin: 0,
  13463. padding: 0,
  13464. background: "transparent",
  13465. border: "none",
  13466. outline: "none",
  13467. appearance: "none",
  13468. "&::-webkit-search-cancel-button": {
  13469. display: "none",
  13470. "-webkit-appearance": "none"
  13471. }
  13472. }
  13473. };
  13474. }, M_e = (t) => {
  13475. const {
  13476. componentCls: e,
  13477. inputPaddingHorizontalBase: n,
  13478. iconCls: r
  13479. } = t;
  13480. return {
  13481. [e]: I(I({}, nn(t)), {
  13482. position: "relative",
  13483. display: "inline-block",
  13484. cursor: "pointer",
  13485. [`&:not(${e}-customize-input) ${e}-selector`]: I(I({}, A_e(t)), E_e(t)),
  13486. // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
  13487. // ...genHoverStyle(token),
  13488. // },
  13489. // ======================== Selection ========================
  13490. [`${e}-selection-item`]: I({
  13491. flex: 1,
  13492. fontWeight: "normal"
  13493. }, Sh),
  13494. // ======================= Placeholder =======================
  13495. [`${e}-selection-placeholder`]: I(I({}, Sh), {
  13496. flex: 1,
  13497. color: t.colorTextPlaceholder,
  13498. pointerEvents: "none"
  13499. }),
  13500. // ========================== Arrow ==========================
  13501. [`${e}-arrow`]: I(I({}, up()), {
  13502. position: "absolute",
  13503. top: "50%",
  13504. insetInlineStart: "auto",
  13505. insetInlineEnd: n,
  13506. height: t.fontSizeIcon,
  13507. marginTop: -t.fontSizeIcon / 2,
  13508. color: t.colorTextQuaternary,
  13509. fontSize: t.fontSizeIcon,
  13510. lineHeight: 1,
  13511. textAlign: "center",
  13512. pointerEvents: "none",
  13513. display: "flex",
  13514. alignItems: "center",
  13515. [r]: {
  13516. verticalAlign: "top",
  13517. transition: `transform ${t.motionDurationSlow}`,
  13518. "> svg": {
  13519. verticalAlign: "top"
  13520. },
  13521. [`&:not(${e}-suffix)`]: {
  13522. pointerEvents: "auto"
  13523. }
  13524. },
  13525. [`${e}-disabled &`]: {
  13526. cursor: "not-allowed"
  13527. },
  13528. "> *:not(:last-child)": {
  13529. marginInlineEnd: 8
  13530. // FIXME: magic
  13531. }
  13532. }),
  13533. // ========================== Clear ==========================
  13534. [`${e}-clear`]: {
  13535. position: "absolute",
  13536. top: "50%",
  13537. insetInlineStart: "auto",
  13538. insetInlineEnd: n,
  13539. zIndex: 1,
  13540. display: "inline-block",
  13541. width: t.fontSizeIcon,
  13542. height: t.fontSizeIcon,
  13543. marginTop: -t.fontSizeIcon / 2,
  13544. color: t.colorTextQuaternary,
  13545. fontSize: t.fontSizeIcon,
  13546. fontStyle: "normal",
  13547. lineHeight: 1,
  13548. textAlign: "center",
  13549. textTransform: "none",
  13550. background: t.colorBgContainer,
  13551. cursor: "pointer",
  13552. opacity: 0,
  13553. transition: `color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,
  13554. textRendering: "auto",
  13555. "&:before": {
  13556. display: "block"
  13557. },
  13558. "&:hover": {
  13559. color: t.colorTextTertiary
  13560. }
  13561. },
  13562. "&:hover": {
  13563. [`${e}-clear`]: {
  13564. opacity: 1
  13565. }
  13566. }
  13567. }),
  13568. // ========================= Feedback ==========================
  13569. [`${e}-has-feedback`]: {
  13570. [`${e}-clear`]: {
  13571. insetInlineEnd: n + t.fontSize + t.paddingXXS
  13572. }
  13573. }
  13574. };
  13575. }, I_e = (t) => {
  13576. const {
  13577. componentCls: e
  13578. } = t;
  13579. return [
  13580. {
  13581. [e]: {
  13582. // ==================== BorderLess ====================
  13583. [`&-borderless ${e}-selector`]: {
  13584. backgroundColor: "transparent !important",
  13585. borderColor: "transparent !important",
  13586. boxShadow: "none !important"
  13587. },
  13588. // ==================== In Form ====================
  13589. [`&${e}-in-form-item`]: {
  13590. width: "100%"
  13591. }
  13592. }
  13593. },
  13594. // =====================================================
  13595. // == LTR ==
  13596. // =====================================================
  13597. // Base
  13598. M_e(t),
  13599. // Single
  13600. T_e(t),
  13601. // Multiple
  13602. C_e(t),
  13603. // Dropdown
  13604. w_e(t),
  13605. // =====================================================
  13606. // == RTL ==
  13607. // =====================================================
  13608. {
  13609. [`${e}-rtl`]: {
  13610. direction: "rtl"
  13611. }
  13612. },
  13613. // =====================================================
  13614. // == Status ==
  13615. // =====================================================
  13616. SC(e, Bt(t, {
  13617. borderHoverColor: t.colorPrimaryHover,
  13618. outlineColor: t.controlOutline
  13619. })),
  13620. SC(`${e}-status-error`, Bt(t, {
  13621. borderHoverColor: t.colorErrorHover,
  13622. outlineColor: t.colorErrorOutline
  13623. }), !0),
  13624. SC(`${e}-status-warning`, Bt(t, {
  13625. borderHoverColor: t.colorWarningHover,
  13626. outlineColor: t.colorWarningOutline
  13627. }), !0),
  13628. // =====================================================
  13629. // == Space Compact ==
  13630. // =====================================================
  13631. dx(t, {
  13632. borderElCls: `${e}-selector`,
  13633. focusElCls: `${e}-focused`
  13634. })
  13635. ];
  13636. }, D_e = Sn("Select", (t, e) => {
  13637. let {
  13638. rootPrefixCls: n
  13639. } = e;
  13640. const r = Bt(t, {
  13641. rootPrefixCls: n,
  13642. inputPaddingHorizontalBase: t.paddingSM - 1
  13643. });
  13644. return [I_e(r)];
  13645. }, (t) => ({
  13646. zIndexPopup: t.zIndexPopupBase + 50
  13647. })), R_e = () => I(I({}, or(HZ(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  13648. value: gn([Array, Object, String, Number]),
  13649. defaultValue: gn([Array, Object, String, Number]),
  13650. notFoundContent: Y.any,
  13651. suffixIcon: Y.any,
  13652. itemIcon: Y.any,
  13653. size: hn(),
  13654. mode: hn(),
  13655. bordered: nt(!0),
  13656. transitionName: String,
  13657. choiceTransitionName: hn(""),
  13658. popupClassName: String,
  13659. /** @deprecated Please use `popupClassName` instead */
  13660. dropdownClassName: String,
  13661. placement: hn(),
  13662. status: hn(),
  13663. "onUpdate:value": tt()
  13664. }), UN = "SECRET_COMBOBOX_MODE_DO_NOT_USE", di = te({
  13665. compatConfig: {
  13666. MODE: 3
  13667. },
  13668. name: "ASelect",
  13669. Option: RI,
  13670. OptGroup: kI,
  13671. inheritAttrs: !1,
  13672. props: sr(R_e(), {
  13673. listHeight: 256,
  13674. listItemHeight: 24
  13675. }),
  13676. SECRET_COMBOBOX_MODE_DO_NOT_USE: UN,
  13677. slots: Object,
  13678. setup(t, e) {
  13679. let {
  13680. attrs: n,
  13681. emit: r,
  13682. slots: i,
  13683. expose: a
  13684. } = e;
  13685. const o = U(), s = ls(), l = ao.useInject(), u = L(() => y0(l.status, t.status)), c = () => {
  13686. var Q;
  13687. (Q = o.value) === null || Q === void 0 || Q.focus();
  13688. }, f = () => {
  13689. var Q;
  13690. (Q = o.value) === null || Q === void 0 || Q.blur();
  13691. }, d = (Q) => {
  13692. var Z;
  13693. (Z = o.value) === null || Z === void 0 || Z.scrollTo(Q);
  13694. }, h = L(() => {
  13695. const {
  13696. mode: Q
  13697. } = t;
  13698. if (Q !== "combobox")
  13699. return Q === UN ? "combobox" : Q;
  13700. });
  13701. process.env.NODE_ENV !== "production" && Gi(!t.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
  13702. const {
  13703. prefixCls: p,
  13704. direction: v,
  13705. configProvider: g,
  13706. renderEmpty: m,
  13707. size: y,
  13708. getPrefixCls: b,
  13709. getPopupContainer: _,
  13710. disabled: O,
  13711. select: S
  13712. } = It("select", t), {
  13713. compactSize: x,
  13714. compactItemClassnames: C
  13715. } = ux(p, v), T = L(() => x.value || y.value), w = Jo(), P = L(() => {
  13716. var Q;
  13717. return (Q = O.value) !== null && Q !== void 0 ? Q : w.value;
  13718. }), [$, A] = D_e(p), D = L(() => b()), E = L(() => t.placement !== void 0 ? t.placement : v.value === "rtl" ? "bottomRight" : "bottomLeft"), R = L(() => ts(D.value, yve(E.value), t.transitionName)), N = L(() => ye({
  13719. [`${p.value}-lg`]: T.value === "large",
  13720. [`${p.value}-sm`]: T.value === "small",
  13721. [`${p.value}-rtl`]: v.value === "rtl",
  13722. [`${p.value}-borderless`]: !t.bordered,
  13723. [`${p.value}-in-form-item`]: l.isFormItemInput
  13724. }, Ds(p.value, u.value, l.hasFeedback), C.value, A.value)), V = function() {
  13725. for (var Q = arguments.length, Z = new Array(Q), ne = 0; ne < Q; ne++)
  13726. Z[ne] = arguments[ne];
  13727. r("update:value", Z[0]), r("change", ...Z), s.onFieldChange();
  13728. }, B = (Q) => {
  13729. r("blur", Q), s.onFieldBlur();
  13730. };
  13731. a({
  13732. blur: f,
  13733. focus: c,
  13734. scrollTo: d
  13735. });
  13736. const W = L(() => h.value === "multiple" || h.value === "tags"), F = L(() => t.showArrow !== void 0 ? t.showArrow : t.loading || !(W.value || h.value === "combobox"));
  13737. return () => {
  13738. var Q, Z, ne, ee;
  13739. const {
  13740. notFoundContent: oe,
  13741. listHeight: K = 256,
  13742. listItemHeight: ie = 24,
  13743. popupClassName: X,
  13744. dropdownClassName: H,
  13745. virtual: G,
  13746. dropdownMatchSelectWidth: re,
  13747. id: fe = s.id.value,
  13748. placeholder: de = (Q = i.placeholder) === null || Q === void 0 ? void 0 : Q.call(i),
  13749. showArrow: Ee
  13750. } = t, {
  13751. hasFeedback: $e,
  13752. feedbackIcon: Se
  13753. } = l;
  13754. let be;
  13755. oe !== void 0 ? be = oe : i.notFoundContent ? be = i.notFoundContent() : h.value === "combobox" ? be = null : be = (m == null ? void 0 : m("Select")) || M(fI, {
  13756. componentName: "Select"
  13757. }, null);
  13758. const {
  13759. suffixIcon: he,
  13760. itemIcon: Te,
  13761. removeIcon: ze,
  13762. clearIcon: ut
  13763. } = Rme(I(I({}, t), {
  13764. multiple: W.value,
  13765. prefixCls: p.value,
  13766. hasFeedback: $e,
  13767. feedbackIcon: Se,
  13768. showArrow: F.value
  13769. }), i), ct = or(t, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Dt = ye(X || H, {
  13770. [`${p.value}-dropdown-${v.value}`]: v.value === "rtl"
  13771. }, A.value);
  13772. return $(M(Vge, j(j(j({
  13773. ref: o,
  13774. virtual: G,
  13775. dropdownMatchSelectWidth: re
  13776. }, ct), n), {}, {
  13777. showSearch: (Z = t.showSearch) !== null && Z !== void 0 ? Z : (ne = S == null ? void 0 : S.value) === null || ne === void 0 ? void 0 : ne.showSearch,
  13778. placeholder: de,
  13779. listHeight: K,
  13780. listItemHeight: ie,
  13781. mode: h.value,
  13782. prefixCls: p.value,
  13783. direction: v.value,
  13784. inputIcon: he,
  13785. menuItemSelectedIcon: Te,
  13786. removeIcon: ze,
  13787. clearIcon: ut,
  13788. notFoundContent: be,
  13789. class: [N.value, n.class],
  13790. getPopupContainer: _ == null ? void 0 : _.value,
  13791. dropdownClassName: Dt,
  13792. onChange: V,
  13793. onBlur: B,
  13794. id: fe,
  13795. dropdownRender: ct.dropdownRender || i.dropdownRender,
  13796. transitionName: R.value,
  13797. children: (ee = i.default) === null || ee === void 0 ? void 0 : ee.call(i),
  13798. tagRender: t.tagRender || i.tagRender,
  13799. optionLabelRender: i.optionLabel,
  13800. maxTagPlaceholder: t.maxTagPlaceholder || i.maxTagPlaceholder,
  13801. showArrow: $e || Ee,
  13802. disabled: P.value
  13803. }), {
  13804. option: i.option
  13805. }));
  13806. };
  13807. }
  13808. });
  13809. di.install = function(t) {
  13810. return t.component(di.name, di), t.component(di.Option.displayName, di.Option), t.component(di.OptGroup.displayName, di.OptGroup), t;
  13811. };
  13812. const D1 = di.Option;
  13813. di.OptGroup;
  13814. var k_e = { 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" };
  13815. function XN(t) {
  13816. for (var e = 1; e < arguments.length; e++) {
  13817. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13818. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13819. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13820. }))), r.forEach(function(i) {
  13821. L_e(t, i, n[i]);
  13822. });
  13823. }
  13824. return t;
  13825. }
  13826. function L_e(t, e, n) {
  13827. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13828. }
  13829. var eD = function(e, n) {
  13830. var r = XN({}, e, n.attrs);
  13831. return M(lt, XN({}, r, {
  13832. icon: k_e
  13833. }), null);
  13834. };
  13835. eD.displayName = "CheckCircleOutlined";
  13836. eD.inheritAttrs = !1;
  13837. var N_e = { 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" };
  13838. function YN(t) {
  13839. for (var e = 1; e < arguments.length; e++) {
  13840. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13841. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13842. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13843. }))), r.forEach(function(i) {
  13844. B_e(t, i, n[i]);
  13845. });
  13846. }
  13847. return t;
  13848. }
  13849. function B_e(t, e, n) {
  13850. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13851. }
  13852. var tD = function(e, n) {
  13853. var r = YN({}, e, n.attrs);
  13854. return M(lt, YN({}, r, {
  13855. icon: N_e
  13856. }), null);
  13857. };
  13858. tD.displayName = "ExclamationCircleOutlined";
  13859. tD.inheritAttrs = !1;
  13860. var z_e = { 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" };
  13861. function qN(t) {
  13862. for (var e = 1; e < arguments.length; e++) {
  13863. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13864. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13865. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13866. }))), r.forEach(function(i) {
  13867. V_e(t, i, n[i]);
  13868. });
  13869. }
  13870. return t;
  13871. }
  13872. function V_e(t, e, n) {
  13873. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13874. }
  13875. var hx = function(e, n) {
  13876. var r = qN({}, e, n.attrs);
  13877. return M(lt, qN({}, r, {
  13878. icon: z_e
  13879. }), null);
  13880. };
  13881. hx.displayName = "InfoCircleOutlined";
  13882. hx.inheritAttrs = !1;
  13883. var F_e = { 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" };
  13884. function KN(t) {
  13885. for (var e = 1; e < arguments.length; e++) {
  13886. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13887. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13888. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13889. }))), r.forEach(function(i) {
  13890. W_e(t, i, n[i]);
  13891. });
  13892. }
  13893. return t;
  13894. }
  13895. function W_e(t, e, n) {
  13896. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13897. }
  13898. var nD = function(e, n) {
  13899. var r = KN({}, e, n.attrs);
  13900. return M(lt, KN({}, r, {
  13901. icon: F_e
  13902. }), null);
  13903. };
  13904. nD.displayName = "CloseCircleOutlined";
  13905. nD.inheritAttrs = !1;
  13906. var Q_e = { 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" };
  13907. function JN(t) {
  13908. for (var e = 1; e < arguments.length; e++) {
  13909. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13910. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13911. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13912. }))), r.forEach(function(i) {
  13913. H_e(t, i, n[i]);
  13914. });
  13915. }
  13916. return t;
  13917. }
  13918. function H_e(t, e, n) {
  13919. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13920. }
  13921. var Ou = function(e, n) {
  13922. var r = JN({}, e, n.attrs);
  13923. return M(lt, JN({}, r, {
  13924. icon: Q_e
  13925. }), null);
  13926. };
  13927. Ou.displayName = "CheckCircleFilled";
  13928. Ou.inheritAttrs = !1;
  13929. var G_e = { 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" };
  13930. function e5(t) {
  13931. for (var e = 1; e < arguments.length; e++) {
  13932. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13933. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13934. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13935. }))), r.forEach(function(i) {
  13936. j_e(t, i, n[i]);
  13937. });
  13938. }
  13939. return t;
  13940. }
  13941. function j_e(t, e, n) {
  13942. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13943. }
  13944. var Su = function(e, n) {
  13945. var r = e5({}, e, n.attrs);
  13946. return M(lt, e5({}, r, {
  13947. icon: G_e
  13948. }), null);
  13949. };
  13950. Su.displayName = "ExclamationCircleFilled";
  13951. Su.inheritAttrs = !1;
  13952. var Z_e = { 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" };
  13953. function t5(t) {
  13954. for (var e = 1; e < arguments.length; e++) {
  13955. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13956. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13957. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13958. }))), r.forEach(function(i) {
  13959. U_e(t, i, n[i]);
  13960. });
  13961. }
  13962. return t;
  13963. }
  13964. function U_e(t, e, n) {
  13965. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13966. }
  13967. var Df = function(e, n) {
  13968. var r = t5({}, e, n.attrs);
  13969. return M(lt, t5({}, r, {
  13970. icon: Z_e
  13971. }), null);
  13972. };
  13973. Df.displayName = "InfoCircleFilled";
  13974. Df.inheritAttrs = !1;
  13975. const Ay = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], X_e = (t) => ({
  13976. xs: `(max-width: ${t.screenXSMax}px)`,
  13977. sm: `(min-width: ${t.screenSM}px)`,
  13978. md: `(min-width: ${t.screenMD}px)`,
  13979. lg: `(min-width: ${t.screenLG}px)`,
  13980. xl: `(min-width: ${t.screenXL}px)`,
  13981. xxl: `(min-width: ${t.screenXXL}px)`,
  13982. xxxl: `{min-width: ${t.screenXXXL}px}`
  13983. });
  13984. function Y_e() {
  13985. const [, t] = cp();
  13986. return L(() => {
  13987. const e = X_e(t.value), n = /* @__PURE__ */ new Map();
  13988. let r = -1, i = {};
  13989. return {
  13990. matchHandlers: {},
  13991. dispatch(a) {
  13992. return i = a, n.forEach((o) => o(i)), n.size >= 1;
  13993. },
  13994. subscribe(a) {
  13995. return n.size || this.register(), r += 1, n.set(r, a), a(i), r;
  13996. },
  13997. unsubscribe(a) {
  13998. n.delete(a), n.size || this.unregister();
  13999. },
  14000. unregister() {
  14001. Object.keys(e).forEach((a) => {
  14002. const o = e[a], s = this.matchHandlers[o];
  14003. s == null || s.mql.removeListener(s == null ? void 0 : s.listener);
  14004. }), n.clear();
  14005. },
  14006. register() {
  14007. Object.keys(e).forEach((a) => {
  14008. const o = e[a], s = (u) => {
  14009. let {
  14010. matches: c
  14011. } = u;
  14012. this.dispatch(I(I({}, i), {
  14013. [a]: c
  14014. }));
  14015. }, l = window.matchMedia(o);
  14016. l.addListener(s), this.matchHandlers[o] = {
  14017. mql: l,
  14018. listener: s
  14019. }, s(l);
  14020. });
  14021. },
  14022. responsiveMap: e
  14023. };
  14024. });
  14025. }
  14026. const Ji = {
  14027. adjustX: 1,
  14028. adjustY: 1
  14029. }, ea = [0, 0], DU = {
  14030. left: {
  14031. points: ["cr", "cl"],
  14032. overflow: Ji,
  14033. offset: [-4, 0],
  14034. targetOffset: ea
  14035. },
  14036. right: {
  14037. points: ["cl", "cr"],
  14038. overflow: Ji,
  14039. offset: [4, 0],
  14040. targetOffset: ea
  14041. },
  14042. top: {
  14043. points: ["bc", "tc"],
  14044. overflow: Ji,
  14045. offset: [0, -4],
  14046. targetOffset: ea
  14047. },
  14048. bottom: {
  14049. points: ["tc", "bc"],
  14050. overflow: Ji,
  14051. offset: [0, 4],
  14052. targetOffset: ea
  14053. },
  14054. topLeft: {
  14055. points: ["bl", "tl"],
  14056. overflow: Ji,
  14057. offset: [0, -4],
  14058. targetOffset: ea
  14059. },
  14060. leftTop: {
  14061. points: ["tr", "tl"],
  14062. overflow: Ji,
  14063. offset: [-4, 0],
  14064. targetOffset: ea
  14065. },
  14066. topRight: {
  14067. points: ["br", "tr"],
  14068. overflow: Ji,
  14069. offset: [0, -4],
  14070. targetOffset: ea
  14071. },
  14072. rightTop: {
  14073. points: ["tl", "tr"],
  14074. overflow: Ji,
  14075. offset: [4, 0],
  14076. targetOffset: ea
  14077. },
  14078. bottomRight: {
  14079. points: ["tr", "br"],
  14080. overflow: Ji,
  14081. offset: [0, 4],
  14082. targetOffset: ea
  14083. },
  14084. rightBottom: {
  14085. points: ["bl", "br"],
  14086. overflow: Ji,
  14087. offset: [4, 0],
  14088. targetOffset: ea
  14089. },
  14090. bottomLeft: {
  14091. points: ["tl", "bl"],
  14092. overflow: Ji,
  14093. offset: [0, 4],
  14094. targetOffset: ea
  14095. },
  14096. leftBottom: {
  14097. points: ["br", "bl"],
  14098. overflow: Ji,
  14099. offset: [-4, 0],
  14100. targetOffset: ea
  14101. }
  14102. }, q_e = {
  14103. prefixCls: String,
  14104. id: String,
  14105. overlayInnerStyle: Y.any
  14106. }, K_e = te({
  14107. compatConfig: {
  14108. MODE: 3
  14109. },
  14110. name: "TooltipContent",
  14111. props: q_e,
  14112. setup(t, e) {
  14113. let {
  14114. slots: n
  14115. } = e;
  14116. return () => {
  14117. var r;
  14118. return M("div", {
  14119. class: `${t.prefixCls}-inner`,
  14120. id: t.id,
  14121. role: "tooltip",
  14122. style: t.overlayInnerStyle
  14123. }, [(r = n.overlay) === null || r === void 0 ? void 0 : r.call(n)]);
  14124. };
  14125. }
  14126. });
  14127. var J_e = function(t, e) {
  14128. var n = {};
  14129. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  14130. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  14131. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  14132. return n;
  14133. };
  14134. function n5() {
  14135. }
  14136. const e1e = te({
  14137. compatConfig: {
  14138. MODE: 3
  14139. },
  14140. name: "Tooltip",
  14141. inheritAttrs: !1,
  14142. props: {
  14143. trigger: Y.any.def(["hover"]),
  14144. defaultVisible: {
  14145. type: Boolean,
  14146. default: void 0
  14147. },
  14148. visible: {
  14149. type: Boolean,
  14150. default: void 0
  14151. },
  14152. placement: Y.string.def("right"),
  14153. transitionName: String,
  14154. animation: Y.any,
  14155. afterVisibleChange: Y.func.def(() => {
  14156. }),
  14157. overlayStyle: {
  14158. type: Object,
  14159. default: void 0
  14160. },
  14161. overlayClassName: String,
  14162. prefixCls: Y.string.def("rc-tooltip"),
  14163. mouseEnterDelay: Y.number.def(0.1),
  14164. mouseLeaveDelay: Y.number.def(0.1),
  14165. getPopupContainer: Function,
  14166. destroyTooltipOnHide: {
  14167. type: Boolean,
  14168. default: !1
  14169. },
  14170. align: Y.object.def(() => ({})),
  14171. arrowContent: Y.any.def(null),
  14172. tipId: String,
  14173. builtinPlacements: Y.object,
  14174. overlayInnerStyle: {
  14175. type: Object,
  14176. default: void 0
  14177. },
  14178. popupVisible: {
  14179. type: Boolean,
  14180. default: void 0
  14181. },
  14182. onVisibleChange: Function,
  14183. onPopupAlign: Function,
  14184. arrow: {
  14185. type: Boolean,
  14186. default: !0
  14187. }
  14188. },
  14189. setup(t, e) {
  14190. let {
  14191. slots: n,
  14192. attrs: r,
  14193. expose: i
  14194. } = e;
  14195. const a = ae(), o = () => {
  14196. const {
  14197. prefixCls: c,
  14198. tipId: f,
  14199. overlayInnerStyle: d
  14200. } = t;
  14201. return [t.arrow ? M("div", {
  14202. class: `${c}-arrow`,
  14203. key: "arrow"
  14204. }, [RS(n, t, "arrowContent")]) : null, M(K_e, {
  14205. key: "content",
  14206. prefixCls: c,
  14207. id: f,
  14208. overlayInnerStyle: d
  14209. }, {
  14210. overlay: n.overlay
  14211. })];
  14212. };
  14213. i({
  14214. getPopupDomNode: () => a.value.getPopupDomNode(),
  14215. triggerDOM: a,
  14216. forcePopupAlign: () => {
  14217. var c;
  14218. return (c = a.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
  14219. }
  14220. });
  14221. const l = ae(!1), u = ae(!1);
  14222. return ht(() => {
  14223. const {
  14224. destroyTooltipOnHide: c
  14225. } = t;
  14226. if (typeof c == "boolean")
  14227. l.value = c;
  14228. else if (c && typeof c == "object") {
  14229. const {
  14230. keepParent: f
  14231. } = c;
  14232. l.value = f === !0, u.value = f === !1;
  14233. }
  14234. }), () => {
  14235. const {
  14236. overlayClassName: c,
  14237. trigger: f,
  14238. mouseEnterDelay: d,
  14239. mouseLeaveDelay: h,
  14240. overlayStyle: p,
  14241. prefixCls: v,
  14242. afterVisibleChange: g,
  14243. transitionName: m,
  14244. animation: y,
  14245. placement: b,
  14246. align: _,
  14247. destroyTooltipOnHide: O,
  14248. defaultVisible: S
  14249. } = t, x = J_e(t, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), C = I({}, x);
  14250. t.visible !== void 0 && (C.popupVisible = t.visible);
  14251. const T = I(I(I({
  14252. popupClassName: c,
  14253. prefixCls: v,
  14254. action: f,
  14255. builtinPlacements: DU,
  14256. popupPlacement: b,
  14257. popupAlign: _,
  14258. afterPopupVisibleChange: g,
  14259. popupTransitionName: m,
  14260. popupAnimation: y,
  14261. defaultPopupVisible: S,
  14262. destroyPopupOnHide: l.value,
  14263. autoDestroy: u.value,
  14264. mouseLeaveDelay: h,
  14265. popupStyle: p,
  14266. mouseEnterDelay: d
  14267. }, C), r), {
  14268. onPopupVisibleChange: t.onVisibleChange || n5,
  14269. onPopupAlign: t.onPopupAlign || n5,
  14270. ref: a,
  14271. arrow: !!t.arrow,
  14272. popup: o()
  14273. });
  14274. return M(ex, T, {
  14275. default: n.default
  14276. });
  14277. };
  14278. }
  14279. }), t1e = () => ({
  14280. trigger: [String, Array],
  14281. open: {
  14282. type: Boolean,
  14283. default: void 0
  14284. },
  14285. /** @deprecated Please use `open` instead. */
  14286. visible: {
  14287. type: Boolean,
  14288. default: void 0
  14289. },
  14290. placement: String,
  14291. color: String,
  14292. transitionName: String,
  14293. overlayStyle: $t(),
  14294. overlayInnerStyle: $t(),
  14295. overlayClassName: String,
  14296. openClassName: String,
  14297. prefixCls: String,
  14298. mouseEnterDelay: Number,
  14299. mouseLeaveDelay: Number,
  14300. getPopupContainer: Function,
  14301. /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
  14302. arrowPointAtCenter: {
  14303. type: Boolean,
  14304. default: void 0
  14305. },
  14306. arrow: {
  14307. type: [Boolean, Object],
  14308. default: !0
  14309. },
  14310. autoAdjustOverflow: {
  14311. type: [Boolean, Object],
  14312. default: void 0
  14313. },
  14314. destroyTooltipOnHide: {
  14315. type: Boolean,
  14316. default: void 0
  14317. },
  14318. align: $t(),
  14319. builtinPlacements: $t(),
  14320. children: Array,
  14321. /** @deprecated Please use `onOpenChange` instead. */
  14322. onVisibleChange: Function,
  14323. /** @deprecated Please use `onUpdate:open` instead. */
  14324. "onUpdate:visible": Function,
  14325. onOpenChange: Function,
  14326. "onUpdate:open": Function
  14327. }), n1e = {
  14328. adjustX: 1,
  14329. adjustY: 1
  14330. }, r5 = {
  14331. adjustX: 0,
  14332. adjustY: 0
  14333. }, r1e = [0, 0];
  14334. function i5(t) {
  14335. return typeof t == "boolean" ? t ? n1e : r5 : I(I({}, r5), t);
  14336. }
  14337. function i1e(t) {
  14338. const {
  14339. arrowWidth: e = 4,
  14340. horizontalArrowShift: n = 16,
  14341. verticalArrowShift: r = 8,
  14342. autoAdjustOverflow: i,
  14343. arrowPointAtCenter: a
  14344. } = t, o = {
  14345. left: {
  14346. points: ["cr", "cl"],
  14347. offset: [-4, 0]
  14348. },
  14349. right: {
  14350. points: ["cl", "cr"],
  14351. offset: [4, 0]
  14352. },
  14353. top: {
  14354. points: ["bc", "tc"],
  14355. offset: [0, -4]
  14356. },
  14357. bottom: {
  14358. points: ["tc", "bc"],
  14359. offset: [0, 4]
  14360. },
  14361. topLeft: {
  14362. points: ["bl", "tc"],
  14363. offset: [-(n + e), -4]
  14364. },
  14365. leftTop: {
  14366. points: ["tr", "cl"],
  14367. offset: [-4, -(r + e)]
  14368. },
  14369. topRight: {
  14370. points: ["br", "tc"],
  14371. offset: [n + e, -4]
  14372. },
  14373. rightTop: {
  14374. points: ["tl", "cr"],
  14375. offset: [4, -(r + e)]
  14376. },
  14377. bottomRight: {
  14378. points: ["tr", "bc"],
  14379. offset: [n + e, 4]
  14380. },
  14381. rightBottom: {
  14382. points: ["bl", "cr"],
  14383. offset: [4, r + e]
  14384. },
  14385. bottomLeft: {
  14386. points: ["tl", "bc"],
  14387. offset: [-(n + e), 4]
  14388. },
  14389. leftBottom: {
  14390. points: ["br", "cl"],
  14391. offset: [-4, r + e]
  14392. }
  14393. };
  14394. return Object.keys(o).forEach((s) => {
  14395. o[s] = a ? I(I({}, o[s]), {
  14396. overflow: i5(i),
  14397. targetOffset: r1e
  14398. }) : I(I({}, DU[s]), {
  14399. overflow: i5(i)
  14400. }), o[s].ignoreShake = !0;
  14401. }), o;
  14402. }
  14403. function RU() {
  14404. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  14405. for (let e = 0, n = t.length; e < n; e++)
  14406. if (t[e] !== void 0)
  14407. return t[e];
  14408. }
  14409. const a1e = O1.map((t) => `${t}-inverse`);
  14410. function o1e(t) {
  14411. return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...a1e, ...O1].includes(t) : O1.includes(t);
  14412. }
  14413. function s1e(t, e) {
  14414. const n = o1e(e), r = ye({
  14415. [`${t}-${e}`]: e && n
  14416. }), i = {}, a = {};
  14417. return e && !n && (i.background = e, a["--antd-arrow-background-color"] = e), {
  14418. className: r,
  14419. overlayStyle: i,
  14420. arrowStyle: a
  14421. };
  14422. }
  14423. function Ey(t) {
  14424. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  14425. return t.map((n) => `${e}${n}`).join(",");
  14426. }
  14427. const kU = 8;
  14428. function l1e(t) {
  14429. const e = kU, {
  14430. sizePopupArrow: n,
  14431. contentRadius: r,
  14432. borderRadiusOuter: i,
  14433. limitVerticalRadius: a
  14434. } = t, o = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), s = (r > 12 ? r + 2 : 12) - o, l = a ? e - o : s;
  14435. return {
  14436. dropdownArrowOffset: s,
  14437. dropdownArrowOffsetVertical: l
  14438. };
  14439. }
  14440. function u1e(t, e) {
  14441. const {
  14442. componentCls: n,
  14443. sizePopupArrow: r,
  14444. marginXXS: i,
  14445. borderRadiusXS: a,
  14446. borderRadiusOuter: o,
  14447. boxShadowPopoverArrow: s
  14448. } = t, {
  14449. colorBg: l,
  14450. showArrowCls: u,
  14451. contentRadius: c = t.borderRadiusLG,
  14452. limitVerticalRadius: f
  14453. } = e, {
  14454. dropdownArrowOffsetVertical: d,
  14455. dropdownArrowOffset: h
  14456. } = l1e({
  14457. sizePopupArrow: r,
  14458. contentRadius: c,
  14459. borderRadiusOuter: o,
  14460. limitVerticalRadius: f
  14461. }), p = r / 2 + i;
  14462. return {
  14463. [n]: {
  14464. // ============================ Basic ============================
  14465. [`${n}-arrow`]: [I(I({
  14466. position: "absolute",
  14467. zIndex: 1,
  14468. display: "block"
  14469. }, yfe(r, a, o, l, s)), {
  14470. "&:before": {
  14471. background: l
  14472. }
  14473. })],
  14474. // ========================== Placement ==========================
  14475. // Here handle the arrow position and rotate stuff
  14476. // >>>>> Top
  14477. [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
  14478. bottom: 0,
  14479. transform: "translateY(100%) rotate(180deg)"
  14480. },
  14481. [`&-placement-top ${n}-arrow`]: {
  14482. left: {
  14483. _skip_check_: !0,
  14484. value: "50%"
  14485. },
  14486. transform: "translateX(-50%) translateY(100%) rotate(180deg)"
  14487. },
  14488. [`&-placement-topLeft ${n}-arrow`]: {
  14489. left: {
  14490. _skip_check_: !0,
  14491. value: h
  14492. }
  14493. },
  14494. [`&-placement-topRight ${n}-arrow`]: {
  14495. right: {
  14496. _skip_check_: !0,
  14497. value: h
  14498. }
  14499. },
  14500. // >>>>> Bottom
  14501. [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
  14502. top: 0,
  14503. transform: "translateY(-100%)"
  14504. },
  14505. [`&-placement-bottom ${n}-arrow`]: {
  14506. left: {
  14507. _skip_check_: !0,
  14508. value: "50%"
  14509. },
  14510. transform: "translateX(-50%) translateY(-100%)"
  14511. },
  14512. [`&-placement-bottomLeft ${n}-arrow`]: {
  14513. left: {
  14514. _skip_check_: !0,
  14515. value: h
  14516. }
  14517. },
  14518. [`&-placement-bottomRight ${n}-arrow`]: {
  14519. right: {
  14520. _skip_check_: !0,
  14521. value: h
  14522. }
  14523. },
  14524. // >>>>> Left
  14525. [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
  14526. right: {
  14527. _skip_check_: !0,
  14528. value: 0
  14529. },
  14530. transform: "translateX(100%) rotate(90deg)"
  14531. },
  14532. [`&-placement-left ${n}-arrow`]: {
  14533. top: {
  14534. _skip_check_: !0,
  14535. value: "50%"
  14536. },
  14537. transform: "translateY(-50%) translateX(100%) rotate(90deg)"
  14538. },
  14539. [`&-placement-leftTop ${n}-arrow`]: {
  14540. top: d
  14541. },
  14542. [`&-placement-leftBottom ${n}-arrow`]: {
  14543. bottom: d
  14544. },
  14545. // >>>>> Right
  14546. [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
  14547. left: {
  14548. _skip_check_: !0,
  14549. value: 0
  14550. },
  14551. transform: "translateX(-100%) rotate(-90deg)"
  14552. },
  14553. [`&-placement-right ${n}-arrow`]: {
  14554. top: {
  14555. _skip_check_: !0,
  14556. value: "50%"
  14557. },
  14558. transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
  14559. },
  14560. [`&-placement-rightTop ${n}-arrow`]: {
  14561. top: d
  14562. },
  14563. [`&-placement-rightBottom ${n}-arrow`]: {
  14564. bottom: d
  14565. },
  14566. // =========================== Offset ============================
  14567. // Offset the popover to account for the dropdown arrow
  14568. // >>>>> Top
  14569. [Ey(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14570. paddingBottom: p
  14571. },
  14572. // >>>>> Bottom
  14573. [Ey(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14574. paddingTop: p
  14575. },
  14576. // >>>>> Left
  14577. [Ey(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14578. paddingRight: {
  14579. _skip_check_: !0,
  14580. value: p
  14581. }
  14582. },
  14583. // >>>>> Right
  14584. [Ey(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14585. paddingLeft: {
  14586. _skip_check_: !0,
  14587. value: p
  14588. }
  14589. }
  14590. }
  14591. };
  14592. }
  14593. const c1e = (t) => {
  14594. const {
  14595. componentCls: e,
  14596. // ant-tooltip
  14597. tooltipMaxWidth: n,
  14598. tooltipColor: r,
  14599. tooltipBg: i,
  14600. tooltipBorderRadius: a,
  14601. zIndexPopup: o,
  14602. controlHeight: s,
  14603. boxShadowSecondary: l,
  14604. paddingSM: u,
  14605. paddingXS: c,
  14606. tooltipRadiusOuter: f
  14607. } = t;
  14608. return [
  14609. {
  14610. [e]: I(I(I(I({}, nn(t)), {
  14611. position: "absolute",
  14612. zIndex: o,
  14613. display: "block",
  14614. "&": [{
  14615. width: "max-content"
  14616. }, {
  14617. width: "intrinsic"
  14618. }],
  14619. maxWidth: n,
  14620. visibility: "visible",
  14621. "&-hidden": {
  14622. display: "none"
  14623. },
  14624. "--antd-arrow-background-color": i,
  14625. // Wrapper for the tooltip content
  14626. [`${e}-inner`]: {
  14627. minWidth: s,
  14628. minHeight: s,
  14629. padding: `${u / 2}px ${c}px`,
  14630. color: r,
  14631. textAlign: "start",
  14632. textDecoration: "none",
  14633. wordWrap: "break-word",
  14634. backgroundColor: i,
  14635. borderRadius: a,
  14636. boxShadow: l
  14637. },
  14638. // Limit left and right placement radius
  14639. [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
  14640. [`${e}-inner`]: {
  14641. borderRadius: Math.min(a, kU)
  14642. }
  14643. },
  14644. [`${e}-content`]: {
  14645. position: "relative"
  14646. }
  14647. }), bfe(t, (d, h) => {
  14648. let {
  14649. darkColor: p
  14650. } = h;
  14651. return {
  14652. [`&${e}-${d}`]: {
  14653. [`${e}-inner`]: {
  14654. backgroundColor: p
  14655. },
  14656. [`${e}-arrow`]: {
  14657. "--antd-arrow-background-color": p
  14658. }
  14659. }
  14660. };
  14661. })), {
  14662. // RTL
  14663. "&-rtl": {
  14664. direction: "rtl"
  14665. }
  14666. })
  14667. },
  14668. // Arrow Style
  14669. u1e(Bt(t, {
  14670. borderRadiusOuter: f
  14671. }), {
  14672. colorBg: "var(--antd-arrow-background-color)",
  14673. showArrowCls: "",
  14674. contentRadius: a,
  14675. limitVerticalRadius: !0
  14676. }),
  14677. // Pure Render
  14678. {
  14679. [`${e}-pure`]: {
  14680. position: "relative",
  14681. maxWidth: "none"
  14682. }
  14683. }
  14684. ];
  14685. }, f1e = (t, e) => Sn("Tooltip", (r) => {
  14686. if ((e == null ? void 0 : e.value) === !1)
  14687. return [];
  14688. const {
  14689. borderRadius: i,
  14690. colorTextLightSolid: a,
  14691. colorBgDefault: o,
  14692. borderRadiusOuter: s
  14693. } = r, l = Bt(r, {
  14694. // default variables
  14695. tooltipMaxWidth: 250,
  14696. tooltipColor: a,
  14697. tooltipBorderRadius: i,
  14698. tooltipBg: o,
  14699. tooltipRadiusOuter: s > 4 ? 4 : s
  14700. });
  14701. return [c1e(l), fx(r, "zoom-big-fast")];
  14702. }, (r) => {
  14703. let {
  14704. zIndexPopupBase: i,
  14705. colorBgSpotlight: a
  14706. } = r;
  14707. return {
  14708. zIndexPopup: i + 70,
  14709. colorBgDefault: a
  14710. };
  14711. })(t), d1e = (t, e) => {
  14712. const n = {}, r = I({}, t);
  14713. return e.forEach((i) => {
  14714. t && i in t && (n[i] = t[i], delete r[i]);
  14715. }), {
  14716. picked: n,
  14717. omitted: r
  14718. };
  14719. }, LU = () => I(I({}, t1e()), {
  14720. title: Y.any
  14721. }), h1e = te({
  14722. compatConfig: {
  14723. MODE: 3
  14724. },
  14725. name: "ATooltip",
  14726. inheritAttrs: !1,
  14727. props: sr(LU(), {
  14728. trigger: "hover",
  14729. align: {},
  14730. placement: "top",
  14731. mouseEnterDelay: 0.1,
  14732. mouseLeaveDelay: 0.1,
  14733. arrowPointAtCenter: !1,
  14734. autoAdjustOverflow: !0
  14735. }),
  14736. slots: Object,
  14737. // emits: ['update:visible', 'visibleChange'],
  14738. setup(t, e) {
  14739. let {
  14740. slots: n,
  14741. emit: r,
  14742. attrs: i,
  14743. expose: a
  14744. } = e;
  14745. process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((w) => {
  14746. let [P, $] = w;
  14747. Yr(t[P] === void 0, "Tooltip", `\`${P}\` is deprecated, please use \`${$}\` instead.`);
  14748. });
  14749. const {
  14750. prefixCls: o,
  14751. getPopupContainer: s,
  14752. direction: l,
  14753. rootPrefixCls: u
  14754. } = It("tooltip", t), c = L(() => {
  14755. var w;
  14756. return (w = t.open) !== null && w !== void 0 ? w : t.visible;
  14757. }), f = U(RU([t.open, t.visible])), d = U();
  14758. let h;
  14759. se(c, (w) => {
  14760. xt.cancel(h), h = xt(() => {
  14761. f.value = !!w;
  14762. });
  14763. });
  14764. const p = () => {
  14765. var w;
  14766. const P = (w = t.title) !== null && w !== void 0 ? w : n.title;
  14767. return !P && P !== 0;
  14768. }, v = (w) => {
  14769. const P = p();
  14770. c.value === void 0 && (f.value = P ? !1 : w), P || (r("update:visible", w), r("visibleChange", w), r("update:open", w), r("openChange", w));
  14771. };
  14772. a({
  14773. getPopupDomNode: () => d.value.getPopupDomNode(),
  14774. open: f,
  14775. forcePopupAlign: () => {
  14776. var w;
  14777. return (w = d.value) === null || w === void 0 ? void 0 : w.forcePopupAlign();
  14778. }
  14779. });
  14780. const m = L(() => {
  14781. var w;
  14782. const {
  14783. builtinPlacements: P,
  14784. autoAdjustOverflow: $,
  14785. arrow: A,
  14786. arrowPointAtCenter: D
  14787. } = t;
  14788. let E = D;
  14789. return typeof A == "object" && (E = (w = A.pointAtCenter) !== null && w !== void 0 ? w : D), P || i1e({
  14790. arrowPointAtCenter: E,
  14791. autoAdjustOverflow: $
  14792. });
  14793. }), y = (w) => w || w === "", b = (w) => {
  14794. const P = w.type;
  14795. if (typeof P == "object" && w.props && ((P.__ANT_BUTTON === !0 || P === "button") && y(w.props.disabled) || P.__ANT_SWITCH === !0 && (y(w.props.disabled) || y(w.props.loading)) || P.__ANT_RADIO === !0 && y(w.props.disabled))) {
  14796. const {
  14797. picked: $,
  14798. omitted: A
  14799. } = d1e(kue(w), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), D = I(I({
  14800. display: "inline-block"
  14801. }, $), {
  14802. cursor: "not-allowed",
  14803. lineHeight: 1,
  14804. width: w.props && w.props.block ? "100%" : void 0
  14805. }), E = I(I({}, A), {
  14806. pointerEvents: "none"
  14807. }), R = Pn(w, {
  14808. style: E
  14809. }, !0);
  14810. return M("span", {
  14811. style: D,
  14812. class: `${o.value}-disabled-compatible-wrapper`
  14813. }, [R]);
  14814. }
  14815. return w;
  14816. }, _ = () => {
  14817. var w, P;
  14818. return (w = t.title) !== null && w !== void 0 ? w : (P = n.title) === null || P === void 0 ? void 0 : P.call(n);
  14819. }, O = (w, P) => {
  14820. const $ = m.value, A = Object.keys($).find((D) => {
  14821. var E, R;
  14822. return $[D].points[0] === ((E = P.points) === null || E === void 0 ? void 0 : E[0]) && $[D].points[1] === ((R = P.points) === null || R === void 0 ? void 0 : R[1]);
  14823. });
  14824. if (A) {
  14825. const D = w.getBoundingClientRect(), E = {
  14826. top: "50%",
  14827. left: "50%"
  14828. };
  14829. A.indexOf("top") >= 0 || A.indexOf("Bottom") >= 0 ? E.top = `${D.height - P.offset[1]}px` : (A.indexOf("Top") >= 0 || A.indexOf("bottom") >= 0) && (E.top = `${-P.offset[1]}px`), A.indexOf("left") >= 0 || A.indexOf("Right") >= 0 ? E.left = `${D.width - P.offset[0]}px` : (A.indexOf("right") >= 0 || A.indexOf("Left") >= 0) && (E.left = `${-P.offset[0]}px`), w.style.transformOrigin = `${E.left} ${E.top}`;
  14830. }
  14831. }, S = L(() => s1e(o.value, t.color)), x = L(() => i["data-popover-inject"]), [C, T] = f1e(o, L(() => !x.value));
  14832. return () => {
  14833. var w, P;
  14834. const {
  14835. openClassName: $,
  14836. overlayClassName: A,
  14837. overlayStyle: D,
  14838. overlayInnerStyle: E
  14839. } = t;
  14840. let R = (P = ss((w = n.default) === null || w === void 0 ? void 0 : w.call(n))) !== null && P !== void 0 ? P : null;
  14841. R = R.length === 1 ? R[0] : R;
  14842. let N = f.value;
  14843. if (c.value === void 0 && p() && (N = !1), !R)
  14844. return null;
  14845. const V = b(Yi(R) && !Lue(R) ? R : M("span", null, [R])), B = ye({
  14846. [$ || `${o.value}-open`]: !0,
  14847. [V.props && V.props.class]: V.props && V.props.class
  14848. }), W = ye(A, {
  14849. [`${o.value}-rtl`]: l.value === "rtl"
  14850. }, S.value.className, T.value), F = I(I({}, S.value.overlayStyle), E), Q = S.value.arrowStyle, Z = I(I(I({}, i), t), {
  14851. prefixCls: o.value,
  14852. arrow: !!t.arrow,
  14853. getPopupContainer: s == null ? void 0 : s.value,
  14854. builtinPlacements: m.value,
  14855. visible: N,
  14856. ref: d,
  14857. overlayClassName: W,
  14858. overlayStyle: I(I({}, Q), D),
  14859. overlayInnerStyle: F,
  14860. onVisibleChange: v,
  14861. onPopupAlign: O,
  14862. transitionName: ts(u.value, "zoom-big-fast", t.transitionName)
  14863. });
  14864. return C(M(e1e, Z, {
  14865. default: () => [f.value ? Pn(V, {
  14866. class: B
  14867. }) : V],
  14868. arrowContent: () => M("span", {
  14869. class: `${o.value}-arrow-content`
  14870. }, null),
  14871. overlay: _
  14872. }));
  14873. };
  14874. }
  14875. }), px = sp(h1e), Yf = {
  14876. adjustX: 1,
  14877. adjustY: 1
  14878. }, qf = [0, 0], p1e = {
  14879. topLeft: {
  14880. points: ["bl", "tl"],
  14881. overflow: Yf,
  14882. offset: [0, -4],
  14883. targetOffset: qf
  14884. },
  14885. topCenter: {
  14886. points: ["bc", "tc"],
  14887. overflow: Yf,
  14888. offset: [0, -4],
  14889. targetOffset: qf
  14890. },
  14891. topRight: {
  14892. points: ["br", "tr"],
  14893. overflow: Yf,
  14894. offset: [0, -4],
  14895. targetOffset: qf
  14896. },
  14897. bottomLeft: {
  14898. points: ["tl", "bl"],
  14899. overflow: Yf,
  14900. offset: [0, 4],
  14901. targetOffset: qf
  14902. },
  14903. bottomCenter: {
  14904. points: ["tc", "bc"],
  14905. overflow: Yf,
  14906. offset: [0, 4],
  14907. targetOffset: qf
  14908. },
  14909. bottomRight: {
  14910. points: ["tr", "br"],
  14911. overflow: Yf,
  14912. offset: [0, 4],
  14913. targetOffset: qf
  14914. }
  14915. };
  14916. var v1e = function(t, e) {
  14917. var n = {};
  14918. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  14919. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  14920. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  14921. return n;
  14922. };
  14923. const g1e = te({
  14924. compatConfig: {
  14925. MODE: 3
  14926. },
  14927. props: {
  14928. minOverlayWidthMatchTrigger: {
  14929. type: Boolean,
  14930. default: void 0
  14931. },
  14932. arrow: {
  14933. type: Boolean,
  14934. default: !1
  14935. },
  14936. prefixCls: Y.string.def("rc-dropdown"),
  14937. transitionName: String,
  14938. overlayClassName: Y.string.def(""),
  14939. openClassName: String,
  14940. animation: Y.any,
  14941. align: Y.object,
  14942. overlayStyle: {
  14943. type: Object,
  14944. default: void 0
  14945. },
  14946. placement: Y.string.def("bottomLeft"),
  14947. overlay: Y.any,
  14948. trigger: Y.oneOfType([Y.string, Y.arrayOf(Y.string)]).def("hover"),
  14949. alignPoint: {
  14950. type: Boolean,
  14951. default: void 0
  14952. },
  14953. showAction: Y.array,
  14954. hideAction: Y.array,
  14955. getPopupContainer: Function,
  14956. visible: {
  14957. type: Boolean,
  14958. default: void 0
  14959. },
  14960. defaultVisible: {
  14961. type: Boolean,
  14962. default: !1
  14963. },
  14964. mouseEnterDelay: Y.number.def(0.15),
  14965. mouseLeaveDelay: Y.number.def(0.1)
  14966. },
  14967. emits: ["visibleChange", "overlayClick"],
  14968. setup(t, e) {
  14969. let {
  14970. slots: n,
  14971. emit: r,
  14972. expose: i
  14973. } = e;
  14974. const a = U(!!t.visible);
  14975. se(() => t.visible, (h) => {
  14976. h !== void 0 && (a.value = h);
  14977. });
  14978. const o = U();
  14979. i({
  14980. triggerRef: o
  14981. });
  14982. const s = (h) => {
  14983. t.visible === void 0 && (a.value = !1), r("overlayClick", h);
  14984. }, l = (h) => {
  14985. t.visible === void 0 && (a.value = h), r("visibleChange", h);
  14986. }, u = () => {
  14987. var h;
  14988. const p = (h = n.overlay) === null || h === void 0 ? void 0 : h.call(n), v = {
  14989. prefixCls: `${t.prefixCls}-menu`,
  14990. onClick: s
  14991. };
  14992. return M(wt, {
  14993. key: rj
  14994. }, [t.arrow && M("div", {
  14995. class: `${t.prefixCls}-arrow`
  14996. }, null), Pn(p, v, !1)]);
  14997. }, c = L(() => {
  14998. const {
  14999. minOverlayWidthMatchTrigger: h = !t.alignPoint
  15000. } = t;
  15001. return h;
  15002. }), f = () => {
  15003. var h;
  15004. const p = (h = n.default) === null || h === void 0 ? void 0 : h.call(n);
  15005. return a.value && p ? Pn(p[0], {
  15006. class: t.openClassName || `${t.prefixCls}-open`
  15007. }, !1) : p;
  15008. }, d = L(() => !t.hideAction && t.trigger.indexOf("contextmenu") !== -1 ? ["click"] : t.hideAction);
  15009. return () => {
  15010. const {
  15011. prefixCls: h,
  15012. arrow: p,
  15013. showAction: v,
  15014. overlayStyle: g,
  15015. trigger: m,
  15016. placement: y,
  15017. align: b,
  15018. getPopupContainer: _,
  15019. transitionName: O,
  15020. animation: S,
  15021. overlayClassName: x
  15022. } = t, C = v1e(t, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
  15023. return M(ex, j(j({}, C), {}, {
  15024. prefixCls: h,
  15025. ref: o,
  15026. popupClassName: ye(x, {
  15027. [`${h}-show-arrow`]: p
  15028. }),
  15029. popupStyle: g,
  15030. builtinPlacements: p1e,
  15031. action: m,
  15032. showAction: v,
  15033. hideAction: d.value || [],
  15034. popupPlacement: y,
  15035. popupAlign: b,
  15036. popupTransitionName: O,
  15037. popupAnimation: S,
  15038. popupVisible: a.value,
  15039. stretch: c.value ? "minWidth" : "",
  15040. onPopupVisibleChange: l,
  15041. getPopupContainer: _
  15042. }), {
  15043. popup: u,
  15044. default: f
  15045. });
  15046. };
  15047. }
  15048. }), m1e = (t) => {
  15049. const {
  15050. componentCls: e,
  15051. colorPrimary: n
  15052. } = t;
  15053. return {
  15054. [e]: {
  15055. position: "absolute",
  15056. background: "transparent",
  15057. pointerEvents: "none",
  15058. boxSizing: "border-box",
  15059. color: `var(--wave-color, ${n})`,
  15060. boxShadow: "0 0 0 0 currentcolor",
  15061. opacity: 0.2,
  15062. // =================== Motion ===================
  15063. "&.wave-motion-appear": {
  15064. transition: [`box-shadow 0.4s ${t.motionEaseOutCirc}`, `opacity 2s ${t.motionEaseOutCirc}`].join(","),
  15065. "&-active": {
  15066. boxShadow: "0 0 0 6px currentcolor",
  15067. opacity: 0
  15068. }
  15069. }
  15070. }
  15071. };
  15072. }, y1e = Sn("Wave", (t) => [m1e(t)]);
  15073. function b1e(t) {
  15074. const e = (t || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  15075. return e && e[1] && e[2] && e[3] ? !(e[1] === e[2] && e[2] === e[3]) : !0;
  15076. }
  15077. function xC(t) {
  15078. return t && t !== "#fff" && t !== "#ffffff" && t !== "rgb(255, 255, 255)" && t !== "rgba(255, 255, 255, 1)" && b1e(t) && !/rgba\((?:\d*, ){3}0\)/.test(t) && // any transparent rgba color
  15079. t !== "transparent";
  15080. }
  15081. function _1e(t) {
  15082. const {
  15083. borderTopColor: e,
  15084. borderColor: n,
  15085. backgroundColor: r
  15086. } = getComputedStyle(t);
  15087. return xC(e) ? e : xC(n) ? n : xC(r) ? r : null;
  15088. }
  15089. function wC(t) {
  15090. return Number.isNaN(t) ? 0 : t;
  15091. }
  15092. const O1e = te({
  15093. props: {
  15094. target: $t(),
  15095. className: String
  15096. },
  15097. setup(t) {
  15098. const e = ae(null), [n, r] = fn(null), [i, a] = fn([]), [o, s] = fn(0), [l, u] = fn(0), [c, f] = fn(0), [d, h] = fn(0), [p, v] = fn(!1);
  15099. function g() {
  15100. const {
  15101. target: x
  15102. } = t, C = getComputedStyle(x);
  15103. r(_1e(x));
  15104. const T = C.position === "static", {
  15105. borderLeftWidth: w,
  15106. borderTopWidth: P
  15107. } = C;
  15108. s(T ? x.offsetLeft : wC(-parseFloat(w))), u(T ? x.offsetTop : wC(-parseFloat(P))), f(x.offsetWidth), h(x.offsetHeight);
  15109. const {
  15110. borderTopLeftRadius: $,
  15111. borderTopRightRadius: A,
  15112. borderBottomLeftRadius: D,
  15113. borderBottomRightRadius: E
  15114. } = C;
  15115. a([$, A, E, D].map((R) => wC(parseFloat(R))));
  15116. }
  15117. let m, y, b;
  15118. const _ = () => {
  15119. clearTimeout(b), xt.cancel(y), m == null || m.disconnect();
  15120. }, O = () => {
  15121. var x;
  15122. const C = (x = e.value) === null || x === void 0 ? void 0 : x.parentElement;
  15123. C && (lf(null, C), C.parentElement && C.parentElement.removeChild(C));
  15124. };
  15125. it(() => {
  15126. _(), b = setTimeout(() => {
  15127. O();
  15128. }, 5e3);
  15129. const {
  15130. target: x
  15131. } = t;
  15132. x && (y = xt(() => {
  15133. g(), v(!0);
  15134. }), typeof ResizeObserver < "u" && (m = new ResizeObserver(g), m.observe(x)));
  15135. }), yt(() => {
  15136. _();
  15137. });
  15138. const S = (x) => {
  15139. x.propertyName === "opacity" && O();
  15140. };
  15141. return () => {
  15142. if (!p.value)
  15143. return null;
  15144. const x = {
  15145. left: `${o.value}px`,
  15146. top: `${l.value}px`,
  15147. width: `${c.value}px`,
  15148. height: `${d.value}px`,
  15149. borderRadius: i.value.map((C) => `${C}px`).join(" ")
  15150. };
  15151. return n && (x["--wave-color"] = n.value), M(ho, {
  15152. appear: !0,
  15153. name: "wave-motion",
  15154. appearFromClass: "wave-motion-appear",
  15155. appearActiveClass: "wave-motion-appear",
  15156. appearToClass: "wave-motion-appear wave-motion-appear-active"
  15157. }, {
  15158. default: () => [M("div", {
  15159. ref: e,
  15160. class: t.className,
  15161. style: x,
  15162. onTransitionend: S
  15163. }, null)]
  15164. });
  15165. };
  15166. }
  15167. });
  15168. function S1e(t, e) {
  15169. const n = document.createElement("div");
  15170. n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", t == null || t.insertBefore(n, t == null ? void 0 : t.firstChild), lf(M(O1e, {
  15171. target: t,
  15172. className: e
  15173. }, null), n);
  15174. }
  15175. function x1e(t, e, n) {
  15176. function r() {
  15177. var i;
  15178. const a = Ts(t);
  15179. !((i = n == null ? void 0 : n.value) === null || i === void 0) && i.disabled || !a || S1e(a, e.value);
  15180. }
  15181. return r;
  15182. }
  15183. const w1e = te({
  15184. compatConfig: {
  15185. MODE: 3
  15186. },
  15187. name: "Wave",
  15188. props: {
  15189. disabled: Boolean
  15190. },
  15191. setup(t, e) {
  15192. let {
  15193. slots: n
  15194. } = e;
  15195. const r = vn(), {
  15196. prefixCls: i,
  15197. wave: a
  15198. } = It("wave", t), [, o] = y1e(i), s = x1e(r, L(() => ye(i.value, o.value)), a);
  15199. let l;
  15200. const u = () => {
  15201. Ts(r).removeEventListener("click", l, !0);
  15202. };
  15203. return it(() => {
  15204. se(() => t.disabled, () => {
  15205. u(), Tt(() => {
  15206. const c = Ts(r);
  15207. c == null || c.removeEventListener("click", l, !0), !(!c || c.nodeType !== 1 || t.disabled) && (l = (f) => {
  15208. f.target.tagName === "INPUT" || !mZ(f.target) || // No need wave
  15209. !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || s();
  15210. }, c.addEventListener("click", l, !0));
  15211. });
  15212. }, {
  15213. immediate: !0,
  15214. flush: "post"
  15215. });
  15216. }), yt(() => {
  15217. u();
  15218. }), () => {
  15219. var c;
  15220. return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
  15221. };
  15222. }
  15223. });
  15224. function NU(t) {
  15225. return t === "danger" ? {
  15226. danger: !0
  15227. } : {
  15228. type: t
  15229. };
  15230. }
  15231. const C1e = () => ({
  15232. prefixCls: String,
  15233. type: String,
  15234. htmlType: {
  15235. type: String,
  15236. default: "button"
  15237. },
  15238. shape: {
  15239. type: String
  15240. },
  15241. size: {
  15242. type: String
  15243. },
  15244. loading: {
  15245. type: [Boolean, Object],
  15246. default: () => !1
  15247. },
  15248. disabled: {
  15249. type: Boolean,
  15250. default: void 0
  15251. },
  15252. ghost: {
  15253. type: Boolean,
  15254. default: void 0
  15255. },
  15256. block: {
  15257. type: Boolean,
  15258. default: void 0
  15259. },
  15260. danger: {
  15261. type: Boolean,
  15262. default: void 0
  15263. },
  15264. icon: Y.any,
  15265. href: String,
  15266. target: String,
  15267. title: String,
  15268. onClick: y1(),
  15269. onMousedown: y1()
  15270. }), a5 = (t) => {
  15271. t && (t.style.width = "0px", t.style.opacity = "0", t.style.transform = "scale(0)");
  15272. }, o5 = (t) => {
  15273. Tt(() => {
  15274. t && (t.style.width = `${t.scrollWidth}px`, t.style.opacity = "1", t.style.transform = "scale(1)");
  15275. });
  15276. }, s5 = (t) => {
  15277. t && t.style && (t.style.width = null, t.style.opacity = null, t.style.transform = null);
  15278. }, T1e = te({
  15279. compatConfig: {
  15280. MODE: 3
  15281. },
  15282. name: "LoadingIcon",
  15283. props: {
  15284. prefixCls: String,
  15285. loading: [Boolean, Object],
  15286. existIcon: Boolean
  15287. },
  15288. setup(t) {
  15289. return () => {
  15290. const {
  15291. existIcon: e,
  15292. prefixCls: n,
  15293. loading: r
  15294. } = t;
  15295. if (e)
  15296. return M("span", {
  15297. class: `${n}-loading-icon`
  15298. }, [M(ns, null, null)]);
  15299. const i = !!r;
  15300. return M(ho, {
  15301. name: `${n}-loading-icon-motion`,
  15302. onBeforeEnter: a5,
  15303. onEnter: o5,
  15304. onAfterEnter: s5,
  15305. onBeforeLeave: o5,
  15306. onLeave: (a) => {
  15307. setTimeout(() => {
  15308. a5(a);
  15309. });
  15310. },
  15311. onAfterLeave: s5
  15312. }, {
  15313. default: () => [i ? M("span", {
  15314. class: `${n}-loading-icon`
  15315. }, [M(ns, null, null)]) : null]
  15316. });
  15317. };
  15318. }
  15319. }), l5 = (t, e) => ({
  15320. // Border
  15321. [`> span, > ${t}`]: {
  15322. "&:not(:last-child)": {
  15323. [`&, & > ${t}`]: {
  15324. "&:not(:disabled)": {
  15325. borderInlineEndColor: e
  15326. }
  15327. }
  15328. },
  15329. "&:not(:first-child)": {
  15330. [`&, & > ${t}`]: {
  15331. "&:not(:disabled)": {
  15332. borderInlineStartColor: e
  15333. }
  15334. }
  15335. }
  15336. }
  15337. }), P1e = (t) => {
  15338. const {
  15339. componentCls: e,
  15340. fontSize: n,
  15341. lineWidth: r,
  15342. colorPrimaryHover: i,
  15343. colorErrorHover: a
  15344. } = t;
  15345. return {
  15346. [`${e}-group`]: [
  15347. {
  15348. position: "relative",
  15349. display: "inline-flex",
  15350. // Border
  15351. [`> span, > ${e}`]: {
  15352. "&:not(:last-child)": {
  15353. [`&, & > ${e}`]: {
  15354. borderStartEndRadius: 0,
  15355. borderEndEndRadius: 0
  15356. }
  15357. },
  15358. "&:not(:first-child)": {
  15359. marginInlineStart: -r,
  15360. [`&, & > ${e}`]: {
  15361. borderStartStartRadius: 0,
  15362. borderEndStartRadius: 0
  15363. }
  15364. }
  15365. },
  15366. [e]: {
  15367. position: "relative",
  15368. zIndex: 1,
  15369. "&:hover,\n &:focus,\n &:active": {
  15370. zIndex: 2
  15371. },
  15372. "&[disabled]": {
  15373. zIndex: 0
  15374. }
  15375. },
  15376. [`${e}-icon-only`]: {
  15377. fontSize: n
  15378. }
  15379. },
  15380. // Border Color
  15381. l5(`${e}-primary`, i),
  15382. l5(`${e}-danger`, a)
  15383. ]
  15384. };
  15385. };
  15386. function $1e(t, e) {
  15387. return {
  15388. // border collapse
  15389. [`&-item:not(${e}-last-item)`]: {
  15390. marginBottom: -t.lineWidth
  15391. },
  15392. "&-item": {
  15393. "&:hover,&:focus,&:active": {
  15394. zIndex: 2
  15395. },
  15396. "&[disabled]": {
  15397. zIndex: 0
  15398. }
  15399. }
  15400. };
  15401. }
  15402. function A1e(t, e) {
  15403. return {
  15404. [`&-item:not(${e}-first-item):not(${e}-last-item)`]: {
  15405. borderRadius: 0
  15406. },
  15407. [`&-item${e}-first-item:not(${e}-last-item)`]: {
  15408. [`&, &${t}-sm, &${t}-lg`]: {
  15409. borderEndEndRadius: 0,
  15410. borderEndStartRadius: 0
  15411. }
  15412. },
  15413. [`&-item${e}-last-item:not(${e}-first-item)`]: {
  15414. [`&, &${t}-sm, &${t}-lg`]: {
  15415. borderStartStartRadius: 0,
  15416. borderStartEndRadius: 0
  15417. }
  15418. }
  15419. };
  15420. }
  15421. function E1e(t) {
  15422. const e = `${t.componentCls}-compact-vertical`;
  15423. return {
  15424. [e]: I(I({}, $1e(t, e)), A1e(t.componentCls, e))
  15425. };
  15426. }
  15427. const M1e = (t) => {
  15428. const {
  15429. componentCls: e,
  15430. iconCls: n
  15431. } = t;
  15432. return {
  15433. [e]: {
  15434. outline: "none",
  15435. position: "relative",
  15436. display: "inline-block",
  15437. fontWeight: 400,
  15438. whiteSpace: "nowrap",
  15439. textAlign: "center",
  15440. backgroundImage: "none",
  15441. backgroundColor: "transparent",
  15442. border: `${t.lineWidth}px ${t.lineType} transparent`,
  15443. cursor: "pointer",
  15444. transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
  15445. userSelect: "none",
  15446. touchAction: "manipulation",
  15447. lineHeight: t.lineHeight,
  15448. color: t.colorText,
  15449. "> span": {
  15450. display: "inline-block"
  15451. },
  15452. // Leave a space between icon and text.
  15453. [`> ${n} + span, > span + ${n}`]: {
  15454. marginInlineStart: t.marginXS
  15455. },
  15456. "> a": {
  15457. color: "currentColor"
  15458. },
  15459. "&:not(:disabled)": I({}, WS(t)),
  15460. // make `btn-icon-only` not too narrow
  15461. [`&-icon-only${e}-compact-item`]: {
  15462. flex: "none"
  15463. },
  15464. // Special styles for Primary Button
  15465. [`&-compact-item${e}-primary`]: {
  15466. [`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]: {
  15467. position: "relative",
  15468. "&:before": {
  15469. position: "absolute",
  15470. top: -t.lineWidth,
  15471. insetInlineStart: -t.lineWidth,
  15472. display: "inline-block",
  15473. width: t.lineWidth,
  15474. height: `calc(100% + ${t.lineWidth * 2}px)`,
  15475. backgroundColor: t.colorPrimaryHover,
  15476. content: '""'
  15477. }
  15478. }
  15479. },
  15480. // Special styles for Primary Button
  15481. "&-compact-vertical-item": {
  15482. [`&${e}-primary`]: {
  15483. [`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]: {
  15484. position: "relative",
  15485. "&:before": {
  15486. position: "absolute",
  15487. top: -t.lineWidth,
  15488. insetInlineStart: -t.lineWidth,
  15489. display: "inline-block",
  15490. width: `calc(100% + ${t.lineWidth * 2}px)`,
  15491. height: t.lineWidth,
  15492. backgroundColor: t.colorPrimaryHover,
  15493. content: '""'
  15494. }
  15495. }
  15496. }
  15497. }
  15498. }
  15499. };
  15500. }, Fs = (t, e) => ({
  15501. "&:not(:disabled)": {
  15502. "&:hover": t,
  15503. "&:active": e
  15504. }
  15505. }), I1e = (t) => ({
  15506. minWidth: t.controlHeight,
  15507. paddingInlineStart: 0,
  15508. paddingInlineEnd: 0,
  15509. borderRadius: "50%"
  15510. }), D1e = (t) => ({
  15511. borderRadius: t.controlHeight,
  15512. paddingInlineStart: t.controlHeight / 2,
  15513. paddingInlineEnd: t.controlHeight / 2
  15514. }), L2 = (t) => ({
  15515. cursor: "not-allowed",
  15516. borderColor: t.colorBorder,
  15517. color: t.colorTextDisabled,
  15518. backgroundColor: t.colorBgContainerDisabled,
  15519. boxShadow: "none"
  15520. }), R1 = (t, e, n, r, i, a, o) => ({
  15521. [`&${t}-background-ghost`]: I(I({
  15522. color: e || void 0,
  15523. backgroundColor: "transparent",
  15524. borderColor: n || void 0,
  15525. boxShadow: "none"
  15526. }, Fs(I({
  15527. backgroundColor: "transparent"
  15528. }, a), I({
  15529. backgroundColor: "transparent"
  15530. }, o))), {
  15531. "&:disabled": {
  15532. cursor: "not-allowed",
  15533. color: r || void 0,
  15534. borderColor: i || void 0
  15535. }
  15536. })
  15537. }), rD = (t) => ({
  15538. "&:disabled": I({}, L2(t))
  15539. }), BU = (t) => I({}, rD(t)), k1 = (t) => ({
  15540. "&:disabled": {
  15541. cursor: "not-allowed",
  15542. color: t.colorTextDisabled
  15543. }
  15544. }), zU = (t) => I(I(I(I(I({}, BU(t)), {
  15545. backgroundColor: t.colorBgContainer,
  15546. borderColor: t.colorBorder,
  15547. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`
  15548. }), Fs({
  15549. color: t.colorPrimaryHover,
  15550. borderColor: t.colorPrimaryHover
  15551. }, {
  15552. color: t.colorPrimaryActive,
  15553. borderColor: t.colorPrimaryActive
  15554. })), R1(t.componentCls, t.colorBgContainer, t.colorBgContainer, t.colorTextDisabled, t.colorBorder)), {
  15555. [`&${t.componentCls}-dangerous`]: I(I(I({
  15556. color: t.colorError,
  15557. borderColor: t.colorError
  15558. }, Fs({
  15559. color: t.colorErrorHover,
  15560. borderColor: t.colorErrorBorderHover
  15561. }, {
  15562. color: t.colorErrorActive,
  15563. borderColor: t.colorErrorActive
  15564. })), R1(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder)), rD(t))
  15565. }), R1e = (t) => I(I(I(I(I({}, BU(t)), {
  15566. color: t.colorTextLightSolid,
  15567. backgroundColor: t.colorPrimary,
  15568. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`
  15569. }), Fs({
  15570. color: t.colorTextLightSolid,
  15571. backgroundColor: t.colorPrimaryHover
  15572. }, {
  15573. color: t.colorTextLightSolid,
  15574. backgroundColor: t.colorPrimaryActive
  15575. })), R1(t.componentCls, t.colorPrimary, t.colorPrimary, t.colorTextDisabled, t.colorBorder, {
  15576. color: t.colorPrimaryHover,
  15577. borderColor: t.colorPrimaryHover
  15578. }, {
  15579. color: t.colorPrimaryActive,
  15580. borderColor: t.colorPrimaryActive
  15581. })), {
  15582. [`&${t.componentCls}-dangerous`]: I(I(I({
  15583. backgroundColor: t.colorError,
  15584. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`
  15585. }, Fs({
  15586. backgroundColor: t.colorErrorHover
  15587. }, {
  15588. backgroundColor: t.colorErrorActive
  15589. })), R1(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder, {
  15590. color: t.colorErrorHover,
  15591. borderColor: t.colorErrorHover
  15592. }, {
  15593. color: t.colorErrorActive,
  15594. borderColor: t.colorErrorActive
  15595. })), rD(t))
  15596. }), k1e = (t) => I(I({}, zU(t)), {
  15597. borderStyle: "dashed"
  15598. }), L1e = (t) => I(I(I({
  15599. color: t.colorLink
  15600. }, Fs({
  15601. color: t.colorLinkHover
  15602. }, {
  15603. color: t.colorLinkActive
  15604. })), k1(t)), {
  15605. [`&${t.componentCls}-dangerous`]: I(I({
  15606. color: t.colorError
  15607. }, Fs({
  15608. color: t.colorErrorHover
  15609. }, {
  15610. color: t.colorErrorActive
  15611. })), k1(t))
  15612. }), N1e = (t) => I(I(I({}, Fs({
  15613. color: t.colorText,
  15614. backgroundColor: t.colorBgTextHover
  15615. }, {
  15616. color: t.colorText,
  15617. backgroundColor: t.colorBgTextActive
  15618. })), k1(t)), {
  15619. [`&${t.componentCls}-dangerous`]: I(I({
  15620. color: t.colorError
  15621. }, k1(t)), Fs({
  15622. color: t.colorErrorHover,
  15623. backgroundColor: t.colorErrorBg
  15624. }, {
  15625. color: t.colorErrorHover,
  15626. backgroundColor: t.colorErrorBg
  15627. }))
  15628. }), B1e = (t) => I(I({}, L2(t)), {
  15629. [`&${t.componentCls}:hover`]: I({}, L2(t))
  15630. }), z1e = (t) => {
  15631. const {
  15632. componentCls: e
  15633. } = t;
  15634. return {
  15635. [`${e}-default`]: zU(t),
  15636. [`${e}-primary`]: R1e(t),
  15637. [`${e}-dashed`]: k1e(t),
  15638. [`${e}-link`]: L1e(t),
  15639. [`${e}-text`]: N1e(t),
  15640. [`${e}-disabled`]: B1e(t)
  15641. };
  15642. }, iD = function(t) {
  15643. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  15644. const {
  15645. componentCls: n,
  15646. iconCls: r,
  15647. controlHeight: i,
  15648. fontSize: a,
  15649. lineHeight: o,
  15650. lineWidth: s,
  15651. borderRadius: l,
  15652. buttonPaddingHorizontal: u
  15653. } = t, c = Math.max(0, (i - a * o) / 2 - s), f = u - s, d = `${n}-icon-only`;
  15654. return [
  15655. // Size
  15656. {
  15657. [`${n}${e}`]: {
  15658. fontSize: a,
  15659. height: i,
  15660. padding: `${c}px ${f}px`,
  15661. borderRadius: l,
  15662. [`&${d}`]: {
  15663. width: i,
  15664. paddingInlineStart: 0,
  15665. paddingInlineEnd: 0,
  15666. [`&${n}-round`]: {
  15667. width: "auto"
  15668. },
  15669. "> span": {
  15670. transform: "scale(1.143)"
  15671. // 14px -> 16px
  15672. }
  15673. },
  15674. // Loading
  15675. [`&${n}-loading`]: {
  15676. opacity: t.opacityLoading,
  15677. cursor: "default"
  15678. },
  15679. [`${n}-loading-icon`]: {
  15680. transition: `width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`
  15681. },
  15682. [`&:not(${d}) ${n}-loading-icon > ${r}`]: {
  15683. marginInlineEnd: t.marginXS
  15684. }
  15685. }
  15686. },
  15687. // Shape - patch prefixCls again to override solid border radius style
  15688. {
  15689. [`${n}${n}-circle${e}`]: I1e(t)
  15690. },
  15691. {
  15692. [`${n}${n}-round${e}`]: D1e(t)
  15693. }
  15694. ];
  15695. }, V1e = (t) => iD(t), F1e = (t) => {
  15696. const e = Bt(t, {
  15697. controlHeight: t.controlHeightSM,
  15698. padding: t.paddingXS,
  15699. buttonPaddingHorizontal: 8,
  15700. borderRadius: t.borderRadiusSM
  15701. });
  15702. return iD(e, `${t.componentCls}-sm`);
  15703. }, W1e = (t) => {
  15704. const e = Bt(t, {
  15705. controlHeight: t.controlHeightLG,
  15706. fontSize: t.fontSizeLG,
  15707. borderRadius: t.borderRadiusLG
  15708. });
  15709. return iD(e, `${t.componentCls}-lg`);
  15710. }, Q1e = (t) => {
  15711. const {
  15712. componentCls: e
  15713. } = t;
  15714. return {
  15715. [e]: {
  15716. [`&${e}-block`]: {
  15717. width: "100%"
  15718. }
  15719. }
  15720. };
  15721. }, H1e = Sn("Button", (t) => {
  15722. const {
  15723. controlTmpOutline: e,
  15724. paddingContentHorizontal: n
  15725. } = t, r = Bt(t, {
  15726. colorOutlineDefault: e,
  15727. buttonPaddingHorizontal: n
  15728. });
  15729. return [
  15730. // Shared
  15731. M1e(r),
  15732. // Size
  15733. F1e(r),
  15734. V1e(r),
  15735. W1e(r),
  15736. // Block
  15737. Q1e(r),
  15738. // Group (type, ghost, danger, disabled, loading)
  15739. z1e(r),
  15740. // Button Group
  15741. P1e(r),
  15742. // Space Compact
  15743. dx(t, {
  15744. focus: !1
  15745. }),
  15746. E1e(t)
  15747. ];
  15748. }), G1e = () => ({
  15749. prefixCls: String,
  15750. size: {
  15751. type: String
  15752. }
  15753. }), VU = zI(), N2 = te({
  15754. compatConfig: {
  15755. MODE: 3
  15756. },
  15757. name: "AButtonGroup",
  15758. props: G1e(),
  15759. setup(t, e) {
  15760. let {
  15761. slots: n
  15762. } = e;
  15763. const {
  15764. prefixCls: r,
  15765. direction: i
  15766. } = It("btn-group", t), [, , a] = cp();
  15767. VU.useProvide(tn({
  15768. size: L(() => t.size)
  15769. }));
  15770. const o = L(() => {
  15771. const {
  15772. size: s
  15773. } = t;
  15774. let l = "";
  15775. switch (s) {
  15776. case "large":
  15777. l = "lg";
  15778. break;
  15779. case "small":
  15780. l = "sm";
  15781. break;
  15782. case "middle":
  15783. case void 0:
  15784. break;
  15785. default:
  15786. Gi(!s, "Button.Group", "Invalid prop `size`.");
  15787. }
  15788. return {
  15789. [`${r.value}`]: !0,
  15790. [`${r.value}-${l}`]: l,
  15791. [`${r.value}-rtl`]: i.value === "rtl",
  15792. [a.value]: !0
  15793. };
  15794. });
  15795. return () => {
  15796. var s;
  15797. return M("div", {
  15798. class: o.value
  15799. }, [Yn((s = n.default) === null || s === void 0 ? void 0 : s.call(n))]);
  15800. };
  15801. }
  15802. }), u5 = /^[\u4e00-\u9fa5]{2}$/, c5 = u5.test.bind(u5);
  15803. function My(t) {
  15804. return t === "text" || t === "link";
  15805. }
  15806. const Xr = te({
  15807. compatConfig: {
  15808. MODE: 3
  15809. },
  15810. name: "AButton",
  15811. inheritAttrs: !1,
  15812. __ANT_BUTTON: !0,
  15813. props: sr(C1e(), {
  15814. type: "default"
  15815. }),
  15816. slots: Object,
  15817. // emits: ['click', 'mousedown'],
  15818. setup(t, e) {
  15819. let {
  15820. slots: n,
  15821. attrs: r,
  15822. emit: i,
  15823. expose: a
  15824. } = e;
  15825. const {
  15826. prefixCls: o,
  15827. autoInsertSpaceInButton: s,
  15828. direction: l,
  15829. size: u
  15830. } = It("btn", t), [c, f] = H1e(o), d = VU.useInject(), h = Jo(), p = L(() => {
  15831. var E;
  15832. return (E = t.disabled) !== null && E !== void 0 ? E : h.value;
  15833. }), v = ae(null), g = ae(void 0);
  15834. let m = !1;
  15835. const y = ae(!1), b = ae(!1), _ = L(() => s.value !== !1), {
  15836. compactSize: O,
  15837. compactItemClassnames: S
  15838. } = ux(o, l), x = L(() => typeof t.loading == "object" && t.loading.delay ? t.loading.delay || !0 : !!t.loading);
  15839. se(x, (E) => {
  15840. clearTimeout(g.value), typeof x.value == "number" ? g.value = setTimeout(() => {
  15841. y.value = E;
  15842. }, x.value) : y.value = E;
  15843. }, {
  15844. immediate: !0
  15845. });
  15846. const C = L(() => {
  15847. const {
  15848. type: E,
  15849. shape: R = "default",
  15850. ghost: N,
  15851. block: V,
  15852. danger: B
  15853. } = t, W = o.value, F = {
  15854. large: "lg",
  15855. small: "sm",
  15856. middle: void 0
  15857. }, Q = O.value || (d == null ? void 0 : d.size) || u.value, Z = Q && F[Q] || "";
  15858. return [S.value, {
  15859. [f.value]: !0,
  15860. [`${W}`]: !0,
  15861. [`${W}-${R}`]: R !== "default" && R,
  15862. [`${W}-${E}`]: E,
  15863. [`${W}-${Z}`]: Z,
  15864. [`${W}-loading`]: y.value,
  15865. [`${W}-background-ghost`]: N && !My(E),
  15866. [`${W}-two-chinese-chars`]: b.value && _.value,
  15867. [`${W}-block`]: V,
  15868. [`${W}-dangerous`]: !!B,
  15869. [`${W}-rtl`]: l.value === "rtl"
  15870. }];
  15871. }), T = () => {
  15872. const E = v.value;
  15873. if (!E || s.value === !1)
  15874. return;
  15875. const R = E.textContent;
  15876. m && c5(R) ? b.value || (b.value = !0) : b.value && (b.value = !1);
  15877. }, w = (E) => {
  15878. if (y.value || p.value) {
  15879. E.preventDefault();
  15880. return;
  15881. }
  15882. i("click", E);
  15883. }, P = (E) => {
  15884. i("mousedown", E);
  15885. }, $ = (E, R) => {
  15886. const N = R ? " " : "";
  15887. if (E.type === $S) {
  15888. let V = E.children.trim();
  15889. return c5(V) && (V = V.split("").join(N)), M("span", null, [V]);
  15890. }
  15891. return E;
  15892. };
  15893. return ht(() => {
  15894. Gi(!(t.ghost && My(t.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
  15895. }), it(T), ap(T), yt(() => {
  15896. g.value && clearTimeout(g.value);
  15897. }), a({
  15898. focus: () => {
  15899. var E;
  15900. (E = v.value) === null || E === void 0 || E.focus();
  15901. },
  15902. blur: () => {
  15903. var E;
  15904. (E = v.value) === null || E === void 0 || E.blur();
  15905. }
  15906. }), () => {
  15907. var E, R;
  15908. const {
  15909. icon: N = (E = n.icon) === null || E === void 0 ? void 0 : E.call(n)
  15910. } = t, V = Yn((R = n.default) === null || R === void 0 ? void 0 : R.call(n));
  15911. m = V.length === 1 && !N && !My(t.type);
  15912. const {
  15913. type: B,
  15914. htmlType: W,
  15915. href: F,
  15916. title: Q,
  15917. target: Z
  15918. } = t, ne = y.value ? "loading" : N, ee = I(I({}, r), {
  15919. title: Q,
  15920. disabled: p.value,
  15921. class: [C.value, r.class, {
  15922. [`${o.value}-icon-only`]: V.length === 0 && !!ne
  15923. }],
  15924. onClick: w,
  15925. onMousedown: P
  15926. });
  15927. p.value || delete ee.disabled;
  15928. const oe = N && !y.value ? N : M(T1e, {
  15929. existIcon: !!N,
  15930. prefixCls: o.value,
  15931. loading: !!y.value
  15932. }, null), K = V.map((X) => $(X, m && _.value));
  15933. if (F !== void 0)
  15934. return c(M("a", j(j({}, ee), {}, {
  15935. href: F,
  15936. target: Z,
  15937. ref: v
  15938. }), [oe, K]));
  15939. let ie = M("button", j(j({}, ee), {}, {
  15940. ref: v,
  15941. type: W
  15942. }), [oe, K]);
  15943. if (!My(B)) {
  15944. const X = /* @__PURE__ */ function() {
  15945. return ie;
  15946. }();
  15947. ie = M(w1e, {
  15948. ref: "wave",
  15949. disabled: !!y.value
  15950. }, {
  15951. default: () => [X]
  15952. });
  15953. }
  15954. return c(ie);
  15955. };
  15956. }
  15957. });
  15958. Xr.Group = N2;
  15959. Xr.install = function(t) {
  15960. return t.component(Xr.name, Xr), t.component(N2.name, N2), t;
  15961. };
  15962. var j1e = { 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" };
  15963. function f5(t) {
  15964. for (var e = 1; e < arguments.length; e++) {
  15965. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  15966. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  15967. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  15968. }))), r.forEach(function(i) {
  15969. Z1e(t, i, n[i]);
  15970. });
  15971. }
  15972. return t;
  15973. }
  15974. function Z1e(t, e, n) {
  15975. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  15976. }
  15977. var vx = function(e, n) {
  15978. var r = f5({}, e, n.attrs);
  15979. return M(lt, f5({}, r, {
  15980. icon: j1e
  15981. }), null);
  15982. };
  15983. vx.displayName = "EllipsisOutlined";
  15984. vx.inheritAttrs = !1;
  15985. var U1e = { 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" };
  15986. function d5(t) {
  15987. for (var e = 1; e < arguments.length; e++) {
  15988. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  15989. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  15990. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  15991. }))), r.forEach(function(i) {
  15992. X1e(t, i, n[i]);
  15993. });
  15994. }
  15995. return t;
  15996. }
  15997. function X1e(t, e, n) {
  15998. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  15999. }
  16000. var gx = function(e, n) {
  16001. var r = d5({}, e, n.attrs);
  16002. return M(lt, d5({}, r, {
  16003. icon: U1e
  16004. }), null);
  16005. };
  16006. gx.displayName = "RightOutlined";
  16007. gx.inheritAttrs = !1;
  16008. const FU = Symbol("OverrideContextKey"), WU = () => Ge(FU, void 0), Y1e = (t) => {
  16009. var e, n, r;
  16010. const {
  16011. prefixCls: i,
  16012. mode: a,
  16013. selectable: o,
  16014. validator: s,
  16015. onClick: l,
  16016. expandIcon: u
  16017. } = WU() || {};
  16018. pt(FU, {
  16019. prefixCls: L(() => {
  16020. var c, f;
  16021. return (f = (c = t.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : i == null ? void 0 : i.value;
  16022. }),
  16023. mode: L(() => {
  16024. var c, f;
  16025. return (f = (c = t.mode) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : a == null ? void 0 : a.value;
  16026. }),
  16027. selectable: L(() => {
  16028. var c, f;
  16029. return (f = (c = t.selectable) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : o == null ? void 0 : o.value;
  16030. }),
  16031. validator: (e = t.validator) !== null && e !== void 0 ? e : s,
  16032. onClick: (n = t.onClick) !== null && n !== void 0 ? n : l,
  16033. expandIcon: (r = t.expandIcon) !== null && r !== void 0 ? r : u == null ? void 0 : u.value
  16034. });
  16035. };
  16036. function q1e(t, e, n, r) {
  16037. let i;
  16038. if (i !== void 0)
  16039. return !!i;
  16040. if (t === e)
  16041. return !0;
  16042. if (typeof t != "object" || !t || typeof e != "object" || !e)
  16043. return !1;
  16044. const a = Object.keys(t), o = Object.keys(e);
  16045. if (a.length !== o.length)
  16046. return !1;
  16047. const s = Object.prototype.hasOwnProperty.bind(e);
  16048. for (let l = 0; l < a.length; l++) {
  16049. const u = a[l];
  16050. if (!s(u))
  16051. return !1;
  16052. const c = t[u], f = e[u];
  16053. if (i = void 0, i === !1 || i === void 0 && c !== f)
  16054. return !1;
  16055. }
  16056. return !0;
  16057. }
  16058. function Kp(t, e) {
  16059. return q1e(Ko(t), Ko(e));
  16060. }
  16061. const QU = Symbol("menuContextKey"), HU = (t) => {
  16062. pt(QU, t);
  16063. }, sl = () => Ge(QU), GU = Symbol("ForceRenderKey"), K1e = (t) => {
  16064. pt(GU, t);
  16065. }, jU = () => Ge(GU, !1), ZU = Symbol("menuFirstLevelContextKey"), UU = (t) => {
  16066. pt(ZU, t);
  16067. }, J1e = () => Ge(ZU, !0), L1 = te({
  16068. compatConfig: {
  16069. MODE: 3
  16070. },
  16071. name: "MenuContextProvider",
  16072. inheritAttrs: !1,
  16073. props: {
  16074. mode: {
  16075. type: String,
  16076. default: void 0
  16077. },
  16078. overflowDisabled: {
  16079. type: Boolean,
  16080. default: void 0
  16081. }
  16082. },
  16083. setup(t, e) {
  16084. let {
  16085. slots: n
  16086. } = e;
  16087. const r = sl(), i = I({}, r);
  16088. return t.mode !== void 0 && (i.mode = Nn(t, "mode")), t.overflowDisabled !== void 0 && (i.overflowDisabled = Nn(t, "overflowDisabled")), HU(i), () => {
  16089. var a;
  16090. return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
  16091. };
  16092. }
  16093. }), eOe = HU, tOe = Symbol("siderCollapsed"), Iy = "$$__vc-menu-more__key", XU = Symbol("KeyPathContext"), aD = () => Ge(XU, {
  16094. parentEventKeys: L(() => []),
  16095. parentKeys: L(() => []),
  16096. parentInfo: {}
  16097. }), nOe = (t, e, n) => {
  16098. const {
  16099. parentEventKeys: r,
  16100. parentKeys: i
  16101. } = aD(), a = L(() => [...r.value, t]), o = L(() => [...i.value, e]);
  16102. return pt(XU, {
  16103. parentEventKeys: a,
  16104. parentKeys: o,
  16105. parentInfo: n
  16106. }), o;
  16107. }, YU = Symbol("measure"), h5 = te({
  16108. compatConfig: {
  16109. MODE: 3
  16110. },
  16111. setup(t, e) {
  16112. let {
  16113. slots: n
  16114. } = e;
  16115. return pt(YU, !0), () => {
  16116. var r;
  16117. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  16118. };
  16119. }
  16120. }), oD = () => Ge(YU, !1), rOe = nOe;
  16121. function qU(t) {
  16122. const {
  16123. mode: e,
  16124. rtl: n,
  16125. inlineIndent: r
  16126. } = sl();
  16127. return L(() => e.value !== "inline" ? null : n.value ? {
  16128. paddingRight: `${t.value * r.value}px`
  16129. } : {
  16130. paddingLeft: `${t.value * r.value}px`
  16131. });
  16132. }
  16133. let iOe = 0;
  16134. const aOe = () => ({
  16135. id: String,
  16136. role: String,
  16137. disabled: Boolean,
  16138. danger: Boolean,
  16139. title: {
  16140. type: [String, Boolean],
  16141. default: void 0
  16142. },
  16143. icon: Y.any,
  16144. onMouseenter: Function,
  16145. onMouseleave: Function,
  16146. onClick: Function,
  16147. onKeydown: Function,
  16148. onFocus: Function,
  16149. // Internal user prop
  16150. originItemValue: $t()
  16151. }), Mh = te({
  16152. compatConfig: {
  16153. MODE: 3
  16154. },
  16155. name: "AMenuItem",
  16156. inheritAttrs: !1,
  16157. props: aOe(),
  16158. slots: Object,
  16159. setup(t, e) {
  16160. let {
  16161. slots: n,
  16162. emit: r,
  16163. attrs: i
  16164. } = e;
  16165. const a = vn(), o = oD(), s = typeof a.vnode.key == "symbol" ? String(a.vnode.key) : a.vnode.key;
  16166. Gi(typeof a.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(s)}"\` not support Symbol type`);
  16167. const l = `menu_item_${++iOe}_$$_${s}`, {
  16168. parentEventKeys: u,
  16169. parentKeys: c
  16170. } = aD(), {
  16171. prefixCls: f,
  16172. activeKeys: d,
  16173. disabled: h,
  16174. changeActiveKeys: p,
  16175. rtl: v,
  16176. inlineCollapsed: g,
  16177. siderCollapsed: m,
  16178. onItemClick: y,
  16179. selectedKeys: b,
  16180. registerMenuInfo: _,
  16181. unRegisterMenuInfo: O
  16182. } = sl(), S = J1e(), x = ae(!1), C = L(() => [...c.value, s]);
  16183. _(l, {
  16184. eventKey: l,
  16185. key: s,
  16186. parentEventKeys: u,
  16187. parentKeys: c,
  16188. isLeaf: !0
  16189. }), yt(() => {
  16190. O(l);
  16191. }), se(d, () => {
  16192. x.value = !!d.value.find((F) => F === s);
  16193. }, {
  16194. immediate: !0
  16195. });
  16196. const w = L(() => h.value || t.disabled), P = L(() => b.value.includes(s)), $ = L(() => {
  16197. const F = `${f.value}-item`;
  16198. return {
  16199. [`${F}`]: !0,
  16200. [`${F}-danger`]: t.danger,
  16201. [`${F}-active`]: x.value,
  16202. [`${F}-selected`]: P.value,
  16203. [`${F}-disabled`]: w.value
  16204. };
  16205. }), A = (F) => ({
  16206. key: s,
  16207. eventKey: l,
  16208. keyPath: C.value,
  16209. eventKeyPath: [...u.value, l],
  16210. domEvent: F,
  16211. item: I(I({}, t), i)
  16212. }), D = (F) => {
  16213. if (w.value)
  16214. return;
  16215. const Q = A(F);
  16216. r("click", F), y(Q);
  16217. }, E = (F) => {
  16218. w.value || (p(C.value), r("mouseenter", F));
  16219. }, R = (F) => {
  16220. w.value || (p([]), r("mouseleave", F));
  16221. }, N = (F) => {
  16222. if (r("keydown", F), F.which === ge.ENTER) {
  16223. const Q = A(F);
  16224. r("click", F), y(Q);
  16225. }
  16226. }, V = (F) => {
  16227. p(C.value), r("focus", F);
  16228. }, B = (F, Q) => {
  16229. const Z = M("span", {
  16230. class: `${f.value}-title-content`
  16231. }, [Q]);
  16232. return (!F || Yi(Q) && Q.type === "span") && Q && g.value && S && typeof Q == "string" ? M("div", {
  16233. class: `${f.value}-inline-collapsed-noicon`
  16234. }, [Q.charAt(0)]) : Z;
  16235. }, W = qU(L(() => C.value.length));
  16236. return () => {
  16237. var F, Q, Z, ne, ee;
  16238. if (o) return null;
  16239. const oe = (F = t.title) !== null && F !== void 0 ? F : (Q = n.title) === null || Q === void 0 ? void 0 : Q.call(n), K = Yn((Z = n.default) === null || Z === void 0 ? void 0 : Z.call(n)), ie = K.length;
  16240. let X = oe;
  16241. typeof oe > "u" ? X = S && ie ? K : "" : oe === !1 && (X = "");
  16242. const H = {
  16243. title: X
  16244. };
  16245. !m.value && !g.value && (H.title = null, H.open = !1);
  16246. const G = {};
  16247. t.role === "option" && (G["aria-selected"] = P.value);
  16248. const re = (ne = t.icon) !== null && ne !== void 0 ? ne : (ee = n.icon) === null || ee === void 0 ? void 0 : ee.call(n, t);
  16249. return M(px, j(j({}, H), {}, {
  16250. placement: v.value ? "left" : "right",
  16251. overlayClassName: `${f.value}-inline-collapsed-tooltip`
  16252. }), {
  16253. default: () => [M(Is.Item, j(j(j({
  16254. component: "li"
  16255. }, i), {}, {
  16256. id: t.id,
  16257. style: I(I({}, i.style || {}), W.value),
  16258. class: [$.value, {
  16259. [`${i.class}`]: !!i.class,
  16260. [`${f.value}-item-only-child`]: (re ? ie + 1 : ie) === 1
  16261. }],
  16262. role: t.role || "menuitem",
  16263. tabindex: t.disabled ? null : -1,
  16264. "data-menu-id": s,
  16265. "aria-disabled": t.disabled
  16266. }, G), {}, {
  16267. onMouseenter: E,
  16268. onMouseleave: R,
  16269. onClick: D,
  16270. onKeydown: N,
  16271. onFocus: V,
  16272. title: typeof oe == "string" ? oe : void 0
  16273. }), {
  16274. default: () => [Pn(typeof re == "function" ? re(t.originItemValue) : re, {
  16275. class: `${f.value}-item-icon`
  16276. }, !1), B(re, K)]
  16277. })]
  16278. });
  16279. };
  16280. }
  16281. }), Dl = {
  16282. adjustX: 1,
  16283. adjustY: 1
  16284. }, oOe = {
  16285. topLeft: {
  16286. points: ["bl", "tl"],
  16287. overflow: Dl,
  16288. offset: [0, -7]
  16289. },
  16290. bottomLeft: {
  16291. points: ["tl", "bl"],
  16292. overflow: Dl,
  16293. offset: [0, 7]
  16294. },
  16295. leftTop: {
  16296. points: ["tr", "tl"],
  16297. overflow: Dl,
  16298. offset: [-4, 0]
  16299. },
  16300. rightTop: {
  16301. points: ["tl", "tr"],
  16302. overflow: Dl,
  16303. offset: [4, 0]
  16304. }
  16305. }, sOe = {
  16306. topLeft: {
  16307. points: ["bl", "tl"],
  16308. overflow: Dl,
  16309. offset: [0, -7]
  16310. },
  16311. bottomLeft: {
  16312. points: ["tl", "bl"],
  16313. overflow: Dl,
  16314. offset: [0, 7]
  16315. },
  16316. rightTop: {
  16317. points: ["tr", "tl"],
  16318. overflow: Dl,
  16319. offset: [-4, 0]
  16320. },
  16321. leftTop: {
  16322. points: ["tl", "tr"],
  16323. overflow: Dl,
  16324. offset: [4, 0]
  16325. }
  16326. }, lOe = {
  16327. horizontal: "bottomLeft",
  16328. vertical: "rightTop",
  16329. "vertical-left": "rightTop",
  16330. "vertical-right": "leftTop"
  16331. }, p5 = te({
  16332. compatConfig: {
  16333. MODE: 3
  16334. },
  16335. name: "PopupTrigger",
  16336. inheritAttrs: !1,
  16337. props: {
  16338. prefixCls: String,
  16339. mode: String,
  16340. visible: Boolean,
  16341. // popup: React.ReactNode;
  16342. popupClassName: String,
  16343. popupOffset: Array,
  16344. disabled: Boolean,
  16345. onVisibleChange: Function
  16346. },
  16347. slots: Object,
  16348. emits: ["visibleChange"],
  16349. setup(t, e) {
  16350. let {
  16351. slots: n,
  16352. emit: r
  16353. } = e;
  16354. const i = ae(!1), {
  16355. getPopupContainer: a,
  16356. rtl: o,
  16357. subMenuOpenDelay: s,
  16358. subMenuCloseDelay: l,
  16359. builtinPlacements: u,
  16360. triggerSubMenuAction: c,
  16361. forceSubMenuRender: f,
  16362. motion: d,
  16363. defaultMotions: h,
  16364. rootClassName: p
  16365. } = sl(), v = jU(), g = L(() => o.value ? I(I({}, sOe), u.value) : I(I({}, oOe), u.value)), m = L(() => lOe[t.mode]), y = ae();
  16366. se(() => t.visible, (O) => {
  16367. xt.cancel(y.value), y.value = xt(() => {
  16368. i.value = O;
  16369. });
  16370. }, {
  16371. immediate: !0
  16372. }), yt(() => {
  16373. xt.cancel(y.value);
  16374. });
  16375. const b = (O) => {
  16376. r("visibleChange", O);
  16377. }, _ = L(() => {
  16378. var O, S;
  16379. const x = d.value || ((O = h.value) === null || O === void 0 ? void 0 : O[t.mode]) || ((S = h.value) === null || S === void 0 ? void 0 : S.other), C = typeof x == "function" ? x() : x;
  16380. return C ? m0(C.name, {
  16381. css: !0
  16382. }) : void 0;
  16383. });
  16384. return () => {
  16385. const {
  16386. prefixCls: O,
  16387. popupClassName: S,
  16388. mode: x,
  16389. popupOffset: C,
  16390. disabled: T
  16391. } = t;
  16392. return M(ex, {
  16393. prefixCls: O,
  16394. popupClassName: ye(`${O}-popup`, {
  16395. [`${O}-rtl`]: o.value
  16396. }, S, p.value),
  16397. stretch: x === "horizontal" ? "minWidth" : null,
  16398. getPopupContainer: a.value,
  16399. builtinPlacements: g.value,
  16400. popupPlacement: m.value,
  16401. popupVisible: i.value,
  16402. popupAlign: C && {
  16403. offset: C
  16404. },
  16405. action: T ? [] : [c.value],
  16406. mouseEnterDelay: s.value,
  16407. mouseLeaveDelay: l.value,
  16408. onPopupVisibleChange: b,
  16409. forceRender: v || f.value,
  16410. popupAnimation: _.value
  16411. }, {
  16412. popup: n.popup,
  16413. default: n.default
  16414. });
  16415. };
  16416. }
  16417. }), sD = (t, e) => {
  16418. let {
  16419. slots: n,
  16420. attrs: r
  16421. } = e;
  16422. var i;
  16423. const {
  16424. prefixCls: a,
  16425. mode: o
  16426. } = sl();
  16427. return M("ul", j(j({}, r), {}, {
  16428. class: ye(a.value, `${a.value}-sub`, `${a.value}-${o.value === "inline" ? "inline" : "vertical"}`),
  16429. "data-menu-list": !0
  16430. }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
  16431. };
  16432. sD.displayName = "SubMenuList";
  16433. const uOe = te({
  16434. compatConfig: {
  16435. MODE: 3
  16436. },
  16437. name: "InlineSubMenuList",
  16438. inheritAttrs: !1,
  16439. props: {
  16440. id: String,
  16441. open: Boolean,
  16442. keyPath: Array
  16443. },
  16444. setup(t, e) {
  16445. let {
  16446. slots: n
  16447. } = e;
  16448. const r = L(() => "inline"), {
  16449. motion: i,
  16450. mode: a,
  16451. defaultMotions: o
  16452. } = sl(), s = L(() => a.value === r.value), l = U(!s.value), u = L(() => s.value ? t.open : !1);
  16453. se(a, () => {
  16454. s.value && (l.value = !1);
  16455. }, {
  16456. flush: "post"
  16457. });
  16458. const c = L(() => {
  16459. var f, d;
  16460. 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;
  16461. return I(I({}, p), {
  16462. appear: t.keyPath.length <= 1
  16463. });
  16464. });
  16465. return () => {
  16466. var f;
  16467. return l.value ? null : M(L1, {
  16468. mode: r.value
  16469. }, {
  16470. default: () => [M(ho, c.value, {
  16471. default: () => [Oi(M(sD, {
  16472. id: t.id
  16473. }, {
  16474. default: () => [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]
  16475. }), [[zs, u.value]])]
  16476. })]
  16477. });
  16478. };
  16479. }
  16480. });
  16481. let v5 = 0;
  16482. const cOe = () => ({
  16483. icon: Y.any,
  16484. title: Y.any,
  16485. disabled: Boolean,
  16486. level: Number,
  16487. popupClassName: String,
  16488. popupOffset: Array,
  16489. internalPopupClose: Boolean,
  16490. eventKey: String,
  16491. expandIcon: Function,
  16492. theme: String,
  16493. onMouseenter: Function,
  16494. onMouseleave: Function,
  16495. onTitleClick: Function,
  16496. // Internal user prop
  16497. originItemValue: $t()
  16498. }), Ih = te({
  16499. compatConfig: {
  16500. MODE: 3
  16501. },
  16502. name: "ASubMenu",
  16503. inheritAttrs: !1,
  16504. props: cOe(),
  16505. slots: Object,
  16506. setup(t, e) {
  16507. let {
  16508. slots: n,
  16509. attrs: r,
  16510. emit: i
  16511. } = e;
  16512. var a, o;
  16513. UU(!1);
  16514. const s = oD(), l = vn(), u = typeof l.vnode.key == "symbol" ? String(l.vnode.key) : l.vnode.key;
  16515. Gi(typeof l.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
  16516. const c = i2(u) ? u : `sub_menu_${++v5}_$$_not_set_key`, f = (a = t.eventKey) !== null && a !== void 0 ? a : i2(u) ? `sub_menu_${++v5}_$$_${u}` : c, {
  16517. parentEventKeys: d,
  16518. parentInfo: h,
  16519. parentKeys: p
  16520. } = aD(), v = L(() => [...p.value, c]), g = ae([]), m = {
  16521. eventKey: f,
  16522. key: c,
  16523. parentEventKeys: d,
  16524. childrenEventKeys: g,
  16525. parentKeys: p
  16526. };
  16527. (o = h.childrenEventKeys) === null || o === void 0 || o.value.push(f), yt(() => {
  16528. var he;
  16529. h.childrenEventKeys && (h.childrenEventKeys.value = (he = h.childrenEventKeys) === null || he === void 0 ? void 0 : he.value.filter((Te) => Te != f));
  16530. }), rOe(f, c, m);
  16531. const {
  16532. prefixCls: y,
  16533. activeKeys: b,
  16534. disabled: _,
  16535. changeActiveKeys: O,
  16536. mode: S,
  16537. inlineCollapsed: x,
  16538. openKeys: C,
  16539. overflowDisabled: T,
  16540. onOpenChange: w,
  16541. registerMenuInfo: P,
  16542. unRegisterMenuInfo: $,
  16543. selectedSubMenuKeys: A,
  16544. expandIcon: D,
  16545. theme: E
  16546. } = sl(), R = u != null, N = !s && (jU() || !R);
  16547. K1e(N), (s && R || !s && !R || N) && (P(f, m), yt(() => {
  16548. $(f);
  16549. }));
  16550. const V = L(() => `${y.value}-submenu`), B = L(() => _.value || t.disabled), W = ae(), F = ae(), Q = L(() => C.value.includes(c)), Z = L(() => !T.value && Q.value), ne = L(() => A.value.includes(c)), ee = ae(!1);
  16551. se(b, () => {
  16552. ee.value = !!b.value.find((he) => he === c);
  16553. }, {
  16554. immediate: !0
  16555. });
  16556. const oe = (he) => {
  16557. B.value || (i("titleClick", he, c), S.value === "inline" && w(c, !Q.value));
  16558. }, K = (he) => {
  16559. B.value || (O(v.value), i("mouseenter", he));
  16560. }, ie = (he) => {
  16561. B.value || (O([]), i("mouseleave", he));
  16562. }, X = qU(L(() => v.value.length)), H = (he) => {
  16563. S.value !== "inline" && w(c, he);
  16564. }, G = () => {
  16565. O(v.value);
  16566. }, re = f && `${f}-popup`, fe = L(() => ye(y.value, `${y.value}-${t.theme || E.value}`, t.popupClassName)), de = (he, Te) => {
  16567. if (!Te)
  16568. return x.value && !p.value.length && he && typeof he == "string" ? M("div", {
  16569. class: `${y.value}-inline-collapsed-noicon`
  16570. }, [he.charAt(0)]) : M("span", {
  16571. class: `${y.value}-title-content`
  16572. }, [he]);
  16573. const ze = Yi(he) && he.type === "span";
  16574. return M(wt, null, [Pn(typeof Te == "function" ? Te(t.originItemValue) : Te, {
  16575. class: `${y.value}-item-icon`
  16576. }, !1), ze ? he : M("span", {
  16577. class: `${y.value}-title-content`
  16578. }, [he])]);
  16579. }, Ee = L(() => S.value !== "inline" && v.value.length > 1 ? "vertical" : S.value), $e = L(() => S.value === "horizontal" ? "vertical" : S.value), Se = L(() => Ee.value === "horizontal" ? "vertical" : Ee.value), be = () => {
  16580. var he, Te;
  16581. const ze = V.value, ut = (he = t.icon) !== null && he !== void 0 ? he : (Te = n.icon) === null || Te === void 0 ? void 0 : Te.call(n, t), ct = t.expandIcon || n.expandIcon || D.value, Dt = de(RS(n, t, "title"), ut);
  16582. return M("div", {
  16583. style: X.value,
  16584. class: `${ze}-title`,
  16585. tabindex: B.value ? null : -1,
  16586. ref: W,
  16587. title: typeof Dt == "string" ? Dt : null,
  16588. "data-menu-id": c,
  16589. "aria-expanded": Z.value,
  16590. "aria-haspopup": !0,
  16591. "aria-controls": re,
  16592. "aria-disabled": B.value,
  16593. onClick: oe,
  16594. onFocus: G
  16595. }, [Dt, S.value !== "horizontal" && ct ? ct(I(I({}, t), {
  16596. isOpen: Z.value
  16597. })) : M("i", {
  16598. class: `${ze}-arrow`
  16599. }, null)]);
  16600. };
  16601. return () => {
  16602. var he;
  16603. if (s)
  16604. return R ? (he = n.default) === null || he === void 0 ? void 0 : he.call(n) : null;
  16605. const Te = V.value;
  16606. let ze = () => null;
  16607. if (!T.value && S.value !== "inline") {
  16608. const ut = S.value === "horizontal" ? [0, 8] : [10, 0];
  16609. ze = () => M(p5, {
  16610. mode: Ee.value,
  16611. prefixCls: Te,
  16612. visible: !t.internalPopupClose && Z.value,
  16613. popupClassName: fe.value,
  16614. popupOffset: t.popupOffset || ut,
  16615. disabled: B.value,
  16616. onVisibleChange: H
  16617. }, {
  16618. default: () => [be()],
  16619. popup: () => M(L1, {
  16620. mode: Se.value
  16621. }, {
  16622. default: () => [M(sD, {
  16623. id: re,
  16624. ref: F
  16625. }, {
  16626. default: n.default
  16627. })]
  16628. })
  16629. });
  16630. } else
  16631. ze = () => M(p5, null, {
  16632. default: be
  16633. });
  16634. return M(L1, {
  16635. mode: $e.value
  16636. }, {
  16637. default: () => [M(Is.Item, j(j({
  16638. component: "li"
  16639. }, r), {}, {
  16640. role: "none",
  16641. class: ye(Te, `${Te}-${S.value}`, r.class, {
  16642. [`${Te}-open`]: Z.value,
  16643. [`${Te}-active`]: ee.value,
  16644. [`${Te}-selected`]: ne.value,
  16645. [`${Te}-disabled`]: B.value
  16646. }),
  16647. onMouseenter: K,
  16648. onMouseleave: ie,
  16649. "data-submenu-id": c
  16650. }), {
  16651. default: () => M(wt, null, [ze(), !T.value && M(uOe, {
  16652. id: re,
  16653. open: Z.value,
  16654. keyPath: v.value
  16655. }, {
  16656. default: n.default
  16657. })])
  16658. })]
  16659. });
  16660. };
  16661. }
  16662. });
  16663. function KU(t, e) {
  16664. return t.classList ? t.classList.contains(e) : ` ${t.className} `.indexOf(` ${e} `) > -1;
  16665. }
  16666. function g5(t, e) {
  16667. t.classList ? t.classList.add(e) : KU(t, e) || (t.className = `${t.className} ${e}`);
  16668. }
  16669. function m5(t, e) {
  16670. if (t.classList)
  16671. t.classList.remove(e);
  16672. else if (KU(t, e)) {
  16673. const n = t.className;
  16674. t.className = ` ${n} `.replace(` ${e} `, " ");
  16675. }
  16676. }
  16677. const lD = function() {
  16678. 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;
  16679. return {
  16680. name: t,
  16681. appear: e,
  16682. css: !0,
  16683. onBeforeEnter: (n) => {
  16684. n.style.height = "0px", n.style.opacity = "0", g5(n, t);
  16685. },
  16686. onEnter: (n) => {
  16687. Tt(() => {
  16688. n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
  16689. });
  16690. },
  16691. onAfterEnter: (n) => {
  16692. n && (m5(n, t), n.style.height = null, n.style.opacity = null);
  16693. },
  16694. onBeforeLeave: (n) => {
  16695. g5(n, t), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
  16696. },
  16697. onLeave: (n) => {
  16698. setTimeout(() => {
  16699. n.style.height = "0px", n.style.opacity = "0";
  16700. });
  16701. },
  16702. onAfterLeave: (n) => {
  16703. n && (m5(n, t), n.style && (n.style.height = null, n.style.opacity = null));
  16704. }
  16705. };
  16706. }, fOe = () => ({
  16707. title: Y.any,
  16708. // Internal user prop
  16709. originItemValue: $t()
  16710. }), N1 = te({
  16711. compatConfig: {
  16712. MODE: 3
  16713. },
  16714. name: "AMenuItemGroup",
  16715. inheritAttrs: !1,
  16716. props: fOe(),
  16717. slots: Object,
  16718. setup(t, e) {
  16719. let {
  16720. slots: n,
  16721. attrs: r
  16722. } = e;
  16723. const {
  16724. prefixCls: i
  16725. } = sl(), a = L(() => `${i.value}-item-group`), o = oD();
  16726. return () => {
  16727. var s, l;
  16728. return o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : M("li", j(j({}, r), {}, {
  16729. onClick: (u) => u.stopPropagation(),
  16730. class: a.value
  16731. }), [M("div", {
  16732. title: typeof t.title == "string" ? t.title : void 0,
  16733. class: `${a.value}-title`
  16734. }, [RS(n, t, "title")]), M("ul", {
  16735. class: `${a.value}-list`
  16736. }, [(l = n.default) === null || l === void 0 ? void 0 : l.call(n)])]);
  16737. };
  16738. }
  16739. }), dOe = () => ({
  16740. prefixCls: String,
  16741. dashed: Boolean
  16742. }), B1 = te({
  16743. compatConfig: {
  16744. MODE: 3
  16745. },
  16746. name: "AMenuDivider",
  16747. props: dOe(),
  16748. setup(t) {
  16749. const {
  16750. prefixCls: e
  16751. } = sl(), n = L(() => ({
  16752. [`${e.value}-item-divider`]: !0,
  16753. [`${e.value}-item-divider-dashed`]: !!t.dashed
  16754. }));
  16755. return () => M("li", {
  16756. class: n.value
  16757. }, null);
  16758. }
  16759. });
  16760. var hOe = function(t, e) {
  16761. var n = {};
  16762. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  16763. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  16764. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  16765. return n;
  16766. };
  16767. function B2(t, e, n) {
  16768. return (t || []).map((r, i) => {
  16769. if (r && typeof r == "object") {
  16770. const a = r, {
  16771. label: o,
  16772. children: s,
  16773. key: l,
  16774. type: u
  16775. } = a, c = hOe(a, ["label", "children", "key", "type"]), f = l ?? `tmp-${i}`, d = n ? n.parentKeys.slice() : [], h = [], p = {
  16776. eventKey: f,
  16777. key: f,
  16778. parentEventKeys: U(d),
  16779. parentKeys: U(d),
  16780. childrenEventKeys: U(h),
  16781. isLeaf: !1
  16782. };
  16783. if (s || u === "group") {
  16784. if (u === "group") {
  16785. const g = B2(s, e, n);
  16786. return M(N1, j(j({
  16787. key: f
  16788. }, c), {}, {
  16789. title: o,
  16790. originItemValue: r
  16791. }), {
  16792. default: () => [g]
  16793. });
  16794. }
  16795. e.set(f, p), n && n.childrenEventKeys.push(f);
  16796. const v = B2(s, e, {
  16797. childrenEventKeys: h,
  16798. parentKeys: [].concat(d, f)
  16799. });
  16800. return M(Ih, j(j({
  16801. key: f
  16802. }, c), {}, {
  16803. title: o,
  16804. originItemValue: r
  16805. }), {
  16806. default: () => [v]
  16807. });
  16808. }
  16809. return u === "divider" ? M(B1, j({
  16810. key: f
  16811. }, c), null) : (p.isLeaf = !0, e.set(f, p), M(Mh, j(j({
  16812. key: f
  16813. }, c), {}, {
  16814. originItemValue: r
  16815. }), {
  16816. default: () => [o]
  16817. }));
  16818. }
  16819. return null;
  16820. }).filter((r) => r);
  16821. }
  16822. function pOe(t) {
  16823. const e = ae([]), n = ae(!1), r = ae(/* @__PURE__ */ new Map());
  16824. return se(() => t.items, () => {
  16825. const i = /* @__PURE__ */ new Map();
  16826. n.value = !1, t.items ? (n.value = !0, e.value = B2(t.items, i)) : e.value = void 0, r.value = i;
  16827. }, {
  16828. immediate: !0,
  16829. deep: !0
  16830. }), {
  16831. itemsNodes: e,
  16832. store: r,
  16833. hasItmes: n
  16834. };
  16835. }
  16836. const vOe = (t) => {
  16837. const {
  16838. componentCls: e,
  16839. motionDurationSlow: n,
  16840. menuHorizontalHeight: r,
  16841. colorSplit: i,
  16842. lineWidth: a,
  16843. lineType: o,
  16844. menuItemPaddingInline: s
  16845. } = t;
  16846. return {
  16847. [`${e}-horizontal`]: {
  16848. lineHeight: `${r}px`,
  16849. border: 0,
  16850. borderBottom: `${a}px ${o} ${i}`,
  16851. boxShadow: "none",
  16852. "&::after": {
  16853. display: "block",
  16854. clear: "both",
  16855. height: 0,
  16856. content: '"\\20"'
  16857. },
  16858. // ======================= Item =======================
  16859. [`${e}-item, ${e}-submenu`]: {
  16860. position: "relative",
  16861. display: "inline-block",
  16862. verticalAlign: "bottom",
  16863. paddingInline: s
  16864. },
  16865. [`> ${e}-item:hover,
  16866. > ${e}-item-active,
  16867. > ${e}-submenu ${e}-submenu-title:hover`]: {
  16868. backgroundColor: "transparent"
  16869. },
  16870. [`${e}-item, ${e}-submenu-title`]: {
  16871. transition: [`border-color ${n}`, `background ${n}`].join(",")
  16872. },
  16873. // ===================== Sub Menu =====================
  16874. [`${e}-submenu-arrow`]: {
  16875. display: "none"
  16876. }
  16877. }
  16878. };
  16879. }, gOe = (t) => {
  16880. let {
  16881. componentCls: e,
  16882. menuArrowOffset: n
  16883. } = t;
  16884. return {
  16885. [`${e}-rtl`]: {
  16886. direction: "rtl"
  16887. },
  16888. [`${e}-submenu-rtl`]: {
  16889. transformOrigin: "100% 0"
  16890. },
  16891. // Vertical Arrow
  16892. [`${e}-rtl${e}-vertical,
  16893. ${e}-submenu-rtl ${e}-vertical`]: {
  16894. [`${e}-submenu-arrow`]: {
  16895. "&::before": {
  16896. transform: `rotate(-45deg) translateY(-${n})`
  16897. },
  16898. "&::after": {
  16899. transform: `rotate(45deg) translateY(${n})`
  16900. }
  16901. }
  16902. }
  16903. };
  16904. }, y5 = (t) => I({}, h0(t)), b5 = (t, e) => {
  16905. const {
  16906. componentCls: n,
  16907. colorItemText: r,
  16908. colorItemTextSelected: i,
  16909. colorGroupTitle: a,
  16910. colorItemBg: o,
  16911. colorSubItemBg: s,
  16912. colorItemBgSelected: l,
  16913. colorActiveBarHeight: u,
  16914. colorActiveBarWidth: c,
  16915. colorActiveBarBorderSize: f,
  16916. motionDurationSlow: d,
  16917. motionEaseInOut: h,
  16918. motionEaseOut: p,
  16919. menuItemPaddingInline: v,
  16920. motionDurationMid: g,
  16921. colorItemTextHover: m,
  16922. lineType: y,
  16923. colorSplit: b,
  16924. // Disabled
  16925. colorItemTextDisabled: _,
  16926. // Danger
  16927. colorDangerItemText: O,
  16928. colorDangerItemTextHover: S,
  16929. colorDangerItemTextSelected: x,
  16930. colorDangerItemBgActive: C,
  16931. colorDangerItemBgSelected: T,
  16932. colorItemBgHover: w,
  16933. menuSubMenuBg: P,
  16934. // Horizontal
  16935. colorItemTextSelectedHorizontal: $,
  16936. colorItemBgSelectedHorizontal: A
  16937. } = t;
  16938. return {
  16939. [`${n}-${e}`]: {
  16940. color: r,
  16941. background: o,
  16942. [`&${n}-root:focus-visible`]: I({}, y5(t)),
  16943. // ======================== Item ========================
  16944. [`${n}-item-group-title`]: {
  16945. color: a
  16946. },
  16947. [`${n}-submenu-selected`]: {
  16948. [`> ${n}-submenu-title`]: {
  16949. color: i
  16950. }
  16951. },
  16952. // Disabled
  16953. [`${n}-item-disabled, ${n}-submenu-disabled`]: {
  16954. color: `${_} !important`
  16955. },
  16956. // Hover
  16957. [`${n}-item:hover, ${n}-submenu-title:hover`]: {
  16958. [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
  16959. color: m
  16960. }
  16961. },
  16962. [`&:not(${n}-horizontal)`]: {
  16963. [`${n}-item:not(${n}-item-selected)`]: {
  16964. "&:hover": {
  16965. backgroundColor: w
  16966. },
  16967. "&:active": {
  16968. backgroundColor: l
  16969. }
  16970. },
  16971. [`${n}-submenu-title`]: {
  16972. "&:hover": {
  16973. backgroundColor: w
  16974. },
  16975. "&:active": {
  16976. backgroundColor: l
  16977. }
  16978. }
  16979. },
  16980. // Danger - only Item has
  16981. [`${n}-item-danger`]: {
  16982. color: O,
  16983. [`&${n}-item:hover`]: {
  16984. [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
  16985. color: S
  16986. }
  16987. },
  16988. [`&${n}-item:active`]: {
  16989. background: C
  16990. }
  16991. },
  16992. [`${n}-item a`]: {
  16993. "&, &:hover": {
  16994. color: "inherit"
  16995. }
  16996. },
  16997. [`${n}-item-selected`]: {
  16998. color: i,
  16999. // Danger
  17000. [`&${n}-item-danger`]: {
  17001. color: x
  17002. },
  17003. "a, a:hover": {
  17004. color: "inherit"
  17005. }
  17006. },
  17007. [`& ${n}-item-selected`]: {
  17008. backgroundColor: l,
  17009. // Danger
  17010. [`&${n}-item-danger`]: {
  17011. backgroundColor: T
  17012. }
  17013. },
  17014. [`${n}-item, ${n}-submenu-title`]: {
  17015. [`&:not(${n}-item-disabled):focus-visible`]: I({}, y5(t))
  17016. },
  17017. [`&${n}-submenu > ${n}`]: {
  17018. backgroundColor: P
  17019. },
  17020. [`&${n}-popup > ${n}`]: {
  17021. backgroundColor: o
  17022. },
  17023. // ====================== Horizontal ======================
  17024. [`&${n}-horizontal`]: I(I({}, e === "dark" ? {
  17025. borderBottom: 0
  17026. } : {}), {
  17027. [`> ${n}-item, > ${n}-submenu`]: {
  17028. top: f,
  17029. marginTop: -f,
  17030. marginBottom: 0,
  17031. borderRadius: 0,
  17032. "&::after": {
  17033. position: "absolute",
  17034. insetInline: v,
  17035. bottom: 0,
  17036. borderBottom: `${u}px solid transparent`,
  17037. transition: `border-color ${d} ${h}`,
  17038. content: '""'
  17039. },
  17040. "&:hover, &-active, &-open": {
  17041. "&::after": {
  17042. borderBottomWidth: u,
  17043. borderBottomColor: $
  17044. }
  17045. },
  17046. "&-selected": {
  17047. color: $,
  17048. backgroundColor: A,
  17049. "&::after": {
  17050. borderBottomWidth: u,
  17051. borderBottomColor: $
  17052. }
  17053. }
  17054. }
  17055. }),
  17056. // ================== Inline & Vertical ===================
  17057. //
  17058. [`&${n}-root`]: {
  17059. [`&${n}-inline, &${n}-vertical`]: {
  17060. borderInlineEnd: `${f}px ${y} ${b}`
  17061. }
  17062. },
  17063. // ======================== Inline ========================
  17064. [`&${n}-inline`]: {
  17065. // Sub
  17066. [`${n}-sub${n}-inline`]: {
  17067. background: s
  17068. },
  17069. // Item
  17070. [`${n}-item, ${n}-submenu-title`]: f && c ? {
  17071. width: `calc(100% + ${f}px)`
  17072. } : {},
  17073. [`${n}-item`]: {
  17074. position: "relative",
  17075. "&::after": {
  17076. position: "absolute",
  17077. insetBlock: 0,
  17078. insetInlineEnd: 0,
  17079. borderInlineEnd: `${c}px solid ${i}`,
  17080. transform: "scaleY(0.0001)",
  17081. opacity: 0,
  17082. transition: [`transform ${g} ${p}`, `opacity ${g} ${p}`].join(","),
  17083. content: '""'
  17084. },
  17085. // Danger
  17086. [`&${n}-item-danger`]: {
  17087. "&::after": {
  17088. borderInlineEndColor: x
  17089. }
  17090. }
  17091. },
  17092. [`${n}-selected, ${n}-item-selected`]: {
  17093. "&::after": {
  17094. transform: "scaleY(1)",
  17095. opacity: 1,
  17096. transition: [`transform ${g} ${h}`, `opacity ${g} ${h}`].join(",")
  17097. }
  17098. }
  17099. }
  17100. }
  17101. };
  17102. }, _5 = (t) => {
  17103. const {
  17104. componentCls: e,
  17105. menuItemHeight: n,
  17106. itemMarginInline: r,
  17107. padding: i,
  17108. menuArrowSize: a,
  17109. marginXS: o,
  17110. marginXXS: s
  17111. } = t, l = i + a + o;
  17112. return {
  17113. [`${e}-item`]: {
  17114. position: "relative"
  17115. },
  17116. [`${e}-item, ${e}-submenu-title`]: {
  17117. height: n,
  17118. lineHeight: `${n}px`,
  17119. paddingInline: i,
  17120. overflow: "hidden",
  17121. textOverflow: "ellipsis",
  17122. marginInline: r,
  17123. marginBlock: s,
  17124. width: `calc(100% - ${r * 2}px)`
  17125. },
  17126. // disable margin collapsed
  17127. [`${e}-submenu`]: {
  17128. paddingBottom: 0.02
  17129. },
  17130. [`> ${e}-item,
  17131. > ${e}-submenu > ${e}-submenu-title`]: {
  17132. height: n,
  17133. lineHeight: `${n}px`
  17134. },
  17135. [`${e}-item-group-list ${e}-submenu-title,
  17136. ${e}-submenu-title`]: {
  17137. paddingInlineEnd: l
  17138. }
  17139. };
  17140. }, mOe = (t) => {
  17141. const {
  17142. componentCls: e,
  17143. iconCls: n,
  17144. menuItemHeight: r,
  17145. colorTextLightSolid: i,
  17146. dropdownWidth: a,
  17147. controlHeightLG: o,
  17148. motionDurationMid: s,
  17149. motionEaseOut: l,
  17150. paddingXL: u,
  17151. fontSizeSM: c,
  17152. fontSizeLG: f,
  17153. motionDurationSlow: d,
  17154. paddingXS: h,
  17155. boxShadowSecondary: p
  17156. } = t, v = {
  17157. height: r,
  17158. lineHeight: `${r}px`,
  17159. listStylePosition: "inside",
  17160. listStyleType: "disc"
  17161. };
  17162. return [
  17163. {
  17164. [e]: {
  17165. "&-inline, &-vertical": I({
  17166. [`&${e}-root`]: {
  17167. boxShadow: "none"
  17168. }
  17169. }, _5(t))
  17170. },
  17171. [`${e}-submenu-popup`]: {
  17172. [`${e}-vertical`]: I(I({}, _5(t)), {
  17173. boxShadow: p
  17174. })
  17175. }
  17176. },
  17177. // Vertical only
  17178. {
  17179. [`${e}-submenu-popup ${e}-vertical${e}-sub`]: {
  17180. minWidth: a,
  17181. maxHeight: `calc(100vh - ${o * 2.5}px)`,
  17182. padding: "0",
  17183. overflow: "hidden",
  17184. borderInlineEnd: 0,
  17185. // https://github.com/ant-design/ant-design/issues/22244
  17186. // https://github.com/ant-design/ant-design/issues/26812
  17187. "&:not([class*='-active'])": {
  17188. overflowX: "hidden",
  17189. overflowY: "auto"
  17190. }
  17191. }
  17192. },
  17193. // Inline Only
  17194. {
  17195. [`${e}-inline`]: {
  17196. width: "100%",
  17197. // Motion enhance for first level
  17198. [`&${e}-root`]: {
  17199. [`${e}-item, ${e}-submenu-title`]: {
  17200. display: "flex",
  17201. alignItems: "center",
  17202. transition: [`border-color ${d}`, `background ${d}`, `padding ${s} ${l}`].join(","),
  17203. [`> ${e}-title-content`]: {
  17204. flex: "auto",
  17205. minWidth: 0,
  17206. overflow: "hidden",
  17207. textOverflow: "ellipsis"
  17208. },
  17209. "> *": {
  17210. flex: "none"
  17211. }
  17212. }
  17213. },
  17214. // >>>>> Sub
  17215. [`${e}-sub${e}-inline`]: {
  17216. padding: 0,
  17217. border: 0,
  17218. borderRadius: 0,
  17219. boxShadow: "none",
  17220. [`& > ${e}-submenu > ${e}-submenu-title`]: v,
  17221. [`& ${e}-item-group-title`]: {
  17222. paddingInlineStart: u
  17223. }
  17224. },
  17225. // >>>>> Item
  17226. [`${e}-item`]: v
  17227. }
  17228. },
  17229. // Inline Collapse Only
  17230. {
  17231. [`${e}-inline-collapsed`]: {
  17232. width: r * 2,
  17233. [`&${e}-root`]: {
  17234. [`${e}-item, ${e}-submenu ${e}-submenu-title`]: {
  17235. [`> ${e}-inline-collapsed-noicon`]: {
  17236. fontSize: f,
  17237. textAlign: "center"
  17238. }
  17239. }
  17240. },
  17241. [`> ${e}-item,
  17242. > ${e}-item-group > ${e}-item-group-list > ${e}-item,
  17243. > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
  17244. > ${e}-submenu > ${e}-submenu-title`]: {
  17245. insetInlineStart: 0,
  17246. paddingInline: `calc(50% - ${c}px)`,
  17247. textOverflow: "clip",
  17248. [`
  17249. ${e}-submenu-arrow,
  17250. ${e}-submenu-expand-icon
  17251. `]: {
  17252. opacity: 0
  17253. },
  17254. [`${e}-item-icon, ${n}`]: {
  17255. margin: 0,
  17256. fontSize: f,
  17257. lineHeight: `${r}px`,
  17258. "+ span": {
  17259. display: "inline-block",
  17260. opacity: 0
  17261. }
  17262. }
  17263. },
  17264. [`${e}-item-icon, ${n}`]: {
  17265. display: "inline-block"
  17266. },
  17267. "&-tooltip": {
  17268. pointerEvents: "none",
  17269. [`${e}-item-icon, ${n}`]: {
  17270. display: "none"
  17271. },
  17272. "a, a:hover": {
  17273. color: i
  17274. }
  17275. },
  17276. [`${e}-item-group-title`]: I(I({}, Sh), {
  17277. paddingInline: h
  17278. })
  17279. }
  17280. }
  17281. ];
  17282. }, O5 = (t) => {
  17283. const {
  17284. componentCls: e,
  17285. fontSize: n,
  17286. motionDurationSlow: r,
  17287. motionDurationMid: i,
  17288. motionEaseInOut: a,
  17289. motionEaseOut: o,
  17290. iconCls: s,
  17291. controlHeightSM: l
  17292. } = t;
  17293. return {
  17294. // >>>>> Item
  17295. [`${e}-item, ${e}-submenu-title`]: {
  17296. position: "relative",
  17297. display: "block",
  17298. margin: 0,
  17299. whiteSpace: "nowrap",
  17300. cursor: "pointer",
  17301. transition: [`border-color ${r}`, `background ${r}`, `padding ${r} ${a}`].join(","),
  17302. [`${e}-item-icon, ${s}`]: {
  17303. minWidth: n,
  17304. fontSize: n,
  17305. transition: [`font-size ${i} ${o}`, `margin ${r} ${a}`, `color ${r}`].join(","),
  17306. "+ span": {
  17307. marginInlineStart: l - n,
  17308. opacity: 1,
  17309. transition: [`opacity ${r} ${a}`, `margin ${r}`, `color ${r}`].join(",")
  17310. }
  17311. },
  17312. [`${e}-item-icon`]: I({}, up()),
  17313. [`&${e}-item-only-child`]: {
  17314. [`> ${s}, > ${e}-item-icon`]: {
  17315. marginInlineEnd: 0
  17316. }
  17317. }
  17318. },
  17319. // Disabled state sets text to gray and nukes hover/tab effects
  17320. [`${e}-item-disabled, ${e}-submenu-disabled`]: {
  17321. background: "none !important",
  17322. cursor: "not-allowed",
  17323. "&::after": {
  17324. borderColor: "transparent !important"
  17325. },
  17326. a: {
  17327. color: "inherit !important"
  17328. },
  17329. [`> ${e}-submenu-title`]: {
  17330. color: "inherit !important",
  17331. cursor: "not-allowed"
  17332. }
  17333. }
  17334. };
  17335. }, S5 = (t) => {
  17336. const {
  17337. componentCls: e,
  17338. motionDurationSlow: n,
  17339. motionEaseInOut: r,
  17340. borderRadius: i,
  17341. menuArrowSize: a,
  17342. menuArrowOffset: o
  17343. } = t;
  17344. return {
  17345. [`${e}-submenu`]: {
  17346. "&-expand-icon, &-arrow": {
  17347. position: "absolute",
  17348. top: "50%",
  17349. insetInlineEnd: t.margin,
  17350. width: a,
  17351. color: "currentcolor",
  17352. transform: "translateY(-50%)",
  17353. transition: `transform ${n} ${r}, opacity ${n}`
  17354. },
  17355. "&-arrow": {
  17356. // →
  17357. "&::before, &::after": {
  17358. position: "absolute",
  17359. width: a * 0.6,
  17360. height: a * 0.15,
  17361. backgroundColor: "currentcolor",
  17362. borderRadius: i,
  17363. transition: [`background ${n} ${r}`, `transform ${n} ${r}`, `top ${n} ${r}`, `color ${n} ${r}`].join(","),
  17364. content: '""'
  17365. },
  17366. "&::before": {
  17367. transform: `rotate(45deg) translateY(-${o})`
  17368. },
  17369. "&::after": {
  17370. transform: `rotate(-45deg) translateY(${o})`
  17371. }
  17372. }
  17373. }
  17374. };
  17375. }, yOe = (t) => {
  17376. const {
  17377. antCls: e,
  17378. componentCls: n,
  17379. fontSize: r,
  17380. motionDurationSlow: i,
  17381. motionDurationMid: a,
  17382. motionEaseInOut: o,
  17383. lineHeight: s,
  17384. paddingXS: l,
  17385. padding: u,
  17386. colorSplit: c,
  17387. lineWidth: f,
  17388. zIndexPopup: d,
  17389. borderRadiusLG: h,
  17390. radiusSubMenuItem: p,
  17391. menuArrowSize: v,
  17392. menuArrowOffset: g,
  17393. lineType: m,
  17394. menuPanelMaskInset: y
  17395. } = t;
  17396. return [
  17397. // Misc
  17398. {
  17399. "": {
  17400. [`${n}`]: I(I({}, S1()), {
  17401. // Hidden
  17402. "&-hidden": {
  17403. display: "none"
  17404. }
  17405. })
  17406. },
  17407. [`${n}-submenu-hidden`]: {
  17408. display: "none"
  17409. }
  17410. },
  17411. {
  17412. [n]: I(I(I(I(I(I(I({}, nn(t)), S1()), {
  17413. marginBottom: 0,
  17414. paddingInlineStart: 0,
  17415. // Override default ul/ol
  17416. fontSize: r,
  17417. lineHeight: 0,
  17418. listStyle: "none",
  17419. outline: "none",
  17420. transition: `width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,
  17421. "ul, ol": {
  17422. margin: 0,
  17423. padding: 0,
  17424. listStyle: "none"
  17425. },
  17426. // Overflow ellipsis
  17427. "&-overflow": {
  17428. display: "flex",
  17429. [`${n}-item`]: {
  17430. flex: "none"
  17431. }
  17432. },
  17433. [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
  17434. borderRadius: t.radiusItem
  17435. },
  17436. [`${n}-item-group-title`]: {
  17437. padding: `${l}px ${u}px`,
  17438. fontSize: r,
  17439. lineHeight: s,
  17440. transition: `all ${i}`
  17441. },
  17442. [`&-horizontal ${n}-submenu`]: {
  17443. transition: [`border-color ${i} ${o}`, `background ${i} ${o}`].join(",")
  17444. },
  17445. [`${n}-submenu, ${n}-submenu-inline`]: {
  17446. transition: [`border-color ${i} ${o}`, `background ${i} ${o}`, `padding ${a} ${o}`].join(",")
  17447. },
  17448. [`${n}-submenu ${n}-sub`]: {
  17449. cursor: "initial",
  17450. transition: [`background ${i} ${o}`, `padding ${i} ${o}`].join(",")
  17451. },
  17452. [`${n}-title-content`]: {
  17453. transition: `color ${i}`
  17454. },
  17455. [`${n}-item a`]: {
  17456. "&::before": {
  17457. position: "absolute",
  17458. inset: 0,
  17459. backgroundColor: "transparent",
  17460. content: '""'
  17461. }
  17462. },
  17463. // Removed a Badge related style seems it's safe
  17464. // https://github.com/ant-design/ant-design/issues/19809
  17465. // >>>>> Divider
  17466. [`${n}-item-divider`]: {
  17467. overflow: "hidden",
  17468. lineHeight: 0,
  17469. borderColor: c,
  17470. borderStyle: m,
  17471. borderWidth: 0,
  17472. borderTopWidth: f,
  17473. marginBlock: f,
  17474. padding: 0,
  17475. "&-dashed": {
  17476. borderStyle: "dashed"
  17477. }
  17478. }
  17479. }), O5(t)), {
  17480. [`${n}-item-group`]: {
  17481. [`${n}-item-group-list`]: {
  17482. margin: 0,
  17483. padding: 0,
  17484. [`${n}-item, ${n}-submenu-title`]: {
  17485. paddingInline: `${r * 2}px ${u}px`
  17486. }
  17487. }
  17488. },
  17489. // ======================= Sub Menu =======================
  17490. "&-submenu": {
  17491. "&-popup": {
  17492. position: "absolute",
  17493. zIndex: d,
  17494. background: "transparent",
  17495. borderRadius: h,
  17496. boxShadow: "none",
  17497. transformOrigin: "0 0",
  17498. // https://github.com/ant-design/ant-design/issues/13955
  17499. "&::before": {
  17500. position: "absolute",
  17501. inset: `${y}px 0 0`,
  17502. zIndex: -1,
  17503. width: "100%",
  17504. height: "100%",
  17505. opacity: 0,
  17506. content: '""'
  17507. }
  17508. },
  17509. // https://github.com/ant-design/ant-design/issues/13955
  17510. "&-placement-rightTop::before": {
  17511. top: 0,
  17512. insetInlineStart: y
  17513. },
  17514. [`> ${n}`]: I(I(I({
  17515. borderRadius: h
  17516. }, O5(t)), S5(t)), {
  17517. [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
  17518. borderRadius: p
  17519. },
  17520. [`${n}-submenu-title::after`]: {
  17521. transition: `transform ${i} ${o}`
  17522. }
  17523. })
  17524. }
  17525. }), S5(t)), {
  17526. [`&-inline-collapsed ${n}-submenu-arrow,
  17527. &-inline ${n}-submenu-arrow`]: {
  17528. // ↓
  17529. "&::before": {
  17530. transform: `rotate(-45deg) translateX(${g})`
  17531. },
  17532. "&::after": {
  17533. transform: `rotate(45deg) translateX(-${g})`
  17534. }
  17535. },
  17536. [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
  17537. // ↑
  17538. transform: `translateY(-${v * 0.2}px)`,
  17539. "&::after": {
  17540. transform: `rotate(-45deg) translateX(-${g})`
  17541. },
  17542. "&::before": {
  17543. transform: `rotate(45deg) translateX(${g})`
  17544. }
  17545. }
  17546. })
  17547. },
  17548. // Integration with header element so menu items have the same height
  17549. {
  17550. [`${e}-layout-header`]: {
  17551. [n]: {
  17552. lineHeight: "inherit"
  17553. }
  17554. }
  17555. }
  17556. ];
  17557. }, bOe = (t, e) => Sn("Menu", (r, i) => {
  17558. let {
  17559. overrideComponentToken: a
  17560. } = i;
  17561. if ((e == null ? void 0 : e.value) === !1)
  17562. return [];
  17563. const {
  17564. colorBgElevated: o,
  17565. colorPrimary: s,
  17566. colorError: l,
  17567. colorErrorHover: u,
  17568. colorTextLightSolid: c
  17569. } = r, {
  17570. controlHeightLG: f,
  17571. fontSize: d
  17572. } = r, h = d / 7 * 5, p = Bt(r, {
  17573. menuItemHeight: f,
  17574. menuItemPaddingInline: r.margin,
  17575. menuArrowSize: h,
  17576. menuHorizontalHeight: f * 1.15,
  17577. menuArrowOffset: `${h * 0.25}px`,
  17578. menuPanelMaskInset: -7,
  17579. menuSubMenuBg: o
  17580. }), v = new en(c).setAlpha(0.65).toRgbString(), g = Bt(p, {
  17581. colorItemText: v,
  17582. colorItemTextHover: c,
  17583. colorGroupTitle: v,
  17584. colorItemTextSelected: c,
  17585. colorItemBg: "#001529",
  17586. colorSubItemBg: "#000c17",
  17587. colorItemBgActive: "transparent",
  17588. colorItemBgSelected: s,
  17589. colorActiveBarWidth: 0,
  17590. colorActiveBarHeight: 0,
  17591. colorActiveBarBorderSize: 0,
  17592. // Disabled
  17593. colorItemTextDisabled: new en(c).setAlpha(0.25).toRgbString(),
  17594. // Danger
  17595. colorDangerItemText: l,
  17596. colorDangerItemTextHover: u,
  17597. colorDangerItemTextSelected: c,
  17598. colorDangerItemBgActive: l,
  17599. colorDangerItemBgSelected: l,
  17600. menuSubMenuBg: "#001529",
  17601. // Horizontal
  17602. colorItemTextSelectedHorizontal: c,
  17603. colorItemBgSelectedHorizontal: s
  17604. }, I({}, a));
  17605. return [
  17606. // Basic
  17607. yOe(p),
  17608. // Horizontal
  17609. vOe(p),
  17610. // Vertical
  17611. mOe(p),
  17612. // Theme
  17613. b5(p, "light"),
  17614. b5(g, "dark"),
  17615. // RTL
  17616. gOe(p),
  17617. // Motion
  17618. JI(p),
  17619. Eh(p, "slide-up"),
  17620. Eh(p, "slide-down"),
  17621. fx(p, "zoom-big")
  17622. ];
  17623. }, (r) => {
  17624. const {
  17625. colorPrimary: i,
  17626. colorError: a,
  17627. colorTextDisabled: o,
  17628. colorErrorBg: s,
  17629. colorText: l,
  17630. colorTextDescription: u,
  17631. colorBgContainer: c,
  17632. colorFillAlter: f,
  17633. colorFillContent: d,
  17634. lineWidth: h,
  17635. lineWidthBold: p,
  17636. controlItemBgActive: v,
  17637. colorBgTextHover: g
  17638. } = r;
  17639. return {
  17640. dropdownWidth: 160,
  17641. zIndexPopup: r.zIndexPopupBase + 50,
  17642. radiusItem: r.borderRadiusLG,
  17643. radiusSubMenuItem: r.borderRadiusSM,
  17644. colorItemText: l,
  17645. colorItemTextHover: l,
  17646. colorItemTextHoverHorizontal: i,
  17647. colorGroupTitle: u,
  17648. colorItemTextSelected: i,
  17649. colorItemTextSelectedHorizontal: i,
  17650. colorItemBg: c,
  17651. colorItemBgHover: g,
  17652. colorItemBgActive: d,
  17653. colorSubItemBg: f,
  17654. colorItemBgSelected: v,
  17655. colorItemBgSelectedHorizontal: "transparent",
  17656. colorActiveBarWidth: 0,
  17657. colorActiveBarHeight: p,
  17658. colorActiveBarBorderSize: h,
  17659. // Disabled
  17660. colorItemTextDisabled: o,
  17661. // Danger
  17662. colorDangerItemText: a,
  17663. colorDangerItemTextHover: a,
  17664. colorDangerItemTextSelected: a,
  17665. colorDangerItemBgActive: s,
  17666. colorDangerItemBgSelected: s,
  17667. itemMarginInline: r.marginXXS
  17668. };
  17669. })(t), _Oe = () => ({
  17670. id: String,
  17671. prefixCls: String,
  17672. // donot use items, now only support inner use
  17673. items: Array,
  17674. disabled: Boolean,
  17675. inlineCollapsed: Boolean,
  17676. disabledOverflow: Boolean,
  17677. forceSubMenuRender: Boolean,
  17678. openKeys: Array,
  17679. selectedKeys: Array,
  17680. activeKey: String,
  17681. selectable: {
  17682. type: Boolean,
  17683. default: !0
  17684. },
  17685. multiple: {
  17686. type: Boolean,
  17687. default: !1
  17688. },
  17689. tabindex: {
  17690. type: [Number, String]
  17691. },
  17692. motion: Object,
  17693. role: String,
  17694. theme: {
  17695. type: String,
  17696. default: "light"
  17697. },
  17698. mode: {
  17699. type: String,
  17700. default: "vertical"
  17701. },
  17702. inlineIndent: {
  17703. type: Number,
  17704. default: 24
  17705. },
  17706. subMenuOpenDelay: {
  17707. type: Number,
  17708. default: 0
  17709. },
  17710. subMenuCloseDelay: {
  17711. type: Number,
  17712. default: 0.1
  17713. },
  17714. builtinPlacements: {
  17715. type: Object
  17716. },
  17717. triggerSubMenuAction: {
  17718. type: String,
  17719. default: "hover"
  17720. },
  17721. getPopupContainer: Function,
  17722. expandIcon: Function,
  17723. onOpenChange: Function,
  17724. onSelect: Function,
  17725. onDeselect: Function,
  17726. onClick: [Function, Array],
  17727. onFocus: Function,
  17728. onBlur: Function,
  17729. onMousedown: Function,
  17730. "onUpdate:openKeys": Function,
  17731. "onUpdate:selectedKeys": Function,
  17732. "onUpdate:activeKey": Function
  17733. }), x5 = [], jl = te({
  17734. compatConfig: {
  17735. MODE: 3
  17736. },
  17737. name: "AMenu",
  17738. inheritAttrs: !1,
  17739. props: _Oe(),
  17740. slots: Object,
  17741. setup(t, e) {
  17742. let {
  17743. slots: n,
  17744. emit: r,
  17745. attrs: i
  17746. } = e;
  17747. const {
  17748. direction: a,
  17749. getPrefixCls: o
  17750. } = It("menu", t), s = WU(), l = L(() => {
  17751. var K;
  17752. return o("menu", t.prefixCls || ((K = s == null ? void 0 : s.prefixCls) === null || K === void 0 ? void 0 : K.value));
  17753. }), [u, c] = bOe(l, L(() => !s)), f = ae(/* @__PURE__ */ new Map()), d = Ge(tOe, U(void 0)), h = L(() => d.value !== void 0 ? d.value : t.inlineCollapsed), {
  17754. itemsNodes: p
  17755. } = pOe(t), v = ae(!1);
  17756. it(() => {
  17757. v.value = !0;
  17758. }), ht(() => {
  17759. Gi(!(t.inlineCollapsed === !0 && t.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), Gi(!(d.value !== void 0 && t.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
  17760. });
  17761. const g = U([]), m = U([]), y = U({});
  17762. se(f, () => {
  17763. const K = {};
  17764. for (const ie of f.value.values())
  17765. K[ie.key] = ie;
  17766. y.value = K;
  17767. }, {
  17768. flush: "post"
  17769. }), ht(() => {
  17770. if (t.activeKey !== void 0) {
  17771. let K = [];
  17772. const ie = t.activeKey ? y.value[t.activeKey] : void 0;
  17773. ie && t.activeKey !== void 0 ? K = bC([].concat(z(ie.parentKeys), t.activeKey)) : K = [], Kp(g.value, K) || (g.value = K);
  17774. }
  17775. }), se(() => t.selectedKeys, (K) => {
  17776. K && (m.value = K.slice());
  17777. }, {
  17778. immediate: !0,
  17779. deep: !0
  17780. });
  17781. const b = U([]);
  17782. se([y, m], () => {
  17783. let K = [];
  17784. m.value.forEach((ie) => {
  17785. const X = y.value[ie];
  17786. X && (K = K.concat(z(X.parentKeys)));
  17787. }), K = bC(K), Kp(b.value, K) || (b.value = K);
  17788. }, {
  17789. immediate: !0
  17790. });
  17791. const _ = (K) => {
  17792. if (t.selectable) {
  17793. const {
  17794. key: ie
  17795. } = K, X = m.value.includes(ie);
  17796. let H;
  17797. t.multiple ? X ? H = m.value.filter((re) => re !== ie) : H = [...m.value, ie] : H = [ie];
  17798. const G = I(I({}, K), {
  17799. selectedKeys: H
  17800. });
  17801. Kp(H, m.value) || (t.selectedKeys === void 0 && (m.value = H), r("update:selectedKeys", H), X && t.multiple ? r("deselect", G) : r("select", G));
  17802. }
  17803. w.value !== "inline" && !t.multiple && O.value.length && A(x5);
  17804. }, O = U([]);
  17805. se(() => t.openKeys, function() {
  17806. let K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : O.value;
  17807. Kp(O.value, K) || (O.value = K.slice());
  17808. }, {
  17809. immediate: !0,
  17810. deep: !0
  17811. });
  17812. let S;
  17813. const x = (K) => {
  17814. clearTimeout(S), S = setTimeout(() => {
  17815. t.activeKey === void 0 && (g.value = K), r("update:activeKey", K[K.length - 1]);
  17816. });
  17817. }, C = L(() => !!t.disabled), T = L(() => a.value === "rtl"), w = U("vertical"), P = ae(!1);
  17818. ht(() => {
  17819. var K;
  17820. (t.mode === "inline" || t.mode === "vertical") && h.value ? (w.value = "vertical", P.value = h.value) : (w.value = t.mode, P.value = !1), !((K = s == null ? void 0 : s.mode) === null || K === void 0) && K.value && (w.value = s.mode.value);
  17821. });
  17822. const $ = L(() => w.value === "inline"), A = (K) => {
  17823. O.value = K, r("update:openKeys", K), r("openChange", K);
  17824. }, D = U(O.value), E = ae(!1);
  17825. se(O, () => {
  17826. $.value && (D.value = O.value);
  17827. }, {
  17828. immediate: !0
  17829. }), se($, () => {
  17830. if (!E.value) {
  17831. E.value = !0;
  17832. return;
  17833. }
  17834. $.value ? O.value = D.value : A(x5);
  17835. }, {
  17836. immediate: !0
  17837. });
  17838. const R = L(() => ({
  17839. [`${l.value}`]: !0,
  17840. [`${l.value}-root`]: !0,
  17841. [`${l.value}-${w.value}`]: !0,
  17842. [`${l.value}-inline-collapsed`]: P.value,
  17843. [`${l.value}-rtl`]: T.value,
  17844. [`${l.value}-${t.theme}`]: !0
  17845. })), N = L(() => o()), V = L(() => ({
  17846. horizontal: {
  17847. name: `${N.value}-slide-up`
  17848. },
  17849. inline: lD(`${N.value}-motion-collapse`),
  17850. other: {
  17851. name: `${N.value}-zoom-big`
  17852. }
  17853. }));
  17854. UU(!0);
  17855. const B = function() {
  17856. let K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  17857. const ie = [], X = f.value;
  17858. return K.forEach((H) => {
  17859. const {
  17860. key: G,
  17861. childrenEventKeys: re
  17862. } = X.get(H);
  17863. ie.push(G, ...B(z(re)));
  17864. }), ie;
  17865. }, W = (K) => {
  17866. var ie;
  17867. r("click", K), _(K), (ie = s == null ? void 0 : s.onClick) === null || ie === void 0 || ie.call(s);
  17868. }, F = (K, ie) => {
  17869. var X;
  17870. const H = ((X = y.value[K]) === null || X === void 0 ? void 0 : X.childrenEventKeys) || [];
  17871. let G = O.value.filter((re) => re !== K);
  17872. if (ie)
  17873. G.push(K);
  17874. else if (w.value !== "inline") {
  17875. const re = B(z(H));
  17876. G = bC(G.filter((fe) => !re.includes(fe)));
  17877. }
  17878. Kp(O, G) || A(G);
  17879. }, Q = (K, ie) => {
  17880. f.value.set(K, ie), f.value = new Map(f.value);
  17881. }, Z = (K) => {
  17882. f.value.delete(K), f.value = new Map(f.value);
  17883. }, ne = U(0), ee = L(() => {
  17884. var K;
  17885. return t.expandIcon || n.expandIcon || !((K = s == null ? void 0 : s.expandIcon) === null || K === void 0) && K.value ? (ie) => {
  17886. let X = t.expandIcon || n.expandIcon;
  17887. return X = typeof X == "function" ? X(ie) : X, Pn(X, {
  17888. class: `${l.value}-submenu-expand-icon`
  17889. }, !1);
  17890. } : null;
  17891. });
  17892. eOe({
  17893. prefixCls: l,
  17894. activeKeys: g,
  17895. openKeys: O,
  17896. selectedKeys: m,
  17897. changeActiveKeys: x,
  17898. disabled: C,
  17899. rtl: T,
  17900. mode: w,
  17901. inlineIndent: L(() => t.inlineIndent),
  17902. subMenuCloseDelay: L(() => t.subMenuCloseDelay),
  17903. subMenuOpenDelay: L(() => t.subMenuOpenDelay),
  17904. builtinPlacements: L(() => t.builtinPlacements),
  17905. triggerSubMenuAction: L(() => t.triggerSubMenuAction),
  17906. getPopupContainer: L(() => t.getPopupContainer),
  17907. inlineCollapsed: P,
  17908. theme: L(() => t.theme),
  17909. siderCollapsed: d,
  17910. defaultMotions: L(() => v.value ? V.value : null),
  17911. motion: L(() => v.value ? t.motion : null),
  17912. overflowDisabled: ae(void 0),
  17913. onOpenChange: F,
  17914. onItemClick: W,
  17915. registerMenuInfo: Q,
  17916. unRegisterMenuInfo: Z,
  17917. selectedSubMenuKeys: b,
  17918. expandIcon: ee,
  17919. forceSubMenuRender: L(() => t.forceSubMenuRender),
  17920. rootClassName: c
  17921. });
  17922. const oe = () => {
  17923. var K;
  17924. return p.value || Yn((K = n.default) === null || K === void 0 ? void 0 : K.call(n));
  17925. };
  17926. return () => {
  17927. var K;
  17928. const ie = oe(), X = ne.value >= ie.length - 1 || w.value !== "horizontal" || t.disabledOverflow, H = (re) => w.value !== "horizontal" || t.disabledOverflow ? re : (
  17929. // Need wrap for overflow dropdown that do not response for open
  17930. re.map((fe, de) => (
  17931. // Always wrap provider to avoid sub node re-mount
  17932. M(L1, {
  17933. key: fe.key,
  17934. overflowDisabled: de > ne.value
  17935. }, {
  17936. default: () => fe
  17937. })
  17938. ))
  17939. ), G = ((K = n.overflowedIndicator) === null || K === void 0 ? void 0 : K.call(n)) || M(vx, null, null);
  17940. return u(M(Is, j(j({}, i), {}, {
  17941. onMousedown: t.onMousedown,
  17942. prefixCls: `${l.value}-overflow`,
  17943. component: "ul",
  17944. itemComponent: Mh,
  17945. class: [R.value, i.class, c.value],
  17946. role: "menu",
  17947. id: t.id,
  17948. data: H(ie),
  17949. renderRawItem: (re) => re,
  17950. renderRawRest: (re) => {
  17951. const fe = re.length, de = fe ? ie.slice(-fe) : null;
  17952. return M(wt, null, [M(Ih, {
  17953. eventKey: Iy,
  17954. key: Iy,
  17955. title: G,
  17956. disabled: X,
  17957. internalPopupClose: fe === 0
  17958. }, {
  17959. default: () => de
  17960. }), M(h5, null, {
  17961. default: () => [M(Ih, {
  17962. eventKey: Iy,
  17963. key: Iy,
  17964. title: G,
  17965. disabled: X,
  17966. internalPopupClose: fe === 0
  17967. }, {
  17968. default: () => de
  17969. })]
  17970. })]);
  17971. },
  17972. maxCount: w.value !== "horizontal" || t.disabledOverflow ? Is.INVALIDATE : Is.RESPONSIVE,
  17973. ssr: "full",
  17974. "data-menu-list": !0,
  17975. onVisibleChange: (re) => {
  17976. ne.value = re;
  17977. }
  17978. }), {
  17979. default: () => [M(AS, {
  17980. to: "body"
  17981. }, {
  17982. default: () => [M("div", {
  17983. style: {
  17984. display: "none"
  17985. },
  17986. "aria-hidden": !0
  17987. }, [M(h5, null, {
  17988. default: () => [H(oe())]
  17989. })])]
  17990. })]
  17991. }));
  17992. };
  17993. }
  17994. });
  17995. jl.install = function(t) {
  17996. return t.component(jl.name, jl), t.component(Mh.name, Mh), t.component(Ih.name, Ih), t.component(B1.name, B1), t.component(N1.name, N1), t;
  17997. };
  17998. jl.Item = Mh;
  17999. jl.Divider = B1;
  18000. jl.SubMenu = Ih;
  18001. jl.ItemGroup = N1;
  18002. var Dy = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
  18003. function mx(t) {
  18004. return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
  18005. }
  18006. var OOe = function(t, e) {
  18007. var n = {};
  18008. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  18009. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  18010. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  18011. return n;
  18012. };
  18013. const SOe = {
  18014. prefixCls: String,
  18015. name: String,
  18016. id: String,
  18017. type: String,
  18018. defaultChecked: {
  18019. type: [Boolean, Number],
  18020. default: void 0
  18021. },
  18022. checked: {
  18023. type: [Boolean, Number],
  18024. default: void 0
  18025. },
  18026. disabled: Boolean,
  18027. tabindex: {
  18028. type: [Number, String]
  18029. },
  18030. readonly: Boolean,
  18031. autofocus: Boolean,
  18032. value: Y.any,
  18033. required: Boolean
  18034. }, JU = te({
  18035. compatConfig: {
  18036. MODE: 3
  18037. },
  18038. name: "Checkbox",
  18039. inheritAttrs: !1,
  18040. props: sr(SOe, {
  18041. prefixCls: "rc-checkbox",
  18042. type: "checkbox",
  18043. defaultChecked: !1
  18044. }),
  18045. emits: ["click", "change"],
  18046. setup(t, e) {
  18047. let {
  18048. attrs: n,
  18049. emit: r,
  18050. expose: i
  18051. } = e;
  18052. const a = U(t.checked === void 0 ? t.defaultChecked : t.checked), o = U();
  18053. se(() => t.checked, () => {
  18054. a.value = t.checked;
  18055. }), i({
  18056. focus() {
  18057. var c;
  18058. (c = o.value) === null || c === void 0 || c.focus();
  18059. },
  18060. blur() {
  18061. var c;
  18062. (c = o.value) === null || c === void 0 || c.blur();
  18063. }
  18064. });
  18065. const s = U(), l = (c) => {
  18066. if (t.disabled)
  18067. return;
  18068. t.checked === void 0 && (a.value = c.target.checked), c.shiftKey = s.value;
  18069. const f = {
  18070. target: I(I({}, t), {
  18071. checked: c.target.checked
  18072. }),
  18073. stopPropagation() {
  18074. c.stopPropagation();
  18075. },
  18076. preventDefault() {
  18077. c.preventDefault();
  18078. },
  18079. nativeEvent: c
  18080. };
  18081. t.checked !== void 0 && (o.value.checked = !!t.checked), r("change", f), s.value = !1;
  18082. }, u = (c) => {
  18083. r("click", c), s.value = c.shiftKey;
  18084. };
  18085. return () => {
  18086. const {
  18087. prefixCls: c,
  18088. name: f,
  18089. id: d,
  18090. type: h,
  18091. disabled: p,
  18092. readonly: v,
  18093. tabindex: g,
  18094. autofocus: m,
  18095. value: y,
  18096. required: b
  18097. } = t, _ = OOe(t, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
  18098. class: O,
  18099. onFocus: S,
  18100. onBlur: x,
  18101. onKeydown: C,
  18102. onKeypress: T,
  18103. onKeyup: w
  18104. } = n, P = I(I({}, _), n), $ = Object.keys(P).reduce((E, R) => ((R.startsWith("data-") || R.startsWith("aria-") || R === "role") && (E[R] = P[R]), E), {}), A = ye(c, O, {
  18105. [`${c}-checked`]: a.value,
  18106. [`${c}-disabled`]: p
  18107. }), D = I(I({
  18108. name: f,
  18109. id: d,
  18110. type: h,
  18111. readonly: v,
  18112. disabled: p,
  18113. tabindex: g,
  18114. class: `${c}-input`,
  18115. checked: !!a.value,
  18116. autofocus: m,
  18117. value: y
  18118. }, $), {
  18119. onChange: l,
  18120. onClick: u,
  18121. onFocus: S,
  18122. onBlur: x,
  18123. onKeydown: C,
  18124. onKeypress: T,
  18125. onKeyup: w,
  18126. required: b
  18127. });
  18128. return M("span", {
  18129. class: A
  18130. }, [M("input", j({
  18131. ref: o
  18132. }, D), null), M("span", {
  18133. class: `${c}-inner`
  18134. }, null)]);
  18135. };
  18136. }
  18137. }), eX = Symbol("radioGroupContextKey"), xOe = (t) => {
  18138. pt(eX, t);
  18139. }, wOe = () => Ge(eX, void 0), tX = Symbol("radioOptionTypeContextKey"), COe = (t) => {
  18140. pt(tX, t);
  18141. }, TOe = () => Ge(tX, void 0), POe = new Ot("antRadioEffect", {
  18142. "0%": {
  18143. transform: "scale(1)",
  18144. opacity: 0.5
  18145. },
  18146. "100%": {
  18147. transform: "scale(1.6)",
  18148. opacity: 0
  18149. }
  18150. }), $Oe = (t) => {
  18151. const {
  18152. componentCls: e,
  18153. antCls: n
  18154. } = t, r = `${e}-group`;
  18155. return {
  18156. [r]: I(I({}, nn(t)), {
  18157. display: "inline-block",
  18158. fontSize: 0,
  18159. // RTL
  18160. [`&${r}-rtl`]: {
  18161. direction: "rtl"
  18162. },
  18163. [`${n}-badge ${n}-badge-count`]: {
  18164. zIndex: 1
  18165. },
  18166. [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
  18167. borderInlineStart: "none"
  18168. }
  18169. })
  18170. };
  18171. }, AOe = (t) => {
  18172. const {
  18173. componentCls: e,
  18174. radioWrapperMarginRight: n,
  18175. radioCheckedColor: r,
  18176. radioSize: i,
  18177. motionDurationSlow: a,
  18178. motionDurationMid: o,
  18179. motionEaseInOut: s,
  18180. motionEaseInOutCirc: l,
  18181. radioButtonBg: u,
  18182. colorBorder: c,
  18183. lineWidth: f,
  18184. radioDotSize: d,
  18185. colorBgContainerDisabled: h,
  18186. colorTextDisabled: p,
  18187. paddingXS: v,
  18188. radioDotDisabledColor: g,
  18189. lineType: m,
  18190. radioDotDisabledSize: y,
  18191. wireframe: b,
  18192. colorWhite: _
  18193. } = t, O = `${e}-inner`;
  18194. return {
  18195. [`${e}-wrapper`]: I(I({}, nn(t)), {
  18196. position: "relative",
  18197. display: "inline-flex",
  18198. alignItems: "baseline",
  18199. marginInlineStart: 0,
  18200. marginInlineEnd: n,
  18201. cursor: "pointer",
  18202. // RTL
  18203. [`&${e}-wrapper-rtl`]: {
  18204. direction: "rtl"
  18205. },
  18206. "&-disabled": {
  18207. cursor: "not-allowed",
  18208. color: t.colorTextDisabled
  18209. },
  18210. "&::after": {
  18211. display: "inline-block",
  18212. width: 0,
  18213. overflow: "hidden",
  18214. content: '"\\a0"'
  18215. },
  18216. // hashId 在 wrapper 上,只能铺平
  18217. [`${e}-checked::after`]: {
  18218. position: "absolute",
  18219. insetBlockStart: 0,
  18220. insetInlineStart: 0,
  18221. width: "100%",
  18222. height: "100%",
  18223. border: `${f}px ${m} ${r}`,
  18224. borderRadius: "50%",
  18225. visibility: "hidden",
  18226. animationName: POe,
  18227. animationDuration: a,
  18228. animationTimingFunction: s,
  18229. animationFillMode: "both",
  18230. content: '""'
  18231. },
  18232. [e]: I(I({}, nn(t)), {
  18233. position: "relative",
  18234. display: "inline-block",
  18235. outline: "none",
  18236. cursor: "pointer",
  18237. alignSelf: "center"
  18238. }),
  18239. [`${e}-wrapper:hover &,
  18240. &:hover ${O}`]: {
  18241. borderColor: r
  18242. },
  18243. [`${e}-input:focus-visible + ${O}`]: I({}, h0(t)),
  18244. [`${e}:hover::after, ${e}-wrapper:hover &::after`]: {
  18245. visibility: "visible"
  18246. },
  18247. [`${e}-inner`]: {
  18248. "&::after": {
  18249. boxSizing: "border-box",
  18250. position: "absolute",
  18251. insetBlockStart: "50%",
  18252. insetInlineStart: "50%",
  18253. display: "block",
  18254. width: i,
  18255. height: i,
  18256. marginBlockStart: i / -2,
  18257. marginInlineStart: i / -2,
  18258. backgroundColor: b ? r : _,
  18259. borderBlockStart: 0,
  18260. borderInlineStart: 0,
  18261. borderRadius: i,
  18262. transform: "scale(0)",
  18263. opacity: 0,
  18264. transition: `all ${a} ${l}`,
  18265. content: '""'
  18266. },
  18267. boxSizing: "border-box",
  18268. position: "relative",
  18269. insetBlockStart: 0,
  18270. insetInlineStart: 0,
  18271. display: "block",
  18272. width: i,
  18273. height: i,
  18274. backgroundColor: u,
  18275. borderColor: c,
  18276. borderStyle: "solid",
  18277. borderWidth: f,
  18278. borderRadius: "50%",
  18279. transition: `all ${o}`
  18280. },
  18281. [`${e}-input`]: {
  18282. position: "absolute",
  18283. insetBlockStart: 0,
  18284. insetInlineEnd: 0,
  18285. insetBlockEnd: 0,
  18286. insetInlineStart: 0,
  18287. zIndex: 1,
  18288. cursor: "pointer",
  18289. opacity: 0
  18290. },
  18291. // 选中状态
  18292. [`${e}-checked`]: {
  18293. [O]: {
  18294. borderColor: r,
  18295. backgroundColor: b ? u : r,
  18296. "&::after": {
  18297. transform: `scale(${d / i})`,
  18298. opacity: 1,
  18299. transition: `all ${a} ${l}`
  18300. }
  18301. }
  18302. },
  18303. [`${e}-disabled`]: {
  18304. cursor: "not-allowed",
  18305. [O]: {
  18306. backgroundColor: h,
  18307. borderColor: c,
  18308. cursor: "not-allowed",
  18309. "&::after": {
  18310. backgroundColor: g
  18311. }
  18312. },
  18313. [`${e}-input`]: {
  18314. cursor: "not-allowed"
  18315. },
  18316. [`${e}-disabled + span`]: {
  18317. color: p,
  18318. cursor: "not-allowed"
  18319. },
  18320. [`&${e}-checked`]: {
  18321. [O]: {
  18322. "&::after": {
  18323. transform: `scale(${y / i})`
  18324. }
  18325. }
  18326. }
  18327. },
  18328. [`span${e} + *`]: {
  18329. paddingInlineStart: v,
  18330. paddingInlineEnd: v
  18331. }
  18332. })
  18333. };
  18334. }, EOe = (t) => {
  18335. const {
  18336. radioButtonColor: e,
  18337. controlHeight: n,
  18338. componentCls: r,
  18339. lineWidth: i,
  18340. lineType: a,
  18341. colorBorder: o,
  18342. motionDurationSlow: s,
  18343. motionDurationMid: l,
  18344. radioButtonPaddingHorizontal: u,
  18345. fontSize: c,
  18346. radioButtonBg: f,
  18347. fontSizeLG: d,
  18348. controlHeightLG: h,
  18349. controlHeightSM: p,
  18350. paddingXS: v,
  18351. borderRadius: g,
  18352. borderRadiusSM: m,
  18353. borderRadiusLG: y,
  18354. radioCheckedColor: b,
  18355. radioButtonCheckedBg: _,
  18356. radioButtonHoverColor: O,
  18357. radioButtonActiveColor: S,
  18358. radioSolidCheckedColor: x,
  18359. colorTextDisabled: C,
  18360. colorBgContainerDisabled: T,
  18361. radioDisabledButtonCheckedColor: w,
  18362. radioDisabledButtonCheckedBg: P
  18363. } = t;
  18364. return {
  18365. [`${r}-button-wrapper`]: {
  18366. position: "relative",
  18367. display: "inline-block",
  18368. height: n,
  18369. margin: 0,
  18370. paddingInline: u,
  18371. paddingBlock: 0,
  18372. color: e,
  18373. fontSize: c,
  18374. lineHeight: `${n - i * 2}px`,
  18375. background: f,
  18376. border: `${i}px ${a} ${o}`,
  18377. // strange align fix for chrome but works
  18378. // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
  18379. borderBlockStartWidth: i + 0.02,
  18380. borderInlineStartWidth: 0,
  18381. borderInlineEndWidth: i,
  18382. cursor: "pointer",
  18383. transition: [`color ${l}`, `background ${l}`, `border-color ${l}`, `box-shadow ${l}`].join(","),
  18384. a: {
  18385. color: e
  18386. },
  18387. [`> ${r}-button`]: {
  18388. position: "absolute",
  18389. insetBlockStart: 0,
  18390. insetInlineStart: 0,
  18391. zIndex: -1,
  18392. width: "100%",
  18393. height: "100%"
  18394. },
  18395. "&:not(:first-child)": {
  18396. "&::before": {
  18397. position: "absolute",
  18398. insetBlockStart: -i,
  18399. insetInlineStart: -i,
  18400. display: "block",
  18401. boxSizing: "content-box",
  18402. width: 1,
  18403. height: "100%",
  18404. paddingBlock: i,
  18405. paddingInline: 0,
  18406. backgroundColor: o,
  18407. transition: `background-color ${s}`,
  18408. content: '""'
  18409. }
  18410. },
  18411. "&:first-child": {
  18412. borderInlineStart: `${i}px ${a} ${o}`,
  18413. borderStartStartRadius: g,
  18414. borderEndStartRadius: g
  18415. },
  18416. "&:last-child": {
  18417. borderStartEndRadius: g,
  18418. borderEndEndRadius: g
  18419. },
  18420. "&:first-child:last-child": {
  18421. borderRadius: g
  18422. },
  18423. [`${r}-group-large &`]: {
  18424. height: h,
  18425. fontSize: d,
  18426. lineHeight: `${h - i * 2}px`,
  18427. "&:first-child": {
  18428. borderStartStartRadius: y,
  18429. borderEndStartRadius: y
  18430. },
  18431. "&:last-child": {
  18432. borderStartEndRadius: y,
  18433. borderEndEndRadius: y
  18434. }
  18435. },
  18436. [`${r}-group-small &`]: {
  18437. height: p,
  18438. paddingInline: v - i,
  18439. paddingBlock: 0,
  18440. lineHeight: `${p - i * 2}px`,
  18441. "&:first-child": {
  18442. borderStartStartRadius: m,
  18443. borderEndStartRadius: m
  18444. },
  18445. "&:last-child": {
  18446. borderStartEndRadius: m,
  18447. borderEndEndRadius: m
  18448. }
  18449. },
  18450. "&:hover": {
  18451. position: "relative",
  18452. color: b
  18453. },
  18454. "&:has(:focus-visible)": I({}, h0(t)),
  18455. [`${r}-inner, input[type='checkbox'], input[type='radio']`]: {
  18456. width: 0,
  18457. height: 0,
  18458. opacity: 0,
  18459. pointerEvents: "none"
  18460. },
  18461. [`&-checked:not(${r}-button-wrapper-disabled)`]: {
  18462. zIndex: 1,
  18463. color: b,
  18464. background: _,
  18465. borderColor: b,
  18466. "&::before": {
  18467. backgroundColor: b
  18468. },
  18469. "&:first-child": {
  18470. borderColor: b
  18471. },
  18472. "&:hover": {
  18473. color: O,
  18474. borderColor: O,
  18475. "&::before": {
  18476. backgroundColor: O
  18477. }
  18478. },
  18479. "&:active": {
  18480. color: S,
  18481. borderColor: S,
  18482. "&::before": {
  18483. backgroundColor: S
  18484. }
  18485. }
  18486. },
  18487. [`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]: {
  18488. color: x,
  18489. background: b,
  18490. borderColor: b,
  18491. "&:hover": {
  18492. color: x,
  18493. background: O,
  18494. borderColor: O
  18495. },
  18496. "&:active": {
  18497. color: x,
  18498. background: S,
  18499. borderColor: S
  18500. }
  18501. },
  18502. "&-disabled": {
  18503. color: C,
  18504. backgroundColor: T,
  18505. borderColor: o,
  18506. cursor: "not-allowed",
  18507. "&:first-child, &:hover": {
  18508. color: C,
  18509. backgroundColor: T,
  18510. borderColor: o
  18511. }
  18512. },
  18513. [`&-disabled${r}-button-wrapper-checked`]: {
  18514. color: w,
  18515. backgroundColor: P,
  18516. borderColor: o,
  18517. boxShadow: "none"
  18518. }
  18519. }
  18520. };
  18521. }, nX = Sn("Radio", (t) => {
  18522. const {
  18523. padding: e,
  18524. lineWidth: n,
  18525. controlItemBgActiveDisabled: r,
  18526. colorTextDisabled: i,
  18527. colorBgContainer: a,
  18528. fontSizeLG: o,
  18529. controlOutline: s,
  18530. colorPrimaryHover: l,
  18531. colorPrimaryActive: u,
  18532. colorText: c,
  18533. colorPrimary: f,
  18534. marginXS: d,
  18535. controlOutlineWidth: h,
  18536. colorTextLightSolid: p,
  18537. wireframe: v
  18538. } = t, g = `0 0 0 ${h}px ${s}`, m = g, y = o, b = 4, _ = y - b * 2, O = v ? _ : y - (b + n) * 2, S = f, x = c, C = l, T = u, w = e - n, A = Bt(t, {
  18539. radioFocusShadow: g,
  18540. radioButtonFocusShadow: m,
  18541. radioSize: y,
  18542. radioDotSize: O,
  18543. radioDotDisabledSize: _,
  18544. radioCheckedColor: S,
  18545. radioDotDisabledColor: i,
  18546. radioSolidCheckedColor: p,
  18547. radioButtonBg: a,
  18548. radioButtonCheckedBg: a,
  18549. radioButtonColor: x,
  18550. radioButtonHoverColor: C,
  18551. radioButtonActiveColor: T,
  18552. radioButtonPaddingHorizontal: w,
  18553. radioDisabledButtonCheckedBg: r,
  18554. radioDisabledButtonCheckedColor: i,
  18555. radioWrapperMarginRight: d
  18556. });
  18557. return [$Oe(A), AOe(A), EOe(A)];
  18558. });
  18559. var MOe = function(t, e) {
  18560. var n = {};
  18561. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  18562. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  18563. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  18564. return n;
  18565. };
  18566. const rX = () => ({
  18567. prefixCls: String,
  18568. checked: nt(),
  18569. disabled: nt(),
  18570. isGroup: nt(),
  18571. value: Y.any,
  18572. name: String,
  18573. id: String,
  18574. autofocus: nt(),
  18575. onChange: tt(),
  18576. onFocus: tt(),
  18577. onBlur: tt(),
  18578. onClick: tt(),
  18579. "onUpdate:checked": tt(),
  18580. "onUpdate:value": tt()
  18581. }), hi = te({
  18582. compatConfig: {
  18583. MODE: 3
  18584. },
  18585. name: "ARadio",
  18586. inheritAttrs: !1,
  18587. props: rX(),
  18588. setup(t, e) {
  18589. let {
  18590. emit: n,
  18591. expose: r,
  18592. slots: i,
  18593. attrs: a
  18594. } = e;
  18595. const o = ls(), s = ao.useInject(), l = TOe(), u = wOe(), c = Jo(), f = L(() => {
  18596. var C;
  18597. return (C = v.value) !== null && C !== void 0 ? C : c.value;
  18598. }), d = U(), {
  18599. prefixCls: h,
  18600. direction: p,
  18601. disabled: v
  18602. } = It("radio", t), g = L(() => (u == null ? void 0 : u.optionType.value) === "button" || l === "button" ? `${h.value}-button` : h.value), m = Jo(), [y, b] = nX(h);
  18603. r({
  18604. focus: () => {
  18605. d.value.focus();
  18606. },
  18607. blur: () => {
  18608. d.value.blur();
  18609. }
  18610. });
  18611. const S = (C) => {
  18612. const T = C.target.checked;
  18613. n("update:checked", T), n("update:value", T), n("change", C), o.onFieldChange();
  18614. }, x = (C) => {
  18615. n("change", C), u && u.onChange && u.onChange(C);
  18616. };
  18617. return () => {
  18618. var C;
  18619. const T = u, {
  18620. prefixCls: w,
  18621. id: P = o.id.value
  18622. } = t, $ = MOe(t, ["prefixCls", "id"]), A = I(I({
  18623. prefixCls: g.value,
  18624. id: P
  18625. }, or($, ["onUpdate:checked", "onUpdate:value"])), {
  18626. disabled: (C = v.value) !== null && C !== void 0 ? C : m.value
  18627. });
  18628. T ? (A.name = T.name.value, A.onChange = x, A.checked = t.value === T.value.value, A.disabled = f.value || T.disabled.value) : A.onChange = S;
  18629. const D = ye({
  18630. [`${g.value}-wrapper`]: !0,
  18631. [`${g.value}-wrapper-checked`]: A.checked,
  18632. [`${g.value}-wrapper-disabled`]: A.disabled,
  18633. [`${g.value}-wrapper-rtl`]: p.value === "rtl",
  18634. [`${g.value}-wrapper-in-form-item`]: s.isFormItemInput
  18635. }, a.class, b.value);
  18636. return y(M("label", j(j({}, a), {}, {
  18637. class: D
  18638. }), [M(JU, j(j({}, A), {}, {
  18639. type: "radio",
  18640. ref: d
  18641. }), null), i.default && M("span", null, [i.default()])]));
  18642. };
  18643. }
  18644. }), IOe = () => ({
  18645. prefixCls: String,
  18646. value: Y.any,
  18647. size: hn(),
  18648. options: cf(),
  18649. disabled: nt(),
  18650. name: String,
  18651. buttonStyle: hn("outline"),
  18652. id: String,
  18653. optionType: hn("default"),
  18654. onChange: tt(),
  18655. "onUpdate:value": tt()
  18656. }), gf = te({
  18657. compatConfig: {
  18658. MODE: 3
  18659. },
  18660. name: "ARadioGroup",
  18661. inheritAttrs: !1,
  18662. props: IOe(),
  18663. // emits: ['update:value', 'change'],
  18664. setup(t, e) {
  18665. let {
  18666. slots: n,
  18667. emit: r,
  18668. attrs: i
  18669. } = e;
  18670. const a = ls(), {
  18671. prefixCls: o,
  18672. direction: s,
  18673. size: l
  18674. } = It("radio", t), [u, c] = nX(o), f = U(t.value), d = U(!1);
  18675. return se(() => t.value, (p) => {
  18676. f.value = p, d.value = !1;
  18677. }), xOe({
  18678. onChange: (p) => {
  18679. const v = f.value, {
  18680. value: g
  18681. } = p.target;
  18682. "value" in t || (f.value = g), !d.value && g !== v && (d.value = !0, r("update:value", g), r("change", p), a.onFieldChange()), Tt(() => {
  18683. d.value = !1;
  18684. });
  18685. },
  18686. value: f,
  18687. disabled: L(() => t.disabled),
  18688. name: L(() => t.name),
  18689. optionType: L(() => t.optionType)
  18690. }), () => {
  18691. var p;
  18692. const {
  18693. options: v,
  18694. buttonStyle: g,
  18695. id: m = a.id.value
  18696. } = t, y = `${o.value}-group`, b = ye(y, `${y}-${g}`, {
  18697. [`${y}-${l.value}`]: l.value,
  18698. [`${y}-rtl`]: s.value === "rtl"
  18699. }, i.class, c.value);
  18700. let _ = null;
  18701. return v && v.length > 0 ? _ = v.map((O) => {
  18702. if (typeof O == "string" || typeof O == "number")
  18703. return M(hi, {
  18704. key: O,
  18705. prefixCls: o.value,
  18706. disabled: t.disabled,
  18707. value: O,
  18708. checked: f.value === O
  18709. }, {
  18710. default: () => [O]
  18711. });
  18712. const {
  18713. value: S,
  18714. disabled: x,
  18715. label: C
  18716. } = O;
  18717. return M(hi, {
  18718. key: `radio-group-value-options-${S}`,
  18719. prefixCls: o.value,
  18720. disabled: x || t.disabled,
  18721. value: S,
  18722. checked: f.value === S
  18723. }, {
  18724. default: () => [C]
  18725. });
  18726. }) : _ = (p = n.default) === null || p === void 0 ? void 0 : p.call(n), u(M("div", j(j({}, i), {}, {
  18727. class: b,
  18728. id: m
  18729. }), [_]));
  18730. };
  18731. }
  18732. }), Do = te({
  18733. compatConfig: {
  18734. MODE: 3
  18735. },
  18736. name: "ARadioButton",
  18737. inheritAttrs: !1,
  18738. props: rX(),
  18739. setup(t, e) {
  18740. let {
  18741. slots: n,
  18742. attrs: r
  18743. } = e;
  18744. const {
  18745. prefixCls: i
  18746. } = It("radio", t);
  18747. return COe("button"), () => {
  18748. var a;
  18749. return M(hi, j(j(j({}, r), t), {}, {
  18750. prefixCls: i.value
  18751. }), {
  18752. default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
  18753. });
  18754. };
  18755. }
  18756. });
  18757. hi.Group = gf;
  18758. hi.Button = Do;
  18759. hi.install = function(t) {
  18760. return t.component(hi.name, hi), t.component(hi.Group.name, hi.Group), t.component(hi.Button.name, hi.Button), t;
  18761. };
  18762. const iX = (t) => ({
  18763. // Firefox
  18764. "&::-moz-placeholder": {
  18765. opacity: 1
  18766. },
  18767. "&::placeholder": {
  18768. color: t,
  18769. userSelect: "none"
  18770. // https://github.com/ant-design/ant-design/pull/32639
  18771. },
  18772. "&:placeholder-shown": {
  18773. textOverflow: "ellipsis"
  18774. }
  18775. }), _0 = (t) => ({
  18776. borderColor: t.inputBorderHoverColor,
  18777. borderInlineEndWidth: t.lineWidth
  18778. }), z1 = (t) => ({
  18779. borderColor: t.inputBorderHoverColor,
  18780. boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`,
  18781. borderInlineEndWidth: t.lineWidth,
  18782. outline: 0
  18783. }), aX = (t) => ({
  18784. color: t.colorTextDisabled,
  18785. backgroundColor: t.colorBgContainerDisabled,
  18786. borderColor: t.colorBorder,
  18787. boxShadow: "none",
  18788. cursor: "not-allowed",
  18789. opacity: 1,
  18790. "&:hover": I({}, _0(Bt(t, {
  18791. inputBorderHoverColor: t.colorBorder
  18792. })))
  18793. }), oX = (t) => {
  18794. const {
  18795. inputPaddingVerticalLG: e,
  18796. fontSizeLG: n,
  18797. lineHeightLG: r,
  18798. borderRadiusLG: i,
  18799. inputPaddingHorizontalLG: a
  18800. } = t;
  18801. return {
  18802. padding: `${e}px ${a}px`,
  18803. fontSize: n,
  18804. lineHeight: r,
  18805. borderRadius: i
  18806. };
  18807. }, sX = (t) => ({
  18808. padding: `${t.inputPaddingVerticalSM}px ${t.controlPaddingHorizontalSM - 1}px`,
  18809. borderRadius: t.borderRadiusSM
  18810. }), yx = (t, e) => {
  18811. const {
  18812. componentCls: n,
  18813. colorError: r,
  18814. colorWarning: i,
  18815. colorErrorOutline: a,
  18816. colorWarningOutline: o,
  18817. colorErrorBorderHover: s,
  18818. colorWarningBorderHover: l
  18819. } = t;
  18820. return {
  18821. [`&-status-error:not(${e}-disabled):not(${e}-borderless)${e}`]: {
  18822. borderColor: r,
  18823. "&:hover": {
  18824. borderColor: s
  18825. },
  18826. "&:focus, &-focused": I({}, z1(Bt(t, {
  18827. inputBorderActiveColor: r,
  18828. inputBorderHoverColor: r,
  18829. controlOutline: a
  18830. }))),
  18831. [`${n}-prefix`]: {
  18832. color: r
  18833. }
  18834. },
  18835. [`&-status-warning:not(${e}-disabled):not(${e}-borderless)${e}`]: {
  18836. borderColor: i,
  18837. "&:hover": {
  18838. borderColor: l
  18839. },
  18840. "&:focus, &-focused": I({}, z1(Bt(t, {
  18841. inputBorderActiveColor: i,
  18842. inputBorderHoverColor: i,
  18843. controlOutline: o
  18844. }))),
  18845. [`${n}-prefix`]: {
  18846. color: i
  18847. }
  18848. }
  18849. };
  18850. }, bx = (t) => I(I({
  18851. position: "relative",
  18852. display: "inline-block",
  18853. width: "100%",
  18854. minWidth: 0,
  18855. padding: `${t.inputPaddingVertical}px ${t.inputPaddingHorizontal}px`,
  18856. color: t.colorText,
  18857. fontSize: t.fontSize,
  18858. lineHeight: t.lineHeight,
  18859. backgroundColor: t.colorBgContainer,
  18860. backgroundImage: "none",
  18861. borderWidth: t.lineWidth,
  18862. borderStyle: t.lineType,
  18863. borderColor: t.colorBorder,
  18864. borderRadius: t.borderRadius,
  18865. transition: `all ${t.motionDurationMid}`
  18866. }, iX(t.colorTextPlaceholder)), {
  18867. "&:hover": I({}, _0(t)),
  18868. "&:focus, &-focused": I({}, z1(t)),
  18869. "&-disabled, &[disabled]": I({}, aX(t)),
  18870. "&-borderless": {
  18871. "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
  18872. backgroundColor: "transparent",
  18873. border: "none",
  18874. boxShadow: "none"
  18875. }
  18876. },
  18877. // Reset height for `textarea`s
  18878. "textarea&": {
  18879. maxWidth: "100%",
  18880. height: "auto",
  18881. minHeight: t.controlHeight,
  18882. lineHeight: t.lineHeight,
  18883. verticalAlign: "bottom",
  18884. transition: `all ${t.motionDurationSlow}, height 0s`,
  18885. resize: "vertical"
  18886. },
  18887. // Size
  18888. "&-lg": I({}, oX(t)),
  18889. "&-sm": I({}, sX(t)),
  18890. // RTL
  18891. "&-rtl": {
  18892. direction: "rtl"
  18893. },
  18894. "&-textarea-rtl": {
  18895. direction: "rtl"
  18896. }
  18897. }), lX = (t) => {
  18898. const {
  18899. componentCls: e,
  18900. antCls: n
  18901. } = t;
  18902. return {
  18903. position: "relative",
  18904. display: "table",
  18905. width: "100%",
  18906. borderCollapse: "separate",
  18907. borderSpacing: 0,
  18908. // Undo padding and float of grid classes
  18909. "&[class*='col-']": {
  18910. paddingInlineEnd: t.paddingXS,
  18911. "&:last-child": {
  18912. paddingInlineEnd: 0
  18913. }
  18914. },
  18915. // Sizing options
  18916. [`&-lg ${e}, &-lg > ${e}-group-addon`]: I({}, oX(t)),
  18917. [`&-sm ${e}, &-sm > ${e}-group-addon`]: I({}, sX(t)),
  18918. [`> ${e}`]: {
  18919. display: "table-cell",
  18920. "&:not(:first-child):not(:last-child)": {
  18921. borderRadius: 0
  18922. }
  18923. },
  18924. [`${e}-group`]: {
  18925. "&-addon, &-wrap": {
  18926. display: "table-cell",
  18927. width: 1,
  18928. whiteSpace: "nowrap",
  18929. verticalAlign: "middle",
  18930. "&:not(:first-child):not(:last-child)": {
  18931. borderRadius: 0
  18932. }
  18933. },
  18934. "&-wrap > *": {
  18935. display: "block !important"
  18936. },
  18937. "&-addon": {
  18938. position: "relative",
  18939. padding: `0 ${t.inputPaddingHorizontal}px`,
  18940. color: t.colorText,
  18941. fontWeight: "normal",
  18942. fontSize: t.fontSize,
  18943. textAlign: "center",
  18944. backgroundColor: t.colorFillAlter,
  18945. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  18946. borderRadius: t.borderRadius,
  18947. transition: `all ${t.motionDurationSlow}`,
  18948. lineHeight: 1,
  18949. // Reset Select's style in addon
  18950. [`${n}-select`]: {
  18951. margin: `-${t.inputPaddingVertical + 1}px -${t.inputPaddingHorizontal}px`,
  18952. [`&${n}-select-single:not(${n}-select-customize-input)`]: {
  18953. [`${n}-select-selector`]: {
  18954. backgroundColor: "inherit",
  18955. border: `${t.lineWidth}px ${t.lineType} transparent`,
  18956. boxShadow: "none"
  18957. }
  18958. },
  18959. "&-open, &-focused": {
  18960. [`${n}-select-selector`]: {
  18961. color: t.colorPrimary
  18962. }
  18963. }
  18964. },
  18965. // https://github.com/ant-design/ant-design/issues/31333
  18966. [`${n}-cascader-picker`]: {
  18967. margin: `-9px -${t.inputPaddingHorizontal}px`,
  18968. backgroundColor: "transparent",
  18969. [`${n}-cascader-input`]: {
  18970. textAlign: "start",
  18971. border: 0,
  18972. boxShadow: "none"
  18973. }
  18974. }
  18975. },
  18976. "&-addon:first-child": {
  18977. borderInlineEnd: 0
  18978. },
  18979. "&-addon:last-child": {
  18980. borderInlineStart: 0
  18981. }
  18982. },
  18983. [`${e}`]: {
  18984. float: "inline-start",
  18985. width: "100%",
  18986. marginBottom: 0,
  18987. textAlign: "inherit",
  18988. "&:focus": {
  18989. zIndex: 1,
  18990. borderInlineEndWidth: 1
  18991. },
  18992. "&:hover": {
  18993. zIndex: 1,
  18994. borderInlineEndWidth: 1,
  18995. [`${e}-search-with-button &`]: {
  18996. zIndex: 0
  18997. }
  18998. }
  18999. },
  19000. // Reset rounded corners
  19001. [`> ${e}:first-child, ${e}-group-addon:first-child`]: {
  19002. borderStartEndRadius: 0,
  19003. borderEndEndRadius: 0,
  19004. // Reset Select's style in addon
  19005. [`${n}-select ${n}-select-selector`]: {
  19006. borderStartEndRadius: 0,
  19007. borderEndEndRadius: 0
  19008. }
  19009. },
  19010. [`> ${e}-affix-wrapper`]: {
  19011. [`&:not(:first-child) ${e}`]: {
  19012. borderStartStartRadius: 0,
  19013. borderEndStartRadius: 0
  19014. },
  19015. [`&:not(:last-child) ${e}`]: {
  19016. borderStartEndRadius: 0,
  19017. borderEndEndRadius: 0
  19018. }
  19019. },
  19020. [`> ${e}:last-child, ${e}-group-addon:last-child`]: {
  19021. borderStartStartRadius: 0,
  19022. borderEndStartRadius: 0,
  19023. // Reset Select's style in addon
  19024. [`${n}-select ${n}-select-selector`]: {
  19025. borderStartStartRadius: 0,
  19026. borderEndStartRadius: 0
  19027. }
  19028. },
  19029. [`${e}-affix-wrapper`]: {
  19030. "&:not(:last-child)": {
  19031. borderStartEndRadius: 0,
  19032. borderEndEndRadius: 0,
  19033. [`${e}-search &`]: {
  19034. borderStartStartRadius: t.borderRadius,
  19035. borderEndStartRadius: t.borderRadius
  19036. }
  19037. },
  19038. [`&:not(:first-child), ${e}-search &:not(:first-child)`]: {
  19039. borderStartStartRadius: 0,
  19040. borderEndStartRadius: 0
  19041. }
  19042. },
  19043. [`&${e}-group-compact`]: I(I({
  19044. display: "block"
  19045. }, S1()), {
  19046. [`${e}-group-addon, ${e}-group-wrap, > ${e}`]: {
  19047. "&:not(:first-child):not(:last-child)": {
  19048. borderInlineEndWidth: t.lineWidth,
  19049. "&:hover": {
  19050. zIndex: 1
  19051. },
  19052. "&:focus": {
  19053. zIndex: 1
  19054. }
  19055. }
  19056. },
  19057. "& > *": {
  19058. display: "inline-block",
  19059. float: "none",
  19060. verticalAlign: "top",
  19061. borderRadius: 0
  19062. },
  19063. [`& > ${e}-affix-wrapper`]: {
  19064. display: "inline-flex"
  19065. },
  19066. [`& > ${n}-picker-range`]: {
  19067. display: "inline-flex"
  19068. },
  19069. "& > *:not(:last-child)": {
  19070. marginInlineEnd: -t.lineWidth,
  19071. borderInlineEndWidth: t.lineWidth
  19072. },
  19073. // Undo float for .ant-input-group .ant-input
  19074. [`${e}`]: {
  19075. float: "none"
  19076. },
  19077. // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
  19078. [`& > ${n}-select > ${n}-select-selector,
  19079. & > ${n}-select-auto-complete ${e},
  19080. & > ${n}-cascader-picker ${e},
  19081. & > ${e}-group-wrapper ${e}`]: {
  19082. borderInlineEndWidth: t.lineWidth,
  19083. borderRadius: 0,
  19084. "&:hover": {
  19085. zIndex: 1
  19086. },
  19087. "&:focus": {
  19088. zIndex: 1
  19089. }
  19090. },
  19091. [`& > ${n}-select-focused`]: {
  19092. zIndex: 1
  19093. },
  19094. // update z-index for arrow icon
  19095. [`& > ${n}-select > ${n}-select-arrow`]: {
  19096. zIndex: 1
  19097. // https://github.com/ant-design/ant-design/issues/20371
  19098. },
  19099. [`& > *:first-child,
  19100. & > ${n}-select:first-child > ${n}-select-selector,
  19101. & > ${n}-select-auto-complete:first-child ${e},
  19102. & > ${n}-cascader-picker:first-child ${e}`]: {
  19103. borderStartStartRadius: t.borderRadius,
  19104. borderEndStartRadius: t.borderRadius
  19105. },
  19106. [`& > *:last-child,
  19107. & > ${n}-select:last-child > ${n}-select-selector,
  19108. & > ${n}-cascader-picker:last-child ${e},
  19109. & > ${n}-cascader-picker-focused:last-child ${e}`]: {
  19110. borderInlineEndWidth: t.lineWidth,
  19111. borderStartEndRadius: t.borderRadius,
  19112. borderEndEndRadius: t.borderRadius
  19113. },
  19114. // https://github.com/ant-design/ant-design/issues/12493
  19115. [`& > ${n}-select-auto-complete ${e}`]: {
  19116. verticalAlign: "top"
  19117. },
  19118. [`${e}-group-wrapper + ${e}-group-wrapper`]: {
  19119. marginInlineStart: -t.lineWidth,
  19120. [`${e}-affix-wrapper`]: {
  19121. borderRadius: 0
  19122. }
  19123. },
  19124. [`${e}-group-wrapper:not(:last-child)`]: {
  19125. [`&${e}-search > ${e}-group`]: {
  19126. [`& > ${e}-group-addon > ${e}-search-button`]: {
  19127. borderRadius: 0
  19128. },
  19129. [`& > ${e}`]: {
  19130. borderStartStartRadius: t.borderRadius,
  19131. borderStartEndRadius: 0,
  19132. borderEndEndRadius: 0,
  19133. borderEndStartRadius: t.borderRadius
  19134. }
  19135. }
  19136. }
  19137. }),
  19138. [`&&-sm ${n}-btn`]: {
  19139. fontSize: t.fontSizeSM,
  19140. height: t.controlHeightSM,
  19141. lineHeight: "normal"
  19142. },
  19143. [`&&-lg ${n}-btn`]: {
  19144. fontSize: t.fontSizeLG,
  19145. height: t.controlHeightLG,
  19146. lineHeight: "normal"
  19147. },
  19148. // Fix https://github.com/ant-design/ant-design/issues/5754
  19149. [`&&-lg ${n}-select-single ${n}-select-selector`]: {
  19150. height: `${t.controlHeightLG}px`,
  19151. [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
  19152. // -2 is for the border size & override default
  19153. lineHeight: `${t.controlHeightLG - 2}px`
  19154. },
  19155. [`${n}-select-selection-search-input`]: {
  19156. height: `${t.controlHeightLG}px`
  19157. }
  19158. },
  19159. [`&&-sm ${n}-select-single ${n}-select-selector`]: {
  19160. height: `${t.controlHeightSM}px`,
  19161. [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
  19162. // -2 is for the border size & override default
  19163. lineHeight: `${t.controlHeightSM - 2}px`
  19164. },
  19165. [`${n}-select-selection-search-input`]: {
  19166. height: `${t.controlHeightSM}px`
  19167. }
  19168. }
  19169. };
  19170. }, DOe = (t) => {
  19171. const {
  19172. componentCls: e,
  19173. controlHeightSM: n,
  19174. lineWidth: r
  19175. } = t, a = (n - r * 2 - 16) / 2;
  19176. return {
  19177. [e]: I(I(I(I({}, nn(t)), bx(t)), yx(t, e)), {
  19178. '&[type="color"]': {
  19179. height: t.controlHeight,
  19180. [`&${e}-lg`]: {
  19181. height: t.controlHeightLG
  19182. },
  19183. [`&${e}-sm`]: {
  19184. height: n,
  19185. paddingTop: a,
  19186. paddingBottom: a
  19187. }
  19188. }
  19189. })
  19190. };
  19191. }, ROe = (t) => {
  19192. const {
  19193. componentCls: e
  19194. } = t;
  19195. return {
  19196. // ========================= Input =========================
  19197. [`${e}-clear-icon`]: {
  19198. margin: 0,
  19199. color: t.colorTextQuaternary,
  19200. fontSize: t.fontSizeIcon,
  19201. verticalAlign: -1,
  19202. // https://github.com/ant-design/ant-design/pull/18151
  19203. // https://codesandbox.io/s/wizardly-sun-u10br
  19204. cursor: "pointer",
  19205. transition: `color ${t.motionDurationSlow}`,
  19206. "&:hover": {
  19207. color: t.colorTextTertiary
  19208. },
  19209. "&:active": {
  19210. color: t.colorText
  19211. },
  19212. "&-hidden": {
  19213. visibility: "hidden"
  19214. },
  19215. "&-has-suffix": {
  19216. margin: `0 ${t.inputAffixPadding}px`
  19217. }
  19218. },
  19219. // ======================= TextArea ========================
  19220. "&-textarea-with-clear-btn": {
  19221. padding: "0 !important",
  19222. border: "0 !important",
  19223. [`${e}-clear-icon`]: {
  19224. position: "absolute",
  19225. insetBlockStart: t.paddingXS,
  19226. insetInlineEnd: t.paddingXS,
  19227. zIndex: 1
  19228. }
  19229. }
  19230. };
  19231. }, kOe = (t) => {
  19232. const {
  19233. componentCls: e,
  19234. inputAffixPadding: n,
  19235. colorTextDescription: r,
  19236. motionDurationSlow: i,
  19237. colorIcon: a,
  19238. colorIconHover: o,
  19239. iconCls: s
  19240. } = t;
  19241. return {
  19242. [`${e}-affix-wrapper`]: I(I(I(I(I({}, bx(t)), {
  19243. display: "inline-flex",
  19244. [`&:not(${e}-affix-wrapper-disabled):hover`]: I(I({}, _0(t)), {
  19245. zIndex: 1,
  19246. [`${e}-search-with-button &`]: {
  19247. zIndex: 0
  19248. }
  19249. }),
  19250. "&-focused, &:focus": {
  19251. zIndex: 1
  19252. },
  19253. "&-disabled": {
  19254. [`${e}[disabled]`]: {
  19255. background: "transparent"
  19256. }
  19257. },
  19258. [`> input${e}`]: {
  19259. padding: 0,
  19260. fontSize: "inherit",
  19261. border: "none",
  19262. borderRadius: 0,
  19263. outline: "none",
  19264. "&:focus": {
  19265. boxShadow: "none !important"
  19266. }
  19267. },
  19268. "&::before": {
  19269. width: 0,
  19270. visibility: "hidden",
  19271. content: '"\\a0"'
  19272. },
  19273. [`${e}`]: {
  19274. "&-prefix, &-suffix": {
  19275. display: "flex",
  19276. flex: "none",
  19277. alignItems: "center",
  19278. "> *:not(:last-child)": {
  19279. marginInlineEnd: t.paddingXS
  19280. }
  19281. },
  19282. "&-show-count-suffix": {
  19283. color: r
  19284. },
  19285. "&-show-count-has-suffix": {
  19286. marginInlineEnd: t.paddingXXS
  19287. },
  19288. "&-prefix": {
  19289. marginInlineEnd: n
  19290. },
  19291. "&-suffix": {
  19292. marginInlineStart: n
  19293. }
  19294. }
  19295. }), ROe(t)), {
  19296. // password
  19297. [`${s}${e}-password-icon`]: {
  19298. color: a,
  19299. cursor: "pointer",
  19300. transition: `all ${i}`,
  19301. "&:hover": {
  19302. color: o
  19303. }
  19304. }
  19305. }), yx(t, `${e}-affix-wrapper`))
  19306. };
  19307. }, LOe = (t) => {
  19308. const {
  19309. componentCls: e,
  19310. colorError: n,
  19311. colorSuccess: r,
  19312. borderRadiusLG: i,
  19313. borderRadiusSM: a
  19314. } = t;
  19315. return {
  19316. [`${e}-group`]: I(I(I({}, nn(t)), lX(t)), {
  19317. "&-rtl": {
  19318. direction: "rtl"
  19319. },
  19320. "&-wrapper": {
  19321. display: "inline-block",
  19322. width: "100%",
  19323. textAlign: "start",
  19324. verticalAlign: "top",
  19325. "&-rtl": {
  19326. direction: "rtl"
  19327. },
  19328. // Size
  19329. "&-lg": {
  19330. [`${e}-group-addon`]: {
  19331. borderRadius: i
  19332. }
  19333. },
  19334. "&-sm": {
  19335. [`${e}-group-addon`]: {
  19336. borderRadius: a
  19337. }
  19338. },
  19339. // Status
  19340. "&-status-error": {
  19341. [`${e}-group-addon`]: {
  19342. color: n,
  19343. borderColor: n
  19344. }
  19345. },
  19346. "&-status-warning": {
  19347. [`${e}-group-addon:last-child`]: {
  19348. color: r,
  19349. borderColor: r
  19350. }
  19351. }
  19352. }
  19353. })
  19354. };
  19355. }, NOe = (t) => {
  19356. const {
  19357. componentCls: e,
  19358. antCls: n
  19359. } = t, r = `${e}-search`;
  19360. return {
  19361. [r]: {
  19362. [`${e}`]: {
  19363. "&:hover, &:focus": {
  19364. borderColor: t.colorPrimaryHover,
  19365. [`+ ${e}-group-addon ${r}-button:not(${n}-btn-primary)`]: {
  19366. borderInlineStartColor: t.colorPrimaryHover
  19367. }
  19368. }
  19369. },
  19370. [`${e}-affix-wrapper`]: {
  19371. borderRadius: 0
  19372. },
  19373. // fix slight height diff in Firefox:
  19374. // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
  19375. [`${e}-lg`]: {
  19376. lineHeight: t.lineHeightLG - 2e-4
  19377. },
  19378. [`> ${e}-group`]: {
  19379. [`> ${e}-group-addon:last-child`]: {
  19380. insetInlineStart: -1,
  19381. padding: 0,
  19382. border: 0,
  19383. [`${r}-button`]: {
  19384. paddingTop: 0,
  19385. paddingBottom: 0,
  19386. borderStartStartRadius: 0,
  19387. borderStartEndRadius: t.borderRadius,
  19388. borderEndEndRadius: t.borderRadius,
  19389. borderEndStartRadius: 0
  19390. },
  19391. [`${r}-button:not(${n}-btn-primary)`]: {
  19392. color: t.colorTextDescription,
  19393. "&:hover": {
  19394. color: t.colorPrimaryHover
  19395. },
  19396. "&:active": {
  19397. color: t.colorPrimaryActive
  19398. },
  19399. [`&${n}-btn-loading::before`]: {
  19400. insetInlineStart: 0,
  19401. insetInlineEnd: 0,
  19402. insetBlockStart: 0,
  19403. insetBlockEnd: 0
  19404. }
  19405. }
  19406. }
  19407. },
  19408. [`${r}-button`]: {
  19409. height: t.controlHeight,
  19410. "&:hover, &:focus": {
  19411. zIndex: 1
  19412. }
  19413. },
  19414. [`&-large ${r}-button`]: {
  19415. height: t.controlHeightLG
  19416. },
  19417. [`&-small ${r}-button`]: {
  19418. height: t.controlHeightSM
  19419. },
  19420. "&-rtl": {
  19421. direction: "rtl"
  19422. },
  19423. // ===================== Compact Item Customized Styles =====================
  19424. [`&${e}-compact-item`]: {
  19425. [`&:not(${e}-compact-last-item)`]: {
  19426. [`${e}-group-addon`]: {
  19427. [`${e}-search-button`]: {
  19428. marginInlineEnd: -t.lineWidth,
  19429. borderRadius: 0
  19430. }
  19431. }
  19432. },
  19433. [`&:not(${e}-compact-first-item)`]: {
  19434. [`${e},${e}-affix-wrapper`]: {
  19435. borderRadius: 0
  19436. }
  19437. },
  19438. [`> ${e}-group-addon ${e}-search-button,
  19439. > ${e},
  19440. ${e}-affix-wrapper`]: {
  19441. "&:hover,&:focus,&:active": {
  19442. zIndex: 2
  19443. }
  19444. },
  19445. [`> ${e}-affix-wrapper-focused`]: {
  19446. zIndex: 2
  19447. }
  19448. }
  19449. }
  19450. };
  19451. };
  19452. function uX(t) {
  19453. return Bt(t, {
  19454. inputAffixPadding: t.paddingXXS,
  19455. inputPaddingVertical: Math.max(Math.round((t.controlHeight - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 3),
  19456. inputPaddingVerticalLG: Math.ceil((t.controlHeightLG - t.fontSizeLG * t.lineHeightLG) / 2 * 10) / 10 - t.lineWidth,
  19457. inputPaddingVerticalSM: Math.max(Math.round((t.controlHeightSM - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 0),
  19458. inputPaddingHorizontal: t.paddingSM - t.lineWidth,
  19459. inputPaddingHorizontalSM: t.paddingXS - t.lineWidth,
  19460. inputPaddingHorizontalLG: t.controlPaddingHorizontal - t.lineWidth,
  19461. inputBorderHoverColor: t.colorPrimaryHover,
  19462. inputBorderActiveColor: t.colorPrimaryHover
  19463. });
  19464. }
  19465. const BOe = (t) => {
  19466. const {
  19467. componentCls: e,
  19468. inputPaddingHorizontal: n,
  19469. paddingLG: r
  19470. } = t, i = `${e}-textarea`;
  19471. return {
  19472. [i]: {
  19473. position: "relative",
  19474. [`${i}-suffix`]: {
  19475. position: "absolute",
  19476. top: 0,
  19477. insetInlineEnd: n,
  19478. bottom: 0,
  19479. zIndex: 1,
  19480. display: "inline-flex",
  19481. alignItems: "center",
  19482. margin: "auto"
  19483. },
  19484. "&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating": {
  19485. [`&${i}-has-feedback`]: {
  19486. [`${e}`]: {
  19487. paddingInlineEnd: r
  19488. }
  19489. }
  19490. },
  19491. "&-show-count": {
  19492. // https://github.com/ant-design/ant-design/issues/33049
  19493. [`> ${e}`]: {
  19494. height: "100%"
  19495. },
  19496. "&::after": {
  19497. color: t.colorTextDescription,
  19498. whiteSpace: "nowrap",
  19499. content: "attr(data-count)",
  19500. pointerEvents: "none",
  19501. float: "right"
  19502. }
  19503. },
  19504. "&-rtl": {
  19505. "&::after": {
  19506. float: "left"
  19507. }
  19508. }
  19509. }
  19510. };
  19511. }, uD = Sn("Input", (t) => {
  19512. const e = uX(t);
  19513. return [
  19514. DOe(e),
  19515. BOe(e),
  19516. kOe(e),
  19517. LOe(e),
  19518. NOe(e),
  19519. // =====================================================
  19520. // == Space Compact ==
  19521. // =====================================================
  19522. dx(e)
  19523. ];
  19524. });
  19525. function zOe(t) {
  19526. const e = ae(), n = ae(!1);
  19527. function r() {
  19528. for (var i = arguments.length, a = new Array(i), o = 0; o < i; o++)
  19529. a[o] = arguments[o];
  19530. n.value || (xt.cancel(e.value), e.value = xt(() => {
  19531. t(...a);
  19532. }));
  19533. }
  19534. return yt(() => {
  19535. n.value = !0, xt.cancel(e.value);
  19536. }), r;
  19537. }
  19538. function VOe(t) {
  19539. const e = ae([]), n = ae(typeof t == "function" ? t() : t), r = zOe(() => {
  19540. let a = n.value;
  19541. e.value.forEach((o) => {
  19542. a = o(a);
  19543. }), e.value = [], n.value = a;
  19544. });
  19545. function i(a) {
  19546. e.value.push(a), r();
  19547. }
  19548. return [n, i];
  19549. }
  19550. const FOe = te({
  19551. compatConfig: {
  19552. MODE: 3
  19553. },
  19554. name: "TabNode",
  19555. props: {
  19556. id: {
  19557. type: String
  19558. },
  19559. prefixCls: {
  19560. type: String
  19561. },
  19562. tab: {
  19563. type: Object
  19564. },
  19565. active: {
  19566. type: Boolean
  19567. },
  19568. closable: {
  19569. type: Boolean
  19570. },
  19571. editable: {
  19572. type: Object
  19573. },
  19574. onClick: {
  19575. type: Function
  19576. },
  19577. onResize: {
  19578. type: Function
  19579. },
  19580. renderWrapper: {
  19581. type: Function
  19582. },
  19583. removeAriaLabel: {
  19584. type: String
  19585. },
  19586. // onRemove: { type: Function as PropType<() => void> },
  19587. onFocus: {
  19588. type: Function
  19589. }
  19590. },
  19591. emits: ["click", "resize", "remove", "focus"],
  19592. setup(t, e) {
  19593. let {
  19594. expose: n,
  19595. attrs: r
  19596. } = e;
  19597. const i = U();
  19598. function a(l) {
  19599. var u;
  19600. !((u = t.tab) === null || u === void 0) && u.disabled || t.onClick(l);
  19601. }
  19602. n({
  19603. domRef: i
  19604. });
  19605. function o(l) {
  19606. var u;
  19607. l.preventDefault(), l.stopPropagation(), t.editable.onEdit("remove", {
  19608. key: (u = t.tab) === null || u === void 0 ? void 0 : u.key,
  19609. event: l
  19610. });
  19611. }
  19612. const s = L(() => {
  19613. var l;
  19614. return t.editable && t.closable !== !1 && !(!((l = t.tab) === null || l === void 0) && l.disabled);
  19615. });
  19616. return () => {
  19617. var l;
  19618. const {
  19619. prefixCls: u,
  19620. id: c,
  19621. active: f,
  19622. tab: {
  19623. key: d,
  19624. tab: h,
  19625. disabled: p,
  19626. closeIcon: v
  19627. },
  19628. renderWrapper: g,
  19629. removeAriaLabel: m,
  19630. editable: y,
  19631. onFocus: b
  19632. } = t, _ = `${u}-tab`, O = M("div", {
  19633. key: d,
  19634. ref: i,
  19635. class: ye(_, {
  19636. [`${_}-with-remove`]: s.value,
  19637. [`${_}-active`]: f,
  19638. [`${_}-disabled`]: p
  19639. }),
  19640. style: r.style,
  19641. onClick: a
  19642. }, [M("div", {
  19643. role: "tab",
  19644. "aria-selected": f,
  19645. id: c && `${c}-tab-${d}`,
  19646. class: `${_}-btn`,
  19647. "aria-controls": c && `${c}-panel-${d}`,
  19648. "aria-disabled": p,
  19649. tabindex: p ? null : 0,
  19650. onClick: (S) => {
  19651. S.stopPropagation(), a(S);
  19652. },
  19653. onKeydown: (S) => {
  19654. [ge.SPACE, ge.ENTER].includes(S.which) && (S.preventDefault(), a(S));
  19655. },
  19656. onFocus: b
  19657. }, [typeof h == "function" ? h() : h]), s.value && M("button", {
  19658. type: "button",
  19659. "aria-label": m || "remove",
  19660. tabindex: 0,
  19661. class: `${_}-remove`,
  19662. onClick: (S) => {
  19663. S.stopPropagation(), o(S);
  19664. }
  19665. }, [(v == null ? void 0 : v()) || ((l = y.removeIcon) === null || l === void 0 ? void 0 : l.call(y)) || "×"])]);
  19666. return g ? g(O) : O;
  19667. };
  19668. }
  19669. }), w5 = {
  19670. width: 0,
  19671. height: 0,
  19672. left: 0,
  19673. top: 0
  19674. };
  19675. function WOe(t, e) {
  19676. const n = U(/* @__PURE__ */ new Map());
  19677. return ht(() => {
  19678. var r, i;
  19679. const a = /* @__PURE__ */ new Map(), o = t.value, s = e.value.get((r = o[0]) === null || r === void 0 ? void 0 : r.key) || w5, l = s.left + s.width;
  19680. for (let u = 0; u < o.length; u += 1) {
  19681. const {
  19682. key: c
  19683. } = o[u];
  19684. let f = e.value.get(c);
  19685. f || (f = e.value.get((i = o[u - 1]) === null || i === void 0 ? void 0 : i.key) || w5);
  19686. const d = a.get(c) || I({}, f);
  19687. d.right = l - d.left - d.width, a.set(c, d);
  19688. }
  19689. n.value = new Map(a);
  19690. }), n;
  19691. }
  19692. const cX = te({
  19693. compatConfig: {
  19694. MODE: 3
  19695. },
  19696. name: "AddButton",
  19697. inheritAttrs: !1,
  19698. props: {
  19699. prefixCls: String,
  19700. editable: {
  19701. type: Object
  19702. },
  19703. locale: {
  19704. type: Object,
  19705. default: void 0
  19706. }
  19707. },
  19708. setup(t, e) {
  19709. let {
  19710. expose: n,
  19711. attrs: r
  19712. } = e;
  19713. const i = U();
  19714. return n({
  19715. domRef: i
  19716. }), () => {
  19717. const {
  19718. prefixCls: a,
  19719. editable: o,
  19720. locale: s
  19721. } = t;
  19722. return !o || o.showAdd === !1 ? null : M("button", {
  19723. ref: i,
  19724. type: "button",
  19725. class: `${a}-nav-add`,
  19726. style: r.style,
  19727. "aria-label": (s == null ? void 0 : s.addAriaLabel) || "Add tab",
  19728. onClick: (l) => {
  19729. o.onEdit("add", {
  19730. event: l
  19731. });
  19732. }
  19733. }, [o.addIcon ? o.addIcon() : "+"]);
  19734. };
  19735. }
  19736. }), QOe = {
  19737. prefixCls: {
  19738. type: String
  19739. },
  19740. id: {
  19741. type: String
  19742. },
  19743. tabs: {
  19744. type: Object
  19745. },
  19746. rtl: {
  19747. type: Boolean
  19748. },
  19749. tabBarGutter: {
  19750. type: Number
  19751. },
  19752. activeKey: {
  19753. type: [String, Number]
  19754. },
  19755. mobile: {
  19756. type: Boolean
  19757. },
  19758. moreIcon: Y.any,
  19759. moreTransitionName: {
  19760. type: String
  19761. },
  19762. editable: {
  19763. type: Object
  19764. },
  19765. locale: {
  19766. type: Object,
  19767. default: void 0
  19768. },
  19769. removeAriaLabel: String,
  19770. onTabClick: {
  19771. type: Function
  19772. },
  19773. popupClassName: String,
  19774. getPopupContainer: tt()
  19775. }, HOe = te({
  19776. compatConfig: {
  19777. MODE: 3
  19778. },
  19779. name: "OperationNode",
  19780. inheritAttrs: !1,
  19781. props: QOe,
  19782. emits: ["tabClick"],
  19783. slots: Object,
  19784. setup(t, e) {
  19785. let {
  19786. attrs: n,
  19787. slots: r
  19788. } = e;
  19789. const [i, a] = fn(!1), [o, s] = fn(null), l = (h) => {
  19790. const p = t.tabs.filter((m) => !m.disabled);
  19791. let v = p.findIndex((m) => m.key === o.value) || 0;
  19792. const g = p.length;
  19793. for (let m = 0; m < g; m += 1) {
  19794. v = (v + h + g) % g;
  19795. const y = p[v];
  19796. if (!y.disabled) {
  19797. s(y.key);
  19798. return;
  19799. }
  19800. }
  19801. }, u = (h) => {
  19802. const {
  19803. which: p
  19804. } = h;
  19805. if (!i.value) {
  19806. [ge.DOWN, ge.SPACE, ge.ENTER].includes(p) && (a(!0), h.preventDefault());
  19807. return;
  19808. }
  19809. switch (p) {
  19810. case ge.UP:
  19811. l(-1), h.preventDefault();
  19812. break;
  19813. case ge.DOWN:
  19814. l(1), h.preventDefault();
  19815. break;
  19816. case ge.ESC:
  19817. a(!1);
  19818. break;
  19819. case ge.SPACE:
  19820. case ge.ENTER:
  19821. o.value !== null && t.onTabClick(o.value, h);
  19822. break;
  19823. }
  19824. }, c = L(() => `${t.id}-more-popup`), f = L(() => o.value !== null ? `${c.value}-${o.value}` : null), d = (h, p) => {
  19825. h.preventDefault(), h.stopPropagation(), t.editable.onEdit("remove", {
  19826. key: p,
  19827. event: h
  19828. });
  19829. };
  19830. return it(() => {
  19831. se(o, () => {
  19832. const h = document.getElementById(f.value);
  19833. h && h.scrollIntoView && h.scrollIntoView(!1);
  19834. }, {
  19835. flush: "post",
  19836. immediate: !0
  19837. });
  19838. }), se(i, () => {
  19839. i.value || s(null);
  19840. }), Y1e({}), () => {
  19841. var h;
  19842. const {
  19843. prefixCls: p,
  19844. id: v,
  19845. tabs: g,
  19846. locale: m,
  19847. mobile: y,
  19848. moreIcon: b = ((h = r.moreIcon) === null || h === void 0 ? void 0 : h.call(r)) || M(vx, null, null),
  19849. moreTransitionName: _,
  19850. editable: O,
  19851. tabBarGutter: S,
  19852. rtl: x,
  19853. onTabClick: C,
  19854. popupClassName: T
  19855. } = t;
  19856. if (!g.length) return null;
  19857. const w = `${p}-dropdown`, P = m == null ? void 0 : m.dropdownAriaLabel, $ = {
  19858. [x ? "marginRight" : "marginLeft"]: S
  19859. };
  19860. g.length || ($.visibility = "hidden", $.order = 1);
  19861. const A = ye({
  19862. [`${w}-rtl`]: x,
  19863. [`${T}`]: !0
  19864. }), D = y ? null : M(g1e, {
  19865. prefixCls: w,
  19866. trigger: ["hover"],
  19867. visible: i.value,
  19868. transitionName: _,
  19869. onVisibleChange: a,
  19870. overlayClassName: A,
  19871. mouseEnterDelay: 0.1,
  19872. mouseLeaveDelay: 0.1,
  19873. getPopupContainer: t.getPopupContainer
  19874. }, {
  19875. overlay: () => M(jl, {
  19876. onClick: (E) => {
  19877. let {
  19878. key: R,
  19879. domEvent: N
  19880. } = E;
  19881. C(R, N), a(!1);
  19882. },
  19883. id: c.value,
  19884. tabindex: -1,
  19885. role: "listbox",
  19886. "aria-activedescendant": f.value,
  19887. selectedKeys: [o.value],
  19888. "aria-label": P !== void 0 ? P : "expanded dropdown"
  19889. }, {
  19890. default: () => [g.map((E) => {
  19891. var R, N;
  19892. const V = O && E.closable !== !1 && !E.disabled;
  19893. return M(Mh, {
  19894. key: E.key,
  19895. id: `${c.value}-${E.key}`,
  19896. role: "option",
  19897. "aria-controls": v && `${v}-panel-${E.key}`,
  19898. disabled: E.disabled
  19899. }, {
  19900. default: () => [M("span", null, [typeof E.tab == "function" ? E.tab() : E.tab]), V && M("button", {
  19901. type: "button",
  19902. "aria-label": t.removeAriaLabel || "remove",
  19903. tabindex: 0,
  19904. class: `${w}-menu-item-remove`,
  19905. onClick: (B) => {
  19906. B.stopPropagation(), d(B, E.key);
  19907. }
  19908. }, [((R = E.closeIcon) === null || R === void 0 ? void 0 : R.call(E)) || ((N = O.removeIcon) === null || N === void 0 ? void 0 : N.call(O)) || "×"])]
  19909. });
  19910. })]
  19911. }),
  19912. default: () => M("button", {
  19913. type: "button",
  19914. class: `${p}-nav-more`,
  19915. style: $,
  19916. tabindex: -1,
  19917. "aria-hidden": "true",
  19918. "aria-haspopup": "listbox",
  19919. "aria-controls": c.value,
  19920. id: `${v}-more`,
  19921. "aria-expanded": i.value,
  19922. onKeydown: u
  19923. }, [b])
  19924. });
  19925. return M("div", {
  19926. class: ye(`${p}-nav-operations`, n.class),
  19927. style: n.style
  19928. }, [D, M(cX, {
  19929. prefixCls: p,
  19930. locale: m,
  19931. editable: O
  19932. }, null)]);
  19933. };
  19934. }
  19935. }), fX = Symbol("tabsContextKey"), dX = (t) => {
  19936. pt(fX, t);
  19937. }, hX = () => Ge(fX, {
  19938. tabs: U([]),
  19939. prefixCls: U()
  19940. });
  19941. te({
  19942. compatConfig: {
  19943. MODE: 3
  19944. },
  19945. name: "TabsContextProvider",
  19946. inheritAttrs: !1,
  19947. props: {
  19948. tabs: {
  19949. type: Object,
  19950. default: void 0
  19951. },
  19952. prefixCls: {
  19953. type: String,
  19954. default: void 0
  19955. }
  19956. },
  19957. setup(t, e) {
  19958. let {
  19959. slots: n
  19960. } = e;
  19961. return dX(ES(t)), () => {
  19962. var r;
  19963. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  19964. };
  19965. }
  19966. });
  19967. const GOe = 0.1, C5 = 0.01, P_ = 20, T5 = Math.pow(0.995, P_);
  19968. function jOe(t, e) {
  19969. const [n, r] = fn(), [i, a] = fn(0), [o, s] = fn(0), [l, u] = fn(), c = U();
  19970. function f(O) {
  19971. const {
  19972. screenX: S,
  19973. screenY: x
  19974. } = O.touches[0];
  19975. r({
  19976. x: S,
  19977. y: x
  19978. }), clearInterval(c.value);
  19979. }
  19980. function d(O) {
  19981. if (!n.value) return;
  19982. O.preventDefault();
  19983. const {
  19984. screenX: S,
  19985. screenY: x
  19986. } = O.touches[0], C = S - n.value.x, T = x - n.value.y;
  19987. e(C, T), r({
  19988. x: S,
  19989. y: x
  19990. });
  19991. const w = Date.now();
  19992. s(w - i.value), a(w), u({
  19993. x: C,
  19994. y: T
  19995. });
  19996. }
  19997. function h() {
  19998. if (!n.value) return;
  19999. const O = l.value;
  20000. if (r(null), u(null), O) {
  20001. const S = O.x / o.value, x = O.y / o.value, C = Math.abs(S), T = Math.abs(x);
  20002. if (Math.max(C, T) < GOe) return;
  20003. let w = S, P = x;
  20004. c.value = setInterval(() => {
  20005. if (Math.abs(w) < C5 && Math.abs(P) < C5) {
  20006. clearInterval(c.value);
  20007. return;
  20008. }
  20009. w *= T5, P *= T5, e(w * P_, P * P_);
  20010. }, P_);
  20011. }
  20012. }
  20013. const p = U();
  20014. function v(O) {
  20015. const {
  20016. deltaX: S,
  20017. deltaY: x
  20018. } = O;
  20019. let C = 0;
  20020. const T = Math.abs(S), w = Math.abs(x);
  20021. T === w ? C = p.value === "x" ? S : x : T > w ? (C = S, p.value = "x") : (C = x, p.value = "y"), e(-C, -C) && O.preventDefault();
  20022. }
  20023. const g = U({
  20024. onTouchStart: f,
  20025. onTouchMove: d,
  20026. onTouchEnd: h,
  20027. onWheel: v
  20028. });
  20029. function m(O) {
  20030. g.value.onTouchStart(O);
  20031. }
  20032. function y(O) {
  20033. g.value.onTouchMove(O);
  20034. }
  20035. function b(O) {
  20036. g.value.onTouchEnd(O);
  20037. }
  20038. function _(O) {
  20039. g.value.onWheel(O);
  20040. }
  20041. it(() => {
  20042. var O, S;
  20043. document.addEventListener("touchmove", y, {
  20044. passive: !1
  20045. }), document.addEventListener("touchend", b, {
  20046. passive: !1
  20047. }), (O = t.value) === null || O === void 0 || O.addEventListener("touchstart", m, {
  20048. passive: !1
  20049. }), (S = t.value) === null || S === void 0 || S.addEventListener("wheel", _, {
  20050. passive: !1
  20051. });
  20052. }), yt(() => {
  20053. document.removeEventListener("touchmove", y), document.removeEventListener("touchend", b);
  20054. });
  20055. }
  20056. function P5(t, e) {
  20057. const n = U(t);
  20058. function r(i) {
  20059. const a = typeof i == "function" ? i(n.value) : i;
  20060. a !== n.value && e(a, n.value), n.value = a;
  20061. }
  20062. return [n, r];
  20063. }
  20064. const ZOe = () => {
  20065. const t = U(/* @__PURE__ */ new Map()), e = (n) => (r) => {
  20066. t.value.set(n, r);
  20067. };
  20068. return j9(() => {
  20069. t.value = /* @__PURE__ */ new Map();
  20070. }), [e, t];
  20071. }, $5 = {
  20072. width: 0,
  20073. height: 0,
  20074. left: 0,
  20075. top: 0,
  20076. right: 0
  20077. }, UOe = () => ({
  20078. id: {
  20079. type: String
  20080. },
  20081. tabPosition: {
  20082. type: String
  20083. },
  20084. activeKey: {
  20085. type: [String, Number]
  20086. },
  20087. rtl: {
  20088. type: Boolean
  20089. },
  20090. animated: $t(),
  20091. editable: $t(),
  20092. moreIcon: Y.any,
  20093. moreTransitionName: {
  20094. type: String
  20095. },
  20096. mobile: {
  20097. type: Boolean
  20098. },
  20099. tabBarGutter: {
  20100. type: Number
  20101. },
  20102. renderTabBar: {
  20103. type: Function
  20104. },
  20105. locale: $t(),
  20106. popupClassName: String,
  20107. getPopupContainer: tt(),
  20108. onTabClick: {
  20109. type: Function
  20110. },
  20111. onTabScroll: {
  20112. type: Function
  20113. }
  20114. }), XOe = (t, e) => {
  20115. const {
  20116. offsetWidth: n,
  20117. offsetHeight: r,
  20118. offsetTop: i,
  20119. offsetLeft: a
  20120. } = t, {
  20121. width: o,
  20122. height: s,
  20123. x: l,
  20124. y: u
  20125. } = t.getBoundingClientRect();
  20126. return Math.abs(o - n) < 1 ? [o, s, l - e.x, u - e.y] : [n, r, a, i];
  20127. }, A5 = te({
  20128. compatConfig: {
  20129. MODE: 3
  20130. },
  20131. name: "TabNavList",
  20132. inheritAttrs: !1,
  20133. props: UOe(),
  20134. slots: Object,
  20135. emits: ["tabClick", "tabScroll"],
  20136. setup(t, e) {
  20137. let {
  20138. attrs: n,
  20139. slots: r
  20140. } = e;
  20141. const {
  20142. tabs: i,
  20143. prefixCls: a
  20144. } = hX(), o = ae(), s = ae(), l = ae(), u = ae(), [c, f] = ZOe(), d = L(() => t.tabPosition === "top" || t.tabPosition === "bottom"), [h, p] = P5(0, (be, he) => {
  20145. d.value && t.onTabScroll && t.onTabScroll({
  20146. direction: be > he ? "left" : "right"
  20147. });
  20148. }), [v, g] = P5(0, (be, he) => {
  20149. !d.value && t.onTabScroll && t.onTabScroll({
  20150. direction: be > he ? "top" : "bottom"
  20151. });
  20152. }), [m, y] = fn(0), [b, _] = fn(0), [O, S] = fn(null), [x, C] = fn(null), [T, w] = fn(0), [P, $] = fn(0), [A, D] = VOe(/* @__PURE__ */ new Map()), E = WOe(i, A), R = L(() => `${a.value}-nav-operations-hidden`), N = ae(0), V = ae(0);
  20153. ht(() => {
  20154. d.value ? t.rtl ? (N.value = 0, V.value = Math.max(0, m.value - O.value)) : (N.value = Math.min(0, O.value - m.value), V.value = 0) : (N.value = Math.min(0, x.value - b.value), V.value = 0);
  20155. });
  20156. const B = (be) => be < N.value ? N.value : be > V.value ? V.value : be, W = ae(), [F, Q] = fn(), Z = () => {
  20157. Q(Date.now());
  20158. }, ne = () => {
  20159. clearTimeout(W.value);
  20160. }, ee = (be, he) => {
  20161. be((Te) => B(Te + he));
  20162. };
  20163. jOe(o, (be, he) => {
  20164. if (d.value) {
  20165. if (O.value >= m.value)
  20166. return !1;
  20167. ee(p, be);
  20168. } else {
  20169. if (x.value >= b.value)
  20170. return !1;
  20171. ee(g, he);
  20172. }
  20173. return ne(), Z(), !0;
  20174. }), se(F, () => {
  20175. ne(), F.value && (W.value = setTimeout(() => {
  20176. Q(0);
  20177. }, 100));
  20178. });
  20179. const oe = function() {
  20180. let be = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : t.activeKey;
  20181. const he = E.value.get(be) || {
  20182. width: 0,
  20183. height: 0,
  20184. left: 0,
  20185. right: 0,
  20186. top: 0
  20187. };
  20188. if (d.value) {
  20189. let Te = h.value;
  20190. t.rtl ? he.right < h.value ? Te = he.right : he.right + he.width > h.value + O.value && (Te = he.right + he.width - O.value) : he.left < -h.value ? Te = -he.left : he.left + he.width > -h.value + O.value && (Te = -(he.left + he.width - O.value)), g(0), p(B(Te));
  20191. } else {
  20192. let Te = v.value;
  20193. he.top < -v.value ? Te = -he.top : he.top + he.height > -v.value + x.value && (Te = -(he.top + he.height - x.value)), p(0), g(B(Te));
  20194. }
  20195. }, K = ae(0), ie = ae(0);
  20196. ht(() => {
  20197. let be, he, Te, ze, ut, ct;
  20198. const Dt = E.value;
  20199. ["top", "bottom"].includes(t.tabPosition) ? (be = "width", ze = O.value, ut = m.value, ct = T.value, he = t.rtl ? "right" : "left", Te = Math.abs(h.value)) : (be = "height", ze = x.value, ut = m.value, ct = P.value, he = "top", Te = -v.value);
  20200. let ve = ze;
  20201. ut + ct > ze && ut < ze && (ve = ze - ct);
  20202. const Xe = i.value;
  20203. if (!Xe.length)
  20204. return [K.value, ie.value] = [0, 0];
  20205. const Rt = Xe.length;
  20206. let An = Rt;
  20207. for (let Ar = 0; Ar < Rt; Ar += 1) {
  20208. const Wa = Dt.get(Xe[Ar].key) || $5;
  20209. if (Wa[he] + Wa[be] > Te + ve) {
  20210. An = Ar - 1;
  20211. break;
  20212. }
  20213. }
  20214. let sn = 0;
  20215. for (let Ar = Rt - 1; Ar >= 0; Ar -= 1)
  20216. if ((Dt.get(Xe[Ar].key) || $5)[he] < Te) {
  20217. sn = Ar + 1;
  20218. break;
  20219. }
  20220. return [K.value, ie.value] = [sn, An];
  20221. });
  20222. const X = () => {
  20223. D(() => {
  20224. var be;
  20225. const he = /* @__PURE__ */ new Map(), Te = (be = s.value) === null || be === void 0 ? void 0 : be.getBoundingClientRect();
  20226. return i.value.forEach((ze) => {
  20227. let {
  20228. key: ut
  20229. } = ze;
  20230. const ct = f.value.get(ut), Dt = (ct == null ? void 0 : ct.$el) || ct;
  20231. if (Dt) {
  20232. const [ve, Xe, Rt, An] = XOe(Dt, Te);
  20233. he.set(ut, {
  20234. width: ve,
  20235. height: Xe,
  20236. left: Rt,
  20237. top: An
  20238. });
  20239. }
  20240. }), he;
  20241. });
  20242. };
  20243. se(() => i.value.map((be) => be.key).join("%%"), () => {
  20244. X();
  20245. }, {
  20246. flush: "post"
  20247. });
  20248. const H = () => {
  20249. var be, he, Te, ze, ut;
  20250. const ct = ((be = o.value) === null || be === void 0 ? void 0 : be.offsetWidth) || 0, Dt = ((he = o.value) === null || he === void 0 ? void 0 : he.offsetHeight) || 0, ve = ((Te = u.value) === null || Te === void 0 ? void 0 : Te.$el) || {}, Xe = ve.offsetWidth || 0, Rt = ve.offsetHeight || 0;
  20251. S(ct), C(Dt), w(Xe), $(Rt);
  20252. const An = (((ze = s.value) === null || ze === void 0 ? void 0 : ze.offsetWidth) || 0) - Xe, sn = (((ut = s.value) === null || ut === void 0 ? void 0 : ut.offsetHeight) || 0) - Rt;
  20253. y(An), _(sn), X();
  20254. }, G = L(() => [...i.value.slice(0, K.value), ...i.value.slice(ie.value + 1)]), [re, fe] = fn(), de = L(() => E.value.get(t.activeKey)), Ee = ae(), $e = () => {
  20255. xt.cancel(Ee.value);
  20256. };
  20257. se([de, d, () => t.rtl], () => {
  20258. const be = {};
  20259. de.value && (d.value ? (t.rtl ? be.right = Zp(de.value.right) : be.left = Zp(de.value.left), be.width = Zp(de.value.width)) : (be.top = Zp(de.value.top), be.height = Zp(de.value.height))), $e(), Ee.value = xt(() => {
  20260. fe(be);
  20261. });
  20262. }), se([() => t.activeKey, de, E, d], () => {
  20263. oe();
  20264. }, {
  20265. flush: "post"
  20266. }), se([() => t.rtl, () => t.tabBarGutter, () => t.activeKey, () => i.value], () => {
  20267. H();
  20268. }, {
  20269. flush: "post"
  20270. });
  20271. const Se = (be) => {
  20272. let {
  20273. position: he,
  20274. prefixCls: Te,
  20275. extra: ze
  20276. } = be;
  20277. if (!ze) return null;
  20278. const ut = ze == null ? void 0 : ze({
  20279. position: he
  20280. });
  20281. return ut ? M("div", {
  20282. class: `${Te}-extra-content`
  20283. }, [ut]) : null;
  20284. };
  20285. return yt(() => {
  20286. ne(), $e();
  20287. }), () => {
  20288. const {
  20289. id: be,
  20290. animated: he,
  20291. activeKey: Te,
  20292. rtl: ze,
  20293. editable: ut,
  20294. locale: ct,
  20295. tabPosition: Dt,
  20296. tabBarGutter: ve,
  20297. onTabClick: Xe
  20298. } = t, {
  20299. class: Rt,
  20300. style: An
  20301. } = n, sn = a.value, Ar = !!G.value.length, Wa = `${sn}-nav-wrap`;
  20302. let Qp, Hp, vy, Gw;
  20303. d.value ? ze ? (Hp = h.value > 0, Qp = h.value + O.value < m.value) : (Qp = h.value < 0, Hp = -h.value + O.value < m.value) : (vy = v.value < 0, Gw = -v.value + x.value < b.value);
  20304. const jf = {};
  20305. Dt === "top" || Dt === "bottom" ? jf[ze ? "marginRight" : "marginLeft"] = typeof ve == "number" ? `${ve}px` : ve : jf.marginTop = typeof ve == "number" ? `${ve}px` : ve;
  20306. const jw = i.value.map((Gp, Zw) => {
  20307. const {
  20308. key: Zf
  20309. } = Gp;
  20310. return M(FOe, {
  20311. id: be,
  20312. prefixCls: sn,
  20313. key: Zf,
  20314. tab: Gp,
  20315. style: Zw === 0 ? void 0 : jf,
  20316. closable: Gp.closable,
  20317. editable: ut,
  20318. active: Zf === Te,
  20319. removeAriaLabel: ct == null ? void 0 : ct.removeAriaLabel,
  20320. ref: c(Zf),
  20321. onClick: (W4) => {
  20322. Xe(Zf, W4);
  20323. },
  20324. onFocus: () => {
  20325. oe(Zf), Z(), o.value && (ze || (o.value.scrollLeft = 0), o.value.scrollTop = 0);
  20326. }
  20327. }, r);
  20328. });
  20329. return M("div", {
  20330. role: "tablist",
  20331. class: ye(`${sn}-nav`, Rt),
  20332. style: An,
  20333. onKeydown: () => {
  20334. Z();
  20335. }
  20336. }, [M(Se, {
  20337. position: "left",
  20338. prefixCls: sn,
  20339. extra: r.leftExtra
  20340. }, null), M(bh, {
  20341. onResize: H
  20342. }, {
  20343. default: () => [M("div", {
  20344. class: ye(Wa, {
  20345. [`${Wa}-ping-left`]: Qp,
  20346. [`${Wa}-ping-right`]: Hp,
  20347. [`${Wa}-ping-top`]: vy,
  20348. [`${Wa}-ping-bottom`]: Gw
  20349. }),
  20350. ref: o
  20351. }, [M(bh, {
  20352. onResize: H
  20353. }, {
  20354. default: () => [M("div", {
  20355. ref: s,
  20356. class: `${sn}-nav-list`,
  20357. style: {
  20358. transform: `translate(${h.value}px, ${v.value}px)`,
  20359. transition: F.value ? "none" : void 0
  20360. }
  20361. }, [jw, M(cX, {
  20362. ref: u,
  20363. prefixCls: sn,
  20364. locale: ct,
  20365. editable: ut,
  20366. style: I(I({}, jw.length === 0 ? void 0 : jf), {
  20367. visibility: Ar ? "hidden" : null
  20368. })
  20369. }, null), M("div", {
  20370. class: ye(`${sn}-ink-bar`, {
  20371. [`${sn}-ink-bar-animated`]: he.inkBar
  20372. }),
  20373. style: re.value
  20374. }, null)])]
  20375. })])]
  20376. }), M(HOe, j(j({}, t), {}, {
  20377. removeAriaLabel: ct == null ? void 0 : ct.removeAriaLabel,
  20378. ref: l,
  20379. prefixCls: sn,
  20380. tabs: G.value,
  20381. class: !Ar && R.value
  20382. }), um(r, ["moreIcon"])), M(Se, {
  20383. position: "right",
  20384. prefixCls: sn,
  20385. extra: r.rightExtra
  20386. }, null), M(Se, {
  20387. position: "right",
  20388. prefixCls: sn,
  20389. extra: r.tabBarExtraContent
  20390. }, null)]);
  20391. };
  20392. }
  20393. }), YOe = te({
  20394. compatConfig: {
  20395. MODE: 3
  20396. },
  20397. name: "TabPanelList",
  20398. inheritAttrs: !1,
  20399. props: {
  20400. activeKey: {
  20401. type: [String, Number]
  20402. },
  20403. id: {
  20404. type: String
  20405. },
  20406. rtl: {
  20407. type: Boolean
  20408. },
  20409. animated: {
  20410. type: Object,
  20411. default: void 0
  20412. },
  20413. tabPosition: {
  20414. type: String
  20415. },
  20416. destroyInactiveTabPane: {
  20417. type: Boolean
  20418. }
  20419. },
  20420. setup(t) {
  20421. const {
  20422. tabs: e,
  20423. prefixCls: n
  20424. } = hX();
  20425. return () => {
  20426. const {
  20427. id: r,
  20428. activeKey: i,
  20429. animated: a,
  20430. tabPosition: o,
  20431. rtl: s,
  20432. destroyInactiveTabPane: l
  20433. } = t, u = a.tabPane, c = n.value, f = e.value.findIndex((d) => d.key === i);
  20434. return M("div", {
  20435. class: `${c}-content-holder`
  20436. }, [M("div", {
  20437. class: [`${c}-content`, `${c}-content-${o}`, {
  20438. [`${c}-content-animated`]: u
  20439. }],
  20440. style: f && u ? {
  20441. [s ? "marginRight" : "marginLeft"]: `-${f}00%`
  20442. } : null
  20443. }, [e.value.map((d) => Pn(d.node, {
  20444. key: d.key,
  20445. prefixCls: c,
  20446. tabKey: d.key,
  20447. id: r,
  20448. animated: u,
  20449. active: d.key === i,
  20450. destroyInactiveTabPane: l
  20451. }))])]);
  20452. };
  20453. }
  20454. });
  20455. var qOe = { 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" };
  20456. function E5(t) {
  20457. for (var e = 1; e < arguments.length; e++) {
  20458. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  20459. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  20460. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  20461. }))), r.forEach(function(i) {
  20462. KOe(t, i, n[i]);
  20463. });
  20464. }
  20465. return t;
  20466. }
  20467. function KOe(t, e, n) {
  20468. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  20469. }
  20470. var _x = function(e, n) {
  20471. var r = E5({}, e, n.attrs);
  20472. return M(lt, E5({}, r, {
  20473. icon: qOe
  20474. }), null);
  20475. };
  20476. _x.displayName = "PlusOutlined";
  20477. _x.inheritAttrs = !1;
  20478. const JOe = (t) => {
  20479. const {
  20480. componentCls: e,
  20481. motionDurationSlow: n
  20482. } = t;
  20483. return [
  20484. {
  20485. [e]: {
  20486. [`${e}-switch`]: {
  20487. "&-appear, &-enter": {
  20488. transition: "none",
  20489. "&-start": {
  20490. opacity: 0
  20491. },
  20492. "&-active": {
  20493. opacity: 1,
  20494. transition: `opacity ${n}`
  20495. }
  20496. },
  20497. "&-leave": {
  20498. position: "absolute",
  20499. transition: "none",
  20500. inset: 0,
  20501. "&-start": {
  20502. opacity: 1
  20503. },
  20504. "&-active": {
  20505. opacity: 0,
  20506. transition: `opacity ${n}`
  20507. }
  20508. }
  20509. }
  20510. }
  20511. },
  20512. // Follow code may reuse in other components
  20513. [Eh(t, "slide-up"), Eh(t, "slide-down")]
  20514. ];
  20515. }, eSe = (t) => {
  20516. const {
  20517. componentCls: e,
  20518. tabsCardHorizontalPadding: n,
  20519. tabsCardHeadBackground: r,
  20520. tabsCardGutter: i,
  20521. colorSplit: a
  20522. } = t;
  20523. return {
  20524. [`${e}-card`]: {
  20525. [`> ${e}-nav, > div > ${e}-nav`]: {
  20526. [`${e}-tab`]: {
  20527. margin: 0,
  20528. padding: n,
  20529. background: r,
  20530. border: `${t.lineWidth}px ${t.lineType} ${a}`,
  20531. transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`
  20532. },
  20533. [`${e}-tab-active`]: {
  20534. color: t.colorPrimary,
  20535. background: t.colorBgContainer
  20536. },
  20537. [`${e}-ink-bar`]: {
  20538. visibility: "hidden"
  20539. }
  20540. },
  20541. // ========================== Top & Bottom ==========================
  20542. [`&${e}-top, &${e}-bottom`]: {
  20543. [`> ${e}-nav, > div > ${e}-nav`]: {
  20544. [`${e}-tab + ${e}-tab`]: {
  20545. marginLeft: {
  20546. _skip_check_: !0,
  20547. value: `${i}px`
  20548. }
  20549. }
  20550. }
  20551. },
  20552. [`&${e}-top`]: {
  20553. [`> ${e}-nav, > div > ${e}-nav`]: {
  20554. [`${e}-tab`]: {
  20555. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`
  20556. },
  20557. [`${e}-tab-active`]: {
  20558. borderBottomColor: t.colorBgContainer
  20559. }
  20560. }
  20561. },
  20562. [`&${e}-bottom`]: {
  20563. [`> ${e}-nav, > div > ${e}-nav`]: {
  20564. [`${e}-tab`]: {
  20565. borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`
  20566. },
  20567. [`${e}-tab-active`]: {
  20568. borderTopColor: t.colorBgContainer
  20569. }
  20570. }
  20571. },
  20572. // ========================== Left & Right ==========================
  20573. [`&${e}-left, &${e}-right`]: {
  20574. [`> ${e}-nav, > div > ${e}-nav`]: {
  20575. [`${e}-tab + ${e}-tab`]: {
  20576. marginTop: `${i}px`
  20577. }
  20578. }
  20579. },
  20580. [`&${e}-left`]: {
  20581. [`> ${e}-nav, > div > ${e}-nav`]: {
  20582. [`${e}-tab`]: {
  20583. borderRadius: {
  20584. _skip_check_: !0,
  20585. value: `${t.borderRadiusLG}px 0 0 ${t.borderRadiusLG}px`
  20586. }
  20587. },
  20588. [`${e}-tab-active`]: {
  20589. borderRightColor: {
  20590. _skip_check_: !0,
  20591. value: t.colorBgContainer
  20592. }
  20593. }
  20594. }
  20595. },
  20596. [`&${e}-right`]: {
  20597. [`> ${e}-nav, > div > ${e}-nav`]: {
  20598. [`${e}-tab`]: {
  20599. borderRadius: {
  20600. _skip_check_: !0,
  20601. value: `0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px 0`
  20602. }
  20603. },
  20604. [`${e}-tab-active`]: {
  20605. borderLeftColor: {
  20606. _skip_check_: !0,
  20607. value: t.colorBgContainer
  20608. }
  20609. }
  20610. }
  20611. }
  20612. }
  20613. };
  20614. }, tSe = (t) => {
  20615. const {
  20616. componentCls: e,
  20617. tabsHoverColor: n,
  20618. dropdownEdgeChildVerticalPadding: r
  20619. } = t;
  20620. return {
  20621. [`${e}-dropdown`]: I(I({}, nn(t)), {
  20622. position: "absolute",
  20623. top: -9999,
  20624. left: {
  20625. _skip_check_: !0,
  20626. value: -9999
  20627. },
  20628. zIndex: t.zIndexPopup,
  20629. display: "block",
  20630. "&-hidden": {
  20631. display: "none"
  20632. },
  20633. [`${e}-dropdown-menu`]: {
  20634. maxHeight: t.tabsDropdownHeight,
  20635. margin: 0,
  20636. padding: `${r}px 0`,
  20637. overflowX: "hidden",
  20638. overflowY: "auto",
  20639. textAlign: {
  20640. _skip_check_: !0,
  20641. value: "left"
  20642. },
  20643. listStyleType: "none",
  20644. backgroundColor: t.colorBgContainer,
  20645. backgroundClip: "padding-box",
  20646. borderRadius: t.borderRadiusLG,
  20647. outline: "none",
  20648. boxShadow: t.boxShadowSecondary,
  20649. "&-item": I(I({}, Sh), {
  20650. display: "flex",
  20651. alignItems: "center",
  20652. minWidth: t.tabsDropdownWidth,
  20653. margin: 0,
  20654. padding: `${t.paddingXXS}px ${t.paddingSM}px`,
  20655. color: t.colorText,
  20656. fontWeight: "normal",
  20657. fontSize: t.fontSize,
  20658. lineHeight: t.lineHeight,
  20659. cursor: "pointer",
  20660. transition: `all ${t.motionDurationSlow}`,
  20661. "> span": {
  20662. flex: 1,
  20663. whiteSpace: "nowrap"
  20664. },
  20665. "&-remove": {
  20666. flex: "none",
  20667. marginLeft: {
  20668. _skip_check_: !0,
  20669. value: t.marginSM
  20670. },
  20671. color: t.colorTextDescription,
  20672. fontSize: t.fontSizeSM,
  20673. background: "transparent",
  20674. border: 0,
  20675. cursor: "pointer",
  20676. "&:hover": {
  20677. color: n
  20678. }
  20679. },
  20680. "&:hover": {
  20681. background: t.controlItemBgHover
  20682. },
  20683. "&-disabled": {
  20684. "&, &:hover": {
  20685. color: t.colorTextDisabled,
  20686. background: "transparent",
  20687. cursor: "not-allowed"
  20688. }
  20689. }
  20690. })
  20691. }
  20692. })
  20693. };
  20694. }, nSe = (t) => {
  20695. const {
  20696. componentCls: e,
  20697. margin: n,
  20698. colorSplit: r
  20699. } = t;
  20700. return {
  20701. // ========================== Top & Bottom ==========================
  20702. [`${e}-top, ${e}-bottom`]: {
  20703. flexDirection: "column",
  20704. [`> ${e}-nav, > div > ${e}-nav`]: {
  20705. margin: `0 0 ${n}px 0`,
  20706. "&::before": {
  20707. position: "absolute",
  20708. right: {
  20709. _skip_check_: !0,
  20710. value: 0
  20711. },
  20712. left: {
  20713. _skip_check_: !0,
  20714. value: 0
  20715. },
  20716. borderBottom: `${t.lineWidth}px ${t.lineType} ${r}`,
  20717. content: "''"
  20718. },
  20719. [`${e}-ink-bar`]: {
  20720. height: t.lineWidthBold,
  20721. "&-animated": {
  20722. transition: `width ${t.motionDurationSlow}, left ${t.motionDurationSlow},
  20723. right ${t.motionDurationSlow}`
  20724. }
  20725. },
  20726. [`${e}-nav-wrap`]: {
  20727. "&::before, &::after": {
  20728. top: 0,
  20729. bottom: 0,
  20730. width: t.controlHeight
  20731. },
  20732. "&::before": {
  20733. left: {
  20734. _skip_check_: !0,
  20735. value: 0
  20736. },
  20737. boxShadow: t.boxShadowTabsOverflowLeft
  20738. },
  20739. "&::after": {
  20740. right: {
  20741. _skip_check_: !0,
  20742. value: 0
  20743. },
  20744. boxShadow: t.boxShadowTabsOverflowRight
  20745. },
  20746. [`&${e}-nav-wrap-ping-left::before`]: {
  20747. opacity: 1
  20748. },
  20749. [`&${e}-nav-wrap-ping-right::after`]: {
  20750. opacity: 1
  20751. }
  20752. }
  20753. }
  20754. },
  20755. [`${e}-top`]: {
  20756. [`> ${e}-nav,
  20757. > div > ${e}-nav`]: {
  20758. "&::before": {
  20759. bottom: 0
  20760. },
  20761. [`${e}-ink-bar`]: {
  20762. bottom: 0
  20763. }
  20764. }
  20765. },
  20766. [`${e}-bottom`]: {
  20767. [`> ${e}-nav, > div > ${e}-nav`]: {
  20768. order: 1,
  20769. marginTop: `${n}px`,
  20770. marginBottom: 0,
  20771. "&::before": {
  20772. top: 0
  20773. },
  20774. [`${e}-ink-bar`]: {
  20775. top: 0
  20776. }
  20777. },
  20778. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20779. order: 0
  20780. }
  20781. },
  20782. // ========================== Left & Right ==========================
  20783. [`${e}-left, ${e}-right`]: {
  20784. [`> ${e}-nav, > div > ${e}-nav`]: {
  20785. flexDirection: "column",
  20786. minWidth: t.controlHeight * 1.25,
  20787. // >>>>>>>>>>> Tab
  20788. [`${e}-tab`]: {
  20789. padding: `${t.paddingXS}px ${t.paddingLG}px`,
  20790. textAlign: "center"
  20791. },
  20792. [`${e}-tab + ${e}-tab`]: {
  20793. margin: `${t.margin}px 0 0 0`
  20794. },
  20795. // >>>>>>>>>>> Nav
  20796. [`${e}-nav-wrap`]: {
  20797. flexDirection: "column",
  20798. "&::before, &::after": {
  20799. right: {
  20800. _skip_check_: !0,
  20801. value: 0
  20802. },
  20803. left: {
  20804. _skip_check_: !0,
  20805. value: 0
  20806. },
  20807. height: t.controlHeight
  20808. },
  20809. "&::before": {
  20810. top: 0,
  20811. boxShadow: t.boxShadowTabsOverflowTop
  20812. },
  20813. "&::after": {
  20814. bottom: 0,
  20815. boxShadow: t.boxShadowTabsOverflowBottom
  20816. },
  20817. [`&${e}-nav-wrap-ping-top::before`]: {
  20818. opacity: 1
  20819. },
  20820. [`&${e}-nav-wrap-ping-bottom::after`]: {
  20821. opacity: 1
  20822. }
  20823. },
  20824. // >>>>>>>>>>> Ink Bar
  20825. [`${e}-ink-bar`]: {
  20826. width: t.lineWidthBold,
  20827. "&-animated": {
  20828. transition: `height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`
  20829. }
  20830. },
  20831. [`${e}-nav-list, ${e}-nav-operations`]: {
  20832. flex: "1 0 auto",
  20833. flexDirection: "column"
  20834. }
  20835. }
  20836. },
  20837. [`${e}-left`]: {
  20838. [`> ${e}-nav, > div > ${e}-nav`]: {
  20839. [`${e}-ink-bar`]: {
  20840. right: {
  20841. _skip_check_: !0,
  20842. value: 0
  20843. }
  20844. }
  20845. },
  20846. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20847. marginLeft: {
  20848. _skip_check_: !0,
  20849. value: `-${t.lineWidth}px`
  20850. },
  20851. borderLeft: {
  20852. _skip_check_: !0,
  20853. value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  20854. },
  20855. [`> ${e}-content > ${e}-tabpane`]: {
  20856. paddingLeft: {
  20857. _skip_check_: !0,
  20858. value: t.paddingLG
  20859. }
  20860. }
  20861. }
  20862. },
  20863. [`${e}-right`]: {
  20864. [`> ${e}-nav, > div > ${e}-nav`]: {
  20865. order: 1,
  20866. [`${e}-ink-bar`]: {
  20867. left: {
  20868. _skip_check_: !0,
  20869. value: 0
  20870. }
  20871. }
  20872. },
  20873. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20874. order: 0,
  20875. marginRight: {
  20876. _skip_check_: !0,
  20877. value: -t.lineWidth
  20878. },
  20879. borderRight: {
  20880. _skip_check_: !0,
  20881. value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  20882. },
  20883. [`> ${e}-content > ${e}-tabpane`]: {
  20884. paddingRight: {
  20885. _skip_check_: !0,
  20886. value: t.paddingLG
  20887. }
  20888. }
  20889. }
  20890. }
  20891. };
  20892. }, rSe = (t) => {
  20893. const {
  20894. componentCls: e,
  20895. padding: n
  20896. } = t;
  20897. return {
  20898. [e]: {
  20899. "&-small": {
  20900. [`> ${e}-nav`]: {
  20901. [`${e}-tab`]: {
  20902. padding: `${t.paddingXS}px 0`,
  20903. fontSize: t.fontSize
  20904. }
  20905. }
  20906. },
  20907. "&-large": {
  20908. [`> ${e}-nav`]: {
  20909. [`${e}-tab`]: {
  20910. padding: `${n}px 0`,
  20911. fontSize: t.fontSizeLG
  20912. }
  20913. }
  20914. }
  20915. },
  20916. [`${e}-card`]: {
  20917. [`&${e}-small`]: {
  20918. [`> ${e}-nav`]: {
  20919. [`${e}-tab`]: {
  20920. padding: `${t.paddingXXS * 1.5}px ${n}px`
  20921. }
  20922. },
  20923. [`&${e}-bottom`]: {
  20924. [`> ${e}-nav ${e}-tab`]: {
  20925. borderRadius: `0 0 ${t.borderRadius}px ${t.borderRadius}px`
  20926. }
  20927. },
  20928. [`&${e}-top`]: {
  20929. [`> ${e}-nav ${e}-tab`]: {
  20930. borderRadius: `${t.borderRadius}px ${t.borderRadius}px 0 0`
  20931. }
  20932. },
  20933. [`&${e}-right`]: {
  20934. [`> ${e}-nav ${e}-tab`]: {
  20935. borderRadius: {
  20936. _skip_check_: !0,
  20937. value: `0 ${t.borderRadius}px ${t.borderRadius}px 0`
  20938. }
  20939. }
  20940. },
  20941. [`&${e}-left`]: {
  20942. [`> ${e}-nav ${e}-tab`]: {
  20943. borderRadius: {
  20944. _skip_check_: !0,
  20945. value: `${t.borderRadius}px 0 0 ${t.borderRadius}px`
  20946. }
  20947. }
  20948. }
  20949. },
  20950. [`&${e}-large`]: {
  20951. [`> ${e}-nav`]: {
  20952. [`${e}-tab`]: {
  20953. padding: `${t.paddingXS}px ${n}px ${t.paddingXXS * 1.5}px`
  20954. }
  20955. }
  20956. }
  20957. }
  20958. };
  20959. }, iSe = (t) => {
  20960. const {
  20961. componentCls: e,
  20962. tabsActiveColor: n,
  20963. tabsHoverColor: r,
  20964. iconCls: i,
  20965. tabsHorizontalGutter: a
  20966. } = t, o = `${e}-tab`;
  20967. return {
  20968. [o]: {
  20969. position: "relative",
  20970. display: "inline-flex",
  20971. alignItems: "center",
  20972. padding: `${t.paddingSM}px 0`,
  20973. fontSize: `${t.fontSize}px`,
  20974. background: "transparent",
  20975. border: 0,
  20976. outline: "none",
  20977. cursor: "pointer",
  20978. "&-btn, &-remove": I({
  20979. "&:focus:not(:focus-visible), &:active": {
  20980. color: n
  20981. }
  20982. }, WS(t)),
  20983. "&-btn": {
  20984. outline: "none",
  20985. transition: "all 0.3s"
  20986. },
  20987. "&-remove": {
  20988. flex: "none",
  20989. marginRight: {
  20990. _skip_check_: !0,
  20991. value: -t.marginXXS
  20992. },
  20993. marginLeft: {
  20994. _skip_check_: !0,
  20995. value: t.marginXS
  20996. },
  20997. color: t.colorTextDescription,
  20998. fontSize: t.fontSizeSM,
  20999. background: "transparent",
  21000. border: "none",
  21001. outline: "none",
  21002. cursor: "pointer",
  21003. transition: `all ${t.motionDurationSlow}`,
  21004. "&:hover": {
  21005. color: t.colorTextHeading
  21006. }
  21007. },
  21008. "&:hover": {
  21009. color: r
  21010. },
  21011. [`&${o}-active ${o}-btn`]: {
  21012. color: t.colorPrimary,
  21013. textShadow: t.tabsActiveTextShadow
  21014. },
  21015. [`&${o}-disabled`]: {
  21016. color: t.colorTextDisabled,
  21017. cursor: "not-allowed"
  21018. },
  21019. [`&${o}-disabled ${o}-btn, &${o}-disabled ${e}-remove`]: {
  21020. "&:focus, &:active": {
  21021. color: t.colorTextDisabled
  21022. }
  21023. },
  21024. [`& ${o}-remove ${i}`]: {
  21025. margin: 0
  21026. },
  21027. [i]: {
  21028. marginRight: {
  21029. _skip_check_: !0,
  21030. value: t.marginSM
  21031. }
  21032. }
  21033. },
  21034. [`${o} + ${o}`]: {
  21035. margin: {
  21036. _skip_check_: !0,
  21037. value: `0 0 0 ${a}px`
  21038. }
  21039. }
  21040. };
  21041. }, aSe = (t) => {
  21042. const {
  21043. componentCls: e,
  21044. tabsHorizontalGutter: n,
  21045. iconCls: r,
  21046. tabsCardGutter: i
  21047. } = t;
  21048. return {
  21049. [`${e}-rtl`]: {
  21050. direction: "rtl",
  21051. [`${e}-nav`]: {
  21052. [`${e}-tab`]: {
  21053. margin: {
  21054. _skip_check_: !0,
  21055. value: `0 0 0 ${n}px`
  21056. },
  21057. [`${e}-tab:last-of-type`]: {
  21058. marginLeft: {
  21059. _skip_check_: !0,
  21060. value: 0
  21061. }
  21062. },
  21063. [r]: {
  21064. marginRight: {
  21065. _skip_check_: !0,
  21066. value: 0
  21067. },
  21068. marginLeft: {
  21069. _skip_check_: !0,
  21070. value: `${t.marginSM}px`
  21071. }
  21072. },
  21073. [`${e}-tab-remove`]: {
  21074. marginRight: {
  21075. _skip_check_: !0,
  21076. value: `${t.marginXS}px`
  21077. },
  21078. marginLeft: {
  21079. _skip_check_: !0,
  21080. value: `-${t.marginXXS}px`
  21081. },
  21082. [r]: {
  21083. margin: 0
  21084. }
  21085. }
  21086. }
  21087. },
  21088. [`&${e}-left`]: {
  21089. [`> ${e}-nav`]: {
  21090. order: 1
  21091. },
  21092. [`> ${e}-content-holder`]: {
  21093. order: 0
  21094. }
  21095. },
  21096. [`&${e}-right`]: {
  21097. [`> ${e}-nav`]: {
  21098. order: 0
  21099. },
  21100. [`> ${e}-content-holder`]: {
  21101. order: 1
  21102. }
  21103. },
  21104. // ====================== Card ======================
  21105. [`&${e}-card${e}-top, &${e}-card${e}-bottom`]: {
  21106. [`> ${e}-nav, > div > ${e}-nav`]: {
  21107. [`${e}-tab + ${e}-tab`]: {
  21108. marginRight: {
  21109. _skip_check_: !0,
  21110. value: `${i}px`
  21111. },
  21112. marginLeft: {
  21113. _skip_check_: !0,
  21114. value: 0
  21115. }
  21116. }
  21117. }
  21118. }
  21119. },
  21120. [`${e}-dropdown-rtl`]: {
  21121. direction: "rtl"
  21122. },
  21123. [`${e}-menu-item`]: {
  21124. [`${e}-dropdown-rtl`]: {
  21125. textAlign: {
  21126. _skip_check_: !0,
  21127. value: "right"
  21128. }
  21129. }
  21130. }
  21131. };
  21132. }, oSe = (t) => {
  21133. const {
  21134. componentCls: e,
  21135. tabsCardHorizontalPadding: n,
  21136. tabsCardHeight: r,
  21137. tabsCardGutter: i,
  21138. tabsHoverColor: a,
  21139. tabsActiveColor: o,
  21140. colorSplit: s
  21141. } = t;
  21142. return {
  21143. [e]: I(I(I(I({}, nn(t)), {
  21144. display: "flex",
  21145. // ========================== Navigation ==========================
  21146. [`> ${e}-nav, > div > ${e}-nav`]: {
  21147. position: "relative",
  21148. display: "flex",
  21149. flex: "none",
  21150. alignItems: "center",
  21151. [`${e}-nav-wrap`]: {
  21152. position: "relative",
  21153. display: "flex",
  21154. flex: "auto",
  21155. alignSelf: "stretch",
  21156. overflow: "hidden",
  21157. whiteSpace: "nowrap",
  21158. transform: "translate(0)",
  21159. // >>>>> Ping shadow
  21160. "&::before, &::after": {
  21161. position: "absolute",
  21162. zIndex: 1,
  21163. opacity: 0,
  21164. transition: `opacity ${t.motionDurationSlow}`,
  21165. content: "''",
  21166. pointerEvents: "none"
  21167. }
  21168. },
  21169. [`${e}-nav-list`]: {
  21170. position: "relative",
  21171. display: "flex",
  21172. transition: `opacity ${t.motionDurationSlow}`
  21173. },
  21174. // >>>>>>>> Operations
  21175. [`${e}-nav-operations`]: {
  21176. display: "flex",
  21177. alignSelf: "stretch"
  21178. },
  21179. [`${e}-nav-operations-hidden`]: {
  21180. position: "absolute",
  21181. visibility: "hidden",
  21182. pointerEvents: "none"
  21183. },
  21184. [`${e}-nav-more`]: {
  21185. position: "relative",
  21186. padding: n,
  21187. background: "transparent",
  21188. border: 0,
  21189. "&::after": {
  21190. position: "absolute",
  21191. right: {
  21192. _skip_check_: !0,
  21193. value: 0
  21194. },
  21195. bottom: 0,
  21196. left: {
  21197. _skip_check_: !0,
  21198. value: 0
  21199. },
  21200. height: t.controlHeightLG / 8,
  21201. transform: "translateY(100%)",
  21202. content: "''"
  21203. }
  21204. },
  21205. [`${e}-nav-add`]: I({
  21206. minWidth: `${r}px`,
  21207. marginLeft: {
  21208. _skip_check_: !0,
  21209. value: `${i}px`
  21210. },
  21211. padding: `0 ${t.paddingXS}px`,
  21212. background: "transparent",
  21213. border: `${t.lineWidth}px ${t.lineType} ${s}`,
  21214. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
  21215. outline: "none",
  21216. cursor: "pointer",
  21217. color: t.colorText,
  21218. transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`,
  21219. "&:hover": {
  21220. color: a
  21221. },
  21222. "&:active, &:focus:not(:focus-visible)": {
  21223. color: o
  21224. }
  21225. }, WS(t))
  21226. },
  21227. [`${e}-extra-content`]: {
  21228. flex: "none"
  21229. },
  21230. // ============================ InkBar ============================
  21231. [`${e}-ink-bar`]: {
  21232. position: "absolute",
  21233. background: t.colorPrimary,
  21234. pointerEvents: "none"
  21235. }
  21236. }), iSe(t)), {
  21237. // =========================== TabPanes ===========================
  21238. [`${e}-content`]: {
  21239. position: "relative",
  21240. display: "flex",
  21241. width: "100%",
  21242. "&-animated": {
  21243. transition: "margin 0.3s"
  21244. }
  21245. },
  21246. [`${e}-content-holder`]: {
  21247. flex: "auto",
  21248. minWidth: 0,
  21249. minHeight: 0
  21250. },
  21251. [`${e}-tabpane`]: {
  21252. outline: "none",
  21253. flex: "none",
  21254. width: "100%"
  21255. }
  21256. }),
  21257. [`${e}-centered`]: {
  21258. [`> ${e}-nav, > div > ${e}-nav`]: {
  21259. [`${e}-nav-wrap`]: {
  21260. [`&:not([class*='${e}-nav-wrap-ping'])`]: {
  21261. justifyContent: "center"
  21262. }
  21263. }
  21264. }
  21265. }
  21266. };
  21267. }, sSe = Sn("Tabs", (t) => {
  21268. const e = t.controlHeightLG, n = Bt(t, {
  21269. tabsHoverColor: t.colorPrimaryHover,
  21270. tabsActiveColor: t.colorPrimaryActive,
  21271. tabsCardHorizontalPadding: `${(e - Math.round(t.fontSize * t.lineHeight)) / 2 - t.lineWidth}px ${t.padding}px`,
  21272. tabsCardHeight: e,
  21273. tabsCardGutter: t.marginXXS / 2,
  21274. tabsHorizontalGutter: 32,
  21275. tabsCardHeadBackground: t.colorFillAlter,
  21276. dropdownEdgeChildVerticalPadding: t.paddingXXS,
  21277. tabsActiveTextShadow: "0 0 0.25px currentcolor",
  21278. tabsDropdownHeight: 200,
  21279. tabsDropdownWidth: 120
  21280. });
  21281. return [rSe(n), aSe(n), nSe(n), tSe(n), eSe(n), oSe(n), JOe(n)];
  21282. }, (t) => ({
  21283. zIndexPopup: t.zIndexPopupBase + 50
  21284. }));
  21285. let M5 = 0;
  21286. const pX = () => ({
  21287. prefixCls: {
  21288. type: String
  21289. },
  21290. id: {
  21291. type: String
  21292. },
  21293. popupClassName: String,
  21294. getPopupContainer: tt(),
  21295. activeKey: {
  21296. type: [String, Number]
  21297. },
  21298. defaultActiveKey: {
  21299. type: [String, Number]
  21300. },
  21301. direction: hn(),
  21302. animated: gn([Boolean, Object]),
  21303. renderTabBar: tt(),
  21304. tabBarGutter: {
  21305. type: Number
  21306. },
  21307. tabBarStyle: $t(),
  21308. tabPosition: hn(),
  21309. destroyInactiveTabPane: nt(),
  21310. hideAdd: Boolean,
  21311. type: hn(),
  21312. size: hn(),
  21313. centered: Boolean,
  21314. onEdit: tt(),
  21315. onChange: tt(),
  21316. onTabClick: tt(),
  21317. onTabScroll: tt(),
  21318. "onUpdate:activeKey": tt(),
  21319. // Accessibility
  21320. locale: $t(),
  21321. onPrevClick: tt(),
  21322. onNextClick: tt(),
  21323. tabBarExtraContent: Y.any
  21324. });
  21325. function lSe(t) {
  21326. return t.map((e) => {
  21327. if (Yi(e)) {
  21328. const n = I({}, e.props || {});
  21329. for (const [d, h] of Object.entries(n))
  21330. delete n[d], n[nI(d)] = h;
  21331. const r = e.children || {}, i = e.key !== void 0 ? e.key : void 0, {
  21332. tab: a = r.tab,
  21333. disabled: o,
  21334. forceRender: s,
  21335. closable: l,
  21336. animated: u,
  21337. active: c,
  21338. destroyInactiveTabPane: f
  21339. } = n;
  21340. return I(I({
  21341. key: i
  21342. }, n), {
  21343. node: e,
  21344. closeIcon: r.closeIcon,
  21345. tab: a,
  21346. disabled: o === "" || o,
  21347. forceRender: s === "" || s,
  21348. closable: l === "" || l,
  21349. animated: u === "" || u,
  21350. active: c === "" || c,
  21351. destroyInactiveTabPane: f === "" || f
  21352. });
  21353. }
  21354. return null;
  21355. }).filter((e) => e);
  21356. }
  21357. const uSe = te({
  21358. compatConfig: {
  21359. MODE: 3
  21360. },
  21361. name: "InternalTabs",
  21362. inheritAttrs: !1,
  21363. props: I(I({}, sr(pX(), {
  21364. tabPosition: "top",
  21365. animated: {
  21366. inkBar: !0,
  21367. tabPane: !1
  21368. }
  21369. })), {
  21370. tabs: cf()
  21371. }),
  21372. slots: Object,
  21373. // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  21374. setup(t, e) {
  21375. let {
  21376. attrs: n,
  21377. slots: r
  21378. } = e;
  21379. Gi(t.onPrevClick === void 0 && t.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), Gi(t.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), Gi(r.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
  21380. const {
  21381. prefixCls: i,
  21382. direction: a,
  21383. size: o,
  21384. rootPrefixCls: s,
  21385. getPopupContainer: l
  21386. } = It("tabs", t), [u, c] = sSe(i), f = L(() => a.value === "rtl"), d = L(() => {
  21387. const {
  21388. animated: x,
  21389. tabPosition: C
  21390. } = t;
  21391. return x === !1 || ["left", "right"].includes(C) ? {
  21392. inkBar: !1,
  21393. tabPane: !1
  21394. } : x === !0 ? {
  21395. inkBar: !0,
  21396. tabPane: !0
  21397. } : I({
  21398. inkBar: !0,
  21399. tabPane: !1
  21400. }, typeof x == "object" ? x : {});
  21401. }), [h, p] = fn(!1);
  21402. it(() => {
  21403. p(EI());
  21404. });
  21405. const [v, g] = Ah(() => {
  21406. var x;
  21407. return (x = t.tabs[0]) === null || x === void 0 ? void 0 : x.key;
  21408. }, {
  21409. value: L(() => t.activeKey),
  21410. defaultValue: t.defaultActiveKey
  21411. }), [m, y] = fn(() => t.tabs.findIndex((x) => x.key === v.value));
  21412. ht(() => {
  21413. var x;
  21414. let C = t.tabs.findIndex((T) => T.key === v.value);
  21415. C === -1 && (C = Math.max(0, Math.min(m.value, t.tabs.length - 1)), g((x = t.tabs[C]) === null || x === void 0 ? void 0 : x.key)), y(C);
  21416. });
  21417. const [b, _] = Ah(null, {
  21418. value: L(() => t.id)
  21419. }), O = L(() => h.value && !["left", "right"].includes(t.tabPosition) ? "top" : t.tabPosition);
  21420. it(() => {
  21421. t.id || (_(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : M5}`), M5 += 1);
  21422. });
  21423. const S = (x, C) => {
  21424. var T, w;
  21425. (T = t.onTabClick) === null || T === void 0 || T.call(t, x, C);
  21426. const P = x !== v.value;
  21427. g(x), P && ((w = t.onChange) === null || w === void 0 || w.call(t, x));
  21428. };
  21429. return dX({
  21430. tabs: L(() => t.tabs),
  21431. prefixCls: i
  21432. }), () => {
  21433. const {
  21434. id: x,
  21435. type: C,
  21436. tabBarGutter: T,
  21437. tabBarStyle: w,
  21438. locale: P,
  21439. destroyInactiveTabPane: $,
  21440. renderTabBar: A = r.renderTabBar,
  21441. onTabScroll: D,
  21442. hideAdd: E,
  21443. centered: R
  21444. } = t, N = {
  21445. id: b.value,
  21446. activeKey: v.value,
  21447. animated: d.value,
  21448. tabPosition: O.value,
  21449. rtl: f.value,
  21450. mobile: h.value
  21451. };
  21452. let V;
  21453. C === "editable-card" && (V = {
  21454. onEdit: (Q, Z) => {
  21455. let {
  21456. key: ne,
  21457. event: ee
  21458. } = Z;
  21459. var oe;
  21460. (oe = t.onEdit) === null || oe === void 0 || oe.call(t, Q === "add" ? ee : ne, Q);
  21461. },
  21462. removeIcon: () => M(ol, null, null),
  21463. addIcon: r.addIcon ? r.addIcon : () => M(_x, null, null),
  21464. showAdd: E !== !0
  21465. });
  21466. let B;
  21467. const W = I(I({}, N), {
  21468. moreTransitionName: `${s.value}-slide-up`,
  21469. editable: V,
  21470. locale: P,
  21471. tabBarGutter: T,
  21472. onTabClick: S,
  21473. onTabScroll: D,
  21474. style: w,
  21475. getPopupContainer: l.value,
  21476. popupClassName: ye(t.popupClassName, c.value)
  21477. });
  21478. A ? B = A(I(I({}, W), {
  21479. DefaultTabBar: A5
  21480. })) : B = M(A5, W, um(r, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
  21481. const F = i.value;
  21482. return u(M("div", j(j({}, n), {}, {
  21483. id: x,
  21484. class: ye(F, `${F}-${O.value}`, {
  21485. [c.value]: !0,
  21486. [`${F}-${o.value}`]: o.value,
  21487. [`${F}-card`]: ["card", "editable-card"].includes(C),
  21488. [`${F}-editable-card`]: C === "editable-card",
  21489. [`${F}-centered`]: R,
  21490. [`${F}-mobile`]: h.value,
  21491. [`${F}-editable`]: C === "editable-card",
  21492. [`${F}-rtl`]: f.value
  21493. }, n.class)
  21494. }), [B, M(YOe, j(j({
  21495. destroyInactiveTabPane: $
  21496. }, N), {}, {
  21497. animated: d.value
  21498. }), null)]));
  21499. };
  21500. }
  21501. }), Uc = te({
  21502. compatConfig: {
  21503. MODE: 3
  21504. },
  21505. name: "ATabs",
  21506. inheritAttrs: !1,
  21507. props: sr(pX(), {
  21508. tabPosition: "top",
  21509. animated: {
  21510. inkBar: !0,
  21511. tabPane: !1
  21512. }
  21513. }),
  21514. slots: Object,
  21515. // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  21516. setup(t, e) {
  21517. let {
  21518. attrs: n,
  21519. slots: r,
  21520. emit: i
  21521. } = e;
  21522. const a = (o) => {
  21523. i("update:activeKey", o), i("change", o);
  21524. };
  21525. return () => {
  21526. var o;
  21527. const s = lSe(Yn((o = r.default) === null || o === void 0 ? void 0 : o.call(r)));
  21528. return M(uSe, j(j(j({}, or(t, ["onUpdate:activeKey"])), n), {}, {
  21529. onChange: a,
  21530. tabs: s
  21531. }), r);
  21532. };
  21533. }
  21534. }), cSe = () => ({
  21535. tab: Y.any,
  21536. disabled: {
  21537. type: Boolean
  21538. },
  21539. forceRender: {
  21540. type: Boolean
  21541. },
  21542. closable: {
  21543. type: Boolean
  21544. },
  21545. animated: {
  21546. type: Boolean
  21547. },
  21548. active: {
  21549. type: Boolean
  21550. },
  21551. destroyInactiveTabPane: {
  21552. type: Boolean
  21553. },
  21554. // Pass by TabPaneList
  21555. prefixCls: {
  21556. type: String
  21557. },
  21558. tabKey: {
  21559. type: [String, Number]
  21560. },
  21561. id: {
  21562. type: String
  21563. }
  21564. // closeIcon: PropTypes.any,
  21565. }), Ws = te({
  21566. compatConfig: {
  21567. MODE: 3
  21568. },
  21569. name: "ATabPane",
  21570. inheritAttrs: !1,
  21571. __ANT_TAB_PANE: !0,
  21572. props: cSe(),
  21573. slots: Object,
  21574. setup(t, e) {
  21575. let {
  21576. attrs: n,
  21577. slots: r
  21578. } = e;
  21579. const i = U(t.forceRender);
  21580. se([() => t.active, () => t.destroyInactiveTabPane], () => {
  21581. t.active ? i.value = !0 : t.destroyInactiveTabPane && (i.value = !1);
  21582. }, {
  21583. immediate: !0
  21584. });
  21585. const a = L(() => t.active ? {} : t.animated ? {
  21586. visibility: "hidden",
  21587. height: 0,
  21588. overflowY: "hidden"
  21589. } : {
  21590. display: "none"
  21591. });
  21592. return () => {
  21593. var o;
  21594. const {
  21595. prefixCls: s,
  21596. forceRender: l,
  21597. id: u,
  21598. active: c,
  21599. tabKey: f
  21600. } = t;
  21601. return M("div", {
  21602. id: u && `${u}-panel-${f}`,
  21603. role: "tabpanel",
  21604. tabindex: c ? 0 : -1,
  21605. "aria-labelledby": u && `${u}-tab-${f}`,
  21606. "aria-hidden": !c,
  21607. style: [a.value, n.style],
  21608. class: [`${s}-tabpane`, c && `${s}-tabpane-active`, n.class]
  21609. }, [(c || i.value || l) && ((o = r.default) === null || o === void 0 ? void 0 : o.call(r))]);
  21610. };
  21611. }
  21612. });
  21613. Uc.TabPane = Ws;
  21614. Uc.install = function(t) {
  21615. return t.component(Uc.name, Uc), t.component(Ws.name, Ws), t;
  21616. };
  21617. const fSe = () => ({
  21618. prefixCls: String,
  21619. activeKey: gn([Array, Number, String]),
  21620. defaultActiveKey: gn([Array, Number, String]),
  21621. accordion: nt(),
  21622. destroyInactivePanel: nt(),
  21623. bordered: nt(),
  21624. expandIcon: tt(),
  21625. openAnimation: Y.object,
  21626. expandIconPosition: hn(),
  21627. collapsible: hn(),
  21628. ghost: nt(),
  21629. onChange: tt(),
  21630. "onUpdate:activeKey": tt()
  21631. }), vX = () => ({
  21632. openAnimation: Y.object,
  21633. prefixCls: String,
  21634. header: Y.any,
  21635. headerClass: String,
  21636. showArrow: nt(),
  21637. isActive: nt(),
  21638. destroyInactivePanel: nt(),
  21639. /** @deprecated Use `collapsible="disabled"` instead */
  21640. disabled: nt(),
  21641. accordion: nt(),
  21642. forceRender: nt(),
  21643. expandIcon: tt(),
  21644. extra: Y.any,
  21645. panelKey: gn(),
  21646. collapsible: hn(),
  21647. role: String,
  21648. onItemClick: tt()
  21649. }), dSe = (t) => {
  21650. const {
  21651. componentCls: e,
  21652. collapseContentBg: n,
  21653. padding: r,
  21654. collapseContentPaddingHorizontal: i,
  21655. collapseHeaderBg: a,
  21656. collapseHeaderPadding: o,
  21657. collapsePanelBorderRadius: s,
  21658. lineWidth: l,
  21659. lineType: u,
  21660. colorBorder: c,
  21661. colorText: f,
  21662. colorTextHeading: d,
  21663. colorTextDisabled: h,
  21664. fontSize: p,
  21665. lineHeight: v,
  21666. marginSM: g,
  21667. paddingSM: m,
  21668. motionDurationSlow: y,
  21669. fontSizeIcon: b
  21670. } = t, _ = `${l}px ${u} ${c}`;
  21671. return {
  21672. [e]: I(I({}, nn(t)), {
  21673. backgroundColor: a,
  21674. border: _,
  21675. borderBottom: 0,
  21676. borderRadius: `${s}px`,
  21677. "&-rtl": {
  21678. direction: "rtl"
  21679. },
  21680. [`& > ${e}-item`]: {
  21681. borderBottom: _,
  21682. "&:last-child": {
  21683. [`
  21684. &,
  21685. & > ${e}-header`]: {
  21686. borderRadius: `0 0 ${s}px ${s}px`
  21687. }
  21688. },
  21689. [`> ${e}-header`]: {
  21690. position: "relative",
  21691. display: "flex",
  21692. flexWrap: "nowrap",
  21693. alignItems: "flex-start",
  21694. padding: o,
  21695. color: d,
  21696. lineHeight: v,
  21697. cursor: "pointer",
  21698. transition: `all ${y}, visibility 0s`,
  21699. [`> ${e}-header-text`]: {
  21700. flex: "auto"
  21701. },
  21702. "&:focus": {
  21703. outline: "none"
  21704. },
  21705. // >>>>> Arrow
  21706. [`${e}-expand-icon`]: {
  21707. height: p * v,
  21708. display: "flex",
  21709. alignItems: "center",
  21710. paddingInlineEnd: g
  21711. },
  21712. [`${e}-arrow`]: I(I({}, up()), {
  21713. fontSize: b,
  21714. svg: {
  21715. transition: `transform ${y}`
  21716. }
  21717. }),
  21718. // >>>>> Text
  21719. [`${e}-header-text`]: {
  21720. marginInlineEnd: "auto"
  21721. }
  21722. },
  21723. [`${e}-header-collapsible-only`]: {
  21724. cursor: "default",
  21725. [`${e}-header-text`]: {
  21726. flex: "none",
  21727. cursor: "pointer"
  21728. },
  21729. [`${e}-expand-icon`]: {
  21730. cursor: "pointer"
  21731. }
  21732. },
  21733. [`${e}-icon-collapsible-only`]: {
  21734. cursor: "default",
  21735. [`${e}-expand-icon`]: {
  21736. cursor: "pointer"
  21737. }
  21738. },
  21739. [`&${e}-no-arrow`]: {
  21740. [`> ${e}-header`]: {
  21741. paddingInlineStart: m
  21742. }
  21743. }
  21744. },
  21745. [`${e}-content`]: {
  21746. color: f,
  21747. backgroundColor: n,
  21748. borderTop: _,
  21749. [`& > ${e}-content-box`]: {
  21750. padding: `${r}px ${i}px`
  21751. },
  21752. "&-hidden": {
  21753. display: "none"
  21754. }
  21755. },
  21756. [`${e}-item:last-child`]: {
  21757. [`> ${e}-content`]: {
  21758. borderRadius: `0 0 ${s}px ${s}px`
  21759. }
  21760. },
  21761. [`& ${e}-item-disabled > ${e}-header`]: {
  21762. "\n &,\n & > .arrow\n ": {
  21763. color: h,
  21764. cursor: "not-allowed"
  21765. }
  21766. },
  21767. // ========================== Icon Position ==========================
  21768. [`&${e}-icon-position-end`]: {
  21769. [`& > ${e}-item`]: {
  21770. [`> ${e}-header`]: {
  21771. [`${e}-expand-icon`]: {
  21772. order: 1,
  21773. paddingInlineEnd: 0,
  21774. paddingInlineStart: g
  21775. }
  21776. }
  21777. }
  21778. }
  21779. })
  21780. };
  21781. }, hSe = (t) => {
  21782. const {
  21783. componentCls: e
  21784. } = t, n = `> ${e}-item > ${e}-header ${e}-arrow svg`;
  21785. return {
  21786. [`${e}-rtl`]: {
  21787. [n]: {
  21788. transform: "rotate(180deg)"
  21789. }
  21790. }
  21791. };
  21792. }, pSe = (t) => {
  21793. const {
  21794. componentCls: e,
  21795. collapseHeaderBg: n,
  21796. paddingXXS: r,
  21797. colorBorder: i
  21798. } = t;
  21799. return {
  21800. [`${e}-borderless`]: {
  21801. backgroundColor: n,
  21802. border: 0,
  21803. [`> ${e}-item`]: {
  21804. borderBottom: `1px solid ${i}`
  21805. },
  21806. [`
  21807. > ${e}-item:last-child,
  21808. > ${e}-item:last-child ${e}-header
  21809. `]: {
  21810. borderRadius: 0
  21811. },
  21812. [`> ${e}-item:last-child`]: {
  21813. borderBottom: 0
  21814. },
  21815. [`> ${e}-item > ${e}-content`]: {
  21816. backgroundColor: "transparent",
  21817. borderTop: 0
  21818. },
  21819. [`> ${e}-item > ${e}-content > ${e}-content-box`]: {
  21820. paddingTop: r
  21821. }
  21822. }
  21823. };
  21824. }, vSe = (t) => {
  21825. const {
  21826. componentCls: e,
  21827. paddingSM: n
  21828. } = t;
  21829. return {
  21830. [`${e}-ghost`]: {
  21831. backgroundColor: "transparent",
  21832. border: 0,
  21833. [`> ${e}-item`]: {
  21834. borderBottom: 0,
  21835. [`> ${e}-content`]: {
  21836. backgroundColor: "transparent",
  21837. border: 0,
  21838. [`> ${e}-content-box`]: {
  21839. paddingBlock: n
  21840. }
  21841. }
  21842. }
  21843. }
  21844. };
  21845. }, gSe = Sn("Collapse", (t) => {
  21846. const e = Bt(t, {
  21847. collapseContentBg: t.colorBgContainer,
  21848. collapseHeaderBg: t.colorFillAlter,
  21849. collapseHeaderPadding: `${t.paddingSM}px ${t.padding}px`,
  21850. collapsePanelBorderRadius: t.borderRadiusLG,
  21851. collapseContentPaddingHorizontal: 16
  21852. // Fixed value
  21853. });
  21854. return [dSe(e), pSe(e), vSe(e), hSe(e), JI(e)];
  21855. });
  21856. function I5(t) {
  21857. let e = t;
  21858. if (!Array.isArray(e)) {
  21859. const n = typeof e;
  21860. e = n === "number" || n === "string" ? [e] : [];
  21861. }
  21862. return e.map((n) => String(n));
  21863. }
  21864. const vg = te({
  21865. compatConfig: {
  21866. MODE: 3
  21867. },
  21868. name: "ACollapse",
  21869. inheritAttrs: !1,
  21870. props: sr(fSe(), {
  21871. accordion: !1,
  21872. destroyInactivePanel: !1,
  21873. bordered: !0,
  21874. expandIconPosition: "start"
  21875. }),
  21876. slots: Object,
  21877. setup(t, e) {
  21878. let {
  21879. attrs: n,
  21880. slots: r,
  21881. emit: i
  21882. } = e;
  21883. const a = U(I5(RU([t.activeKey, t.defaultActiveKey])));
  21884. se(() => t.activeKey, () => {
  21885. a.value = I5(t.activeKey);
  21886. }, {
  21887. deep: !0
  21888. });
  21889. const {
  21890. prefixCls: o,
  21891. direction: s,
  21892. rootPrefixCls: l
  21893. } = It("collapse", t), [u, c] = gSe(o), f = L(() => {
  21894. const {
  21895. expandIconPosition: m
  21896. } = t;
  21897. return m !== void 0 ? m : s.value === "rtl" ? "end" : "start";
  21898. }), d = (m) => {
  21899. const {
  21900. expandIcon: y = r.expandIcon
  21901. } = t, b = y ? y(m) : M(gx, {
  21902. rotate: m.isActive ? 90 : void 0
  21903. }, null);
  21904. return M("div", {
  21905. class: [`${o.value}-expand-icon`, c.value],
  21906. onClick: () => ["header", "icon"].includes(t.collapsible) && p(m.panelKey)
  21907. }, [Yi(Array.isArray(y) ? b[0] : b) ? Pn(b, {
  21908. class: `${o.value}-arrow`
  21909. }, !1) : b]);
  21910. }, h = (m) => {
  21911. t.activeKey === void 0 && (a.value = m);
  21912. const y = t.accordion ? m[0] : m;
  21913. i("update:activeKey", y), i("change", y);
  21914. }, p = (m) => {
  21915. let y = a.value;
  21916. if (t.accordion)
  21917. y = y[0] === m ? [] : [m];
  21918. else {
  21919. y = [...y];
  21920. const b = y.indexOf(m);
  21921. b > -1 ? y.splice(b, 1) : y.push(m);
  21922. }
  21923. h(y);
  21924. }, v = (m, y) => {
  21925. var b, _, O;
  21926. if (rI(m)) return;
  21927. const S = a.value, {
  21928. accordion: x,
  21929. destroyInactivePanel: C,
  21930. collapsible: T,
  21931. openAnimation: w
  21932. } = t, P = w || lD(`${l.value}-motion-collapse`), $ = String((b = m.key) !== null && b !== void 0 ? b : y), {
  21933. header: A = (O = (_ = m.children) === null || _ === void 0 ? void 0 : _.header) === null || O === void 0 ? void 0 : O.call(_),
  21934. headerClass: D,
  21935. collapsible: E,
  21936. disabled: R
  21937. } = m.props || {};
  21938. let N = !1;
  21939. x ? N = S[0] === $ : N = S.indexOf($) > -1;
  21940. let V = E ?? T;
  21941. (R || R === "") && (V = "disabled");
  21942. const B = {
  21943. key: $,
  21944. panelKey: $,
  21945. header: A,
  21946. headerClass: D,
  21947. isActive: N,
  21948. prefixCls: o.value,
  21949. destroyInactivePanel: C,
  21950. openAnimation: P,
  21951. accordion: x,
  21952. onItemClick: V === "disabled" ? null : p,
  21953. expandIcon: d,
  21954. collapsible: V
  21955. };
  21956. return Pn(m, B);
  21957. }, g = () => {
  21958. var m;
  21959. return Yn((m = r.default) === null || m === void 0 ? void 0 : m.call(r)).map(v);
  21960. };
  21961. return () => {
  21962. const {
  21963. accordion: m,
  21964. bordered: y,
  21965. ghost: b
  21966. } = t, _ = ye(o.value, {
  21967. [`${o.value}-borderless`]: !y,
  21968. [`${o.value}-icon-position-${f.value}`]: !0,
  21969. [`${o.value}-rtl`]: s.value === "rtl",
  21970. [`${o.value}-ghost`]: !!b,
  21971. [n.class]: !!n.class
  21972. }, c.value);
  21973. return u(M("div", j(j({
  21974. class: _
  21975. }, due(n)), {}, {
  21976. style: n.style,
  21977. role: m ? "tablist" : null
  21978. }), [g()]));
  21979. };
  21980. }
  21981. }), mSe = te({
  21982. compatConfig: {
  21983. MODE: 3
  21984. },
  21985. name: "PanelContent",
  21986. props: vX(),
  21987. setup(t, e) {
  21988. let {
  21989. slots: n
  21990. } = e;
  21991. const r = ae(!1);
  21992. return ht(() => {
  21993. (t.isActive || t.forceRender) && (r.value = !0);
  21994. }), () => {
  21995. var i;
  21996. if (!r.value) return null;
  21997. const {
  21998. prefixCls: a,
  21999. isActive: o,
  22000. role: s
  22001. } = t;
  22002. return M("div", {
  22003. class: ye(`${a}-content`, {
  22004. [`${a}-content-active`]: o,
  22005. [`${a}-content-inactive`]: !o
  22006. }),
  22007. role: s
  22008. }, [M("div", {
  22009. class: `${a}-content-box`
  22010. }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
  22011. };
  22012. }
  22013. }), V1 = te({
  22014. compatConfig: {
  22015. MODE: 3
  22016. },
  22017. name: "ACollapsePanel",
  22018. inheritAttrs: !1,
  22019. props: sr(vX(), {
  22020. showArrow: !0,
  22021. isActive: !1,
  22022. onItemClick() {
  22023. },
  22024. headerClass: "",
  22025. forceRender: !1
  22026. }),
  22027. slots: Object,
  22028. // emits: ['itemClick'],
  22029. setup(t, e) {
  22030. let {
  22031. slots: n,
  22032. emit: r,
  22033. attrs: i
  22034. } = e;
  22035. Gi(t.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
  22036. const {
  22037. prefixCls: a
  22038. } = It("collapse", t), o = () => {
  22039. r("itemClick", t.panelKey);
  22040. }, s = (l) => {
  22041. (l.key === "Enter" || l.keyCode === 13 || l.which === 13) && o();
  22042. };
  22043. return () => {
  22044. var l, u;
  22045. const {
  22046. header: c = (l = n.header) === null || l === void 0 ? void 0 : l.call(n),
  22047. headerClass: f,
  22048. isActive: d,
  22049. showArrow: h,
  22050. destroyInactivePanel: p,
  22051. accordion: v,
  22052. forceRender: g,
  22053. openAnimation: m,
  22054. expandIcon: y = n.expandIcon,
  22055. extra: b = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
  22056. collapsible: _
  22057. } = t, O = _ === "disabled", S = a.value, x = ye(`${S}-header`, {
  22058. [f]: f,
  22059. [`${S}-header-collapsible-only`]: _ === "header",
  22060. [`${S}-icon-collapsible-only`]: _ === "icon"
  22061. }), C = ye({
  22062. [`${S}-item`]: !0,
  22063. [`${S}-item-active`]: d,
  22064. [`${S}-item-disabled`]: O,
  22065. [`${S}-no-arrow`]: !h,
  22066. [`${i.class}`]: !!i.class
  22067. });
  22068. let T = M("i", {
  22069. class: "arrow"
  22070. }, null);
  22071. h && typeof y == "function" && (T = y(t));
  22072. const w = Oi(M(mSe, {
  22073. prefixCls: S,
  22074. isActive: d,
  22075. forceRender: g,
  22076. role: v ? "tabpanel" : null
  22077. }, {
  22078. default: n.default
  22079. }), [[zs, d]]), P = I({
  22080. appear: !1,
  22081. css: !1
  22082. }, m);
  22083. return M("div", j(j({}, i), {}, {
  22084. class: C
  22085. }), [M("div", {
  22086. class: x,
  22087. onClick: () => !["header", "icon"].includes(_) && o(),
  22088. role: v ? "tab" : "button",
  22089. tabindex: O ? -1 : 0,
  22090. "aria-expanded": d,
  22091. onKeypress: s
  22092. }, [h && T, M("span", {
  22093. onClick: () => _ === "header" && o(),
  22094. class: `${S}-header-text`
  22095. }, [c]), b && M("div", {
  22096. class: `${S}-extra`
  22097. }, [b])]), M(ho, P, {
  22098. default: () => [!p || d ? w : null]
  22099. })]);
  22100. };
  22101. }
  22102. });
  22103. vg.Panel = V1;
  22104. vg.install = function(t) {
  22105. return t.component(vg.name, vg), t.component(V1.name, V1), t;
  22106. };
  22107. var ySe = { 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" };
  22108. function D5(t) {
  22109. for (var e = 1; e < arguments.length; e++) {
  22110. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  22111. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  22112. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  22113. }))), r.forEach(function(i) {
  22114. bSe(t, i, n[i]);
  22115. });
  22116. }
  22117. return t;
  22118. }
  22119. function bSe(t, e, n) {
  22120. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  22121. }
  22122. var cD = function(e, n) {
  22123. var r = D5({}, e, n.attrs);
  22124. return M(lt, D5({}, r, {
  22125. icon: ySe
  22126. }), null);
  22127. };
  22128. cD.displayName = "LeftOutlined";
  22129. cD.inheritAttrs = !1;
  22130. const gX = () => Ta() && window.document.documentElement;
  22131. let Ry;
  22132. const _Se = () => {
  22133. if (!gX())
  22134. return !1;
  22135. if (Ry !== void 0)
  22136. return Ry;
  22137. const t = document.createElement("div");
  22138. 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), Ry = t.scrollHeight === 1, document.body.removeChild(t), Ry;
  22139. }, OSe = () => {
  22140. const t = ae(!1);
  22141. return it(() => {
  22142. t.value = _Se();
  22143. }), t;
  22144. }, mX = Symbol("rowContextKey"), SSe = (t) => {
  22145. pt(mX, t);
  22146. }, xSe = () => Ge(mX, {
  22147. gutter: L(() => {
  22148. }),
  22149. wrap: L(() => {
  22150. }),
  22151. supportFlexGap: L(() => {
  22152. })
  22153. }), wSe = (t) => {
  22154. const {
  22155. componentCls: e
  22156. } = t;
  22157. return {
  22158. // Grid system
  22159. [e]: {
  22160. display: "flex",
  22161. flexFlow: "row wrap",
  22162. minWidth: 0,
  22163. "&::before, &::after": {
  22164. display: "flex"
  22165. },
  22166. "&-no-wrap": {
  22167. flexWrap: "nowrap"
  22168. },
  22169. // The origin of the X-axis
  22170. "&-start": {
  22171. justifyContent: "flex-start"
  22172. },
  22173. // The center of the X-axis
  22174. "&-center": {
  22175. justifyContent: "center"
  22176. },
  22177. // The opposite of the X-axis
  22178. "&-end": {
  22179. justifyContent: "flex-end"
  22180. },
  22181. "&-space-between": {
  22182. justifyContent: "space-between"
  22183. },
  22184. "&-space-around ": {
  22185. justifyContent: "space-around"
  22186. },
  22187. "&-space-evenly ": {
  22188. justifyContent: "space-evenly"
  22189. },
  22190. // Align at the top
  22191. "&-top": {
  22192. alignItems: "flex-start"
  22193. },
  22194. // Align at the center
  22195. "&-middle": {
  22196. alignItems: "center"
  22197. },
  22198. "&-bottom": {
  22199. alignItems: "flex-end"
  22200. }
  22201. }
  22202. };
  22203. }, CSe = (t) => {
  22204. const {
  22205. componentCls: e
  22206. } = t;
  22207. return {
  22208. // Grid system
  22209. [e]: {
  22210. position: "relative",
  22211. maxWidth: "100%",
  22212. // Prevent columns from collapsing when empty
  22213. minHeight: 1
  22214. }
  22215. };
  22216. }, TSe = (t, e) => {
  22217. const {
  22218. componentCls: n,
  22219. gridColumns: r
  22220. } = t, i = {};
  22221. for (let a = r; a >= 0; a--)
  22222. a === 0 ? (i[`${n}${e}-${a}`] = {
  22223. display: "none"
  22224. }, i[`${n}-push-${a}`] = {
  22225. insetInlineStart: "auto"
  22226. }, i[`${n}-pull-${a}`] = {
  22227. insetInlineEnd: "auto"
  22228. }, i[`${n}${e}-push-${a}`] = {
  22229. insetInlineStart: "auto"
  22230. }, i[`${n}${e}-pull-${a}`] = {
  22231. insetInlineEnd: "auto"
  22232. }, i[`${n}${e}-offset-${a}`] = {
  22233. marginInlineEnd: 0
  22234. }, i[`${n}${e}-order-${a}`] = {
  22235. order: 0
  22236. }) : (i[`${n}${e}-${a}`] = {
  22237. display: "block",
  22238. flex: `0 0 ${a / r * 100}%`,
  22239. maxWidth: `${a / r * 100}%`
  22240. }, i[`${n}${e}-push-${a}`] = {
  22241. insetInlineStart: `${a / r * 100}%`
  22242. }, i[`${n}${e}-pull-${a}`] = {
  22243. insetInlineEnd: `${a / r * 100}%`
  22244. }, i[`${n}${e}-offset-${a}`] = {
  22245. marginInlineStart: `${a / r * 100}%`
  22246. }, i[`${n}${e}-order-${a}`] = {
  22247. order: a
  22248. });
  22249. return i;
  22250. }, z2 = (t, e) => TSe(t, e), PSe = (t, e, n) => ({
  22251. [`@media (min-width: ${e}px)`]: I({}, z2(t, n))
  22252. }), $Se = Sn("Grid", (t) => [wSe(t)]), ASe = Sn("Grid", (t) => {
  22253. const e = Bt(t, {
  22254. gridColumns: 24
  22255. // Row is divided into 24 parts in Grid
  22256. }), n = {
  22257. "-sm": e.screenSMMin,
  22258. "-md": e.screenMDMin,
  22259. "-lg": e.screenLGMin,
  22260. "-xl": e.screenXLMin,
  22261. "-xxl": e.screenXXLMin
  22262. };
  22263. return [CSe(e), z2(e, ""), z2(e, "-xs"), Object.keys(n).map((r) => PSe(e, n[r], r)).reduce((r, i) => I(I({}, r), i), {})];
  22264. }), ESe = () => ({
  22265. align: gn([String, Object]),
  22266. justify: gn([String, Object]),
  22267. prefixCls: String,
  22268. gutter: gn([Number, Array, Object], 0),
  22269. wrap: {
  22270. type: Boolean,
  22271. default: void 0
  22272. }
  22273. }), MSe = te({
  22274. compatConfig: {
  22275. MODE: 3
  22276. },
  22277. name: "ARow",
  22278. inheritAttrs: !1,
  22279. props: ESe(),
  22280. setup(t, e) {
  22281. let {
  22282. slots: n,
  22283. attrs: r
  22284. } = e;
  22285. const {
  22286. prefixCls: i,
  22287. direction: a
  22288. } = It("row", t), [o, s] = $Se(i);
  22289. let l;
  22290. const u = Y_e(), c = U({
  22291. xs: !0,
  22292. sm: !0,
  22293. md: !0,
  22294. lg: !0,
  22295. xl: !0,
  22296. xxl: !0
  22297. }), f = U({
  22298. xs: !1,
  22299. sm: !1,
  22300. md: !1,
  22301. lg: !1,
  22302. xl: !1,
  22303. xxl: !1
  22304. }), d = (b) => L(() => {
  22305. if (typeof t[b] == "string")
  22306. return t[b];
  22307. if (typeof t[b] != "object")
  22308. return "";
  22309. for (let _ = 0; _ < Ay.length; _++) {
  22310. const O = Ay[_];
  22311. if (!f.value[O]) continue;
  22312. const S = t[b][O];
  22313. if (S !== void 0)
  22314. return S;
  22315. }
  22316. return "";
  22317. }), h = d("align"), p = d("justify"), v = OSe();
  22318. it(() => {
  22319. l = u.value.subscribe((b) => {
  22320. f.value = b;
  22321. const _ = t.gutter || 0;
  22322. (!Array.isArray(_) && typeof _ == "object" || Array.isArray(_) && (typeof _[0] == "object" || typeof _[1] == "object")) && (c.value = b);
  22323. });
  22324. }), yt(() => {
  22325. u.value.unsubscribe(l);
  22326. });
  22327. const g = L(() => {
  22328. const b = [void 0, void 0], {
  22329. gutter: _ = 0
  22330. } = t;
  22331. return (Array.isArray(_) ? _ : [_, void 0]).forEach((S, x) => {
  22332. if (typeof S == "object")
  22333. for (let C = 0; C < Ay.length; C++) {
  22334. const T = Ay[C];
  22335. if (c.value[T] && S[T] !== void 0) {
  22336. b[x] = S[T];
  22337. break;
  22338. }
  22339. }
  22340. else
  22341. b[x] = S;
  22342. }), b;
  22343. });
  22344. SSe({
  22345. gutter: g,
  22346. supportFlexGap: v,
  22347. wrap: L(() => t.wrap)
  22348. });
  22349. const m = L(() => ye(i.value, {
  22350. [`${i.value}-no-wrap`]: t.wrap === !1,
  22351. [`${i.value}-${p.value}`]: p.value,
  22352. [`${i.value}-${h.value}`]: h.value,
  22353. [`${i.value}-rtl`]: a.value === "rtl"
  22354. }, r.class, s.value)), y = L(() => {
  22355. const b = g.value, _ = {}, O = b[0] != null && b[0] > 0 ? `${b[0] / -2}px` : void 0, S = b[1] != null && b[1] > 0 ? `${b[1] / -2}px` : void 0;
  22356. return O && (_.marginLeft = O, _.marginRight = O), v.value ? _.rowGap = `${b[1]}px` : S && (_.marginTop = S, _.marginBottom = S), _;
  22357. });
  22358. return () => {
  22359. var b;
  22360. return o(M("div", j(j({}, r), {}, {
  22361. class: m.value,
  22362. style: I(I({}, y.value), r.style)
  22363. }), [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)]));
  22364. };
  22365. }
  22366. });
  22367. function Ic() {
  22368. return Ic = Object.assign ? Object.assign.bind() : function(t) {
  22369. for (var e = 1; e < arguments.length; e++) {
  22370. var n = arguments[e];
  22371. for (var r in n)
  22372. Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
  22373. }
  22374. return t;
  22375. }, Ic.apply(this, arguments);
  22376. }
  22377. function ISe(t, e) {
  22378. t.prototype = Object.create(e.prototype), t.prototype.constructor = t, cm(t, e);
  22379. }
  22380. function V2(t) {
  22381. return V2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
  22382. return n.__proto__ || Object.getPrototypeOf(n);
  22383. }, V2(t);
  22384. }
  22385. function cm(t, e) {
  22386. return cm = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
  22387. return r.__proto__ = i, r;
  22388. }, cm(t, e);
  22389. }
  22390. function DSe() {
  22391. if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  22392. if (typeof Proxy == "function") return !0;
  22393. try {
  22394. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  22395. })), !0;
  22396. } catch {
  22397. return !1;
  22398. }
  22399. }
  22400. function $_(t, e, n) {
  22401. return DSe() ? $_ = Reflect.construct.bind() : $_ = function(i, a, o) {
  22402. var s = [null];
  22403. s.push.apply(s, a);
  22404. var l = Function.bind.apply(i, s), u = new l();
  22405. return o && cm(u, o.prototype), u;
  22406. }, $_.apply(null, arguments);
  22407. }
  22408. function RSe(t) {
  22409. return Function.toString.call(t).indexOf("[native code]") !== -1;
  22410. }
  22411. function F2(t) {
  22412. var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  22413. return F2 = function(r) {
  22414. if (r === null || !RSe(r)) return r;
  22415. if (typeof r != "function")
  22416. throw new TypeError("Super expression must either be null or a function");
  22417. if (typeof e < "u") {
  22418. if (e.has(r)) return e.get(r);
  22419. e.set(r, i);
  22420. }
  22421. function i() {
  22422. return $_(r, arguments, V2(this).constructor);
  22423. }
  22424. return i.prototype = Object.create(r.prototype, {
  22425. constructor: {
  22426. value: i,
  22427. enumerable: !1,
  22428. writable: !0,
  22429. configurable: !0
  22430. }
  22431. }), cm(i, r);
  22432. }, F2(t);
  22433. }
  22434. var kSe = /%[sdj%]/g, yX = function() {
  22435. };
  22436. typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (yX = function(e, n) {
  22437. typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
  22438. return typeof r == "string";
  22439. }) && console.warn(e, n);
  22440. });
  22441. function W2(t) {
  22442. if (!t || !t.length) return null;
  22443. var e = {};
  22444. return t.forEach(function(n) {
  22445. var r = n.field;
  22446. e[r] = e[r] || [], e[r].push(n);
  22447. }), e;
  22448. }
  22449. function Fi(t) {
  22450. for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
  22451. n[r - 1] = arguments[r];
  22452. var i = 0, a = n.length;
  22453. if (typeof t == "function")
  22454. return t.apply(null, n);
  22455. if (typeof t == "string") {
  22456. var o = t.replace(kSe, function(s) {
  22457. if (s === "%%")
  22458. return "%";
  22459. if (i >= a)
  22460. return s;
  22461. switch (s) {
  22462. case "%s":
  22463. return String(n[i++]);
  22464. case "%d":
  22465. return Number(n[i++]);
  22466. case "%j":
  22467. try {
  22468. return JSON.stringify(n[i++]);
  22469. } catch {
  22470. return "[Circular]";
  22471. }
  22472. break;
  22473. default:
  22474. return s;
  22475. }
  22476. });
  22477. return o;
  22478. }
  22479. return t;
  22480. }
  22481. function LSe(t) {
  22482. return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
  22483. }
  22484. function Kn(t, e) {
  22485. return !!(t == null || e === "array" && Array.isArray(t) && !t.length || LSe(e) && typeof t == "string" && !t);
  22486. }
  22487. function NSe(t, e, n) {
  22488. var r = [], i = 0, a = t.length;
  22489. function o(s) {
  22490. r.push.apply(r, s || []), i++, i === a && n(r);
  22491. }
  22492. t.forEach(function(s) {
  22493. e(s, o);
  22494. });
  22495. }
  22496. function R5(t, e, n) {
  22497. var r = 0, i = t.length;
  22498. function a(o) {
  22499. if (o && o.length) {
  22500. n(o);
  22501. return;
  22502. }
  22503. var s = r;
  22504. r = r + 1, s < i ? e(t[s], a) : n([]);
  22505. }
  22506. a([]);
  22507. }
  22508. function BSe(t) {
  22509. var e = [];
  22510. return Object.keys(t).forEach(function(n) {
  22511. e.push.apply(e, t[n] || []);
  22512. }), e;
  22513. }
  22514. var k5 = /* @__PURE__ */ function(t) {
  22515. ISe(e, t);
  22516. function e(n, r) {
  22517. var i;
  22518. return i = t.call(this, "Async Validation Error") || this, i.errors = n, i.fields = r, i;
  22519. }
  22520. return e;
  22521. }(/* @__PURE__ */ F2(Error));
  22522. function zSe(t, e, n, r, i) {
  22523. if (e.first) {
  22524. var a = new Promise(function(d, h) {
  22525. var p = function(m) {
  22526. return r(m), m.length ? h(new k5(m, W2(m))) : d(i);
  22527. }, v = BSe(t);
  22528. R5(v, n, p);
  22529. });
  22530. return a.catch(function(d) {
  22531. return d;
  22532. }), a;
  22533. }
  22534. 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) {
  22535. var p = function(g) {
  22536. if (c.push.apply(c, g), u++, u === l)
  22537. return r(c), c.length ? h(new k5(c, W2(c))) : d(i);
  22538. };
  22539. s.length || (r(c), d(i)), s.forEach(function(v) {
  22540. var g = t[v];
  22541. o.indexOf(v) !== -1 ? R5(g, n, p) : NSe(g, n, p);
  22542. });
  22543. });
  22544. return f.catch(function(d) {
  22545. return d;
  22546. }), f;
  22547. }
  22548. function VSe(t) {
  22549. return !!(t && t.message !== void 0);
  22550. }
  22551. function FSe(t, e) {
  22552. for (var n = t, r = 0; r < e.length; r++) {
  22553. if (n == null)
  22554. return n;
  22555. n = n[e[r]];
  22556. }
  22557. return n;
  22558. }
  22559. function L5(t, e) {
  22560. return function(n) {
  22561. var r;
  22562. return t.fullFields ? r = FSe(e, t.fullFields) : r = e[n.field || t.fullField], VSe(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
  22563. message: typeof n == "function" ? n() : n,
  22564. fieldValue: r,
  22565. field: n.field || t.fullField
  22566. };
  22567. };
  22568. }
  22569. function N5(t, e) {
  22570. if (e) {
  22571. for (var n in e)
  22572. if (e.hasOwnProperty(n)) {
  22573. var r = e[n];
  22574. typeof r == "object" && typeof t[n] == "object" ? t[n] = Ic({}, t[n], r) : t[n] = r;
  22575. }
  22576. }
  22577. return t;
  22578. }
  22579. var bX = function(e, n, r, i, a, o) {
  22580. e.required && (!r.hasOwnProperty(e.field) || Kn(n, o || e.type)) && i.push(Fi(a.messages.required, e.fullField));
  22581. }, WSe = function(e, n, r, i, a) {
  22582. (/^\s+$/.test(n) || n === "") && i.push(Fi(a.messages.whitespace, e.fullField));
  22583. }, ky, QSe = function() {
  22584. if (ky)
  22585. return ky;
  22586. var t = "[a-fA-F\\d:]", e = function(_) {
  22587. return _ && _.includeBoundaries ? "(?:(?<=\\s|^)(?=" + t + ")|(?<=" + t + ")(?=\\s|$))" : "";
  22588. }, 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 = (`
  22589. (?:
  22590. (?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
  22591. (?:` + 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
  22592. (?:` + 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
  22593. (?:` + 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
  22594. (?:` + 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
  22595. (?:` + 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
  22596. (?:` + 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
  22597. (?::(?:(?::` + 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
  22598. )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
  22599. `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), o = new RegExp("^" + n + "$"), s = new RegExp("^" + i + "$"), l = function(_) {
  22600. return _ && _.exact ? a : new RegExp("(?:" + e(_) + n + e(_) + ")|(?:" + e(_) + i + e(_) + ")", "g");
  22601. };
  22602. l.v4 = function(b) {
  22603. return b && b.exact ? o : new RegExp("" + e(b) + n + e(b), "g");
  22604. }, l.v6 = function(b) {
  22605. return b && b.exact ? s : new RegExp("" + e(b) + i + e(b), "g");
  22606. };
  22607. 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;
  22608. return ky = new RegExp("(?:^" + y + "$)", "i"), ky;
  22609. }, B5 = {
  22610. // http://emailregex.com/
  22611. 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,}))$/,
  22612. // url: new RegExp(
  22613. // '^(?!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]*)?$',
  22614. // 'i',
  22615. // ),
  22616. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  22617. }, Qv = {
  22618. integer: function(e) {
  22619. return Qv.number(e) && parseInt(e, 10) === e;
  22620. },
  22621. float: function(e) {
  22622. return Qv.number(e) && !Qv.integer(e);
  22623. },
  22624. array: function(e) {
  22625. return Array.isArray(e);
  22626. },
  22627. regexp: function(e) {
  22628. if (e instanceof RegExp)
  22629. return !0;
  22630. try {
  22631. return !!new RegExp(e);
  22632. } catch {
  22633. return !1;
  22634. }
  22635. },
  22636. date: function(e) {
  22637. return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
  22638. },
  22639. number: function(e) {
  22640. return isNaN(e) ? !1 : typeof e == "number";
  22641. },
  22642. object: function(e) {
  22643. return typeof e == "object" && !Qv.array(e);
  22644. },
  22645. method: function(e) {
  22646. return typeof e == "function";
  22647. },
  22648. email: function(e) {
  22649. return typeof e == "string" && e.length <= 320 && !!e.match(B5.email);
  22650. },
  22651. url: function(e) {
  22652. return typeof e == "string" && e.length <= 2048 && !!e.match(QSe());
  22653. },
  22654. hex: function(e) {
  22655. return typeof e == "string" && !!e.match(B5.hex);
  22656. }
  22657. }, HSe = function(e, n, r, i, a) {
  22658. if (e.required && n === void 0) {
  22659. bX(e, n, r, i, a);
  22660. return;
  22661. }
  22662. var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
  22663. o.indexOf(s) > -1 ? Qv[s](n) || i.push(Fi(a.messages.types[s], e.fullField, e.type)) : s && typeof n !== e.type && i.push(Fi(a.messages.types[s], e.fullField, e.type));
  22664. }, GSe = function(e, n, r, i, a) {
  22665. 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);
  22666. if (d ? f = "number" : h ? f = "string" : p && (f = "array"), !f)
  22667. return !1;
  22668. p && (c = n.length), h && (c = n.replace(u, "_").length), o ? c !== e.len && i.push(Fi(a.messages[f].len, e.fullField, e.len)) : s && !l && c < e.min ? i.push(Fi(a.messages[f].min, e.fullField, e.min)) : l && !s && c > e.max ? i.push(Fi(a.messages[f].max, e.fullField, e.max)) : s && l && (c < e.min || c > e.max) && i.push(Fi(a.messages[f].range, e.fullField, e.min, e.max));
  22669. }, Kf = "enum", jSe = function(e, n, r, i, a) {
  22670. e[Kf] = Array.isArray(e[Kf]) ? e[Kf] : [], e[Kf].indexOf(n) === -1 && i.push(Fi(a.messages[Kf], e.fullField, e[Kf].join(", ")));
  22671. }, ZSe = function(e, n, r, i, a) {
  22672. if (e.pattern) {
  22673. if (e.pattern instanceof RegExp)
  22674. e.pattern.lastIndex = 0, e.pattern.test(n) || i.push(Fi(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
  22675. else if (typeof e.pattern == "string") {
  22676. var o = new RegExp(e.pattern);
  22677. o.test(n) || i.push(Fi(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
  22678. }
  22679. }
  22680. }, Mt = {
  22681. required: bX,
  22682. whitespace: WSe,
  22683. type: HSe,
  22684. range: GSe,
  22685. enum: jSe,
  22686. pattern: ZSe
  22687. }, USe = function(e, n, r, i, a) {
  22688. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22689. if (s) {
  22690. if (Kn(n, "string") && !e.required)
  22691. return r();
  22692. Mt.required(e, n, i, o, a, "string"), Kn(n, "string") || (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a), Mt.pattern(e, n, i, o, a), e.whitespace === !0 && Mt.whitespace(e, n, i, o, a));
  22693. }
  22694. r(o);
  22695. }, XSe = function(e, n, r, i, a) {
  22696. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22697. if (s) {
  22698. if (Kn(n) && !e.required)
  22699. return r();
  22700. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22701. }
  22702. r(o);
  22703. }, YSe = function(e, n, r, i, a) {
  22704. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22705. if (s) {
  22706. if (n === "" && (n = void 0), Kn(n) && !e.required)
  22707. return r();
  22708. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22709. }
  22710. r(o);
  22711. }, qSe = function(e, n, r, i, a) {
  22712. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22713. if (s) {
  22714. if (Kn(n) && !e.required)
  22715. return r();
  22716. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22717. }
  22718. r(o);
  22719. }, KSe = function(e, n, r, i, a) {
  22720. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22721. if (s) {
  22722. if (Kn(n) && !e.required)
  22723. return r();
  22724. Mt.required(e, n, i, o, a), Kn(n) || Mt.type(e, n, i, o, a);
  22725. }
  22726. r(o);
  22727. }, JSe = function(e, n, r, i, a) {
  22728. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22729. if (s) {
  22730. if (Kn(n) && !e.required)
  22731. return r();
  22732. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22733. }
  22734. r(o);
  22735. }, exe = function(e, n, r, i, a) {
  22736. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22737. if (s) {
  22738. if (Kn(n) && !e.required)
  22739. return r();
  22740. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22741. }
  22742. r(o);
  22743. }, txe = function(e, n, r, i, a) {
  22744. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22745. if (s) {
  22746. if (n == null && !e.required)
  22747. return r();
  22748. Mt.required(e, n, i, o, a, "array"), n != null && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22749. }
  22750. r(o);
  22751. }, nxe = function(e, n, r, i, a) {
  22752. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22753. if (s) {
  22754. if (Kn(n) && !e.required)
  22755. return r();
  22756. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22757. }
  22758. r(o);
  22759. }, rxe = "enum", ixe = function(e, n, r, i, a) {
  22760. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22761. if (s) {
  22762. if (Kn(n) && !e.required)
  22763. return r();
  22764. Mt.required(e, n, i, o, a), n !== void 0 && Mt[rxe](e, n, i, o, a);
  22765. }
  22766. r(o);
  22767. }, axe = function(e, n, r, i, a) {
  22768. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22769. if (s) {
  22770. if (Kn(n, "string") && !e.required)
  22771. return r();
  22772. Mt.required(e, n, i, o, a), Kn(n, "string") || Mt.pattern(e, n, i, o, a);
  22773. }
  22774. r(o);
  22775. }, oxe = function(e, n, r, i, a) {
  22776. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22777. if (s) {
  22778. if (Kn(n, "date") && !e.required)
  22779. return r();
  22780. if (Mt.required(e, n, i, o, a), !Kn(n, "date")) {
  22781. var l;
  22782. n instanceof Date ? l = n : l = new Date(n), Mt.type(e, l, i, o, a), l && Mt.range(e, l.getTime(), i, o, a);
  22783. }
  22784. }
  22785. r(o);
  22786. }, sxe = function(e, n, r, i, a) {
  22787. var o = [], s = Array.isArray(n) ? "array" : typeof n;
  22788. Mt.required(e, n, i, o, a, s), r(o);
  22789. }, CC = function(e, n, r, i, a) {
  22790. var o = e.type, s = [], l = e.required || !e.required && i.hasOwnProperty(e.field);
  22791. if (l) {
  22792. if (Kn(n, o) && !e.required)
  22793. return r();
  22794. Mt.required(e, n, i, s, a, o), Kn(n, o) || Mt.type(e, n, i, s, a);
  22795. }
  22796. r(s);
  22797. }, lxe = function(e, n, r, i, a) {
  22798. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22799. if (s) {
  22800. if (Kn(n) && !e.required)
  22801. return r();
  22802. Mt.required(e, n, i, o, a);
  22803. }
  22804. r(o);
  22805. }, gg = {
  22806. string: USe,
  22807. method: XSe,
  22808. number: YSe,
  22809. boolean: qSe,
  22810. regexp: KSe,
  22811. integer: JSe,
  22812. float: exe,
  22813. array: txe,
  22814. object: nxe,
  22815. enum: ixe,
  22816. pattern: axe,
  22817. date: oxe,
  22818. url: CC,
  22819. hex: CC,
  22820. email: CC,
  22821. required: sxe,
  22822. any: lxe
  22823. };
  22824. function Q2() {
  22825. return {
  22826. default: "Validation error on field %s",
  22827. required: "%s is required",
  22828. enum: "%s must be one of %s",
  22829. whitespace: "%s cannot be empty",
  22830. date: {
  22831. format: "%s date %s is invalid for format %s",
  22832. parse: "%s date could not be parsed, %s is invalid ",
  22833. invalid: "%s date %s is invalid"
  22834. },
  22835. types: {
  22836. string: "%s is not a %s",
  22837. method: "%s is not a %s (function)",
  22838. array: "%s is not an %s",
  22839. object: "%s is not an %s",
  22840. number: "%s is not a %s",
  22841. date: "%s is not a %s",
  22842. boolean: "%s is not a %s",
  22843. integer: "%s is not an %s",
  22844. float: "%s is not a %s",
  22845. regexp: "%s is not a valid %s",
  22846. email: "%s is not a valid %s",
  22847. url: "%s is not a valid %s",
  22848. hex: "%s is not a valid %s"
  22849. },
  22850. string: {
  22851. len: "%s must be exactly %s characters",
  22852. min: "%s must be at least %s characters",
  22853. max: "%s cannot be longer than %s characters",
  22854. range: "%s must be between %s and %s characters"
  22855. },
  22856. number: {
  22857. len: "%s must equal %s",
  22858. min: "%s cannot be less than %s",
  22859. max: "%s cannot be greater than %s",
  22860. range: "%s must be between %s and %s"
  22861. },
  22862. array: {
  22863. len: "%s must be exactly %s in length",
  22864. min: "%s cannot be less than %s in length",
  22865. max: "%s cannot be greater than %s in length",
  22866. range: "%s must be between %s and %s in length"
  22867. },
  22868. pattern: {
  22869. mismatch: "%s value %s does not match pattern %s"
  22870. },
  22871. clone: function() {
  22872. var e = JSON.parse(JSON.stringify(this));
  22873. return e.clone = this.clone, e;
  22874. }
  22875. };
  22876. }
  22877. var H2 = Q2(), O0 = /* @__PURE__ */ function() {
  22878. function t(n) {
  22879. this.rules = null, this._messages = H2, this.define(n);
  22880. }
  22881. var e = t.prototype;
  22882. return e.define = function(r) {
  22883. var i = this;
  22884. if (!r)
  22885. throw new Error("Cannot configure a schema with no rules");
  22886. if (typeof r != "object" || Array.isArray(r))
  22887. throw new Error("Rules must be an object");
  22888. this.rules = {}, Object.keys(r).forEach(function(a) {
  22889. var o = r[a];
  22890. i.rules[a] = Array.isArray(o) ? o : [o];
  22891. });
  22892. }, e.messages = function(r) {
  22893. return r && (this._messages = N5(Q2(), r)), this._messages;
  22894. }, e.validate = function(r, i, a) {
  22895. var o = this;
  22896. i === void 0 && (i = {}), a === void 0 && (a = function() {
  22897. });
  22898. var s = r, l = i, u = a;
  22899. if (typeof l == "function" && (u = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
  22900. return u && u(null, s), Promise.resolve(s);
  22901. function c(v) {
  22902. var g = [], m = {};
  22903. function y(_) {
  22904. if (Array.isArray(_)) {
  22905. var O;
  22906. g = (O = g).concat.apply(O, _);
  22907. } else
  22908. g.push(_);
  22909. }
  22910. for (var b = 0; b < v.length; b++)
  22911. y(v[b]);
  22912. g.length ? (m = W2(g), u(g, m)) : u(null, s);
  22913. }
  22914. if (l.messages) {
  22915. var f = this.messages();
  22916. f === H2 && (f = Q2()), N5(f, l.messages), l.messages = f;
  22917. } else
  22918. l.messages = this.messages();
  22919. var d = {}, h = l.keys || Object.keys(this.rules);
  22920. h.forEach(function(v) {
  22921. var g = o.rules[v], m = s[v];
  22922. g.forEach(function(y) {
  22923. var b = y;
  22924. typeof b.transform == "function" && (s === r && (s = Ic({}, s)), m = s[v] = b.transform(m)), typeof b == "function" ? b = {
  22925. validator: b
  22926. } : b = Ic({}, b), b.validator = o.getValidationMethod(b), b.validator && (b.field = v, b.fullField = b.fullField || v, b.type = o.getType(b), d[v] = d[v] || [], d[v].push({
  22927. rule: b,
  22928. value: m,
  22929. source: s,
  22930. field: v
  22931. }));
  22932. });
  22933. });
  22934. var p = {};
  22935. return zSe(d, l, function(v, g) {
  22936. var m = v.rule, y = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
  22937. y = y && (m.required || !m.required && v.value), m.field = v.field;
  22938. function b(S, x) {
  22939. return Ic({}, x, {
  22940. fullField: m.fullField + "." + S,
  22941. fullFields: m.fullFields ? [].concat(m.fullFields, [S]) : [S]
  22942. });
  22943. }
  22944. function _(S) {
  22945. S === void 0 && (S = []);
  22946. var x = Array.isArray(S) ? S : [S];
  22947. !l.suppressWarning && x.length && t.warning("async-validator:", x), x.length && m.message !== void 0 && (x = [].concat(m.message));
  22948. var C = x.map(L5(m, s));
  22949. if (l.first && C.length)
  22950. return p[m.field] = 1, g(C);
  22951. if (!y)
  22952. g(C);
  22953. else {
  22954. if (m.required && !v.value)
  22955. return m.message !== void 0 ? C = [].concat(m.message).map(L5(m, s)) : l.error && (C = [l.error(m, Fi(l.messages.required, m.field))]), g(C);
  22956. var T = {};
  22957. m.defaultField && Object.keys(v.value).map(function($) {
  22958. T[$] = m.defaultField;
  22959. }), T = Ic({}, T, v.rule.fields);
  22960. var w = {};
  22961. Object.keys(T).forEach(function($) {
  22962. var A = T[$], D = Array.isArray(A) ? A : [A];
  22963. w[$] = D.map(b.bind(null, $));
  22964. });
  22965. var P = new t(w);
  22966. P.messages(l.messages), v.rule.options && (v.rule.options.messages = l.messages, v.rule.options.error = l.error), P.validate(v.value, v.rule.options || l, function($) {
  22967. var A = [];
  22968. C && C.length && A.push.apply(A, C), $ && $.length && A.push.apply(A, $), g(A.length ? A : null);
  22969. });
  22970. }
  22971. }
  22972. var O;
  22973. if (m.asyncValidator)
  22974. O = m.asyncValidator(m, v.value, _, v.source, l);
  22975. else if (m.validator) {
  22976. try {
  22977. O = m.validator(m, v.value, _, v.source, l);
  22978. } catch (S) {
  22979. console.error == null || console.error(S), l.suppressValidatorError || setTimeout(function() {
  22980. throw S;
  22981. }, 0), _(S.message);
  22982. }
  22983. O === !0 ? _() : O === !1 ? _(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : O instanceof Array ? _(O) : O instanceof Error && _(O.message);
  22984. }
  22985. O && O.then && O.then(function() {
  22986. return _();
  22987. }, function(S) {
  22988. return _(S);
  22989. });
  22990. }, function(v) {
  22991. c(v);
  22992. }, s);
  22993. }, e.getType = function(r) {
  22994. if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !gg.hasOwnProperty(r.type))
  22995. throw new Error(Fi("Unknown rule type %s", r.type));
  22996. return r.type || "string";
  22997. }, e.getValidationMethod = function(r) {
  22998. if (typeof r.validator == "function")
  22999. return r.validator;
  23000. var i = Object.keys(r), a = i.indexOf("message");
  23001. return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? gg.required : gg[this.getType(r)] || void 0;
  23002. }, t;
  23003. }();
  23004. O0.register = function(e, n) {
  23005. if (typeof n != "function")
  23006. throw new Error("Cannot register a validator by type, validator is not a function");
  23007. gg[e] = n;
  23008. };
  23009. O0.warning = yX;
  23010. O0.messages = H2;
  23011. O0.validators = gg;
  23012. function Zl(t) {
  23013. return t == null ? [] : Array.isArray(t) ? t : [t];
  23014. }
  23015. function _X(t, e) {
  23016. let n = t;
  23017. for (let r = 0; r < e.length; r += 1) {
  23018. if (n == null)
  23019. return;
  23020. n = n[e[r]];
  23021. }
  23022. return n;
  23023. }
  23024. function OX(t, e, n, r) {
  23025. if (!e.length)
  23026. return n;
  23027. const [i, ...a] = e;
  23028. let o;
  23029. return !t && typeof i == "number" ? o = [] : Array.isArray(t) ? o = [...t] : o = I({}, t), r && n === void 0 && a.length === 1 ? delete o[i][a[0]] : o[i] = OX(o[i], a, n, r), o;
  23030. }
  23031. function uxe(t, e, n) {
  23032. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  23033. return e.length && r && n === void 0 && !_X(t, e.slice(0, -1)) ? t : OX(t, e, n, r);
  23034. }
  23035. function G2(t) {
  23036. return Zl(t);
  23037. }
  23038. function cxe(t, e) {
  23039. return _X(t, e);
  23040. }
  23041. function fxe(t, e, n) {
  23042. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  23043. return uxe(t, e, n, r);
  23044. }
  23045. function dxe(t, e) {
  23046. return t && t.some((n) => pxe(n, e));
  23047. }
  23048. function z5(t) {
  23049. return typeof t == "object" && t !== null && Object.getPrototypeOf(t) === Object.prototype;
  23050. }
  23051. function SX(t, e) {
  23052. const n = Array.isArray(t) ? [...t] : I({}, t);
  23053. return e && Object.keys(e).forEach((r) => {
  23054. const i = n[r], a = e[r], o = z5(i) && z5(a);
  23055. n[r] = o ? SX(i, a || {}) : a;
  23056. }), n;
  23057. }
  23058. function hxe(t) {
  23059. for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
  23060. n[r - 1] = arguments[r];
  23061. return n.reduce((i, a) => SX(i, a), t);
  23062. }
  23063. function V5(t, e) {
  23064. let n = {};
  23065. return e.forEach((r) => {
  23066. const i = cxe(t, r);
  23067. n = fxe(n, r, i);
  23068. }), n;
  23069. }
  23070. function pxe(t, e) {
  23071. return !t || !e || t.length !== e.length ? !1 : t.every((n, r) => e[r] === n);
  23072. }
  23073. const Ai = "'${name}' is not a valid ${type}", Ox = {
  23074. default: "Validation error on field '${name}'",
  23075. required: "'${name}' is required",
  23076. enum: "'${name}' must be one of [${enum}]",
  23077. whitespace: "'${name}' cannot be empty",
  23078. date: {
  23079. format: "'${name}' is invalid for format date",
  23080. parse: "'${name}' could not be parsed as date",
  23081. invalid: "'${name}' is invalid date"
  23082. },
  23083. types: {
  23084. string: Ai,
  23085. method: Ai,
  23086. array: Ai,
  23087. object: Ai,
  23088. number: Ai,
  23089. date: Ai,
  23090. boolean: Ai,
  23091. integer: Ai,
  23092. float: Ai,
  23093. regexp: Ai,
  23094. email: Ai,
  23095. url: Ai,
  23096. hex: Ai
  23097. },
  23098. string: {
  23099. len: "'${name}' must be exactly ${len} characters",
  23100. min: "'${name}' must be at least ${min} characters",
  23101. max: "'${name}' cannot be longer than ${max} characters",
  23102. range: "'${name}' must be between ${min} and ${max} characters"
  23103. },
  23104. number: {
  23105. len: "'${name}' must equal ${len}",
  23106. min: "'${name}' cannot be less than ${min}",
  23107. max: "'${name}' cannot be greater than ${max}",
  23108. range: "'${name}' must be between ${min} and ${max}"
  23109. },
  23110. array: {
  23111. len: "'${name}' must be exactly ${len} in length",
  23112. min: "'${name}' cannot be less than ${min} in length",
  23113. max: "'${name}' cannot be greater than ${max} in length",
  23114. range: "'${name}' must be between ${min} and ${max} in length"
  23115. },
  23116. pattern: {
  23117. mismatch: "'${name}' does not match pattern ${pattern}"
  23118. }
  23119. };
  23120. var Sx = function(t, e, n, r) {
  23121. function i(a) {
  23122. return a instanceof n ? a : new n(function(o) {
  23123. o(a);
  23124. });
  23125. }
  23126. return new (n || (n = Promise))(function(a, o) {
  23127. function s(c) {
  23128. try {
  23129. u(r.next(c));
  23130. } catch (f) {
  23131. o(f);
  23132. }
  23133. }
  23134. function l(c) {
  23135. try {
  23136. u(r.throw(c));
  23137. } catch (f) {
  23138. o(f);
  23139. }
  23140. }
  23141. function u(c) {
  23142. c.done ? a(c.value) : i(c.value).then(s, l);
  23143. }
  23144. u((r = r.apply(t, e || [])).next());
  23145. });
  23146. };
  23147. const vxe = O0;
  23148. function gxe(t, e) {
  23149. return t.replace(/\$\{\w+\}/g, (n) => {
  23150. const r = n.slice(2, -1);
  23151. return e[r];
  23152. });
  23153. }
  23154. function j2(t, e, n, r, i) {
  23155. return Sx(this, void 0, void 0, function* () {
  23156. const a = I({}, n);
  23157. delete a.ruleIndex, delete a.trigger;
  23158. let o = null;
  23159. a && a.type === "array" && a.defaultField && (o = a.defaultField, delete a.defaultField);
  23160. const s = new vxe({
  23161. [t]: [a]
  23162. }), l = hxe({}, Ox, r.validateMessages);
  23163. s.messages(l);
  23164. let u = [];
  23165. try {
  23166. yield Promise.resolve(s.validate({
  23167. [t]: e
  23168. }, I({}, r)));
  23169. } catch (d) {
  23170. d.errors ? u = d.errors.map((h, p) => {
  23171. let {
  23172. message: v
  23173. } = h;
  23174. return (
  23175. // Wrap VueNode with `key`
  23176. Yi(v) ? Bs(v, {
  23177. key: `error_${p}`
  23178. }) : v
  23179. );
  23180. }) : (console.error(d), u = [l.default()]);
  23181. }
  23182. if (!u.length && o)
  23183. return (yield Promise.all(e.map((h, p) => j2(`${t}.${p}`, h, o, r, i)))).reduce((h, p) => [...h, ...p], []);
  23184. const c = I(I(I({}, n), {
  23185. name: t,
  23186. enum: (n.enum || []).join(", ")
  23187. }), i);
  23188. return u.map((d) => typeof d == "string" ? gxe(d, c) : d);
  23189. });
  23190. }
  23191. function xX(t, e, n, r, i, a) {
  23192. const o = t.join("."), s = n.map((u, c) => {
  23193. const f = u.validator, d = I(I({}, u), {
  23194. ruleIndex: c
  23195. });
  23196. return f && (d.validator = (h, p, v) => {
  23197. let g = !1;
  23198. const y = f(h, p, function() {
  23199. for (var b = arguments.length, _ = new Array(b), O = 0; O < b; O++)
  23200. _[O] = arguments[O];
  23201. Promise.resolve().then(() => {
  23202. ff(!g, "Your validator function has already return a promise. `callback` will be ignored."), g || v(..._);
  23203. });
  23204. });
  23205. g = y && typeof y.then == "function" && typeof y.catch == "function", ff(g, "`callback` is deprecated. Please return a promise instead."), g && y.then(() => {
  23206. v();
  23207. }).catch((b) => {
  23208. v(b || " ");
  23209. });
  23210. }), d;
  23211. }).sort((u, c) => {
  23212. let {
  23213. warningOnly: f,
  23214. ruleIndex: d
  23215. } = u, {
  23216. warningOnly: h,
  23217. ruleIndex: p
  23218. } = c;
  23219. return !!f == !!h ? d - p : f ? 1 : -1;
  23220. });
  23221. let l;
  23222. if (i === !0)
  23223. l = new Promise((u, c) => Sx(this, void 0, void 0, function* () {
  23224. for (let f = 0; f < s.length; f += 1) {
  23225. const d = s[f], h = yield j2(o, e, d, r, a);
  23226. if (h.length) {
  23227. c([{
  23228. errors: h,
  23229. rule: d
  23230. }]);
  23231. return;
  23232. }
  23233. }
  23234. u([]);
  23235. }));
  23236. else {
  23237. const u = s.map((c) => j2(o, e, c, r, a).then((f) => ({
  23238. errors: f,
  23239. rule: c
  23240. })));
  23241. l = (i ? yxe(u) : mxe(u)).then((c) => Promise.reject(c));
  23242. }
  23243. return l.catch((u) => u), l;
  23244. }
  23245. function mxe(t) {
  23246. return Sx(this, void 0, void 0, function* () {
  23247. return Promise.all(t).then((e) => [].concat(...e));
  23248. });
  23249. }
  23250. function yxe(t) {
  23251. return Sx(this, void 0, void 0, function* () {
  23252. let e = 0;
  23253. return new Promise((n) => {
  23254. t.forEach((r) => {
  23255. r.then((i) => {
  23256. i.errors.length && n([i]), e += 1, e === t.length && n([]);
  23257. });
  23258. });
  23259. });
  23260. });
  23261. }
  23262. const wX = Symbol("formContextKey"), CX = (t) => {
  23263. pt(wX, t);
  23264. }, fD = () => Ge(wX, {
  23265. name: L(() => {
  23266. }),
  23267. labelAlign: L(() => "right"),
  23268. vertical: L(() => !1),
  23269. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  23270. addField: (t, e) => {
  23271. },
  23272. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  23273. removeField: (t) => {
  23274. },
  23275. model: L(() => {
  23276. }),
  23277. rules: L(() => {
  23278. }),
  23279. colon: L(() => {
  23280. }),
  23281. labelWrap: L(() => {
  23282. }),
  23283. labelCol: L(() => {
  23284. }),
  23285. requiredMark: L(() => !1),
  23286. validateTrigger: L(() => {
  23287. }),
  23288. onValidate: () => {
  23289. },
  23290. validateMessages: L(() => Ox)
  23291. }), TX = Symbol("formItemPrefixContextKey"), bxe = (t) => {
  23292. pt(TX, t);
  23293. }, _xe = () => Ge(TX, {
  23294. prefixCls: L(() => "")
  23295. });
  23296. function Oxe(t) {
  23297. return typeof t == "number" ? `${t} ${t} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(t) ? `0 0 ${t}` : t;
  23298. }
  23299. const Sxe = () => ({
  23300. span: [String, Number],
  23301. order: [String, Number],
  23302. offset: [String, Number],
  23303. push: [String, Number],
  23304. pull: [String, Number],
  23305. xs: {
  23306. type: [String, Number, Object],
  23307. default: void 0
  23308. },
  23309. sm: {
  23310. type: [String, Number, Object],
  23311. default: void 0
  23312. },
  23313. md: {
  23314. type: [String, Number, Object],
  23315. default: void 0
  23316. },
  23317. lg: {
  23318. type: [String, Number, Object],
  23319. default: void 0
  23320. },
  23321. xl: {
  23322. type: [String, Number, Object],
  23323. default: void 0
  23324. },
  23325. xxl: {
  23326. type: [String, Number, Object],
  23327. default: void 0
  23328. },
  23329. prefixCls: String,
  23330. flex: [String, Number]
  23331. }), xxe = ["xs", "sm", "md", "lg", "xl", "xxl"], PX = te({
  23332. compatConfig: {
  23333. MODE: 3
  23334. },
  23335. name: "ACol",
  23336. inheritAttrs: !1,
  23337. props: Sxe(),
  23338. setup(t, e) {
  23339. let {
  23340. slots: n,
  23341. attrs: r
  23342. } = e;
  23343. const {
  23344. gutter: i,
  23345. supportFlexGap: a,
  23346. wrap: o
  23347. } = xSe(), {
  23348. prefixCls: s,
  23349. direction: l
  23350. } = It("col", t), [u, c] = ASe(s), f = L(() => {
  23351. const {
  23352. span: h,
  23353. order: p,
  23354. offset: v,
  23355. push: g,
  23356. pull: m
  23357. } = t, y = s.value;
  23358. let b = {};
  23359. return xxe.forEach((_) => {
  23360. let O = {};
  23361. const S = t[_];
  23362. typeof S == "number" ? O.span = S : typeof S == "object" && (O = S || {}), b = I(I({}, b), {
  23363. [`${y}-${_}-${O.span}`]: O.span !== void 0,
  23364. [`${y}-${_}-order-${O.order}`]: O.order || O.order === 0,
  23365. [`${y}-${_}-offset-${O.offset}`]: O.offset || O.offset === 0,
  23366. [`${y}-${_}-push-${O.push}`]: O.push || O.push === 0,
  23367. [`${y}-${_}-pull-${O.pull}`]: O.pull || O.pull === 0,
  23368. [`${y}-rtl`]: l.value === "rtl"
  23369. });
  23370. }), ye(y, {
  23371. [`${y}-${h}`]: h !== void 0,
  23372. [`${y}-order-${p}`]: p,
  23373. [`${y}-offset-${v}`]: v,
  23374. [`${y}-push-${g}`]: g,
  23375. [`${y}-pull-${m}`]: m
  23376. }, b, r.class, c.value);
  23377. }), d = L(() => {
  23378. const {
  23379. flex: h
  23380. } = t, p = i.value, v = {};
  23381. if (p && p[0] > 0) {
  23382. const g = `${p[0] / 2}px`;
  23383. v.paddingLeft = g, v.paddingRight = g;
  23384. }
  23385. if (p && p[1] > 0 && !a.value) {
  23386. const g = `${p[1] / 2}px`;
  23387. v.paddingTop = g, v.paddingBottom = g;
  23388. }
  23389. return h && (v.flex = Oxe(h), o.value === !1 && !v.minWidth && (v.minWidth = 0)), v;
  23390. });
  23391. return () => {
  23392. var h;
  23393. return u(M("div", j(j({}, r), {}, {
  23394. class: f.value,
  23395. style: [d.value, r.style]
  23396. }), [(h = n.default) === null || h === void 0 ? void 0 : h.call(n)]));
  23397. };
  23398. }
  23399. });
  23400. var wxe = { 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" };
  23401. function F5(t) {
  23402. for (var e = 1; e < arguments.length; e++) {
  23403. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  23404. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  23405. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  23406. }))), r.forEach(function(i) {
  23407. Cxe(t, i, n[i]);
  23408. });
  23409. }
  23410. return t;
  23411. }
  23412. function Cxe(t, e, n) {
  23413. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  23414. }
  23415. var dD = function(e, n) {
  23416. var r = F5({}, e, n.attrs);
  23417. return M(lt, F5({}, r, {
  23418. icon: wxe
  23419. }), null);
  23420. };
  23421. dD.displayName = "QuestionCircleOutlined";
  23422. dD.inheritAttrs = !1;
  23423. const hD = (t, e) => {
  23424. let {
  23425. slots: n,
  23426. emit: r,
  23427. attrs: i
  23428. } = e;
  23429. var a, o, s, l, u;
  23430. const {
  23431. prefixCls: c,
  23432. htmlFor: f,
  23433. labelCol: d,
  23434. labelAlign: h,
  23435. colon: p,
  23436. required: v,
  23437. requiredMark: g
  23438. } = I(I({}, t), i), [m] = LS("Form"), y = (a = t.label) !== null && a !== void 0 ? a : (o = n.label) === null || o === void 0 ? void 0 : o.call(n);
  23439. if (!y) return null;
  23440. const {
  23441. vertical: b,
  23442. labelAlign: _,
  23443. labelCol: O,
  23444. labelWrap: S,
  23445. colon: x
  23446. } = fD(), C = d || (O == null ? void 0 : O.value) || {}, T = h || (_ == null ? void 0 : _.value), w = `${c}-item-label`, P = ye(w, T === "left" && `${w}-left`, C.class, {
  23447. [`${w}-wrap`]: !!S.value
  23448. });
  23449. let $ = y;
  23450. const A = p === !0 || (x == null ? void 0 : x.value) !== !1 && p !== !1;
  23451. if (A && !b.value && typeof y == "string" && y.trim() !== "" && ($ = y.replace(/[:|:]\s*$/, "")), t.tooltip || n.tooltip) {
  23452. const R = M("span", {
  23453. class: `${c}-item-tooltip`
  23454. }, [M(px, {
  23455. title: t.tooltip
  23456. }, {
  23457. default: () => [M(dD, null, null)]
  23458. })]);
  23459. $ = M(wt, null, [$, n.tooltip ? (s = n.tooltip) === null || s === void 0 ? void 0 : s.call(n, {
  23460. class: `${c}-item-tooltip`
  23461. }) : R]);
  23462. }
  23463. g === "optional" && !v && ($ = M(wt, null, [$, M("span", {
  23464. class: `${c}-item-optional`
  23465. }, [((l = m.value) === null || l === void 0 ? void 0 : l.optional) || ((u = Vs.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  23466. const E = ye({
  23467. [`${c}-item-required`]: v,
  23468. [`${c}-item-required-mark-optional`]: g === "optional",
  23469. [`${c}-item-no-colon`]: !A
  23470. });
  23471. return M(PX, j(j({}, C), {}, {
  23472. class: P
  23473. }), {
  23474. default: () => [M("label", {
  23475. for: f,
  23476. class: E,
  23477. title: typeof y == "string" ? y : "",
  23478. onClick: (R) => r("click", R)
  23479. }, [$])]
  23480. });
  23481. };
  23482. hD.displayName = "FormItemLabel";
  23483. hD.inheritAttrs = !1;
  23484. const Txe = (t) => {
  23485. const {
  23486. componentCls: e
  23487. } = t, n = `${e}-show-help`, r = `${e}-show-help-item`;
  23488. return {
  23489. [n]: {
  23490. // Explain holder
  23491. transition: `opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,
  23492. "&-appear, &-enter": {
  23493. opacity: 0,
  23494. "&-active": {
  23495. opacity: 1
  23496. }
  23497. },
  23498. "&-leave": {
  23499. opacity: 1,
  23500. "&-active": {
  23501. opacity: 0
  23502. }
  23503. },
  23504. // Explain
  23505. [r]: {
  23506. overflow: "hidden",
  23507. transition: `height ${t.motionDurationSlow} ${t.motionEaseInOut},
  23508. opacity ${t.motionDurationSlow} ${t.motionEaseInOut},
  23509. transform ${t.motionDurationSlow} ${t.motionEaseInOut} !important`,
  23510. [`&${r}-appear, &${r}-enter`]: {
  23511. transform: "translateY(-5px)",
  23512. opacity: 0,
  23513. "&-active": {
  23514. transform: "translateY(0)",
  23515. opacity: 1
  23516. }
  23517. },
  23518. [`&${r}-leave-active`]: {
  23519. transform: "translateY(-5px)"
  23520. }
  23521. }
  23522. }
  23523. };
  23524. }, Pxe = (t) => ({
  23525. legend: {
  23526. display: "block",
  23527. width: "100%",
  23528. marginBottom: t.marginLG,
  23529. padding: 0,
  23530. color: t.colorTextDescription,
  23531. fontSize: t.fontSizeLG,
  23532. lineHeight: "inherit",
  23533. border: 0,
  23534. borderBottom: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  23535. },
  23536. label: {
  23537. fontSize: t.fontSize
  23538. },
  23539. 'input[type="search"]': {
  23540. boxSizing: "border-box"
  23541. },
  23542. // Position radios and checkboxes better
  23543. 'input[type="radio"], input[type="checkbox"]': {
  23544. lineHeight: "normal"
  23545. },
  23546. 'input[type="file"]': {
  23547. display: "block"
  23548. },
  23549. // Make range inputs behave like textual form controls
  23550. 'input[type="range"]': {
  23551. display: "block",
  23552. width: "100%"
  23553. },
  23554. // Make multiple select elements height not fixed
  23555. "select[multiple], select[size]": {
  23556. height: "auto"
  23557. },
  23558. // Focus for file, radio, and checkbox
  23559. "input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus": {
  23560. outline: 0,
  23561. boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`
  23562. },
  23563. // Adjust output element
  23564. output: {
  23565. display: "block",
  23566. paddingTop: 15,
  23567. color: t.colorText,
  23568. fontSize: t.fontSize,
  23569. lineHeight: t.lineHeight
  23570. }
  23571. }), W5 = (t, e) => {
  23572. const {
  23573. formItemCls: n
  23574. } = t;
  23575. return {
  23576. [n]: {
  23577. [`${n}-label > label`]: {
  23578. height: e
  23579. },
  23580. [`${n}-control-input`]: {
  23581. minHeight: e
  23582. }
  23583. }
  23584. };
  23585. }, $xe = (t) => {
  23586. const {
  23587. componentCls: e
  23588. } = t;
  23589. return {
  23590. [t.componentCls]: I(I(I({}, nn(t)), Pxe(t)), {
  23591. [`${e}-text`]: {
  23592. display: "inline-block",
  23593. paddingInlineEnd: t.paddingSM
  23594. },
  23595. // ================================================================
  23596. // = Size =
  23597. // ================================================================
  23598. "&-small": I({}, W5(t, t.controlHeightSM)),
  23599. "&-large": I({}, W5(t, t.controlHeightLG))
  23600. })
  23601. };
  23602. }, Axe = (t) => {
  23603. const {
  23604. formItemCls: e,
  23605. iconCls: n,
  23606. componentCls: r,
  23607. rootPrefixCls: i
  23608. } = t;
  23609. return {
  23610. [e]: I(I({}, nn(t)), {
  23611. marginBottom: t.marginLG,
  23612. verticalAlign: "top",
  23613. "&-with-help": {
  23614. transition: "none"
  23615. },
  23616. [`&-hidden,
  23617. &-hidden.${i}-row`]: {
  23618. // https://github.com/ant-design/ant-design/issues/26141
  23619. display: "none"
  23620. },
  23621. "&-has-warning": {
  23622. [`${e}-split`]: {
  23623. color: t.colorError
  23624. }
  23625. },
  23626. "&-has-error": {
  23627. [`${e}-split`]: {
  23628. color: t.colorWarning
  23629. }
  23630. },
  23631. // ==============================================================
  23632. // = Label =
  23633. // ==============================================================
  23634. [`${e}-label`]: {
  23635. display: "inline-block",
  23636. flexGrow: 0,
  23637. overflow: "hidden",
  23638. whiteSpace: "nowrap",
  23639. textAlign: "end",
  23640. verticalAlign: "middle",
  23641. "&-left": {
  23642. textAlign: "start"
  23643. },
  23644. "&-wrap": {
  23645. overflow: "unset",
  23646. lineHeight: `${t.lineHeight} - 0.25em`,
  23647. whiteSpace: "unset"
  23648. },
  23649. "> label": {
  23650. position: "relative",
  23651. display: "inline-flex",
  23652. alignItems: "center",
  23653. maxWidth: "100%",
  23654. height: t.controlHeight,
  23655. color: t.colorTextHeading,
  23656. fontSize: t.fontSize,
  23657. [`> ${n}`]: {
  23658. fontSize: t.fontSize,
  23659. verticalAlign: "top"
  23660. },
  23661. // Required mark
  23662. [`&${e}-required:not(${e}-required-mark-optional)::before`]: {
  23663. display: "inline-block",
  23664. marginInlineEnd: t.marginXXS,
  23665. color: t.colorError,
  23666. fontSize: t.fontSize,
  23667. fontFamily: "SimSun, sans-serif",
  23668. lineHeight: 1,
  23669. content: '"*"',
  23670. [`${r}-hide-required-mark &`]: {
  23671. display: "none"
  23672. }
  23673. },
  23674. // Optional mark
  23675. [`${e}-optional`]: {
  23676. display: "inline-block",
  23677. marginInlineStart: t.marginXXS,
  23678. color: t.colorTextDescription,
  23679. [`${r}-hide-required-mark &`]: {
  23680. display: "none"
  23681. }
  23682. },
  23683. // Optional mark
  23684. [`${e}-tooltip`]: {
  23685. color: t.colorTextDescription,
  23686. cursor: "help",
  23687. writingMode: "horizontal-tb",
  23688. marginInlineStart: t.marginXXS
  23689. },
  23690. "&::after": {
  23691. content: '":"',
  23692. position: "relative",
  23693. marginBlock: 0,
  23694. marginInlineStart: t.marginXXS / 2,
  23695. marginInlineEnd: t.marginXS
  23696. },
  23697. [`&${e}-no-colon::after`]: {
  23698. content: '" "'
  23699. }
  23700. }
  23701. },
  23702. // ==============================================================
  23703. // = Input =
  23704. // ==============================================================
  23705. [`${e}-control`]: {
  23706. display: "flex",
  23707. flexDirection: "column",
  23708. flexGrow: 1,
  23709. [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
  23710. width: "100%"
  23711. },
  23712. "&-input": {
  23713. position: "relative",
  23714. display: "flex",
  23715. alignItems: "center",
  23716. minHeight: t.controlHeight,
  23717. "&-content": {
  23718. flex: "auto",
  23719. maxWidth: "100%"
  23720. }
  23721. }
  23722. },
  23723. // ==============================================================
  23724. // = Explain =
  23725. // ==============================================================
  23726. [e]: {
  23727. "&-explain, &-extra": {
  23728. clear: "both",
  23729. color: t.colorTextDescription,
  23730. fontSize: t.fontSize,
  23731. lineHeight: t.lineHeight
  23732. },
  23733. "&-explain-connected": {
  23734. width: "100%"
  23735. },
  23736. "&-extra": {
  23737. minHeight: t.controlHeightSM,
  23738. transition: `color ${t.motionDurationMid} ${t.motionEaseOut}`
  23739. // sync input color transition
  23740. },
  23741. "&-explain": {
  23742. "&-error": {
  23743. color: t.colorError
  23744. },
  23745. "&-warning": {
  23746. color: t.colorWarning
  23747. }
  23748. }
  23749. },
  23750. [`&-with-help ${e}-explain`]: {
  23751. height: "auto",
  23752. opacity: 1
  23753. },
  23754. // ==============================================================
  23755. // = Feedback Icon =
  23756. // ==============================================================
  23757. [`${e}-feedback-icon`]: {
  23758. fontSize: t.fontSize,
  23759. textAlign: "center",
  23760. visibility: "visible",
  23761. animationName: KI,
  23762. animationDuration: t.motionDurationMid,
  23763. animationTimingFunction: t.motionEaseOutBack,
  23764. pointerEvents: "none",
  23765. "&-success": {
  23766. color: t.colorSuccess
  23767. },
  23768. "&-error": {
  23769. color: t.colorError
  23770. },
  23771. "&-warning": {
  23772. color: t.colorWarning
  23773. },
  23774. "&-validating": {
  23775. color: t.colorPrimary
  23776. }
  23777. }
  23778. })
  23779. };
  23780. }, Exe = (t) => {
  23781. const {
  23782. componentCls: e,
  23783. formItemCls: n,
  23784. rootPrefixCls: r
  23785. } = t;
  23786. return {
  23787. [`${e}-horizontal`]: {
  23788. [`${n}-label`]: {
  23789. flexGrow: 0
  23790. },
  23791. [`${n}-control`]: {
  23792. flex: "1 1 0",
  23793. // https://github.com/ant-design/ant-design/issues/32777
  23794. // https://github.com/ant-design/ant-design/issues/33773
  23795. minWidth: 0
  23796. },
  23797. // https://github.com/ant-design/ant-design/issues/32980
  23798. [`${n}-label.${r}-col-24 + ${n}-control`]: {
  23799. minWidth: "unset"
  23800. }
  23801. }
  23802. };
  23803. }, Mxe = (t) => {
  23804. const {
  23805. componentCls: e,
  23806. formItemCls: n
  23807. } = t;
  23808. return {
  23809. [`${e}-inline`]: {
  23810. display: "flex",
  23811. flexWrap: "wrap",
  23812. [n]: {
  23813. flex: "none",
  23814. flexWrap: "nowrap",
  23815. marginInlineEnd: t.margin,
  23816. marginBottom: 0,
  23817. "&-with-help": {
  23818. marginBottom: t.marginLG
  23819. },
  23820. [`> ${n}-label,
  23821. > ${n}-control`]: {
  23822. display: "inline-block",
  23823. verticalAlign: "top"
  23824. },
  23825. [`> ${n}-label`]: {
  23826. flex: "none"
  23827. },
  23828. [`${e}-text`]: {
  23829. display: "inline-block"
  23830. },
  23831. [`${n}-has-feedback`]: {
  23832. display: "inline-block"
  23833. }
  23834. }
  23835. }
  23836. };
  23837. }, Pd = (t) => ({
  23838. margin: 0,
  23839. padding: `0 0 ${t.paddingXS}px`,
  23840. whiteSpace: "initial",
  23841. textAlign: "start",
  23842. "> label": {
  23843. margin: 0,
  23844. "&::after": {
  23845. display: "none"
  23846. }
  23847. }
  23848. }), Ixe = (t) => {
  23849. const {
  23850. componentCls: e,
  23851. formItemCls: n
  23852. } = t;
  23853. return {
  23854. [`${n} ${n}-label`]: Pd(t),
  23855. [e]: {
  23856. [n]: {
  23857. flexWrap: "wrap",
  23858. [`${n}-label,
  23859. ${n}-control`]: {
  23860. flex: "0 0 100%",
  23861. maxWidth: "100%"
  23862. }
  23863. }
  23864. }
  23865. };
  23866. }, Dxe = (t) => {
  23867. const {
  23868. componentCls: e,
  23869. formItemCls: n,
  23870. rootPrefixCls: r
  23871. } = t;
  23872. return {
  23873. [`${e}-vertical`]: {
  23874. [n]: {
  23875. "&-row": {
  23876. flexDirection: "column"
  23877. },
  23878. "&-label > label": {
  23879. height: "auto"
  23880. },
  23881. [`${e}-item-control`]: {
  23882. width: "100%"
  23883. }
  23884. }
  23885. },
  23886. [`${e}-vertical ${n}-label,
  23887. .${r}-col-24${n}-label,
  23888. .${r}-col-xl-24${n}-label`]: Pd(t),
  23889. [`@media (max-width: ${t.screenXSMax}px)`]: [Ixe(t), {
  23890. [e]: {
  23891. [`.${r}-col-xs-24${n}-label`]: Pd(t)
  23892. }
  23893. }],
  23894. [`@media (max-width: ${t.screenSMMax}px)`]: {
  23895. [e]: {
  23896. [`.${r}-col-sm-24${n}-label`]: Pd(t)
  23897. }
  23898. },
  23899. [`@media (max-width: ${t.screenMDMax}px)`]: {
  23900. [e]: {
  23901. [`.${r}-col-md-24${n}-label`]: Pd(t)
  23902. }
  23903. },
  23904. [`@media (max-width: ${t.screenLGMax}px)`]: {
  23905. [e]: {
  23906. [`.${r}-col-lg-24${n}-label`]: Pd(t)
  23907. }
  23908. }
  23909. };
  23910. }, pD = Sn("Form", (t, e) => {
  23911. let {
  23912. rootPrefixCls: n
  23913. } = e;
  23914. const r = Bt(t, {
  23915. formItemCls: `${t.componentCls}-item`,
  23916. rootPrefixCls: n
  23917. });
  23918. return [$xe(r), Axe(r), Txe(r), Exe(r), Mxe(r), Dxe(r), JI(r), KI];
  23919. }), Rxe = te({
  23920. compatConfig: {
  23921. MODE: 3
  23922. },
  23923. name: "ErrorList",
  23924. inheritAttrs: !1,
  23925. props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  23926. setup(t, e) {
  23927. let {
  23928. attrs: n
  23929. } = e;
  23930. const {
  23931. prefixCls: r,
  23932. status: i
  23933. } = _xe(), a = L(() => `${r.value}-item-explain`), o = L(() => !!(t.errors && t.errors.length)), s = U(i.value), [, l] = pD(r);
  23934. return se([o, i], () => {
  23935. o.value && (s.value = i.value);
  23936. }), () => {
  23937. var u, c;
  23938. const f = lD(`${r.value}-show-help-item`), d = CI(`${r.value}-show-help-item`, f);
  23939. return d.role = "alert", d.class = [l.value, a.value, n.class, `${r.value}-show-help`], M(ho, j(j({}, m0(`${r.value}-show-help`)), {}, {
  23940. onAfterEnter: () => t.onErrorVisibleChanged(!0),
  23941. onAfterLeave: () => t.onErrorVisibleChanged(!1)
  23942. }), {
  23943. default: () => [Oi(M(eI, j(j({}, d), {}, {
  23944. tag: "div"
  23945. }), {
  23946. default: () => [(c = t.errors) === null || c === void 0 ? void 0 : c.map((h, p) => M("div", {
  23947. key: p,
  23948. class: s.value ? `${a.value}-${s.value}` : ""
  23949. }, [h]))]
  23950. }), [[zs, !!(!((u = t.errors) === null || u === void 0) && u.length)]])]
  23951. });
  23952. };
  23953. }
  23954. }), kxe = te({
  23955. compatConfig: {
  23956. MODE: 3
  23957. },
  23958. slots: Object,
  23959. inheritAttrs: !1,
  23960. props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
  23961. setup(t, e) {
  23962. let {
  23963. slots: n
  23964. } = e;
  23965. const r = fD(), {
  23966. wrapperCol: i
  23967. } = r, a = I({}, r);
  23968. return delete a.labelCol, delete a.wrapperCol, CX(a), bxe({
  23969. prefixCls: L(() => t.prefixCls),
  23970. status: L(() => t.status)
  23971. }), () => {
  23972. var o, s, l;
  23973. const {
  23974. prefixCls: u,
  23975. wrapperCol: c,
  23976. marginBottom: f,
  23977. onErrorVisibleChanged: d,
  23978. help: h = (o = n.help) === null || o === void 0 ? void 0 : o.call(n),
  23979. errors: p = ss((s = n.errors) === null || s === void 0 ? void 0 : s.call(n)),
  23980. // hasFeedback,
  23981. // status,
  23982. extra: v = (l = n.extra) === null || l === void 0 ? void 0 : l.call(n)
  23983. } = t, g = `${u}-item`, m = c || (i == null ? void 0 : i.value) || {}, y = ye(`${g}-control`, m.class);
  23984. return M(PX, j(j({}, m), {}, {
  23985. class: y
  23986. }), {
  23987. default: () => {
  23988. var b;
  23989. return M(wt, null, [M("div", {
  23990. class: `${g}-control-input`
  23991. }, [M("div", {
  23992. class: `${g}-control-input-content`
  23993. }, [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)])]), f !== null || p.length ? M("div", {
  23994. style: {
  23995. display: "flex",
  23996. flexWrap: "nowrap"
  23997. }
  23998. }, [M(Rxe, {
  23999. errors: p,
  24000. help: h,
  24001. class: `${g}-explain-connected`,
  24002. onErrorVisibleChanged: d
  24003. }, null), !!f && M("div", {
  24004. style: {
  24005. width: 0,
  24006. height: `${f}px`
  24007. }
  24008. }, null)]) : null, v ? M("div", {
  24009. class: `${g}-extra`
  24010. }, [v]) : null]);
  24011. }
  24012. });
  24013. };
  24014. }
  24015. });
  24016. function Lxe(t) {
  24017. const e = ae(t.value.slice());
  24018. let n = null;
  24019. return ht(() => {
  24020. clearTimeout(n), n = setTimeout(() => {
  24021. e.value = t.value;
  24022. }, t.value.length ? 0 : 10);
  24023. }), e;
  24024. }
  24025. ru("success", "warning", "error", "validating", "");
  24026. const Nxe = {
  24027. success: Ou,
  24028. warning: Su,
  24029. error: ka,
  24030. validating: ns
  24031. };
  24032. function TC(t, e, n) {
  24033. let r = t;
  24034. const i = e;
  24035. let a = 0;
  24036. try {
  24037. for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
  24038. const s = i[a];
  24039. if (s in r)
  24040. r = r[s];
  24041. else {
  24042. if (n)
  24043. throw Error("please transfer a valid name path to form item!");
  24044. break;
  24045. }
  24046. }
  24047. if (n && !r)
  24048. throw Error("please transfer a valid name path to form item!");
  24049. } catch {
  24050. console.error("please transfer a valid name path to form item!");
  24051. }
  24052. return {
  24053. o: r,
  24054. k: i[a],
  24055. v: r ? r[i[a]] : void 0
  24056. };
  24057. }
  24058. const Bxe = () => ({
  24059. htmlFor: String,
  24060. prefixCls: String,
  24061. label: Y.any,
  24062. help: Y.any,
  24063. extra: Y.any,
  24064. labelCol: {
  24065. type: Object
  24066. },
  24067. wrapperCol: {
  24068. type: Object
  24069. },
  24070. hasFeedback: {
  24071. type: Boolean,
  24072. default: !1
  24073. },
  24074. colon: {
  24075. type: Boolean,
  24076. default: void 0
  24077. },
  24078. labelAlign: String,
  24079. prop: {
  24080. type: [String, Number, Array]
  24081. },
  24082. name: {
  24083. type: [String, Number, Array]
  24084. },
  24085. rules: [Array, Object],
  24086. autoLink: {
  24087. type: Boolean,
  24088. default: !0
  24089. },
  24090. required: {
  24091. type: Boolean,
  24092. default: void 0
  24093. },
  24094. validateFirst: {
  24095. type: Boolean,
  24096. default: void 0
  24097. },
  24098. validateStatus: Y.oneOf(ru("", "success", "warning", "error", "validating")),
  24099. validateTrigger: {
  24100. type: [String, Array]
  24101. },
  24102. messageVariables: {
  24103. type: Object
  24104. },
  24105. hidden: Boolean,
  24106. noStyle: Boolean,
  24107. tooltip: String
  24108. });
  24109. let zxe = 0;
  24110. const Vxe = "form_item", $X = te({
  24111. compatConfig: {
  24112. MODE: 3
  24113. },
  24114. name: "AFormItem",
  24115. inheritAttrs: !1,
  24116. __ANT_NEW_FORM_ITEM: !0,
  24117. props: Bxe(),
  24118. slots: Object,
  24119. setup(t, e) {
  24120. let {
  24121. slots: n,
  24122. attrs: r,
  24123. expose: i
  24124. } = e;
  24125. ff(t.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
  24126. const a = `form-item-${++zxe}`, {
  24127. prefixCls: o
  24128. } = It("form", t), [s, l] = pD(o), u = ae(), c = fD(), f = L(() => t.name || t.prop), d = ae([]), h = ae(!1), p = ae(), v = L(() => {
  24129. const ee = f.value;
  24130. return G2(ee);
  24131. }), g = L(() => {
  24132. if (v.value.length) {
  24133. const ee = c.name.value, oe = v.value.join("_");
  24134. return ee ? `${ee}_${oe}` : `${Vxe}_${oe}`;
  24135. } else
  24136. return;
  24137. }), m = () => {
  24138. const ee = c.model.value;
  24139. if (!(!ee || !f.value))
  24140. return TC(ee, v.value, !0).v;
  24141. }, y = L(() => m()), b = ae(Zc(y.value)), _ = L(() => {
  24142. let ee = t.validateTrigger !== void 0 ? t.validateTrigger : c.validateTrigger.value;
  24143. return ee = ee === void 0 ? "change" : ee, Zl(ee);
  24144. }), O = L(() => {
  24145. let ee = c.rules.value;
  24146. const oe = t.rules, K = t.required !== void 0 ? {
  24147. required: !!t.required,
  24148. trigger: _.value
  24149. } : [], ie = TC(ee, v.value);
  24150. ee = ee ? ie.o[ie.k] || ie.v : [];
  24151. const X = [].concat(oe || ee || []);
  24152. return Obe(X, (H) => H.required) ? X : X.concat(K);
  24153. }), S = L(() => {
  24154. const ee = O.value;
  24155. let oe = !1;
  24156. return ee && ee.length && ee.every((K) => K.required ? (oe = !0, !1) : !0), oe || t.required;
  24157. }), x = ae();
  24158. ht(() => {
  24159. x.value = t.validateStatus;
  24160. });
  24161. const C = L(() => {
  24162. let ee = {};
  24163. return typeof t.label == "string" ? ee.label = t.label : t.name && (ee.label = String(t.name)), t.messageVariables && (ee = I(I({}, ee), t.messageVariables)), ee;
  24164. }), T = (ee) => {
  24165. if (v.value.length === 0)
  24166. return;
  24167. const {
  24168. validateFirst: oe = !1
  24169. } = t, {
  24170. triggerName: K
  24171. } = ee || {};
  24172. let ie = O.value;
  24173. if (K && (ie = ie.filter((H) => {
  24174. const {
  24175. trigger: G
  24176. } = H;
  24177. return !G && !_.value.length ? !0 : Zl(G || _.value).includes(K);
  24178. })), !ie.length)
  24179. return Promise.resolve();
  24180. const X = xX(v.value, y.value, ie, I({
  24181. validateMessages: c.validateMessages.value
  24182. }, ee), oe, C.value);
  24183. return x.value = "validating", d.value = [], X.catch((H) => H).then(function() {
  24184. let H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  24185. if (x.value === "validating") {
  24186. const G = H.filter((re) => re && re.errors.length);
  24187. x.value = G.length ? "error" : "success", d.value = G.map((re) => re.errors), c.onValidate(f.value, !d.value.length, d.value.length ? Ko(d.value[0]) : null);
  24188. }
  24189. }), X;
  24190. }, w = () => {
  24191. T({
  24192. triggerName: "blur"
  24193. });
  24194. }, P = () => {
  24195. if (h.value) {
  24196. h.value = !1;
  24197. return;
  24198. }
  24199. T({
  24200. triggerName: "change"
  24201. });
  24202. }, $ = () => {
  24203. x.value = t.validateStatus, h.value = !1, d.value = [];
  24204. }, A = () => {
  24205. var ee;
  24206. x.value = t.validateStatus, h.value = !0, d.value = [];
  24207. const oe = c.model.value || {}, K = y.value, ie = TC(oe, v.value, !0);
  24208. Array.isArray(K) ? ie.o[ie.k] = [].concat((ee = b.value) !== null && ee !== void 0 ? ee : []) : ie.o[ie.k] = b.value, Tt(() => {
  24209. h.value = !1;
  24210. });
  24211. }, D = L(() => t.htmlFor === void 0 ? g.value : t.htmlFor), E = () => {
  24212. const ee = D.value;
  24213. if (!ee || !p.value)
  24214. return;
  24215. const oe = p.value.$el.querySelector(`[id="${ee}"]`);
  24216. oe && oe.focus && oe.focus();
  24217. };
  24218. i({
  24219. onFieldBlur: w,
  24220. onFieldChange: P,
  24221. clearValidate: $,
  24222. resetField: A
  24223. }), kme({
  24224. id: g,
  24225. onFieldBlur: () => {
  24226. t.autoLink && w();
  24227. },
  24228. onFieldChange: () => {
  24229. t.autoLink && P();
  24230. },
  24231. clearValidate: $
  24232. }, L(() => !!(t.autoLink && c.model.value && f.value)));
  24233. let R = !1;
  24234. se(f, (ee) => {
  24235. ee ? R || (R = !0, c.addField(a, {
  24236. fieldValue: y,
  24237. fieldId: g,
  24238. fieldName: f,
  24239. resetField: A,
  24240. clearValidate: $,
  24241. namePath: v,
  24242. validateRules: T,
  24243. rules: O
  24244. })) : (R = !1, c.removeField(a));
  24245. }, {
  24246. immediate: !0
  24247. }), yt(() => {
  24248. c.removeField(a);
  24249. });
  24250. const N = Lxe(d), V = L(() => t.validateStatus !== void 0 ? t.validateStatus : N.value.length ? "error" : x.value), B = L(() => ({
  24251. [`${o.value}-item`]: !0,
  24252. [l.value]: !0,
  24253. // Status
  24254. [`${o.value}-item-has-feedback`]: V.value && t.hasFeedback,
  24255. [`${o.value}-item-has-success`]: V.value === "success",
  24256. [`${o.value}-item-has-warning`]: V.value === "warning",
  24257. [`${o.value}-item-has-error`]: V.value === "error",
  24258. [`${o.value}-item-is-validating`]: V.value === "validating",
  24259. [`${o.value}-item-hidden`]: t.hidden
  24260. })), W = tn({});
  24261. ao.useProvide(W), ht(() => {
  24262. let ee;
  24263. if (t.hasFeedback) {
  24264. const oe = V.value && Nxe[V.value];
  24265. ee = oe ? M("span", {
  24266. class: ye(`${o.value}-item-feedback-icon`, `${o.value}-item-feedback-icon-${V.value}`)
  24267. }, [M(oe, null, null)]) : null;
  24268. }
  24269. I(W, {
  24270. status: V.value,
  24271. hasFeedback: t.hasFeedback,
  24272. feedbackIcon: ee,
  24273. isFormItemInput: !0
  24274. });
  24275. });
  24276. const F = ae(null), Q = ae(!1), Z = () => {
  24277. if (u.value) {
  24278. const ee = getComputedStyle(u.value);
  24279. F.value = parseInt(ee.marginBottom, 10);
  24280. }
  24281. };
  24282. it(() => {
  24283. se(Q, () => {
  24284. Q.value && Z();
  24285. }, {
  24286. flush: "post",
  24287. immediate: !0
  24288. });
  24289. });
  24290. const ne = (ee) => {
  24291. ee || (F.value = null);
  24292. };
  24293. return () => {
  24294. var ee, oe;
  24295. if (t.noStyle) return (ee = n.default) === null || ee === void 0 ? void 0 : ee.call(n);
  24296. const K = (oe = t.help) !== null && oe !== void 0 ? oe : n.help ? ss(n.help()) : null, ie = !!(K != null && Array.isArray(K) && K.length || N.value.length);
  24297. return Q.value = ie, s(M("div", {
  24298. class: [B.value, ie ? `${o.value}-item-with-help` : "", r.class],
  24299. ref: u
  24300. }, [M(MSe, j(j({}, r), {}, {
  24301. class: `${o.value}-item-row`,
  24302. key: "row"
  24303. }), {
  24304. default: () => {
  24305. var X, H;
  24306. return M(wt, null, [M(hD, j(j({}, t), {}, {
  24307. htmlFor: D.value,
  24308. required: S.value,
  24309. requiredMark: c.requiredMark.value,
  24310. prefixCls: o.value,
  24311. onClick: E,
  24312. label: t.label
  24313. }), {
  24314. label: n.label,
  24315. tooltip: n.tooltip
  24316. }), M(kxe, j(j({}, t), {}, {
  24317. errors: K != null ? Zl(K) : N.value,
  24318. marginBottom: F.value,
  24319. prefixCls: o.value,
  24320. status: V.value,
  24321. ref: p,
  24322. help: K,
  24323. extra: (X = t.extra) !== null && X !== void 0 ? X : (H = n.extra) === null || H === void 0 ? void 0 : H.call(n),
  24324. onErrorVisibleChanged: ne
  24325. }), {
  24326. default: n.default
  24327. })]);
  24328. }
  24329. }), !!F.value && M("div", {
  24330. class: `${o.value}-margin-offset`,
  24331. style: {
  24332. marginBottom: `-${F.value}px`
  24333. }
  24334. }, null)]));
  24335. };
  24336. }
  24337. });
  24338. function AX(t) {
  24339. let e = !1, n = t.length;
  24340. const r = [];
  24341. return t.length ? new Promise((i, a) => {
  24342. t.forEach((o, s) => {
  24343. o.catch((l) => (e = !0, l)).then((l) => {
  24344. n -= 1, r[s] = l, !(n > 0) && (e && a(r), i(r));
  24345. });
  24346. });
  24347. }) : Promise.resolve([]);
  24348. }
  24349. function Q5(t) {
  24350. let e = !1;
  24351. return t && t.length && t.every((n) => n.required ? (e = !0, !1) : !0), e;
  24352. }
  24353. function H5(t) {
  24354. return t == null ? [] : Array.isArray(t) ? t : [t];
  24355. }
  24356. function PC(t, e, n) {
  24357. let r = t;
  24358. e = e.replace(/\[(\w+)\]/g, ".$1"), e = e.replace(/^\./, "");
  24359. const i = e.split(".");
  24360. let a = 0;
  24361. for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
  24362. const s = i[a];
  24363. if (s in r)
  24364. r = r[s];
  24365. else {
  24366. if (n)
  24367. throw new Error("please transfer a valid name path to validate!");
  24368. break;
  24369. }
  24370. }
  24371. return {
  24372. o: r,
  24373. k: i[a],
  24374. v: r ? r[i[a]] : null,
  24375. isValid: r && i[a] in r
  24376. };
  24377. }
  24378. function Fxe(t) {
  24379. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : U({}), n = arguments.length > 2 ? arguments[2] : void 0;
  24380. const r = Zc(z(t)), i = tn({}), a = ae([]), o = (b) => {
  24381. I(z(t), I(I({}, Zc(r)), b)), Tt(() => {
  24382. Object.keys(i).forEach((_) => {
  24383. i[_] = {
  24384. autoLink: !1,
  24385. required: Q5(z(e)[_])
  24386. };
  24387. });
  24388. });
  24389. }, s = function() {
  24390. let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], _ = arguments.length > 1 ? arguments[1] : void 0;
  24391. return _.length ? b.filter((O) => {
  24392. const S = H5(O.trigger || "change");
  24393. return Cbe(S, _).length;
  24394. }) : b;
  24395. };
  24396. let l = null;
  24397. const u = function(b) {
  24398. let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = arguments.length > 2 ? arguments[2] : void 0;
  24399. const S = [], x = {};
  24400. for (let w = 0; w < b.length; w++) {
  24401. const P = b[w], $ = PC(z(t), P, O);
  24402. if (!$.isValid) continue;
  24403. x[P] = $.v;
  24404. const A = s(z(e)[P], H5(_ && _.trigger));
  24405. A.length && S.push(c(P, $.v, A, _ || {}).then(() => ({
  24406. name: P,
  24407. errors: [],
  24408. warnings: []
  24409. })).catch((D) => {
  24410. const E = [], R = [];
  24411. return D.forEach((N) => {
  24412. let {
  24413. rule: {
  24414. warningOnly: V
  24415. },
  24416. errors: B
  24417. } = N;
  24418. V ? R.push(...B) : E.push(...B);
  24419. }), E.length ? Promise.reject({
  24420. name: P,
  24421. errors: E,
  24422. warnings: R
  24423. }) : {
  24424. name: P,
  24425. errors: E,
  24426. warnings: R
  24427. };
  24428. }));
  24429. }
  24430. const C = AX(S);
  24431. l = C;
  24432. const T = C.then(() => l === C ? Promise.resolve(x) : Promise.reject([])).catch((w) => {
  24433. const P = w.filter(($) => $ && $.errors.length);
  24434. return P.length ? Promise.reject({
  24435. values: x,
  24436. errorFields: P,
  24437. outOfDate: l !== C
  24438. }) : Promise.resolve(x);
  24439. });
  24440. return T.catch((w) => w), T;
  24441. }, c = function(b, _, O) {
  24442. let S = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
  24443. const x = xX([b], _, O, I({
  24444. validateMessages: Ox
  24445. }, S), !!S.validateFirst);
  24446. return i[b] ? (i[b].validateStatus = "validating", x.catch((C) => C).then(function() {
  24447. let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  24448. var T;
  24449. if (i[b].validateStatus === "validating") {
  24450. const w = C.filter((P) => P && P.errors.length);
  24451. i[b].validateStatus = w.length ? "error" : "success", i[b].help = w.length ? w.map((P) => P.errors) : null, (T = n == null ? void 0 : n.onValidate) === null || T === void 0 || T.call(n, b, !w.length, w.length ? Ko(i[b].help[0]) : null);
  24452. }
  24453. }), x) : x.catch((C) => C);
  24454. }, f = (b, _) => {
  24455. let O = [], S = !0;
  24456. b ? Array.isArray(b) ? O = b : O = [b] : (S = !1, O = a.value);
  24457. const x = u(O, _ || {}, S);
  24458. return x.catch((C) => C), x;
  24459. }, d = (b) => {
  24460. let _ = [];
  24461. b ? Array.isArray(b) ? _ = b : _ = [b] : _ = a.value, _.forEach((O) => {
  24462. i[O] && I(i[O], {
  24463. validateStatus: "",
  24464. help: null
  24465. });
  24466. });
  24467. }, h = (b) => {
  24468. const _ = {
  24469. autoLink: !1
  24470. }, O = [], S = Array.isArray(b) ? b : [b];
  24471. for (let x = 0; x < S.length; x++) {
  24472. const C = S[x];
  24473. (C == null ? void 0 : C.validateStatus) === "error" && (_.validateStatus = "error", C.help && O.push(C.help)), _.required = _.required || (C == null ? void 0 : C.required);
  24474. }
  24475. return _.help = O, _;
  24476. };
  24477. let p = r, v = !0;
  24478. const g = (b) => {
  24479. const _ = [];
  24480. a.value.forEach((O) => {
  24481. const S = PC(b, O, !1), x = PC(p, O, !1);
  24482. (v && (n == null ? void 0 : n.immediate) && S.isValid || !KS(S.v, x.v)) && _.push(O);
  24483. }), f(_, {
  24484. trigger: "change"
  24485. }), v = !1, p = Zc(Ko(b));
  24486. }, m = n == null ? void 0 : n.debounce;
  24487. let y = !0;
  24488. return se(e, () => {
  24489. a.value = e ? Object.keys(z(e)) : [], !y && n && n.validateOnRuleChange && f(), y = !1;
  24490. }, {
  24491. deep: !0,
  24492. immediate: !0
  24493. }), se(a, () => {
  24494. const b = {};
  24495. a.value.forEach((_) => {
  24496. b[_] = I({}, i[_], {
  24497. autoLink: !1,
  24498. required: Q5(z(e)[_])
  24499. }), delete i[_];
  24500. });
  24501. for (const _ in i)
  24502. Object.prototype.hasOwnProperty.call(i, _) && delete i[_];
  24503. I(i, b);
  24504. }, {
  24505. immediate: !0
  24506. }), se(t, m && m.wait ? XI(g, m.wait, CU(m, ["wait"])) : g, {
  24507. immediate: n && !!n.immediate,
  24508. deep: !0
  24509. }), {
  24510. modelRef: t,
  24511. rulesRef: e,
  24512. initialModel: r,
  24513. validateInfos: i,
  24514. resetFields: o,
  24515. validate: f,
  24516. validateField: c,
  24517. mergeValidateInfo: h,
  24518. clearValidate: d
  24519. };
  24520. }
  24521. const Wxe = () => ({
  24522. layout: Y.oneOf(ru("horizontal", "inline", "vertical")),
  24523. labelCol: $t(),
  24524. wrapperCol: $t(),
  24525. colon: nt(),
  24526. labelAlign: hn(),
  24527. labelWrap: nt(),
  24528. prefixCls: String,
  24529. requiredMark: gn([String, Boolean]),
  24530. /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  24531. hideRequiredMark: nt(),
  24532. model: Y.object,
  24533. rules: $t(),
  24534. validateMessages: $t(),
  24535. validateOnRuleChange: nt(),
  24536. // 提交失败自动滚动到第一个错误字段
  24537. scrollToFirstError: ha(),
  24538. onSubmit: tt(),
  24539. name: String,
  24540. validateTrigger: gn([String, Array]),
  24541. size: hn(),
  24542. disabled: nt(),
  24543. onValuesChange: tt(),
  24544. onFieldsChange: tt(),
  24545. onFinish: tt(),
  24546. onFinishFailed: tt(),
  24547. onValidate: tt()
  24548. });
  24549. function Qxe(t, e) {
  24550. return KS(Zl(t), Zl(e));
  24551. }
  24552. const dr = te({
  24553. compatConfig: {
  24554. MODE: 3
  24555. },
  24556. name: "AForm",
  24557. inheritAttrs: !1,
  24558. props: sr(Wxe(), {
  24559. layout: "horizontal",
  24560. hideRequiredMark: !1,
  24561. colon: !0
  24562. }),
  24563. Item: $X,
  24564. useForm: Fxe,
  24565. // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  24566. setup(t, e) {
  24567. let {
  24568. emit: n,
  24569. slots: r,
  24570. expose: i,
  24571. attrs: a
  24572. } = e;
  24573. const {
  24574. prefixCls: o,
  24575. direction: s,
  24576. form: l,
  24577. size: u,
  24578. disabled: c
  24579. } = It("form", t), f = L(() => t.requiredMark === "" || t.requiredMark), d = L(() => {
  24580. var N;
  24581. return f.value !== void 0 ? f.value : l && ((N = l.value) === null || N === void 0 ? void 0 : N.requiredMark) !== void 0 ? l.value.requiredMark : !t.hideRequiredMark;
  24582. });
  24583. Xj(u), fj(c);
  24584. const h = L(() => {
  24585. var N, V;
  24586. return (N = t.colon) !== null && N !== void 0 ? N : (V = l.value) === null || V === void 0 ? void 0 : V.colon;
  24587. }), {
  24588. validateMessages: p
  24589. } = Bue(), v = L(() => I(I(I({}, Ox), p.value), t.validateMessages)), [g, m] = pD(o), y = L(() => ye(o.value, {
  24590. [`${o.value}-${t.layout}`]: !0,
  24591. [`${o.value}-hide-required-mark`]: d.value === !1,
  24592. [`${o.value}-rtl`]: s.value === "rtl",
  24593. [`${o.value}-${u.value}`]: u.value
  24594. }, m.value)), b = U(), _ = {}, O = (N, V) => {
  24595. _[N] = V;
  24596. }, S = (N) => {
  24597. delete _[N];
  24598. }, x = (N) => {
  24599. const V = !!N, B = V ? Zl(N).map(G2) : [];
  24600. return V ? Object.values(_).filter((W) => B.findIndex((F) => Qxe(F, W.fieldName.value)) > -1) : Object.values(_);
  24601. }, C = (N) => {
  24602. if (!t.model) {
  24603. Yr(!1, "Form", "model is required for resetFields to work.");
  24604. return;
  24605. }
  24606. x(N).forEach((V) => {
  24607. V.resetField();
  24608. });
  24609. }, T = (N) => {
  24610. x(N).forEach((V) => {
  24611. V.clearValidate();
  24612. });
  24613. }, w = (N) => {
  24614. const {
  24615. scrollToFirstError: V
  24616. } = t;
  24617. if (n("finishFailed", N), V && N.errorFields.length) {
  24618. let B = {};
  24619. typeof V == "object" && (B = V), $(N.errorFields[0].name, B);
  24620. }
  24621. }, P = function() {
  24622. return E(...arguments);
  24623. }, $ = function(N) {
  24624. let V = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  24625. const B = x(N ? [N] : void 0);
  24626. if (B.length) {
  24627. const W = B[0].fieldId.value, F = W ? document.getElementById(W) : null;
  24628. F && Rfe(F, I({
  24629. scrollMode: "if-needed",
  24630. block: "nearest"
  24631. }, V));
  24632. }
  24633. }, A = function() {
  24634. let N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
  24635. if (N === !0) {
  24636. const V = [];
  24637. return Object.values(_).forEach((B) => {
  24638. let {
  24639. namePath: W
  24640. } = B;
  24641. V.push(W.value);
  24642. }), V5(t.model, V);
  24643. } else
  24644. return V5(t.model, N);
  24645. }, D = (N, V) => {
  24646. if (Yr(!(N instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !t.model)
  24647. return Yr(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
  24648. const B = !!N, W = B ? Zl(N).map(G2) : [], F = [];
  24649. Object.values(_).forEach((ne) => {
  24650. var ee;
  24651. if (B || W.push(ne.namePath.value), !(!((ee = ne.rules) === null || ee === void 0) && ee.value.length))
  24652. return;
  24653. const oe = ne.namePath.value;
  24654. if (!B || dxe(W, oe)) {
  24655. const K = ne.validateRules(I({
  24656. validateMessages: v.value
  24657. }, V));
  24658. F.push(K.then(() => ({
  24659. name: oe,
  24660. errors: [],
  24661. warnings: []
  24662. })).catch((ie) => {
  24663. const X = [], H = [];
  24664. return ie.forEach((G) => {
  24665. let {
  24666. rule: {
  24667. warningOnly: re
  24668. },
  24669. errors: fe
  24670. } = G;
  24671. re ? H.push(...fe) : X.push(...fe);
  24672. }), X.length ? Promise.reject({
  24673. name: oe,
  24674. errors: X,
  24675. warnings: H
  24676. }) : {
  24677. name: oe,
  24678. errors: X,
  24679. warnings: H
  24680. };
  24681. }));
  24682. }
  24683. });
  24684. const Q = AX(F);
  24685. b.value = Q;
  24686. const Z = Q.then(() => b.value === Q ? Promise.resolve(A(W)) : Promise.reject([])).catch((ne) => {
  24687. const ee = ne.filter((oe) => oe && oe.errors.length);
  24688. return Promise.reject({
  24689. values: A(W),
  24690. errorFields: ee,
  24691. outOfDate: b.value !== Q
  24692. });
  24693. });
  24694. return Z.catch((ne) => ne), Z;
  24695. }, E = function() {
  24696. return D(...arguments);
  24697. }, R = (N) => {
  24698. N.preventDefault(), N.stopPropagation(), n("submit", N), t.model && D().then((B) => {
  24699. n("finish", B);
  24700. }).catch((B) => {
  24701. w(B);
  24702. });
  24703. };
  24704. return i({
  24705. resetFields: C,
  24706. clearValidate: T,
  24707. validateFields: D,
  24708. getFieldsValue: A,
  24709. validate: P,
  24710. scrollToField: $
  24711. }), CX({
  24712. model: L(() => t.model),
  24713. name: L(() => t.name),
  24714. labelAlign: L(() => t.labelAlign),
  24715. labelCol: L(() => t.labelCol),
  24716. labelWrap: L(() => t.labelWrap),
  24717. wrapperCol: L(() => t.wrapperCol),
  24718. vertical: L(() => t.layout === "vertical"),
  24719. colon: h,
  24720. requiredMark: d,
  24721. validateTrigger: L(() => t.validateTrigger),
  24722. rules: L(() => t.rules),
  24723. addField: O,
  24724. removeField: S,
  24725. onValidate: (N, V, B) => {
  24726. n("validate", N, V, B);
  24727. },
  24728. validateMessages: v
  24729. }), se(() => t.rules, () => {
  24730. t.validateOnRuleChange && D();
  24731. }), () => {
  24732. var N;
  24733. return g(M("form", j(j({}, a), {}, {
  24734. onSubmit: R,
  24735. class: [y.value, a.class]
  24736. }), [(N = r.default) === null || N === void 0 ? void 0 : N.call(r)]));
  24737. };
  24738. }
  24739. });
  24740. dr.useInjectFormItemContext = ls;
  24741. dr.ItemRest = lm;
  24742. dr.install = function(t) {
  24743. return t.component(dr.name, dr), t.component(dr.Item.name, dr.Item), t.component(lm.name, lm), t;
  24744. };
  24745. const Hxe = new Ot("antCheckboxEffect", {
  24746. "0%": {
  24747. transform: "scale(1)",
  24748. opacity: 0.5
  24749. },
  24750. "100%": {
  24751. transform: "scale(1.6)",
  24752. opacity: 0
  24753. }
  24754. }), Gxe = (t) => {
  24755. const {
  24756. checkboxCls: e
  24757. } = t, n = `${e}-wrapper`;
  24758. return [
  24759. // ===================== Basic =====================
  24760. {
  24761. // Group
  24762. [`${e}-group`]: I(I({}, nn(t)), {
  24763. display: "inline-flex",
  24764. flexWrap: "wrap",
  24765. columnGap: t.marginXS,
  24766. // Group > Grid
  24767. [`> ${t.antCls}-row`]: {
  24768. flex: 1
  24769. }
  24770. }),
  24771. // Wrapper
  24772. [n]: I(I({}, nn(t)), {
  24773. display: "inline-flex",
  24774. alignItems: "baseline",
  24775. cursor: "pointer",
  24776. // Fix checkbox & radio in flex align #30260
  24777. "&:after": {
  24778. display: "inline-block",
  24779. width: 0,
  24780. overflow: "hidden",
  24781. content: "'\\a0'"
  24782. },
  24783. // Checkbox near checkbox
  24784. [`& + ${n}`]: {
  24785. marginInlineStart: 0
  24786. },
  24787. [`&${n}-in-form-item`]: {
  24788. 'input[type="checkbox"]': {
  24789. width: 14,
  24790. height: 14
  24791. // FIXME: magic
  24792. }
  24793. }
  24794. }),
  24795. // Wrapper > Checkbox
  24796. [e]: I(I({}, nn(t)), {
  24797. position: "relative",
  24798. whiteSpace: "nowrap",
  24799. lineHeight: 1,
  24800. cursor: "pointer",
  24801. // To make alignment right when `controlHeight` is changed
  24802. // Ref: https://github.com/ant-design/ant-design/issues/41564
  24803. alignSelf: "center",
  24804. // Wrapper > Checkbox > input
  24805. [`${e}-input`]: {
  24806. position: "absolute",
  24807. // Since baseline align will get additional space offset,
  24808. // we need to move input to top to make it align with text.
  24809. // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
  24810. inset: 0,
  24811. zIndex: 1,
  24812. cursor: "pointer",
  24813. opacity: 0,
  24814. margin: 0,
  24815. [`&:focus-visible + ${e}-inner`]: I({}, h0(t))
  24816. },
  24817. // Wrapper > Checkbox > inner
  24818. [`${e}-inner`]: {
  24819. boxSizing: "border-box",
  24820. position: "relative",
  24821. top: 0,
  24822. insetInlineStart: 0,
  24823. display: "block",
  24824. width: t.checkboxSize,
  24825. height: t.checkboxSize,
  24826. direction: "ltr",
  24827. backgroundColor: t.colorBgContainer,
  24828. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  24829. borderRadius: t.borderRadiusSM,
  24830. borderCollapse: "separate",
  24831. transition: `all ${t.motionDurationSlow}`,
  24832. "&:after": {
  24833. boxSizing: "border-box",
  24834. position: "absolute",
  24835. top: "50%",
  24836. insetInlineStart: "21.5%",
  24837. display: "table",
  24838. width: t.checkboxSize / 14 * 5,
  24839. height: t.checkboxSize / 14 * 8,
  24840. border: `${t.lineWidthBold}px solid ${t.colorWhite}`,
  24841. borderTop: 0,
  24842. borderInlineStart: 0,
  24843. transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
  24844. opacity: 0,
  24845. content: '""',
  24846. transition: `all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`
  24847. }
  24848. },
  24849. // Wrapper > Checkbox + Text
  24850. "& + span": {
  24851. paddingInlineStart: t.paddingXS,
  24852. paddingInlineEnd: t.paddingXS
  24853. }
  24854. })
  24855. },
  24856. // ================= Indeterminate =================
  24857. {
  24858. [e]: {
  24859. "&-indeterminate": {
  24860. // Wrapper > Checkbox > inner
  24861. [`${e}-inner`]: {
  24862. "&:after": {
  24863. top: "50%",
  24864. insetInlineStart: "50%",
  24865. width: t.fontSizeLG / 2,
  24866. height: t.fontSizeLG / 2,
  24867. backgroundColor: t.colorPrimary,
  24868. border: 0,
  24869. transform: "translate(-50%, -50%) scale(1)",
  24870. opacity: 1,
  24871. content: '""'
  24872. }
  24873. }
  24874. }
  24875. }
  24876. },
  24877. // ===================== Hover =====================
  24878. {
  24879. // Wrapper
  24880. [`${n}:hover ${e}:after`]: {
  24881. visibility: "visible"
  24882. },
  24883. // Wrapper & Wrapper > Checkbox
  24884. [`
  24885. ${n}:not(${n}-disabled),
  24886. ${e}:not(${e}-disabled)
  24887. `]: {
  24888. [`&:hover ${e}-inner`]: {
  24889. borderColor: t.colorPrimary
  24890. }
  24891. },
  24892. [`${n}:not(${n}-disabled)`]: {
  24893. [`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]: {
  24894. backgroundColor: t.colorPrimaryHover,
  24895. borderColor: "transparent"
  24896. },
  24897. [`&:hover ${e}-checked:not(${e}-disabled):after`]: {
  24898. borderColor: t.colorPrimaryHover
  24899. }
  24900. }
  24901. },
  24902. // ==================== Checked ====================
  24903. {
  24904. // Wrapper > Checkbox
  24905. [`${e}-checked`]: {
  24906. [`${e}-inner`]: {
  24907. backgroundColor: t.colorPrimary,
  24908. borderColor: t.colorPrimary,
  24909. "&:after": {
  24910. opacity: 1,
  24911. transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
  24912. transition: `all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`
  24913. }
  24914. },
  24915. // Checked Effect
  24916. "&:after": {
  24917. position: "absolute",
  24918. top: 0,
  24919. insetInlineStart: 0,
  24920. width: "100%",
  24921. height: "100%",
  24922. borderRadius: t.borderRadiusSM,
  24923. visibility: "hidden",
  24924. border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
  24925. animationName: Hxe,
  24926. animationDuration: t.motionDurationSlow,
  24927. animationTimingFunction: "ease-in-out",
  24928. animationFillMode: "backwards",
  24929. content: '""',
  24930. transition: `all ${t.motionDurationSlow}`
  24931. }
  24932. },
  24933. [`
  24934. ${n}-checked:not(${n}-disabled),
  24935. ${e}-checked:not(${e}-disabled)
  24936. `]: {
  24937. [`&:hover ${e}-inner`]: {
  24938. backgroundColor: t.colorPrimaryHover,
  24939. borderColor: "transparent"
  24940. },
  24941. [`&:hover ${e}:after`]: {
  24942. borderColor: t.colorPrimaryHover
  24943. }
  24944. }
  24945. },
  24946. // ==================== Disable ====================
  24947. {
  24948. // Wrapper
  24949. [`${n}-disabled`]: {
  24950. cursor: "not-allowed"
  24951. },
  24952. // Wrapper > Checkbox
  24953. [`${e}-disabled`]: {
  24954. // Wrapper > Checkbox > input
  24955. [`&, ${e}-input`]: {
  24956. cursor: "not-allowed",
  24957. // Disabled for native input to enable Tooltip event handler
  24958. // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
  24959. pointerEvents: "none"
  24960. },
  24961. // Wrapper > Checkbox > inner
  24962. [`${e}-inner`]: {
  24963. background: t.colorBgContainerDisabled,
  24964. borderColor: t.colorBorder,
  24965. "&:after": {
  24966. borderColor: t.colorTextDisabled
  24967. }
  24968. },
  24969. "&:after": {
  24970. display: "none"
  24971. },
  24972. "& + span": {
  24973. color: t.colorTextDisabled
  24974. },
  24975. [`&${e}-indeterminate ${e}-inner::after`]: {
  24976. background: t.colorTextDisabled
  24977. }
  24978. }
  24979. }
  24980. ];
  24981. };
  24982. function jxe(t, e) {
  24983. const n = Bt(e, {
  24984. checkboxCls: `.${t}`,
  24985. checkboxSize: e.controlInteractiveSize
  24986. });
  24987. return [Gxe(n)];
  24988. }
  24989. const EX = Sn("Checkbox", (t, e) => {
  24990. let {
  24991. prefixCls: n
  24992. } = e;
  24993. return [jxe(n, t)];
  24994. }), Zxe = () => ({
  24995. name: String,
  24996. prefixCls: String,
  24997. options: cf([]),
  24998. disabled: Boolean,
  24999. id: String
  25000. }), Uxe = () => I(I({}, Zxe()), {
  25001. defaultValue: cf(),
  25002. value: cf(),
  25003. onChange: tt(),
  25004. "onUpdate:value": tt()
  25005. }), Xxe = () => ({
  25006. prefixCls: String,
  25007. defaultChecked: nt(),
  25008. checked: nt(),
  25009. disabled: nt(),
  25010. isGroup: nt(),
  25011. value: Y.any,
  25012. name: String,
  25013. id: String,
  25014. indeterminate: nt(),
  25015. type: hn("checkbox"),
  25016. autofocus: nt(),
  25017. onChange: tt(),
  25018. "onUpdate:checked": tt(),
  25019. onClick: tt(),
  25020. skipGroup: nt(!1)
  25021. }), Yxe = () => I(I({}, Xxe()), {
  25022. indeterminate: nt(!1)
  25023. }), MX = Symbol("CheckboxGroupContext");
  25024. var G5 = function(t, e) {
  25025. var n = {};
  25026. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25027. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25028. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25029. return n;
  25030. };
  25031. const mg = te({
  25032. compatConfig: {
  25033. MODE: 3
  25034. },
  25035. name: "ACheckbox",
  25036. inheritAttrs: !1,
  25037. __ANT_CHECKBOX: !0,
  25038. props: Yxe(),
  25039. // emits: ['change', 'update:checked'],
  25040. setup(t, e) {
  25041. let {
  25042. emit: n,
  25043. attrs: r,
  25044. slots: i,
  25045. expose: a
  25046. } = e;
  25047. const o = ls(), s = ao.useInject(), {
  25048. prefixCls: l,
  25049. direction: u,
  25050. disabled: c
  25051. } = It("checkbox", t), f = Jo(), [d, h] = EX(l), p = Ge(MX, void 0), v = Symbol("checkboxUniId"), g = L(() => (p == null ? void 0 : p.disabled.value) || c.value);
  25052. ht(() => {
  25053. !t.skipGroup && p && p.registerValue(v, t.value);
  25054. }), yt(() => {
  25055. p && p.cancelValue(v);
  25056. }), it(() => {
  25057. Yr(!!(t.checked !== void 0 || p || t.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
  25058. });
  25059. const m = (O) => {
  25060. const S = O.target.checked;
  25061. n("update:checked", S), n("change", O), o.onFieldChange();
  25062. }, y = U();
  25063. return a({
  25064. focus: () => {
  25065. var O;
  25066. (O = y.value) === null || O === void 0 || O.focus();
  25067. },
  25068. blur: () => {
  25069. var O;
  25070. (O = y.value) === null || O === void 0 || O.blur();
  25071. }
  25072. }), () => {
  25073. var O;
  25074. const S = Yn((O = i.default) === null || O === void 0 ? void 0 : O.call(i)), {
  25075. indeterminate: x,
  25076. skipGroup: C,
  25077. id: T = o.id.value
  25078. } = t, w = G5(t, ["indeterminate", "skipGroup", "id"]), {
  25079. onMouseenter: P,
  25080. onMouseleave: $,
  25081. onInput: A,
  25082. class: D,
  25083. style: E
  25084. } = r, R = G5(r, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), N = I(I(I(I({}, w), {
  25085. id: T,
  25086. prefixCls: l.value
  25087. }), R), {
  25088. disabled: g.value
  25089. });
  25090. p && !C ? (N.onChange = function() {
  25091. for (var F = arguments.length, Q = new Array(F), Z = 0; Z < F; Z++)
  25092. Q[Z] = arguments[Z];
  25093. n("change", ...Q), p.toggleOption({
  25094. label: S,
  25095. value: t.value
  25096. });
  25097. }, N.name = p.name.value, N.checked = p.mergedValue.value.includes(t.value), N.disabled = g.value || f.value, N.indeterminate = x) : N.onChange = m;
  25098. const V = ye({
  25099. [`${l.value}-wrapper`]: !0,
  25100. [`${l.value}-rtl`]: u.value === "rtl",
  25101. [`${l.value}-wrapper-checked`]: N.checked,
  25102. [`${l.value}-wrapper-disabled`]: N.disabled,
  25103. [`${l.value}-wrapper-in-form-item`]: s.isFormItemInput
  25104. }, D, h.value), B = ye({
  25105. [`${l.value}-indeterminate`]: x
  25106. }, h.value);
  25107. return d(M("label", {
  25108. class: V,
  25109. style: E,
  25110. onMouseenter: P,
  25111. onMouseleave: $
  25112. }, [M(JU, j(j({
  25113. "aria-checked": x ? "mixed" : void 0
  25114. }, N), {}, {
  25115. class: B,
  25116. ref: y
  25117. }), null), S.length ? M("span", null, [S]) : null]));
  25118. };
  25119. }
  25120. }), F1 = te({
  25121. compatConfig: {
  25122. MODE: 3
  25123. },
  25124. name: "ACheckboxGroup",
  25125. inheritAttrs: !1,
  25126. props: Uxe(),
  25127. // emits: ['change', 'update:value'],
  25128. setup(t, e) {
  25129. let {
  25130. slots: n,
  25131. attrs: r,
  25132. emit: i,
  25133. expose: a
  25134. } = e;
  25135. const o = ls(), {
  25136. prefixCls: s,
  25137. direction: l
  25138. } = It("checkbox", t), u = L(() => `${s.value}-group`), [c, f] = EX(u), d = U((t.value === void 0 ? t.defaultValue : t.value) || []);
  25139. se(() => t.value, () => {
  25140. d.value = t.value || [];
  25141. });
  25142. const h = L(() => t.options.map((_) => typeof _ == "string" || typeof _ == "number" ? {
  25143. label: _,
  25144. value: _
  25145. } : _)), p = U(Symbol()), v = U(/* @__PURE__ */ new Map()), g = (_) => {
  25146. v.value.delete(_), p.value = Symbol();
  25147. }, m = (_, O) => {
  25148. v.value.set(_, O), p.value = Symbol();
  25149. }, y = U(/* @__PURE__ */ new Map());
  25150. return se(p, () => {
  25151. const _ = /* @__PURE__ */ new Map();
  25152. for (const O of v.value.values())
  25153. _.set(O, !0);
  25154. y.value = _;
  25155. }), pt(MX, {
  25156. cancelValue: g,
  25157. registerValue: m,
  25158. toggleOption: (_) => {
  25159. const O = d.value.indexOf(_.value), S = [...d.value];
  25160. O === -1 ? S.push(_.value) : S.splice(O, 1), t.value === void 0 && (d.value = S);
  25161. const x = S.filter((C) => y.value.has(C)).sort((C, T) => {
  25162. const w = h.value.findIndex(($) => $.value === C), P = h.value.findIndex(($) => $.value === T);
  25163. return w - P;
  25164. });
  25165. i("update:value", x), i("change", x), o.onFieldChange();
  25166. },
  25167. mergedValue: d,
  25168. name: L(() => t.name),
  25169. disabled: L(() => t.disabled)
  25170. }), a({
  25171. mergedValue: d
  25172. }), () => {
  25173. var _;
  25174. const {
  25175. id: O = o.id.value
  25176. } = t;
  25177. let S = null;
  25178. return h.value && h.value.length > 0 && (S = h.value.map((x) => {
  25179. var C;
  25180. return M(mg, {
  25181. prefixCls: s.value,
  25182. key: x.value.toString(),
  25183. disabled: "disabled" in x ? x.disabled : t.disabled,
  25184. indeterminate: x.indeterminate,
  25185. value: x.value,
  25186. checked: d.value.indexOf(x.value) !== -1,
  25187. onChange: x.onChange,
  25188. class: `${u.value}-item`
  25189. }, {
  25190. default: () => [n.label !== void 0 ? (C = n.label) === null || C === void 0 ? void 0 : C.call(n, x) : x.label]
  25191. });
  25192. })), c(M("div", j(j({}, r), {}, {
  25193. class: [u.value, {
  25194. [`${u.value}-rtl`]: l.value === "rtl"
  25195. }, r.class, f.value],
  25196. id: O
  25197. }), [S || ((_ = n.default) === null || _ === void 0 ? void 0 : _.call(n))]));
  25198. };
  25199. }
  25200. });
  25201. mg.Group = F1;
  25202. mg.install = function(t) {
  25203. return t.component(mg.name, mg), t.component(F1.name, F1), t;
  25204. };
  25205. let A_ = I({}, Vs.Modal);
  25206. function qxe(t) {
  25207. t ? A_ = I(I({}, A_), t) : A_ = I({}, Vs.Modal);
  25208. }
  25209. function Kxe() {
  25210. return A_;
  25211. }
  25212. const Z2 = "internalMark", E_ = te({
  25213. compatConfig: {
  25214. MODE: 3
  25215. },
  25216. name: "ALocaleProvider",
  25217. props: {
  25218. locale: {
  25219. type: Object
  25220. },
  25221. ANT_MARK__: String
  25222. },
  25223. setup(t, e) {
  25224. let {
  25225. slots: n
  25226. } = e;
  25227. Yr(t.ANT_MARK__ === Z2, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
  25228. const r = tn({
  25229. antLocale: I(I({}, t.locale), {
  25230. exist: !0
  25231. }),
  25232. ANT_MARK__: Z2
  25233. });
  25234. return pt("localeData", r), se(() => t.locale, (i) => {
  25235. qxe(i && i.Modal), r.antLocale = I(I({}, i), {
  25236. exist: !0
  25237. });
  25238. }, {
  25239. immediate: !0
  25240. }), () => {
  25241. var i;
  25242. return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
  25243. };
  25244. }
  25245. });
  25246. E_.install = function(t) {
  25247. return t.component(E_.name, E_), t;
  25248. };
  25249. const Jxe = sp(E_), xx = te({
  25250. name: "Notice",
  25251. inheritAttrs: !1,
  25252. props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
  25253. setup(t, e) {
  25254. let {
  25255. attrs: n,
  25256. slots: r
  25257. } = e, i, a = !1;
  25258. const o = L(() => t.duration === void 0 ? 4.5 : t.duration), s = () => {
  25259. o.value && !a && (i = setTimeout(() => {
  25260. u();
  25261. }, o.value * 1e3));
  25262. }, l = () => {
  25263. i && (clearTimeout(i), i = null);
  25264. }, u = (f) => {
  25265. f && f.stopPropagation(), l();
  25266. const {
  25267. onClose: d,
  25268. noticeKey: h
  25269. } = t;
  25270. d && d(h);
  25271. }, c = () => {
  25272. l(), s();
  25273. };
  25274. return it(() => {
  25275. s();
  25276. }), rl(() => {
  25277. a = !0, l();
  25278. }), se([o, () => t.updateMark, () => t.visible], (f, d) => {
  25279. let [h, p, v] = f, [g, m, y] = d;
  25280. (h !== g || p !== m || v !== y && y) && c();
  25281. }, {
  25282. flush: "post"
  25283. }), () => {
  25284. var f, d;
  25285. const {
  25286. prefixCls: h,
  25287. closable: p,
  25288. closeIcon: v = (f = r.closeIcon) === null || f === void 0 ? void 0 : f.call(r),
  25289. onClick: g,
  25290. holder: m
  25291. } = t, {
  25292. class: y,
  25293. style: b
  25294. } = n, _ = `${h}-notice`, O = Object.keys(n).reduce((x, C) => ((C.startsWith("data-") || C.startsWith("aria-") || C === "role") && (x[C] = n[C]), x), {}), S = M("div", j({
  25295. class: ye(_, y, {
  25296. [`${_}-closable`]: p
  25297. }),
  25298. style: b,
  25299. onMouseenter: l,
  25300. onMouseleave: s,
  25301. onClick: g
  25302. }, O), [M("div", {
  25303. class: `${_}-content`
  25304. }, [(d = r.default) === null || d === void 0 ? void 0 : d.call(r)]), p ? M("a", {
  25305. tabindex: 0,
  25306. onClick: u,
  25307. class: `${_}-close`
  25308. }, [v || M("span", {
  25309. class: `${_}-close-x`
  25310. }, null)]) : null]);
  25311. return m ? M(AS, {
  25312. to: m
  25313. }, {
  25314. default: () => S
  25315. }) : S;
  25316. };
  25317. }
  25318. });
  25319. var ewe = function(t, e) {
  25320. var n = {};
  25321. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25322. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25323. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25324. return n;
  25325. };
  25326. let j5 = 0;
  25327. const twe = Date.now();
  25328. function Z5() {
  25329. const t = j5;
  25330. return j5 += 1, `rcNotification_${twe}_${t}`;
  25331. }
  25332. const W1 = te({
  25333. name: "Notification",
  25334. inheritAttrs: !1,
  25335. props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  25336. setup(t, e) {
  25337. let {
  25338. attrs: n,
  25339. expose: r,
  25340. slots: i
  25341. } = e;
  25342. const a = /* @__PURE__ */ new Map(), o = U([]), s = L(() => {
  25343. const {
  25344. prefixCls: c,
  25345. animation: f = "fade"
  25346. } = t;
  25347. let d = t.transitionName;
  25348. return !d && f && (d = `${c}-${f}`), CI(d);
  25349. }), l = (c, f) => {
  25350. const d = c.key || Z5(), h = I(I({}, c), {
  25351. key: d
  25352. }), {
  25353. maxCount: p
  25354. } = t, v = o.value.map((m) => m.notice.key).indexOf(d), g = o.value.concat();
  25355. v !== -1 ? g.splice(v, 1, {
  25356. notice: h,
  25357. holderCallback: f
  25358. }) : (p && o.value.length >= p && (h.key = g[0].notice.key, h.updateMark = Z5(), h.userPassKey = d, g.shift()), g.push({
  25359. notice: h,
  25360. holderCallback: f
  25361. })), o.value = g;
  25362. }, u = (c) => {
  25363. o.value = o.value.filter((f) => {
  25364. let {
  25365. notice: {
  25366. key: d,
  25367. userPassKey: h
  25368. }
  25369. } = f;
  25370. return (h || d) !== c;
  25371. });
  25372. };
  25373. return r({
  25374. add: l,
  25375. remove: u,
  25376. notices: o
  25377. }), () => {
  25378. var c;
  25379. const {
  25380. prefixCls: f,
  25381. closeIcon: d = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
  25382. prefixCls: f
  25383. })
  25384. } = t, h = o.value.map((v, g) => {
  25385. let {
  25386. notice: m,
  25387. holderCallback: y
  25388. } = v;
  25389. const b = g === o.value.length - 1 ? m.updateMark : void 0, {
  25390. key: _,
  25391. userPassKey: O
  25392. } = m, {
  25393. content: S
  25394. } = m, x = I(I(I({
  25395. prefixCls: f,
  25396. closeIcon: typeof d == "function" ? d({
  25397. prefixCls: f
  25398. }) : d
  25399. }, m), m.props), {
  25400. key: _,
  25401. noticeKey: O || _,
  25402. updateMark: b,
  25403. onClose: (C) => {
  25404. var T;
  25405. u(C), (T = m.onClose) === null || T === void 0 || T.call(m);
  25406. },
  25407. onClick: m.onClick
  25408. });
  25409. return y ? M("div", {
  25410. key: _,
  25411. class: `${f}-hook-holder`,
  25412. ref: (C) => {
  25413. typeof _ > "u" || (C ? (a.set(_, C), y(C, x)) : a.delete(_));
  25414. }
  25415. }, null) : M(xx, j(j({}, x), {}, {
  25416. class: ye(x.class, t.hashId)
  25417. }), {
  25418. default: () => [typeof S == "function" ? S({
  25419. prefixCls: f
  25420. }) : S]
  25421. });
  25422. }), p = {
  25423. [f]: 1,
  25424. [n.class]: !!n.class,
  25425. [t.hashId]: !0
  25426. };
  25427. return M("div", {
  25428. class: p,
  25429. style: n.style || {
  25430. top: "65px",
  25431. left: "50%"
  25432. }
  25433. }, [M(eI, j({
  25434. tag: "div"
  25435. }, s.value), {
  25436. default: () => [h]
  25437. })]);
  25438. };
  25439. }
  25440. });
  25441. W1.newInstance = function(e, n) {
  25442. const r = e || {}, {
  25443. name: i = "notification",
  25444. getContainer: a,
  25445. appContext: o,
  25446. prefixCls: s,
  25447. rootPrefixCls: l,
  25448. transitionName: u,
  25449. hasTransitionName: c,
  25450. useStyle: f
  25451. } = r, d = ewe(r, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), h = document.createElement("div");
  25452. a ? a().appendChild(h) : document.body.appendChild(h);
  25453. const p = te({
  25454. compatConfig: {
  25455. MODE: 3
  25456. },
  25457. name: "NotificationWrapper",
  25458. setup(g, m) {
  25459. let {
  25460. attrs: y
  25461. } = m;
  25462. const b = ae(), _ = L(() => hr.getPrefixCls(i, s)), [, O] = f(_);
  25463. return it(() => {
  25464. n({
  25465. notice(S) {
  25466. var x;
  25467. (x = b.value) === null || x === void 0 || x.add(S);
  25468. },
  25469. removeNotice(S) {
  25470. var x;
  25471. (x = b.value) === null || x === void 0 || x.remove(S);
  25472. },
  25473. destroy() {
  25474. lf(null, h), h.parentNode && h.parentNode.removeChild(h);
  25475. },
  25476. component: b
  25477. });
  25478. }), () => {
  25479. const S = hr, x = S.getRootPrefixCls(l, _.value), C = c ? u : `${_.value}-${u}`;
  25480. return M(qd, j(j({}, S), {}, {
  25481. prefixCls: x
  25482. }), {
  25483. default: () => [M(W1, j(j({
  25484. ref: b
  25485. }, y), {}, {
  25486. prefixCls: _.value,
  25487. transitionName: C,
  25488. hashId: O.value
  25489. }), null)]
  25490. });
  25491. };
  25492. }
  25493. }), v = M(p, d);
  25494. v.appContext = o || v.appContext, lf(v, h);
  25495. };
  25496. let U5 = 0;
  25497. const nwe = Date.now();
  25498. function X5() {
  25499. const t = U5;
  25500. return U5 += 1, `rcNotification_${nwe}_${t}`;
  25501. }
  25502. const rwe = te({
  25503. name: "HookNotification",
  25504. inheritAttrs: !1,
  25505. props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
  25506. setup(t, e) {
  25507. let {
  25508. attrs: n,
  25509. slots: r
  25510. } = e;
  25511. const i = /* @__PURE__ */ new Map(), a = L(() => t.notices), o = L(() => {
  25512. let c = t.transitionName;
  25513. if (!c && t.animation)
  25514. switch (typeof t.animation) {
  25515. case "string":
  25516. c = t.animation;
  25517. break;
  25518. case "function":
  25519. c = t.animation().name;
  25520. break;
  25521. case "object":
  25522. c = t.animation.name;
  25523. break;
  25524. default:
  25525. c = `${t.prefixCls}-fade`;
  25526. break;
  25527. }
  25528. return CI(c);
  25529. }), s = (c) => t.remove(c), l = U({});
  25530. se(a, () => {
  25531. const c = {};
  25532. Object.keys(l.value).forEach((f) => {
  25533. c[f] = [];
  25534. }), t.notices.forEach((f) => {
  25535. const {
  25536. placement: d = "topRight"
  25537. } = f.notice;
  25538. d && (c[d] = c[d] || [], c[d].push(f));
  25539. }), l.value = c;
  25540. });
  25541. const u = L(() => Object.keys(l.value));
  25542. return () => {
  25543. var c;
  25544. const {
  25545. prefixCls: f,
  25546. closeIcon: d = (c = r.closeIcon) === null || c === void 0 ? void 0 : c.call(r, {
  25547. prefixCls: f
  25548. })
  25549. } = t, h = u.value.map((p) => {
  25550. var v, g;
  25551. const m = l.value[p], y = (v = t.getClassName) === null || v === void 0 ? void 0 : v.call(t, p), b = (g = t.getStyles) === null || g === void 0 ? void 0 : g.call(t, p), _ = m.map((x, C) => {
  25552. let {
  25553. notice: T,
  25554. holderCallback: w
  25555. } = x;
  25556. const P = C === a.value.length - 1 ? T.updateMark : void 0, {
  25557. key: $,
  25558. userPassKey: A
  25559. } = T, {
  25560. content: D
  25561. } = T, E = I(I(I({
  25562. prefixCls: f,
  25563. closeIcon: typeof d == "function" ? d({
  25564. prefixCls: f
  25565. }) : d
  25566. }, T), T.props), {
  25567. key: $,
  25568. noticeKey: A || $,
  25569. updateMark: P,
  25570. onClose: (R) => {
  25571. var N;
  25572. s(R), (N = T.onClose) === null || N === void 0 || N.call(T);
  25573. },
  25574. onClick: T.onClick
  25575. });
  25576. return w ? M("div", {
  25577. key: $,
  25578. class: `${f}-hook-holder`,
  25579. ref: (R) => {
  25580. typeof $ > "u" || (R ? (i.set($, R), w(R, E)) : i.delete($));
  25581. }
  25582. }, null) : M(xx, j(j({}, E), {}, {
  25583. class: ye(E.class, t.hashId)
  25584. }), {
  25585. default: () => [typeof D == "function" ? D({
  25586. prefixCls: f
  25587. }) : D]
  25588. });
  25589. }), O = {
  25590. [f]: 1,
  25591. [`${f}-${p}`]: 1,
  25592. [n.class]: !!n.class,
  25593. [t.hashId]: !0,
  25594. [y]: !!y
  25595. };
  25596. function S() {
  25597. var x;
  25598. m.length > 0 || (Reflect.deleteProperty(l.value, p), (x = t.onAllRemoved) === null || x === void 0 || x.call(t));
  25599. }
  25600. return M("div", {
  25601. key: p,
  25602. class: O,
  25603. style: n.style || b || {
  25604. top: "65px",
  25605. left: "50%"
  25606. }
  25607. }, [M(eI, j(j({
  25608. tag: "div"
  25609. }, o.value), {}, {
  25610. onAfterLeave: S
  25611. }), {
  25612. default: () => [_]
  25613. })]);
  25614. });
  25615. return M(EZ, {
  25616. getContainer: t.getContainer
  25617. }, {
  25618. default: () => [h]
  25619. });
  25620. };
  25621. }
  25622. }), iwe = rwe;
  25623. var awe = function(t, e) {
  25624. var n = {};
  25625. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25626. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25627. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25628. return n;
  25629. };
  25630. const owe = () => document.body;
  25631. let Y5 = 0;
  25632. function swe() {
  25633. const t = {};
  25634. for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
  25635. n[r] = arguments[r];
  25636. return n.forEach((i) => {
  25637. i && Object.keys(i).forEach((a) => {
  25638. const o = i[a];
  25639. o !== void 0 && (t[a] = o);
  25640. });
  25641. }), t;
  25642. }
  25643. function IX() {
  25644. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  25645. const {
  25646. getContainer: e = owe,
  25647. motion: n,
  25648. prefixCls: r,
  25649. maxCount: i,
  25650. getClassName: a,
  25651. getStyles: o,
  25652. onAllRemoved: s
  25653. } = t, l = awe(t, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = ae([]), c = ae(), f = (m, y) => {
  25654. const b = m.key || X5(), _ = I(I({}, m), {
  25655. key: b
  25656. }), O = u.value.map((x) => x.notice.key).indexOf(b), S = u.value.concat();
  25657. O !== -1 ? S.splice(O, 1, {
  25658. notice: _,
  25659. holderCallback: y
  25660. }) : (i && u.value.length >= i && (_.key = S[0].notice.key, _.updateMark = X5(), _.userPassKey = b, S.shift()), S.push({
  25661. notice: _,
  25662. holderCallback: y
  25663. })), u.value = S;
  25664. }, d = (m) => {
  25665. u.value = u.value.filter((y) => {
  25666. let {
  25667. notice: {
  25668. key: b,
  25669. userPassKey: _
  25670. }
  25671. } = y;
  25672. return (_ || b) !== m;
  25673. });
  25674. }, h = () => {
  25675. u.value = [];
  25676. }, p = () => M(iwe, {
  25677. ref: c,
  25678. prefixCls: r,
  25679. maxCount: i,
  25680. notices: u.value,
  25681. remove: d,
  25682. getClassName: a,
  25683. getStyles: o,
  25684. animation: n,
  25685. hashId: t.hashId,
  25686. onAllRemoved: s,
  25687. getContainer: e
  25688. }, null), v = ae([]), g = {
  25689. open: (m) => {
  25690. const y = swe(l, m);
  25691. (y.key === null || y.key === void 0) && (y.key = `vc-notification-${Y5}`, Y5 += 1), v.value = [...v.value, {
  25692. type: "open",
  25693. config: y
  25694. }];
  25695. },
  25696. close: (m) => {
  25697. v.value = [...v.value, {
  25698. type: "close",
  25699. key: m
  25700. }];
  25701. },
  25702. destroy: () => {
  25703. v.value = [...v.value, {
  25704. type: "destroy"
  25705. }];
  25706. }
  25707. };
  25708. return se(v, () => {
  25709. v.value.length && (v.value.forEach((m) => {
  25710. switch (m.type) {
  25711. case "open":
  25712. f(m.config);
  25713. break;
  25714. case "close":
  25715. d(m.key);
  25716. break;
  25717. case "destroy":
  25718. h();
  25719. break;
  25720. }
  25721. }), v.value = []);
  25722. }), [g, p];
  25723. }
  25724. const lwe = (t) => {
  25725. const {
  25726. componentCls: e,
  25727. iconCls: n,
  25728. boxShadowSecondary: r,
  25729. colorBgElevated: i,
  25730. colorSuccess: a,
  25731. colorError: o,
  25732. colorWarning: s,
  25733. colorInfo: l,
  25734. fontSizeLG: u,
  25735. motionEaseInOutCirc: c,
  25736. motionDurationSlow: f,
  25737. marginXS: d,
  25738. paddingXS: h,
  25739. borderRadiusLG: p,
  25740. zIndexPopup: v,
  25741. // Custom token
  25742. messageNoticeContentPadding: g
  25743. } = t, m = new Ot("MessageMoveIn", {
  25744. "0%": {
  25745. padding: 0,
  25746. transform: "translateY(-100%)",
  25747. opacity: 0
  25748. },
  25749. "100%": {
  25750. padding: h,
  25751. transform: "translateY(0)",
  25752. opacity: 1
  25753. }
  25754. }), y = new Ot("MessageMoveOut", {
  25755. "0%": {
  25756. maxHeight: t.height,
  25757. padding: h,
  25758. opacity: 1
  25759. },
  25760. "100%": {
  25761. maxHeight: 0,
  25762. padding: 0,
  25763. opacity: 0
  25764. }
  25765. });
  25766. return [
  25767. // ============================ Holder ============================
  25768. {
  25769. [e]: I(I({}, nn(t)), {
  25770. position: "fixed",
  25771. top: d,
  25772. left: "50%",
  25773. transform: "translateX(-50%)",
  25774. width: "100%",
  25775. pointerEvents: "none",
  25776. zIndex: v,
  25777. [`${e}-move-up`]: {
  25778. animationFillMode: "forwards"
  25779. },
  25780. [`
  25781. ${e}-move-up-appear,
  25782. ${e}-move-up-enter
  25783. `]: {
  25784. animationName: m,
  25785. animationDuration: f,
  25786. animationPlayState: "paused",
  25787. animationTimingFunction: c
  25788. },
  25789. [`
  25790. ${e}-move-up-appear${e}-move-up-appear-active,
  25791. ${e}-move-up-enter${e}-move-up-enter-active
  25792. `]: {
  25793. animationPlayState: "running"
  25794. },
  25795. [`${e}-move-up-leave`]: {
  25796. animationName: y,
  25797. animationDuration: f,
  25798. animationPlayState: "paused",
  25799. animationTimingFunction: c
  25800. },
  25801. [`${e}-move-up-leave${e}-move-up-leave-active`]: {
  25802. animationPlayState: "running"
  25803. },
  25804. "&-rtl": {
  25805. direction: "rtl",
  25806. span: {
  25807. direction: "rtl"
  25808. }
  25809. }
  25810. })
  25811. },
  25812. // ============================ Notice ============================
  25813. {
  25814. [`${e}-notice`]: {
  25815. padding: h,
  25816. textAlign: "center",
  25817. [n]: {
  25818. verticalAlign: "text-bottom",
  25819. marginInlineEnd: d,
  25820. fontSize: u
  25821. },
  25822. [`${e}-notice-content`]: {
  25823. display: "inline-block",
  25824. padding: g,
  25825. background: i,
  25826. borderRadius: p,
  25827. boxShadow: r,
  25828. pointerEvents: "all"
  25829. },
  25830. [`${e}-success ${n}`]: {
  25831. color: a
  25832. },
  25833. [`${e}-error ${n}`]: {
  25834. color: o
  25835. },
  25836. [`${e}-warning ${n}`]: {
  25837. color: s
  25838. },
  25839. [`
  25840. ${e}-info ${n},
  25841. ${e}-loading ${n}`]: {
  25842. color: l
  25843. }
  25844. }
  25845. },
  25846. // ============================= Pure =============================
  25847. {
  25848. [`${e}-notice-pure-panel`]: {
  25849. padding: 0,
  25850. textAlign: "start"
  25851. }
  25852. }
  25853. ];
  25854. }, vD = Sn("Message", (t) => {
  25855. const e = Bt(t, {
  25856. messageNoticeContentPadding: `${(t.controlHeightLG - t.fontSize * t.lineHeight) / 2}px ${t.paddingSM}px`
  25857. });
  25858. return [lwe(e)];
  25859. }, (t) => ({
  25860. height: 150,
  25861. zIndexPopup: t.zIndexPopupBase + 10
  25862. })), uwe = {
  25863. info: M(Df, null, null),
  25864. success: M(Ou, null, null),
  25865. error: M(ka, null, null),
  25866. warning: M(Su, null, null),
  25867. loading: M(ns, null, null)
  25868. }, DX = te({
  25869. name: "PureContent",
  25870. inheritAttrs: !1,
  25871. props: ["prefixCls", "type", "icon"],
  25872. setup(t, e) {
  25873. let {
  25874. slots: n
  25875. } = e;
  25876. return () => {
  25877. var r;
  25878. return M("div", {
  25879. class: ye(`${t.prefixCls}-custom-content`, `${t.prefixCls}-${t.type}`)
  25880. }, [t.icon || uwe[t.type], M("span", null, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
  25881. };
  25882. }
  25883. });
  25884. te({
  25885. name: "PurePanel",
  25886. inheritAttrs: !1,
  25887. props: ["prefixCls", "class", "type", "icon", "content"],
  25888. setup(t, e) {
  25889. let {
  25890. slots: n,
  25891. attrs: r
  25892. } = e;
  25893. var i;
  25894. const {
  25895. getPrefixCls: a
  25896. } = kS(), o = L(() => t.prefixCls || a("message")), [, s] = vD(o);
  25897. return M(xx, j(j({}, r), {}, {
  25898. prefixCls: o.value,
  25899. class: ye(s.value, `${o.value}-notice-pure-panel`),
  25900. noticeKey: "pure",
  25901. duration: null
  25902. }), {
  25903. default: () => [M(DX, {
  25904. prefixCls: o.value,
  25905. type: t.type,
  25906. icon: t.icon
  25907. }, {
  25908. default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
  25909. })]
  25910. });
  25911. }
  25912. });
  25913. var cwe = function(t, e) {
  25914. var n = {};
  25915. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25916. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25917. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25918. return n;
  25919. };
  25920. const fwe = 8, dwe = 3, hwe = te({
  25921. name: "Holder",
  25922. inheritAttrs: !1,
  25923. props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved"],
  25924. setup(t, e) {
  25925. let {
  25926. expose: n
  25927. } = e;
  25928. var r, i;
  25929. const {
  25930. getPrefixCls: a,
  25931. getPopupContainer: o
  25932. } = It("message", t), s = L(() => a("message", t.prefixCls)), [, l] = vD(s), u = () => {
  25933. var v;
  25934. const g = (v = t.top) !== null && v !== void 0 ? v : fwe;
  25935. return {
  25936. left: "50%",
  25937. transform: "translateX(-50%)",
  25938. top: typeof g == "number" ? `${g}px` : g
  25939. };
  25940. }, c = () => ye(l.value, t.rtl ? `${s.value}-rtl` : ""), f = () => {
  25941. var v;
  25942. return pI({
  25943. prefixCls: s.value,
  25944. animation: (v = t.animation) !== null && v !== void 0 ? v : "move-up",
  25945. transitionName: t.transitionName
  25946. });
  25947. }, d = M("span", {
  25948. class: `${s.value}-close-x`
  25949. }, [M(ol, {
  25950. class: `${s.value}-close-icon`
  25951. }, null)]), [h, p] = IX({
  25952. //@ts-ignore
  25953. getStyles: u,
  25954. prefixCls: s.value,
  25955. getClassName: c,
  25956. motion: f,
  25957. closable: !1,
  25958. closeIcon: d,
  25959. duration: (r = t.duration) !== null && r !== void 0 ? r : dwe,
  25960. getContainer: (i = t.staticGetContainer) !== null && i !== void 0 ? i : o.value,
  25961. maxCount: t.maxCount,
  25962. onAllRemoved: t.onAllRemoved
  25963. });
  25964. return n(I(I({}, h), {
  25965. prefixCls: s,
  25966. hashId: l
  25967. })), p;
  25968. }
  25969. });
  25970. let q5 = 0;
  25971. function pwe(t) {
  25972. const e = ae(null), n = Symbol("messageHolderKey"), r = (l) => {
  25973. var u;
  25974. (u = e.value) === null || u === void 0 || u.close(l);
  25975. }, i = (l) => {
  25976. if (!e.value) {
  25977. const O = () => {
  25978. };
  25979. return O.then = () => {
  25980. }, O;
  25981. }
  25982. const {
  25983. open: u,
  25984. prefixCls: c,
  25985. hashId: f
  25986. } = e.value, d = `${c}-notice`, {
  25987. content: h,
  25988. icon: p,
  25989. type: v,
  25990. key: g,
  25991. class: m,
  25992. onClose: y
  25993. } = l, b = cwe(l, ["content", "icon", "type", "key", "class", "onClose"]);
  25994. let _ = g;
  25995. return _ == null && (q5 += 1, _ = `antd-message-${q5}`), hue((O) => (u(I(I({}, b), {
  25996. key: _,
  25997. content: () => M(DX, {
  25998. prefixCls: c,
  25999. type: v,
  26000. icon: typeof p == "function" ? p() : p
  26001. }, {
  26002. default: () => [typeof h == "function" ? h() : h]
  26003. }),
  26004. placement: "top",
  26005. // @ts-ignore
  26006. class: ye(v && `${d}-${v}`, f, m),
  26007. onClose: () => {
  26008. y == null || y(), O();
  26009. }
  26010. })), () => {
  26011. r(_);
  26012. }));
  26013. }, o = {
  26014. open: i,
  26015. destroy: (l) => {
  26016. var u;
  26017. l !== void 0 ? r(l) : (u = e.value) === null || u === void 0 || u.destroy();
  26018. }
  26019. };
  26020. return ["info", "success", "warning", "error", "loading"].forEach((l) => {
  26021. const u = (c, f, d) => {
  26022. let h;
  26023. c && typeof c == "object" && "content" in c ? h = c : h = {
  26024. content: c
  26025. };
  26026. let p, v;
  26027. typeof f == "function" ? v = f : (p = f, v = d);
  26028. const g = I(I({
  26029. onClose: v,
  26030. duration: p
  26031. }, h), {
  26032. type: l
  26033. });
  26034. return i(g);
  26035. };
  26036. o[l] = u;
  26037. }), [o, () => M(hwe, j(j({
  26038. key: n
  26039. }, t), {}, {
  26040. ref: e
  26041. }), null)];
  26042. }
  26043. function vwe(t) {
  26044. return pwe(t);
  26045. }
  26046. let RX = 3, kX, Ur, gwe = 1, LX = "", NX = "move-up", BX = !1, zX = () => document.body, VX, FX = !1;
  26047. function mwe() {
  26048. return gwe++;
  26049. }
  26050. function ywe(t) {
  26051. t.top !== void 0 && (kX = t.top, Ur = null), t.duration !== void 0 && (RX = t.duration), t.prefixCls !== void 0 && (LX = t.prefixCls), t.getContainer !== void 0 && (zX = t.getContainer, Ur = null), t.transitionName !== void 0 && (NX = t.transitionName, Ur = null, BX = !0), t.maxCount !== void 0 && (VX = t.maxCount, Ur = null), t.rtl !== void 0 && (FX = t.rtl);
  26052. }
  26053. function bwe(t, e) {
  26054. if (Ur) {
  26055. e(Ur);
  26056. return;
  26057. }
  26058. W1.newInstance({
  26059. appContext: t.appContext,
  26060. prefixCls: t.prefixCls || LX,
  26061. rootPrefixCls: t.rootPrefixCls,
  26062. transitionName: NX,
  26063. hasTransitionName: BX,
  26064. style: {
  26065. top: kX
  26066. },
  26067. getContainer: zX || t.getPopupContainer,
  26068. maxCount: VX,
  26069. name: "message",
  26070. useStyle: vD
  26071. }, (n) => {
  26072. if (Ur) {
  26073. e(Ur);
  26074. return;
  26075. }
  26076. Ur = n, e(n);
  26077. });
  26078. }
  26079. const WX = {
  26080. info: Df,
  26081. success: Ou,
  26082. error: ka,
  26083. warning: Su,
  26084. loading: ns
  26085. }, _we = Object.keys(WX);
  26086. function Owe(t) {
  26087. const e = t.duration !== void 0 ? t.duration : RX, n = t.key || mwe(), r = new Promise((a) => {
  26088. const o = () => (typeof t.onClose == "function" && t.onClose(), a(!0));
  26089. bwe(t, (s) => {
  26090. s.notice({
  26091. key: n,
  26092. duration: e,
  26093. style: t.style || {},
  26094. class: t.class,
  26095. content: (l) => {
  26096. let {
  26097. prefixCls: u
  26098. } = l;
  26099. const c = WX[t.type], f = c ? M(c, null, null) : "", d = ye(`${u}-custom-content`, {
  26100. [`${u}-${t.type}`]: t.type,
  26101. [`${u}-rtl`]: FX === !0
  26102. });
  26103. return M("div", {
  26104. class: d
  26105. }, [typeof t.icon == "function" ? t.icon() : t.icon || f, M("span", null, [typeof t.content == "function" ? t.content() : t.content])]);
  26106. },
  26107. onClose: o,
  26108. onClick: t.onClick
  26109. });
  26110. });
  26111. }), i = () => {
  26112. Ur && Ur.removeNotice(n);
  26113. };
  26114. return i.then = (a, o) => r.then(a, o), i.promise = r, i;
  26115. }
  26116. function Swe(t) {
  26117. return Object.prototype.toString.call(t) === "[object Object]" && !!t.content;
  26118. }
  26119. const Dh = {
  26120. open: Owe,
  26121. config: ywe,
  26122. destroy(t) {
  26123. if (Ur)
  26124. if (t) {
  26125. const {
  26126. removeNotice: e
  26127. } = Ur;
  26128. e(t);
  26129. } else {
  26130. const {
  26131. destroy: e
  26132. } = Ur;
  26133. e(), Ur = null;
  26134. }
  26135. }
  26136. };
  26137. function xwe(t, e) {
  26138. t[e] = (n, r, i) => Swe(n) ? t.open(I(I({}, n), {
  26139. type: e
  26140. })) : (typeof r == "function" && (i = r, r = void 0), t.open({
  26141. content: n,
  26142. duration: r,
  26143. type: e,
  26144. onClose: i
  26145. }));
  26146. }
  26147. _we.forEach((t) => xwe(Dh, t));
  26148. Dh.warn = Dh.warning;
  26149. Dh.useMessage = vwe;
  26150. const wwe = (t) => {
  26151. const {
  26152. componentCls: e,
  26153. width: n,
  26154. notificationMarginEdge: r
  26155. } = t, i = new Ot("antNotificationTopFadeIn", {
  26156. "0%": {
  26157. marginTop: "-100%",
  26158. opacity: 0
  26159. },
  26160. "100%": {
  26161. marginTop: 0,
  26162. opacity: 1
  26163. }
  26164. }), a = new Ot("antNotificationBottomFadeIn", {
  26165. "0%": {
  26166. marginBottom: "-100%",
  26167. opacity: 0
  26168. },
  26169. "100%": {
  26170. marginBottom: 0,
  26171. opacity: 1
  26172. }
  26173. }), o = new Ot("antNotificationLeftFadeIn", {
  26174. "0%": {
  26175. right: {
  26176. _skip_check_: !0,
  26177. value: n
  26178. },
  26179. opacity: 0
  26180. },
  26181. "100%": {
  26182. right: {
  26183. _skip_check_: !0,
  26184. value: 0
  26185. },
  26186. opacity: 1
  26187. }
  26188. });
  26189. return {
  26190. [`&${e}-top, &${e}-bottom`]: {
  26191. marginInline: 0
  26192. },
  26193. [`&${e}-top`]: {
  26194. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26195. animationName: i
  26196. }
  26197. },
  26198. [`&${e}-bottom`]: {
  26199. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26200. animationName: a
  26201. }
  26202. },
  26203. [`&${e}-topLeft, &${e}-bottomLeft`]: {
  26204. marginInlineEnd: 0,
  26205. marginInlineStart: r,
  26206. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26207. animationName: o
  26208. }
  26209. }
  26210. };
  26211. }, Cwe = (t) => {
  26212. const {
  26213. iconCls: e,
  26214. componentCls: n,
  26215. // .ant-notification
  26216. boxShadowSecondary: r,
  26217. fontSizeLG: i,
  26218. notificationMarginBottom: a,
  26219. borderRadiusLG: o,
  26220. colorSuccess: s,
  26221. colorInfo: l,
  26222. colorWarning: u,
  26223. colorError: c,
  26224. colorTextHeading: f,
  26225. notificationBg: d,
  26226. notificationPadding: h,
  26227. notificationMarginEdge: p,
  26228. motionDurationMid: v,
  26229. motionEaseInOut: g,
  26230. fontSize: m,
  26231. lineHeight: y,
  26232. width: b,
  26233. notificationIconSize: _
  26234. } = t, O = `${n}-notice`, S = new Ot("antNotificationFadeIn", {
  26235. "0%": {
  26236. left: {
  26237. _skip_check_: !0,
  26238. value: b
  26239. },
  26240. opacity: 0
  26241. },
  26242. "100%": {
  26243. left: {
  26244. _skip_check_: !0,
  26245. value: 0
  26246. },
  26247. opacity: 1
  26248. }
  26249. }), x = new Ot("antNotificationFadeOut", {
  26250. "0%": {
  26251. maxHeight: t.animationMaxHeight,
  26252. marginBottom: a,
  26253. opacity: 1
  26254. },
  26255. "100%": {
  26256. maxHeight: 0,
  26257. marginBottom: 0,
  26258. paddingTop: 0,
  26259. paddingBottom: 0,
  26260. opacity: 0
  26261. }
  26262. });
  26263. return [
  26264. // ============================ Holder ============================
  26265. {
  26266. [n]: I(I(I(I({}, nn(t)), {
  26267. position: "fixed",
  26268. zIndex: t.zIndexPopup,
  26269. marginInlineEnd: p,
  26270. [`${n}-hook-holder`]: {
  26271. position: "relative"
  26272. },
  26273. [`&${n}-top, &${n}-bottom`]: {
  26274. [`${n}-notice`]: {
  26275. marginInline: "auto auto"
  26276. }
  26277. },
  26278. [`&${n}-topLeft, &${n}-bottomLeft`]: {
  26279. [`${n}-notice`]: {
  26280. marginInlineEnd: "auto",
  26281. marginInlineStart: 0
  26282. }
  26283. },
  26284. // animation
  26285. [`${n}-fade-enter, ${n}-fade-appear`]: {
  26286. animationDuration: t.motionDurationMid,
  26287. animationTimingFunction: g,
  26288. animationFillMode: "both",
  26289. opacity: 0,
  26290. animationPlayState: "paused"
  26291. },
  26292. [`${n}-fade-leave`]: {
  26293. animationTimingFunction: g,
  26294. animationFillMode: "both",
  26295. animationDuration: v,
  26296. animationPlayState: "paused"
  26297. },
  26298. [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
  26299. animationName: S,
  26300. animationPlayState: "running"
  26301. },
  26302. [`${n}-fade-leave${n}-fade-leave-active`]: {
  26303. animationName: x,
  26304. animationPlayState: "running"
  26305. }
  26306. }), wwe(t)), {
  26307. // RTL
  26308. "&-rtl": {
  26309. direction: "rtl",
  26310. [`${n}-notice-btn`]: {
  26311. float: "left"
  26312. }
  26313. }
  26314. })
  26315. },
  26316. // ============================ Notice ============================
  26317. {
  26318. [O]: {
  26319. position: "relative",
  26320. width: b,
  26321. maxWidth: `calc(100vw - ${p * 2}px)`,
  26322. marginBottom: a,
  26323. marginInlineStart: "auto",
  26324. padding: h,
  26325. overflow: "hidden",
  26326. lineHeight: y,
  26327. wordWrap: "break-word",
  26328. background: d,
  26329. borderRadius: o,
  26330. boxShadow: r,
  26331. [`${n}-close-icon`]: {
  26332. fontSize: m,
  26333. cursor: "pointer"
  26334. },
  26335. [`${O}-message`]: {
  26336. marginBottom: t.marginXS,
  26337. color: f,
  26338. fontSize: i,
  26339. lineHeight: t.lineHeightLG
  26340. },
  26341. [`${O}-description`]: {
  26342. fontSize: m
  26343. },
  26344. [`&${O}-closable ${O}-message`]: {
  26345. paddingInlineEnd: t.paddingLG
  26346. },
  26347. [`${O}-with-icon ${O}-message`]: {
  26348. marginBottom: t.marginXS,
  26349. marginInlineStart: t.marginSM + _,
  26350. fontSize: i
  26351. },
  26352. [`${O}-with-icon ${O}-description`]: {
  26353. marginInlineStart: t.marginSM + _,
  26354. fontSize: m
  26355. },
  26356. // Icon & color style in different selector level
  26357. // https://github.com/ant-design/ant-design/issues/16503
  26358. // https://github.com/ant-design/ant-design/issues/15512
  26359. [`${O}-icon`]: {
  26360. position: "absolute",
  26361. fontSize: _,
  26362. lineHeight: 0,
  26363. // icon-font
  26364. [`&-success${e}`]: {
  26365. color: s
  26366. },
  26367. [`&-info${e}`]: {
  26368. color: l
  26369. },
  26370. [`&-warning${e}`]: {
  26371. color: u
  26372. },
  26373. [`&-error${e}`]: {
  26374. color: c
  26375. }
  26376. },
  26377. [`${O}-close`]: {
  26378. position: "absolute",
  26379. top: t.notificationPaddingVertical,
  26380. insetInlineEnd: t.notificationPaddingHorizontal,
  26381. color: t.colorIcon,
  26382. outline: "none",
  26383. width: t.notificationCloseButtonSize,
  26384. height: t.notificationCloseButtonSize,
  26385. borderRadius: t.borderRadiusSM,
  26386. transition: `background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,
  26387. display: "flex",
  26388. alignItems: "center",
  26389. justifyContent: "center",
  26390. "&:hover": {
  26391. color: t.colorIconHover,
  26392. backgroundColor: t.wireframe ? "transparent" : t.colorFillContent
  26393. }
  26394. },
  26395. [`${O}-btn`]: {
  26396. float: "right",
  26397. marginTop: t.marginSM
  26398. }
  26399. }
  26400. },
  26401. // ============================= Pure =============================
  26402. {
  26403. [`${O}-pure-panel`]: {
  26404. margin: 0
  26405. }
  26406. }
  26407. ];
  26408. }, gD = Sn("Notification", (t) => {
  26409. const e = t.paddingMD, n = t.paddingLG, r = Bt(t, {
  26410. // default.less variables
  26411. notificationBg: t.colorBgElevated,
  26412. notificationPaddingVertical: e,
  26413. notificationPaddingHorizontal: n,
  26414. // index.less variables
  26415. notificationPadding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`,
  26416. notificationMarginBottom: t.margin,
  26417. notificationMarginEdge: t.marginLG,
  26418. animationMaxHeight: 150,
  26419. notificationIconSize: t.fontSizeLG * t.lineHeightLG,
  26420. notificationCloseButtonSize: t.controlHeightLG * 0.55
  26421. });
  26422. return [Cwe(r)];
  26423. }, (t) => ({
  26424. zIndexPopup: t.zIndexPopupBase + 50,
  26425. width: 384
  26426. }));
  26427. function QX(t, e) {
  26428. return e || M("span", {
  26429. class: `${t}-close-x`
  26430. }, [M(ol, {
  26431. class: `${t}-close-icon`
  26432. }, null)]);
  26433. }
  26434. M(Df, null, null), M(Ou, null, null), M(ka, null, null), M(Su, null, null), M(ns, null, null);
  26435. const Twe = {
  26436. success: Ou,
  26437. info: Df,
  26438. error: ka,
  26439. warning: Su
  26440. };
  26441. function HX(t) {
  26442. let {
  26443. prefixCls: e,
  26444. icon: n,
  26445. type: r,
  26446. message: i,
  26447. description: a,
  26448. btn: o
  26449. } = t, s = null;
  26450. if (n)
  26451. s = M("span", {
  26452. class: `${e}-icon`
  26453. }, [Nd(n)]);
  26454. else if (r) {
  26455. const l = Twe[r];
  26456. s = M(l, {
  26457. class: `${e}-icon ${e}-icon-${r}`
  26458. }, null);
  26459. }
  26460. return M("div", {
  26461. class: ye({
  26462. [`${e}-with-icon`]: s
  26463. }),
  26464. role: "alert"
  26465. }, [s, M("div", {
  26466. class: `${e}-message`
  26467. }, [i]), M("div", {
  26468. class: `${e}-description`
  26469. }, [a]), o && M("div", {
  26470. class: `${e}-btn`
  26471. }, [o])]);
  26472. }
  26473. te({
  26474. name: "PurePanel",
  26475. inheritAttrs: !1,
  26476. props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  26477. setup(t) {
  26478. const {
  26479. getPrefixCls: e
  26480. } = It("notification", t), n = L(() => t.prefixCls || e("notification")), r = L(() => `${n.value}-notice`), [, i] = gD(n);
  26481. return () => M(xx, j(j({}, t), {}, {
  26482. prefixCls: n.value,
  26483. class: ye(i.value, `${r.value}-pure-panel`),
  26484. noticeKey: "pure",
  26485. duration: null,
  26486. closable: t.closable,
  26487. closeIcon: QX(n.value, t.closeIcon)
  26488. }), {
  26489. default: () => [M(HX, {
  26490. prefixCls: r.value,
  26491. icon: t.icon,
  26492. type: t.type,
  26493. message: t.message,
  26494. description: t.description,
  26495. btn: t.btn
  26496. }, null)]
  26497. });
  26498. }
  26499. });
  26500. function GX(t, e, n) {
  26501. let r;
  26502. switch (e = typeof e == "number" ? `${e}px` : e, n = typeof n == "number" ? `${n}px` : n, t) {
  26503. case "top":
  26504. r = {
  26505. left: "50%",
  26506. transform: "translateX(-50%)",
  26507. right: "auto",
  26508. top: e,
  26509. bottom: "auto"
  26510. };
  26511. break;
  26512. case "topLeft":
  26513. r = {
  26514. left: 0,
  26515. top: e,
  26516. bottom: "auto"
  26517. };
  26518. break;
  26519. case "topRight":
  26520. r = {
  26521. right: 0,
  26522. top: e,
  26523. bottom: "auto"
  26524. };
  26525. break;
  26526. case "bottom":
  26527. r = {
  26528. left: "50%",
  26529. transform: "translateX(-50%)",
  26530. right: "auto",
  26531. top: "auto",
  26532. bottom: n
  26533. };
  26534. break;
  26535. case "bottomLeft":
  26536. r = {
  26537. left: 0,
  26538. top: "auto",
  26539. bottom: n
  26540. };
  26541. break;
  26542. default:
  26543. r = {
  26544. right: 0,
  26545. top: "auto",
  26546. bottom: n
  26547. };
  26548. break;
  26549. }
  26550. return r;
  26551. }
  26552. function Pwe(t) {
  26553. return {
  26554. name: `${t}-fade`
  26555. };
  26556. }
  26557. var $we = function(t, e) {
  26558. var n = {};
  26559. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  26560. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  26561. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  26562. return n;
  26563. };
  26564. const K5 = 24, Awe = 4.5, Ewe = te({
  26565. name: "Holder",
  26566. inheritAttrs: !1,
  26567. props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  26568. setup(t, e) {
  26569. let {
  26570. expose: n
  26571. } = e;
  26572. const {
  26573. getPrefixCls: r,
  26574. getPopupContainer: i
  26575. } = It("notification", t), a = L(() => t.prefixCls || r("notification")), o = (d) => {
  26576. var h, p;
  26577. return GX(d, (h = t.top) !== null && h !== void 0 ? h : K5, (p = t.bottom) !== null && p !== void 0 ? p : K5);
  26578. }, [, s] = gD(a), l = () => ye(s.value, {
  26579. [`${a.value}-rtl`]: t.rtl
  26580. }), u = () => Pwe(a.value), [c, f] = IX({
  26581. prefixCls: a.value,
  26582. getStyles: o,
  26583. getClassName: l,
  26584. motion: u,
  26585. closable: !0,
  26586. closeIcon: QX(a.value),
  26587. duration: Awe,
  26588. getContainer: () => {
  26589. var d, h;
  26590. 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;
  26591. },
  26592. maxCount: t.maxCount,
  26593. hashId: s.value,
  26594. onAllRemoved: t.onAllRemoved
  26595. });
  26596. return n(I(I({}, c), {
  26597. prefixCls: a.value,
  26598. hashId: s
  26599. })), f;
  26600. }
  26601. });
  26602. function Mwe(t) {
  26603. const e = ae(null), n = Symbol("notificationHolderKey"), r = (s) => {
  26604. if (!e.value)
  26605. return;
  26606. const {
  26607. open: l,
  26608. prefixCls: u,
  26609. hashId: c
  26610. } = e.value, f = `${u}-notice`, {
  26611. message: d,
  26612. description: h,
  26613. icon: p,
  26614. type: v,
  26615. btn: g,
  26616. class: m
  26617. } = s, y = $we(s, ["message", "description", "icon", "type", "btn", "class"]);
  26618. return l(I(I({
  26619. placement: "topRight"
  26620. }, y), {
  26621. content: () => M(HX, {
  26622. prefixCls: f,
  26623. icon: typeof p == "function" ? p() : p,
  26624. type: v,
  26625. message: typeof d == "function" ? d() : d,
  26626. description: typeof h == "function" ? h() : h,
  26627. btn: typeof g == "function" ? g() : g
  26628. }, null),
  26629. // @ts-ignore
  26630. class: ye(v && `${f}-${v}`, c, m)
  26631. }));
  26632. }, a = {
  26633. open: r,
  26634. destroy: (s) => {
  26635. var l, u;
  26636. s !== void 0 ? (l = e.value) === null || l === void 0 || l.close(s) : (u = e.value) === null || u === void 0 || u.destroy();
  26637. }
  26638. };
  26639. return ["success", "info", "warning", "error"].forEach((s) => {
  26640. a[s] = (l) => r(I(I({}, l), {
  26641. type: s
  26642. }));
  26643. }), [a, () => M(Ewe, j(j({
  26644. key: n
  26645. }, t), {}, {
  26646. ref: e
  26647. }), null)];
  26648. }
  26649. function Iwe(t) {
  26650. return Mwe(t);
  26651. }
  26652. const _c = {};
  26653. let jX = 4.5, ZX = "24px", UX = "24px", U2 = "", XX = "topRight", YX = () => document.body, qX = null, X2 = !1, KX;
  26654. function Dwe(t) {
  26655. const {
  26656. duration: e,
  26657. placement: n,
  26658. bottom: r,
  26659. top: i,
  26660. getContainer: a,
  26661. closeIcon: o,
  26662. prefixCls: s
  26663. } = t;
  26664. s !== void 0 && (U2 = s), e !== void 0 && (jX = e), n !== void 0 && (XX = n), r !== void 0 && (UX = typeof r == "number" ? `${r}px` : r), i !== void 0 && (ZX = typeof i == "number" ? `${i}px` : i), a !== void 0 && (YX = a), o !== void 0 && (qX = o), t.rtl !== void 0 && (X2 = t.rtl), t.maxCount !== void 0 && (KX = t.maxCount);
  26665. }
  26666. function Rwe(t, e) {
  26667. let {
  26668. prefixCls: n,
  26669. placement: r = XX,
  26670. getContainer: i = YX,
  26671. top: a,
  26672. bottom: o,
  26673. closeIcon: s = qX,
  26674. appContext: l
  26675. } = t;
  26676. const {
  26677. getPrefixCls: u
  26678. } = jwe(), c = u("notification", n || U2), f = `${c}-${r}-${X2}`, d = _c[f];
  26679. if (d) {
  26680. Promise.resolve(d).then((p) => {
  26681. e(p);
  26682. });
  26683. return;
  26684. }
  26685. const h = ye(`${c}-${r}`, {
  26686. [`${c}-rtl`]: X2 === !0
  26687. });
  26688. W1.newInstance({
  26689. name: "notification",
  26690. prefixCls: n || U2,
  26691. useStyle: gD,
  26692. class: h,
  26693. style: GX(r, a ?? ZX, o ?? UX),
  26694. appContext: l,
  26695. getContainer: i,
  26696. closeIcon: (p) => {
  26697. let {
  26698. prefixCls: v
  26699. } = p;
  26700. return M("span", {
  26701. class: `${v}-close-x`
  26702. }, [Nd(s, {}, M(ol, {
  26703. class: `${v}-close-icon`
  26704. }, null))]);
  26705. },
  26706. maxCount: KX,
  26707. hasTransitionName: !0
  26708. }, (p) => {
  26709. _c[f] = p, e(p);
  26710. });
  26711. }
  26712. const kwe = {
  26713. success: eD,
  26714. info: hx,
  26715. error: nD,
  26716. warning: tD
  26717. };
  26718. function Lwe(t) {
  26719. const {
  26720. icon: e,
  26721. type: n,
  26722. description: r,
  26723. message: i,
  26724. btn: a
  26725. } = t, o = t.duration === void 0 ? jX : t.duration;
  26726. Rwe(t, (s) => {
  26727. s.notice({
  26728. content: (l) => {
  26729. let {
  26730. prefixCls: u
  26731. } = l;
  26732. const c = `${u}-notice`;
  26733. let f = null;
  26734. if (e)
  26735. f = () => M("span", {
  26736. class: `${c}-icon`
  26737. }, [Nd(e)]);
  26738. else if (n) {
  26739. const d = kwe[n];
  26740. f = () => M(d, {
  26741. class: `${c}-icon ${c}-icon-${n}`
  26742. }, null);
  26743. }
  26744. return M("div", {
  26745. class: f ? `${c}-with-icon` : ""
  26746. }, [f && f(), M("div", {
  26747. class: `${c}-message`
  26748. }, [!r && f ? M("span", {
  26749. class: `${c}-message-single-line-auto-margin`
  26750. }, null) : null, Nd(i)]), M("div", {
  26751. class: `${c}-description`
  26752. }, [Nd(r)]), a ? M("span", {
  26753. class: `${c}-btn`
  26754. }, [Nd(a)]) : null]);
  26755. },
  26756. duration: o,
  26757. closable: !0,
  26758. onClose: t.onClose,
  26759. onClick: t.onClick,
  26760. key: t.key,
  26761. style: t.style || {},
  26762. class: t.class
  26763. });
  26764. });
  26765. }
  26766. const Rh = {
  26767. open: Lwe,
  26768. close(t) {
  26769. Object.keys(_c).forEach((e) => Promise.resolve(_c[e]).then((n) => {
  26770. n.removeNotice(t);
  26771. }));
  26772. },
  26773. config: Dwe,
  26774. destroy() {
  26775. Object.keys(_c).forEach((t) => {
  26776. Promise.resolve(_c[t]).then((e) => {
  26777. e.destroy();
  26778. }), delete _c[t];
  26779. });
  26780. }
  26781. }, Nwe = ["success", "info", "warning", "error"];
  26782. Nwe.forEach((t) => {
  26783. Rh[t] = (e) => Rh.open(I(I({}, e), {
  26784. type: t
  26785. }));
  26786. });
  26787. Rh.warn = Rh.warning;
  26788. Rh.useNotification = Iwe;
  26789. const Bwe = `-ant-${Date.now()}-${Math.random()}`;
  26790. function zwe(t, e) {
  26791. const n = {}, r = (o, s) => {
  26792. let l = o.clone();
  26793. return l = (s == null ? void 0 : s(l)) || l, l.toRgbString();
  26794. }, i = (o, s) => {
  26795. const l = new en(o), u = df(l.toRgbString());
  26796. 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];
  26797. };
  26798. if (e.primaryColor) {
  26799. i(e.primaryColor, "primary");
  26800. const o = new en(e.primaryColor), s = df(o.toRgbString());
  26801. s.forEach((u, c) => {
  26802. n[`primary-${c + 1}`] = u;
  26803. }), 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));
  26804. const l = new en(s[0]);
  26805. 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));
  26806. }
  26807. 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"), `
  26808. :root {
  26809. ${Object.keys(n).map((o) => `--${t}-${o}: ${n[o]};`).join(`
  26810. `)}
  26811. }
  26812. `.trim();
  26813. }
  26814. function Vwe(t, e) {
  26815. const n = zwe(t, e);
  26816. Ta() ? em(n, `${Bwe}-dynamic-theme`) : Yr(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
  26817. }
  26818. const Fwe = (t) => {
  26819. const [e, n] = cp();
  26820. return h2(L(() => ({
  26821. theme: e.value,
  26822. token: n.value,
  26823. hashId: "",
  26824. path: ["ant-design-icons", t.value]
  26825. })), () => [{
  26826. [`.${t.value}`]: I(I({}, up()), {
  26827. [`.${t.value} .${t.value}-icon`]: {
  26828. display: "block"
  26829. }
  26830. })
  26831. }]);
  26832. };
  26833. function Wwe(t, e) {
  26834. const n = L(() => (t == null ? void 0 : t.value) || {}), r = L(() => n.value.inherit === !1 || !(e != null && e.value) ? Fj : e.value);
  26835. return L(() => {
  26836. if (!(t != null && t.value))
  26837. return e == null ? void 0 : e.value;
  26838. const a = I({}, r.value.components);
  26839. return Object.keys(t.value.components || {}).forEach((o) => {
  26840. a[o] = I(I({}, a[o]), t.value.components[o]);
  26841. }), I(I(I({}, r.value), n.value), {
  26842. token: I(I({}, r.value.token), n.value.token),
  26843. components: a
  26844. });
  26845. });
  26846. }
  26847. var Qwe = function(t, e) {
  26848. var n = {};
  26849. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  26850. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  26851. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  26852. return n;
  26853. };
  26854. const Hwe = "ant";
  26855. function Yd() {
  26856. return hr.prefixCls || Hwe;
  26857. }
  26858. function JX() {
  26859. return hr.iconPrefixCls || aI;
  26860. }
  26861. const mD = tn({}), hr = tn({});
  26862. ht(() => {
  26863. I(hr, mD), hr.prefixCls = Yd(), hr.iconPrefixCls = JX(), hr.getPrefixCls = (t, e) => e || (t ? `${hr.prefixCls}-${t}` : hr.prefixCls), hr.getRootPrefixCls = () => hr.prefixCls ? hr.prefixCls : Yd();
  26864. });
  26865. let $C;
  26866. const Gwe = (t) => {
  26867. $C && $C(), $C = ht(() => {
  26868. I(mD, tn(t)), I(hr, tn(t));
  26869. }), t.theme && Vwe(Yd(), t.theme);
  26870. }, jwe = () => ({
  26871. getPrefixCls: (t, e) => e || (t ? `${Yd()}-${t}` : Yd()),
  26872. getIconPrefixCls: JX,
  26873. getRootPrefixCls: () => hr.prefixCls ? hr.prefixCls : Yd()
  26874. }), qd = te({
  26875. compatConfig: {
  26876. MODE: 3
  26877. },
  26878. name: "AConfigProvider",
  26879. inheritAttrs: !1,
  26880. props: zue(),
  26881. setup(t, e) {
  26882. let {
  26883. slots: n
  26884. } = e;
  26885. const r = kS(), i = (E, R) => {
  26886. const {
  26887. prefixCls: N = "ant"
  26888. } = t;
  26889. if (R) return R;
  26890. const V = N || r.getPrefixCls("");
  26891. return E ? `${V}-${E}` : V;
  26892. }, a = L(() => t.iconPrefixCls || r.iconPrefixCls.value || aI), o = L(() => a.value !== r.iconPrefixCls.value), s = L(() => {
  26893. var E;
  26894. return t.csp || ((E = r.csp) === null || E === void 0 ? void 0 : E.value);
  26895. }), l = Fwe(a), u = Wwe(L(() => t.theme), L(() => {
  26896. var E;
  26897. return (E = r.theme) === null || E === void 0 ? void 0 : E.value;
  26898. })), c = (E) => (t.renderEmpty || n.renderEmpty || r.renderEmpty || Mfe)(E), f = L(() => {
  26899. var E, R;
  26900. return (E = t.autoInsertSpaceInButton) !== null && E !== void 0 ? E : (R = r.autoInsertSpaceInButton) === null || R === void 0 ? void 0 : R.value;
  26901. }), d = L(() => {
  26902. var E;
  26903. return t.locale || ((E = r.locale) === null || E === void 0 ? void 0 : E.value);
  26904. });
  26905. se(d, () => {
  26906. mD.locale = d.value;
  26907. }, {
  26908. immediate: !0
  26909. });
  26910. const h = L(() => {
  26911. var E;
  26912. return t.direction || ((E = r.direction) === null || E === void 0 ? void 0 : E.value);
  26913. }), p = L(() => {
  26914. var E, R;
  26915. return (E = t.space) !== null && E !== void 0 ? E : (R = r.space) === null || R === void 0 ? void 0 : R.value;
  26916. }), v = L(() => {
  26917. var E, R;
  26918. return (E = t.virtual) !== null && E !== void 0 ? E : (R = r.virtual) === null || R === void 0 ? void 0 : R.value;
  26919. }), g = L(() => {
  26920. var E, R;
  26921. return (E = t.dropdownMatchSelectWidth) !== null && E !== void 0 ? E : (R = r.dropdownMatchSelectWidth) === null || R === void 0 ? void 0 : R.value;
  26922. }), m = L(() => {
  26923. var E;
  26924. return t.getTargetContainer !== void 0 ? t.getTargetContainer : (E = r.getTargetContainer) === null || E === void 0 ? void 0 : E.value;
  26925. }), y = L(() => {
  26926. var E;
  26927. return t.getPopupContainer !== void 0 ? t.getPopupContainer : (E = r.getPopupContainer) === null || E === void 0 ? void 0 : E.value;
  26928. }), b = L(() => {
  26929. var E;
  26930. return t.pageHeader !== void 0 ? t.pageHeader : (E = r.pageHeader) === null || E === void 0 ? void 0 : E.value;
  26931. }), _ = L(() => {
  26932. var E;
  26933. return t.input !== void 0 ? t.input : (E = r.input) === null || E === void 0 ? void 0 : E.value;
  26934. }), O = L(() => {
  26935. var E;
  26936. return t.pagination !== void 0 ? t.pagination : (E = r.pagination) === null || E === void 0 ? void 0 : E.value;
  26937. }), S = L(() => {
  26938. var E;
  26939. return t.form !== void 0 ? t.form : (E = r.form) === null || E === void 0 ? void 0 : E.value;
  26940. }), x = L(() => {
  26941. var E;
  26942. return t.select !== void 0 ? t.select : (E = r.select) === null || E === void 0 ? void 0 : E.value;
  26943. }), C = L(() => t.componentSize), T = L(() => t.componentDisabled), w = L(() => {
  26944. var E, R;
  26945. return (E = t.wave) !== null && E !== void 0 ? E : (R = r.wave) === null || R === void 0 ? void 0 : R.value;
  26946. }), P = {
  26947. csp: s,
  26948. autoInsertSpaceInButton: f,
  26949. locale: d,
  26950. direction: h,
  26951. space: p,
  26952. virtual: v,
  26953. dropdownMatchSelectWidth: g,
  26954. getPrefixCls: i,
  26955. iconPrefixCls: a,
  26956. theme: L(() => {
  26957. var E, R;
  26958. return (E = u.value) !== null && E !== void 0 ? E : (R = r.theme) === null || R === void 0 ? void 0 : R.value;
  26959. }),
  26960. renderEmpty: c,
  26961. getTargetContainer: m,
  26962. getPopupContainer: y,
  26963. pageHeader: b,
  26964. input: _,
  26965. pagination: O,
  26966. form: S,
  26967. select: x,
  26968. componentSize: C,
  26969. componentDisabled: T,
  26970. transformCellText: L(() => t.transformCellText),
  26971. wave: w
  26972. }, $ = L(() => {
  26973. const E = u.value || {}, {
  26974. algorithm: R,
  26975. token: N
  26976. } = E, V = Qwe(E, ["algorithm", "token"]), B = R && (!Array.isArray(R) || R.length > 0) ? wj(R) : void 0;
  26977. return I(I({}, V), {
  26978. theme: B,
  26979. token: I(I({}, FS), N)
  26980. });
  26981. }), A = L(() => {
  26982. var E, R;
  26983. let N = {};
  26984. return d.value && (N = ((E = d.value.Form) === null || E === void 0 ? void 0 : E.defaultValidateMessages) || ((R = Vs.Form) === null || R === void 0 ? void 0 : R.defaultValidateMessages) || {}), t.form && t.form.validateMessages && (N = I(I({}, N), t.form.validateMessages)), N;
  26985. });
  26986. Vue(P), Nue({
  26987. validateMessages: A
  26988. }), Xj(C), fj(T);
  26989. const D = (E) => {
  26990. var R, N;
  26991. let V = o.value ? l((R = n.default) === null || R === void 0 ? void 0 : R.call(n)) : (N = n.default) === null || N === void 0 ? void 0 : N.call(n);
  26992. if (t.theme) {
  26993. const B = /* @__PURE__ */ function() {
  26994. return V;
  26995. }();
  26996. V = M(Tfe, {
  26997. value: $.value
  26998. }, {
  26999. default: () => [B]
  27000. });
  27001. }
  27002. return M(Jxe, {
  27003. locale: d.value || E,
  27004. ANT_MARK__: Z2
  27005. }, {
  27006. default: () => [V]
  27007. });
  27008. };
  27009. return ht(() => {
  27010. h.value && (Dh.config({
  27011. rtl: h.value === "rtl"
  27012. }), Rh.config({
  27013. rtl: h.value === "rtl"
  27014. }));
  27015. }), () => M(hj, {
  27016. children: (E, R, N) => D(N)
  27017. }, null);
  27018. }
  27019. });
  27020. qd.config = Gwe;
  27021. qd.install = function(t) {
  27022. t.component(qd.name, qd);
  27023. };
  27024. const Zwe = (t) => {
  27025. const {
  27026. componentCls: e,
  27027. sizePaddingEdgeHorizontal: n,
  27028. colorSplit: r,
  27029. lineWidth: i
  27030. } = t;
  27031. return {
  27032. [e]: I(I({}, nn(t)), {
  27033. borderBlockStart: `${i}px solid ${r}`,
  27034. // vertical
  27035. "&-vertical": {
  27036. position: "relative",
  27037. top: "-0.06em",
  27038. display: "inline-block",
  27039. height: "0.9em",
  27040. margin: `0 ${t.dividerVerticalGutterMargin}px`,
  27041. verticalAlign: "middle",
  27042. borderTop: 0,
  27043. borderInlineStart: `${i}px solid ${r}`
  27044. },
  27045. "&-horizontal": {
  27046. display: "flex",
  27047. clear: "both",
  27048. width: "100%",
  27049. minWidth: "100%",
  27050. margin: `${t.dividerHorizontalGutterMargin}px 0`
  27051. },
  27052. [`&-horizontal${e}-with-text`]: {
  27053. display: "flex",
  27054. alignItems: "center",
  27055. margin: `${t.dividerHorizontalWithTextGutterMargin}px 0`,
  27056. color: t.colorTextHeading,
  27057. fontWeight: 500,
  27058. fontSize: t.fontSizeLG,
  27059. whiteSpace: "nowrap",
  27060. textAlign: "center",
  27061. borderBlockStart: `0 ${r}`,
  27062. "&::before, &::after": {
  27063. position: "relative",
  27064. width: "50%",
  27065. borderBlockStart: `${i}px solid transparent`,
  27066. // Chrome not accept `inherit` in `border-top`
  27067. borderBlockStartColor: "inherit",
  27068. borderBlockEnd: 0,
  27069. transform: "translateY(50%)",
  27070. content: "''"
  27071. }
  27072. },
  27073. [`&-horizontal${e}-with-text-left`]: {
  27074. "&::before": {
  27075. width: "5%"
  27076. },
  27077. "&::after": {
  27078. width: "95%"
  27079. }
  27080. },
  27081. [`&-horizontal${e}-with-text-right`]: {
  27082. "&::before": {
  27083. width: "95%"
  27084. },
  27085. "&::after": {
  27086. width: "5%"
  27087. }
  27088. },
  27089. [`${e}-inner-text`]: {
  27090. display: "inline-block",
  27091. padding: "0 1em"
  27092. },
  27093. "&-dashed": {
  27094. background: "none",
  27095. borderColor: r,
  27096. borderStyle: "dashed",
  27097. borderWidth: `${i}px 0 0`
  27098. },
  27099. [`&-horizontal${e}-with-text${e}-dashed`]: {
  27100. "&::before, &::after": {
  27101. borderStyle: "dashed none none"
  27102. }
  27103. },
  27104. [`&-vertical${e}-dashed`]: {
  27105. borderInlineStartWidth: i,
  27106. borderInlineEnd: 0,
  27107. borderBlockStart: 0,
  27108. borderBlockEnd: 0
  27109. },
  27110. [`&-plain${e}-with-text`]: {
  27111. color: t.colorText,
  27112. fontWeight: "normal",
  27113. fontSize: t.fontSize
  27114. },
  27115. [`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]: {
  27116. "&::before": {
  27117. width: 0
  27118. },
  27119. "&::after": {
  27120. width: "100%"
  27121. },
  27122. [`${e}-inner-text`]: {
  27123. paddingInlineStart: n
  27124. }
  27125. },
  27126. [`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]: {
  27127. "&::before": {
  27128. width: "100%"
  27129. },
  27130. "&::after": {
  27131. width: 0
  27132. },
  27133. [`${e}-inner-text`]: {
  27134. paddingInlineEnd: n
  27135. }
  27136. }
  27137. })
  27138. };
  27139. }, Uwe = Sn("Divider", (t) => {
  27140. const e = Bt(t, {
  27141. dividerVerticalGutterMargin: t.marginXS,
  27142. dividerHorizontalWithTextGutterMargin: t.margin,
  27143. dividerHorizontalGutterMargin: t.marginLG
  27144. });
  27145. return [Zwe(e)];
  27146. }, {
  27147. sizePaddingEdgeHorizontal: 0
  27148. }), Xwe = () => ({
  27149. prefixCls: String,
  27150. type: {
  27151. type: String,
  27152. default: "horizontal"
  27153. },
  27154. dashed: {
  27155. type: Boolean,
  27156. default: !1
  27157. },
  27158. orientation: {
  27159. type: String,
  27160. default: "center"
  27161. },
  27162. plain: {
  27163. type: Boolean,
  27164. default: !1
  27165. },
  27166. orientationMargin: [String, Number]
  27167. }), Ywe = te({
  27168. name: "ADivider",
  27169. inheritAttrs: !1,
  27170. compatConfig: {
  27171. MODE: 3
  27172. },
  27173. props: Xwe(),
  27174. setup(t, e) {
  27175. let {
  27176. slots: n,
  27177. attrs: r
  27178. } = e;
  27179. const {
  27180. prefixCls: i,
  27181. direction: a
  27182. } = It("divider", t), [o, s] = Uwe(i), l = L(() => t.orientation === "left" && t.orientationMargin != null), u = L(() => t.orientation === "right" && t.orientationMargin != null), c = L(() => {
  27183. const {
  27184. type: h,
  27185. dashed: p,
  27186. plain: v
  27187. } = t, g = i.value;
  27188. return {
  27189. [g]: !0,
  27190. [s.value]: !!s.value,
  27191. [`${g}-${h}`]: !0,
  27192. [`${g}-dashed`]: !!p,
  27193. [`${g}-plain`]: !!v,
  27194. [`${g}-rtl`]: a.value === "rtl",
  27195. [`${g}-no-default-orientation-margin-left`]: l.value,
  27196. [`${g}-no-default-orientation-margin-right`]: u.value
  27197. };
  27198. }), f = L(() => {
  27199. const h = typeof t.orientationMargin == "number" ? `${t.orientationMargin}px` : t.orientationMargin;
  27200. return I(I({}, l.value && {
  27201. marginLeft: h
  27202. }), u.value && {
  27203. marginRight: h
  27204. });
  27205. }), d = L(() => t.orientation.length > 0 ? "-" + t.orientation : t.orientation);
  27206. return () => {
  27207. var h;
  27208. const p = Yn((h = n.default) === null || h === void 0 ? void 0 : h.call(n));
  27209. return o(M("div", j(j({}, r), {}, {
  27210. class: [c.value, p.length ? `${i.value}-with-text ${i.value}-with-text${d.value}` : "", r.class],
  27211. role: "separator"
  27212. }), [p.length ? M("span", {
  27213. class: `${i.value}-inner-text`,
  27214. style: f.value
  27215. }, [p]) : null]));
  27216. };
  27217. }
  27218. }), qwe = sp(Ywe), yg = (t) => t != null && (Array.isArray(t) ? ss(t).length : !0);
  27219. function yD(t) {
  27220. return yg(t.prefix) || yg(t.suffix) || yg(t.allowClear);
  27221. }
  27222. function M_(t) {
  27223. return yg(t.addonBefore) || yg(t.addonAfter);
  27224. }
  27225. function Y2(t) {
  27226. return typeof t > "u" || t === null ? "" : String(t);
  27227. }
  27228. function bg(t, e, n, r) {
  27229. if (!n)
  27230. return;
  27231. const i = e;
  27232. if (e.type === "click") {
  27233. Object.defineProperty(i, "target", {
  27234. writable: !0
  27235. }), Object.defineProperty(i, "currentTarget", {
  27236. writable: !0
  27237. });
  27238. const a = t.cloneNode(!0);
  27239. i.target = a, i.currentTarget = a, a.value = "", n(i);
  27240. return;
  27241. }
  27242. if (r !== void 0) {
  27243. Object.defineProperty(i, "target", {
  27244. writable: !0
  27245. }), Object.defineProperty(i, "currentTarget", {
  27246. writable: !0
  27247. }), i.target = t, i.currentTarget = t, t.value = r, n(i);
  27248. return;
  27249. }
  27250. n(i);
  27251. }
  27252. function eY(t, e) {
  27253. if (!t) return;
  27254. t.focus(e);
  27255. const {
  27256. cursor: n
  27257. } = e || {};
  27258. if (n) {
  27259. const r = t.value.length;
  27260. switch (n) {
  27261. case "start":
  27262. t.setSelectionRange(0, 0);
  27263. break;
  27264. case "end":
  27265. t.setSelectionRange(r, r);
  27266. break;
  27267. default:
  27268. t.setSelectionRange(0, r);
  27269. }
  27270. }
  27271. }
  27272. const Kwe = () => ({
  27273. addonBefore: Y.any,
  27274. addonAfter: Y.any,
  27275. prefix: Y.any,
  27276. suffix: Y.any,
  27277. clearIcon: Y.any,
  27278. affixWrapperClassName: String,
  27279. groupClassName: String,
  27280. wrapperClassName: String,
  27281. inputClassName: String,
  27282. allowClear: {
  27283. type: Boolean,
  27284. default: void 0
  27285. }
  27286. }), tY = () => I(I({}, Kwe()), {
  27287. value: {
  27288. type: [String, Number, Symbol],
  27289. default: void 0
  27290. },
  27291. defaultValue: {
  27292. type: [String, Number, Symbol],
  27293. default: void 0
  27294. },
  27295. inputElement: Y.any,
  27296. prefixCls: String,
  27297. disabled: {
  27298. type: Boolean,
  27299. default: void 0
  27300. },
  27301. focused: {
  27302. type: Boolean,
  27303. default: void 0
  27304. },
  27305. triggerFocus: Function,
  27306. readonly: {
  27307. type: Boolean,
  27308. default: void 0
  27309. },
  27310. handleReset: Function,
  27311. hidden: {
  27312. type: Boolean,
  27313. default: void 0
  27314. }
  27315. }), nY = () => I(I({}, tY()), {
  27316. id: String,
  27317. placeholder: {
  27318. type: [String, Number]
  27319. },
  27320. autocomplete: String,
  27321. type: hn("text"),
  27322. name: String,
  27323. size: {
  27324. type: String
  27325. },
  27326. autofocus: {
  27327. type: Boolean,
  27328. default: void 0
  27329. },
  27330. lazy: {
  27331. type: Boolean,
  27332. default: !0
  27333. },
  27334. maxlength: Number,
  27335. loading: {
  27336. type: Boolean,
  27337. default: void 0
  27338. },
  27339. bordered: {
  27340. type: Boolean,
  27341. default: void 0
  27342. },
  27343. showCount: {
  27344. type: [Boolean, Object]
  27345. },
  27346. htmlSize: Number,
  27347. onPressEnter: Function,
  27348. onKeydown: Function,
  27349. onKeyup: Function,
  27350. onFocus: Function,
  27351. onBlur: Function,
  27352. onChange: Function,
  27353. onInput: Function,
  27354. "onUpdate:value": Function,
  27355. onCompositionstart: Function,
  27356. onCompositionend: Function,
  27357. valueModifiers: Object,
  27358. hidden: {
  27359. type: Boolean,
  27360. default: void 0
  27361. },
  27362. status: String
  27363. }), Jwe = te({
  27364. name: "BaseInput",
  27365. inheritAttrs: !1,
  27366. props: tY(),
  27367. setup(t, e) {
  27368. let {
  27369. slots: n,
  27370. attrs: r
  27371. } = e;
  27372. const i = U(), a = (s) => {
  27373. var l;
  27374. if (!((l = i.value) === null || l === void 0) && l.contains(s.target)) {
  27375. const {
  27376. triggerFocus: u
  27377. } = t;
  27378. u == null || u();
  27379. }
  27380. }, o = () => {
  27381. var s;
  27382. const {
  27383. allowClear: l,
  27384. value: u,
  27385. disabled: c,
  27386. readonly: f,
  27387. handleReset: d,
  27388. suffix: h = n.suffix,
  27389. prefixCls: p
  27390. } = t;
  27391. if (!l)
  27392. return null;
  27393. const v = !c && !f && u, g = `${p}-clear-icon`, m = ((s = n.clearIcon) === null || s === void 0 ? void 0 : s.call(n)) || "*";
  27394. return M("span", {
  27395. onClick: d,
  27396. onMousedown: (y) => y.preventDefault(),
  27397. class: ye({
  27398. [`${g}-hidden`]: !v,
  27399. [`${g}-has-suffix`]: !!h
  27400. }, g),
  27401. role: "button",
  27402. tabindex: -1
  27403. }, [m]);
  27404. };
  27405. return () => {
  27406. var s, l;
  27407. const {
  27408. focused: u,
  27409. value: c,
  27410. disabled: f,
  27411. allowClear: d,
  27412. readonly: h,
  27413. hidden: p,
  27414. prefixCls: v,
  27415. prefix: g = (s = n.prefix) === null || s === void 0 ? void 0 : s.call(n),
  27416. suffix: m = (l = n.suffix) === null || l === void 0 ? void 0 : l.call(n),
  27417. addonAfter: y = n.addonAfter,
  27418. addonBefore: b = n.addonBefore,
  27419. inputElement: _,
  27420. affixWrapperClassName: O,
  27421. wrapperClassName: S,
  27422. groupClassName: x
  27423. } = t;
  27424. let C = Pn(_, {
  27425. value: c,
  27426. hidden: p
  27427. });
  27428. if (yD({
  27429. prefix: g,
  27430. suffix: m,
  27431. allowClear: d
  27432. })) {
  27433. const T = `${v}-affix-wrapper`, w = ye(T, {
  27434. [`${T}-disabled`]: f,
  27435. [`${T}-focused`]: u,
  27436. [`${T}-readonly`]: h,
  27437. [`${T}-input-with-clear-btn`]: m && d && c
  27438. }, !M_({
  27439. addonAfter: y,
  27440. addonBefore: b
  27441. }) && r.class, O), P = (m || d) && M("span", {
  27442. class: `${v}-suffix`
  27443. }, [o(), m]);
  27444. C = M("span", {
  27445. class: w,
  27446. style: r.style,
  27447. hidden: !M_({
  27448. addonAfter: y,
  27449. addonBefore: b
  27450. }) && p,
  27451. onMousedown: a,
  27452. ref: i
  27453. }, [g && M("span", {
  27454. class: `${v}-prefix`
  27455. }, [g]), Pn(_, {
  27456. style: null,
  27457. value: c,
  27458. hidden: null
  27459. }), P]);
  27460. }
  27461. if (M_({
  27462. addonAfter: y,
  27463. addonBefore: b
  27464. })) {
  27465. const T = `${v}-group`, w = `${T}-addon`, P = ye(`${v}-wrapper`, T, S), $ = ye(`${v}-group-wrapper`, r.class, x);
  27466. return M("span", {
  27467. class: $,
  27468. style: r.style,
  27469. hidden: p
  27470. }, [M("span", {
  27471. class: P
  27472. }, [b && M("span", {
  27473. class: w
  27474. }, [b]), Pn(C, {
  27475. style: null,
  27476. hidden: null
  27477. }), y && M("span", {
  27478. class: w
  27479. }, [y])])]);
  27480. }
  27481. return C;
  27482. };
  27483. }
  27484. });
  27485. var eCe = function(t, e) {
  27486. var n = {};
  27487. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27488. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27489. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27490. return n;
  27491. };
  27492. const tCe = te({
  27493. name: "VCInput",
  27494. inheritAttrs: !1,
  27495. props: nY(),
  27496. setup(t, e) {
  27497. let {
  27498. slots: n,
  27499. attrs: r,
  27500. expose: i,
  27501. emit: a
  27502. } = e;
  27503. const o = ae(t.value === void 0 ? t.defaultValue : t.value), s = ae(!1), l = ae(), u = ae();
  27504. se(() => t.value, () => {
  27505. o.value = t.value;
  27506. }), se(() => t.disabled, () => {
  27507. t.disabled && (s.value = !1);
  27508. });
  27509. const c = (x) => {
  27510. l.value && eY(l.value.input, x);
  27511. }, f = () => {
  27512. var x;
  27513. (x = l.value.input) === null || x === void 0 || x.blur();
  27514. }, d = (x, C, T) => {
  27515. var w;
  27516. (w = l.value.input) === null || w === void 0 || w.setSelectionRange(x, C, T);
  27517. }, h = () => {
  27518. var x;
  27519. (x = l.value.input) === null || x === void 0 || x.select();
  27520. };
  27521. i({
  27522. focus: c,
  27523. blur: f,
  27524. input: L(() => {
  27525. var x;
  27526. return (x = l.value.input) === null || x === void 0 ? void 0 : x.input;
  27527. }),
  27528. stateValue: o,
  27529. setSelectionRange: d,
  27530. select: h
  27531. });
  27532. const p = (x) => {
  27533. a("change", x);
  27534. }, v = (x, C) => {
  27535. o.value !== x && (t.value === void 0 ? o.value = x : Tt(() => {
  27536. var T;
  27537. l.value.input.value !== o.value && ((T = u.value) === null || T === void 0 || T.$forceUpdate());
  27538. }), Tt(() => {
  27539. C && C();
  27540. }));
  27541. }, g = (x) => {
  27542. const {
  27543. value: C
  27544. } = x.target;
  27545. if (o.value === C) return;
  27546. const T = x.target.value;
  27547. bg(l.value.input, x, p), v(T);
  27548. }, m = (x) => {
  27549. x.keyCode === 13 && a("pressEnter", x), a("keydown", x);
  27550. }, y = (x) => {
  27551. s.value = !0, a("focus", x);
  27552. }, b = (x) => {
  27553. s.value = !1, a("blur", x);
  27554. }, _ = (x) => {
  27555. bg(l.value.input, x, p), v("", () => {
  27556. c();
  27557. });
  27558. }, O = () => {
  27559. var x, C;
  27560. const {
  27561. addonBefore: T = n.addonBefore,
  27562. addonAfter: w = n.addonAfter,
  27563. disabled: P,
  27564. valueModifiers: $ = {},
  27565. htmlSize: A,
  27566. autocomplete: D,
  27567. prefixCls: E,
  27568. inputClassName: R,
  27569. prefix: N = (x = n.prefix) === null || x === void 0 ? void 0 : x.call(n),
  27570. suffix: V = (C = n.suffix) === null || C === void 0 ? void 0 : C.call(n),
  27571. allowClear: B,
  27572. type: W = "text"
  27573. } = t, F = or(t, [
  27574. "prefixCls",
  27575. "onPressEnter",
  27576. "addonBefore",
  27577. "addonAfter",
  27578. "prefix",
  27579. "suffix",
  27580. "allowClear",
  27581. // Input elements must be either controlled or uncontrolled,
  27582. // specify either the value prop, or the defaultValue prop, but not both.
  27583. "defaultValue",
  27584. "size",
  27585. "bordered",
  27586. "htmlSize",
  27587. "lazy",
  27588. "showCount",
  27589. "valueModifiers",
  27590. "showCount",
  27591. "affixWrapperClassName",
  27592. "groupClassName",
  27593. "inputClassName",
  27594. "wrapperClassName"
  27595. ]), Q = I(I(I({}, F), r), {
  27596. autocomplete: D,
  27597. onChange: g,
  27598. onInput: g,
  27599. onFocus: y,
  27600. onBlur: b,
  27601. onKeydown: m,
  27602. class: ye(E, {
  27603. [`${E}-disabled`]: P
  27604. }, R, !M_({
  27605. addonAfter: w,
  27606. addonBefore: T
  27607. }) && !yD({
  27608. prefix: N,
  27609. suffix: V,
  27610. allowClear: B
  27611. }) && r.class),
  27612. ref: l,
  27613. key: "ant-input",
  27614. size: A,
  27615. type: W,
  27616. lazy: t.lazy
  27617. });
  27618. return $.lazy && delete Q.onInput, Q.autofocus || delete Q.autofocus, M(PI, or(Q, ["size"]), null);
  27619. }, S = () => {
  27620. var x;
  27621. const {
  27622. maxlength: C,
  27623. suffix: T = (x = n.suffix) === null || x === void 0 ? void 0 : x.call(n),
  27624. showCount: w,
  27625. prefixCls: P
  27626. } = t, $ = Number(C) > 0;
  27627. if (T || w) {
  27628. const A = [...Y2(o.value)].length, D = typeof w == "object" ? w.formatter({
  27629. count: A,
  27630. maxlength: C
  27631. }) : `${A}${$ ? ` / ${C}` : ""}`;
  27632. return M(wt, null, [!!w && M("span", {
  27633. class: ye(`${P}-show-count-suffix`, {
  27634. [`${P}-show-count-has-suffix`]: !!T
  27635. })
  27636. }, [D]), T]);
  27637. }
  27638. return null;
  27639. };
  27640. return it(() => {
  27641. process.env.NODE_ENV === "test" && t.autofocus && c();
  27642. }), () => {
  27643. const {
  27644. prefixCls: x,
  27645. disabled: C
  27646. } = t, T = eCe(t, ["prefixCls", "disabled"]);
  27647. return M(Jwe, j(j(j({}, T), r), {}, {
  27648. ref: u,
  27649. prefixCls: x,
  27650. inputElement: O(),
  27651. handleReset: _,
  27652. value: Y2(o.value),
  27653. focused: s.value,
  27654. triggerFocus: c,
  27655. suffix: S(),
  27656. disabled: C
  27657. }), n);
  27658. };
  27659. }
  27660. }), Cx = () => or(nY(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), rY = () => I(I({}, or(Cx(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  27661. rows: Number,
  27662. autosize: {
  27663. type: [Boolean, Object],
  27664. default: void 0
  27665. },
  27666. autoSize: {
  27667. type: [Boolean, Object],
  27668. default: void 0
  27669. },
  27670. onResize: {
  27671. type: Function
  27672. },
  27673. onCompositionstart: y1(),
  27674. onCompositionend: y1(),
  27675. valueModifiers: Object
  27676. });
  27677. var nCe = function(t, e) {
  27678. var n = {};
  27679. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27680. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27681. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27682. return n;
  27683. };
  27684. const Hn = te({
  27685. compatConfig: {
  27686. MODE: 3
  27687. },
  27688. name: "AInput",
  27689. inheritAttrs: !1,
  27690. props: Cx(),
  27691. setup(t, e) {
  27692. let {
  27693. slots: n,
  27694. attrs: r,
  27695. expose: i,
  27696. emit: a
  27697. } = e;
  27698. const o = U(), s = ls(), l = ao.useInject(), u = L(() => y0(l.status, t.status)), {
  27699. direction: c,
  27700. prefixCls: f,
  27701. size: d,
  27702. autocomplete: h
  27703. } = It("input", t), {
  27704. compactSize: p,
  27705. compactItemClassnames: v
  27706. } = ux(f, c), g = L(() => p.value || d.value), [m, y] = uD(f), b = Jo();
  27707. i({
  27708. focus: (A) => {
  27709. var D;
  27710. (D = o.value) === null || D === void 0 || D.focus(A);
  27711. },
  27712. blur: () => {
  27713. var A;
  27714. (A = o.value) === null || A === void 0 || A.blur();
  27715. },
  27716. input: o,
  27717. setSelectionRange: (A, D, E) => {
  27718. var R;
  27719. (R = o.value) === null || R === void 0 || R.setSelectionRange(A, D, E);
  27720. },
  27721. select: () => {
  27722. var A;
  27723. (A = o.value) === null || A === void 0 || A.select();
  27724. }
  27725. });
  27726. const C = U([]), T = () => {
  27727. C.value.push(setTimeout(() => {
  27728. var A, D, E, R;
  27729. !((A = o.value) === null || A === void 0) && A.input && ((D = o.value) === null || D === void 0 ? void 0 : D.input.getAttribute("type")) === "password" && (!((E = o.value) === null || E === void 0) && E.input.hasAttribute("value")) && ((R = o.value) === null || R === void 0 || R.input.removeAttribute("value"));
  27730. }));
  27731. };
  27732. it(() => {
  27733. T();
  27734. }), j9(() => {
  27735. C.value.forEach((A) => clearTimeout(A));
  27736. }), yt(() => {
  27737. C.value.forEach((A) => clearTimeout(A));
  27738. });
  27739. const w = (A) => {
  27740. T(), a("blur", A), s.onFieldBlur();
  27741. }, P = (A) => {
  27742. T(), a("focus", A);
  27743. }, $ = (A) => {
  27744. a("update:value", A.target.value), a("change", A), a("input", A), s.onFieldChange();
  27745. };
  27746. return () => {
  27747. var A, D, E, R, N, V;
  27748. const {
  27749. hasFeedback: B,
  27750. feedbackIcon: W
  27751. } = l, {
  27752. allowClear: F,
  27753. bordered: Q = !0,
  27754. prefix: Z = (A = n.prefix) === null || A === void 0 ? void 0 : A.call(n),
  27755. suffix: ne = (D = n.suffix) === null || D === void 0 ? void 0 : D.call(n),
  27756. addonAfter: ee = (E = n.addonAfter) === null || E === void 0 ? void 0 : E.call(n),
  27757. addonBefore: oe = (R = n.addonBefore) === null || R === void 0 ? void 0 : R.call(n),
  27758. id: K = (N = s.id) === null || N === void 0 ? void 0 : N.value
  27759. } = t, ie = nCe(t, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), X = (B || ne) && M(wt, null, [ne, B && W]), H = f.value, G = yD({
  27760. prefix: Z,
  27761. suffix: ne
  27762. }) || !!B, re = n.clearIcon || (() => M(ka, null, null));
  27763. return m(M(tCe, j(j(j({}, r), or(ie, ["onUpdate:value", "onChange", "onInput"])), {}, {
  27764. onChange: $,
  27765. id: K,
  27766. disabled: (V = t.disabled) !== null && V !== void 0 ? V : b.value,
  27767. ref: o,
  27768. prefixCls: H,
  27769. autocomplete: h.value,
  27770. onBlur: w,
  27771. onFocus: P,
  27772. prefix: Z,
  27773. suffix: X,
  27774. allowClear: F,
  27775. addonAfter: ee && M(I1, null, {
  27776. default: () => [M(A1, null, {
  27777. default: () => [ee]
  27778. })]
  27779. }),
  27780. addonBefore: oe && M(I1, null, {
  27781. default: () => [M(A1, null, {
  27782. default: () => [oe]
  27783. })]
  27784. }),
  27785. class: [r.class, v.value],
  27786. inputClassName: ye({
  27787. [`${H}-sm`]: g.value === "small",
  27788. [`${H}-lg`]: g.value === "large",
  27789. [`${H}-rtl`]: c.value === "rtl",
  27790. [`${H}-borderless`]: !Q
  27791. }, !G && Ds(H, u.value), y.value),
  27792. affixWrapperClassName: ye({
  27793. [`${H}-affix-wrapper-sm`]: g.value === "small",
  27794. [`${H}-affix-wrapper-lg`]: g.value === "large",
  27795. [`${H}-affix-wrapper-rtl`]: c.value === "rtl",
  27796. [`${H}-affix-wrapper-borderless`]: !Q
  27797. }, Ds(`${H}-affix-wrapper`, u.value, B), y.value),
  27798. wrapperClassName: ye({
  27799. [`${H}-group-rtl`]: c.value === "rtl"
  27800. }, y.value),
  27801. groupClassName: ye({
  27802. [`${H}-group-wrapper-sm`]: g.value === "small",
  27803. [`${H}-group-wrapper-lg`]: g.value === "large",
  27804. [`${H}-group-wrapper-rtl`]: c.value === "rtl"
  27805. }, Ds(`${H}-group-wrapper`, u.value, B), y.value)
  27806. }), I(I({}, n), {
  27807. clearIcon: re
  27808. })));
  27809. };
  27810. }
  27811. }), rCe = te({
  27812. compatConfig: {
  27813. MODE: 3
  27814. },
  27815. name: "AInputGroup",
  27816. inheritAttrs: !1,
  27817. props: {
  27818. prefixCls: String,
  27819. size: {
  27820. type: String
  27821. },
  27822. compact: {
  27823. type: Boolean,
  27824. default: void 0
  27825. }
  27826. },
  27827. setup(t, e) {
  27828. let {
  27829. slots: n,
  27830. attrs: r
  27831. } = e;
  27832. const {
  27833. prefixCls: i,
  27834. direction: a,
  27835. getPrefixCls: o
  27836. } = It("input-group", t), s = ao.useInject();
  27837. ao.useProvide(s, {
  27838. isFormItemInput: !1
  27839. });
  27840. const l = L(() => o("input")), [u, c] = uD(l), f = L(() => {
  27841. const d = i.value;
  27842. return {
  27843. [`${d}`]: !0,
  27844. [c.value]: !0,
  27845. [`${d}-lg`]: t.size === "large",
  27846. [`${d}-sm`]: t.size === "small",
  27847. [`${d}-compact`]: t.compact,
  27848. [`${d}-rtl`]: a.value === "rtl"
  27849. };
  27850. });
  27851. return () => {
  27852. var d;
  27853. return u(M("span", j(j({}, r), {}, {
  27854. class: ye(f.value, r.class)
  27855. }), [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]));
  27856. };
  27857. }
  27858. });
  27859. var iCe = function(t, e) {
  27860. var n = {};
  27861. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27862. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27863. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27864. return n;
  27865. };
  27866. const aCe = te({
  27867. compatConfig: {
  27868. MODE: 3
  27869. },
  27870. name: "AInputSearch",
  27871. inheritAttrs: !1,
  27872. props: I(I({}, Cx()), {
  27873. inputPrefixCls: String,
  27874. // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
  27875. enterButton: Y.any,
  27876. onSearch: {
  27877. type: Function
  27878. }
  27879. }),
  27880. setup(t, e) {
  27881. let {
  27882. slots: n,
  27883. attrs: r,
  27884. expose: i,
  27885. emit: a
  27886. } = e;
  27887. const o = ae(), s = ae(!1);
  27888. i({
  27889. focus: () => {
  27890. var O;
  27891. (O = o.value) === null || O === void 0 || O.focus();
  27892. },
  27893. blur: () => {
  27894. var O;
  27895. (O = o.value) === null || O === void 0 || O.blur();
  27896. }
  27897. });
  27898. const c = (O) => {
  27899. a("update:value", O.target.value), O && O.target && O.type === "click" && a("search", O.target.value, O), a("change", O);
  27900. }, f = (O) => {
  27901. var S;
  27902. document.activeElement === ((S = o.value) === null || S === void 0 ? void 0 : S.input) && O.preventDefault();
  27903. }, d = (O) => {
  27904. var S, x;
  27905. a("search", (x = (S = o.value) === null || S === void 0 ? void 0 : S.input) === null || x === void 0 ? void 0 : x.stateValue, O);
  27906. }, h = (O) => {
  27907. s.value || t.loading || d(O);
  27908. }, p = (O) => {
  27909. s.value = !0, a("compositionstart", O);
  27910. }, v = (O) => {
  27911. s.value = !1, a("compositionend", O);
  27912. }, {
  27913. prefixCls: g,
  27914. getPrefixCls: m,
  27915. direction: y,
  27916. size: b
  27917. } = It("input-search", t), _ = L(() => m("input", t.inputPrefixCls));
  27918. return () => {
  27919. var O, S, x, C;
  27920. const {
  27921. disabled: T,
  27922. loading: w,
  27923. addonAfter: P = (O = n.addonAfter) === null || O === void 0 ? void 0 : O.call(n),
  27924. suffix: $ = (S = n.suffix) === null || S === void 0 ? void 0 : S.call(n)
  27925. } = t, A = iCe(t, ["disabled", "loading", "addonAfter", "suffix"]);
  27926. let {
  27927. enterButton: D = (C = (x = n.enterButton) === null || x === void 0 ? void 0 : x.call(n)) !== null && C !== void 0 ? C : !1
  27928. } = t;
  27929. D = D || D === "";
  27930. const E = typeof D == "boolean" ? M(ix, null, null) : null, R = `${g.value}-button`, N = Array.isArray(D) ? D[0] : D;
  27931. let V;
  27932. const B = N.type && ZI(N.type) && N.type.__ANT_BUTTON;
  27933. if (B || N.tagName === "button")
  27934. V = Pn(N, I({
  27935. onMousedown: f,
  27936. onClick: d,
  27937. key: "enterButton"
  27938. }, B ? {
  27939. class: R,
  27940. size: b.value
  27941. } : {}), !1);
  27942. else {
  27943. const F = E && !D;
  27944. V = M(Xr, {
  27945. class: R,
  27946. type: D ? "primary" : void 0,
  27947. size: b.value,
  27948. disabled: T,
  27949. key: "enterButton",
  27950. onMousedown: f,
  27951. onClick: d,
  27952. loading: w,
  27953. icon: F ? E : null
  27954. }, {
  27955. default: () => [F ? null : E || D]
  27956. });
  27957. }
  27958. P && (V = [V, P]);
  27959. const W = ye(g.value, {
  27960. [`${g.value}-rtl`]: y.value === "rtl",
  27961. [`${g.value}-${b.value}`]: !!b.value,
  27962. [`${g.value}-with-button`]: !!D
  27963. }, r.class);
  27964. return M(Hn, j(j(j({
  27965. ref: o
  27966. }, or(A, ["onUpdate:value", "onSearch", "enterButton"])), r), {}, {
  27967. onPressEnter: h,
  27968. onCompositionstart: p,
  27969. onCompositionend: v,
  27970. size: b.value,
  27971. prefixCls: _.value,
  27972. addonAfter: V,
  27973. suffix: $,
  27974. onChange: c,
  27975. class: W,
  27976. disabled: T
  27977. }), n);
  27978. };
  27979. }
  27980. }), J5 = (t) => t != null && (Array.isArray(t) ? ss(t).length : !0);
  27981. function oCe(t) {
  27982. return J5(t.addonBefore) || J5(t.addonAfter);
  27983. }
  27984. const sCe = ["text", "input"], lCe = te({
  27985. compatConfig: {
  27986. MODE: 3
  27987. },
  27988. name: "ClearableLabeledInput",
  27989. inheritAttrs: !1,
  27990. props: {
  27991. prefixCls: String,
  27992. inputType: Y.oneOf(ru("text", "input")),
  27993. value: ha(),
  27994. defaultValue: ha(),
  27995. allowClear: {
  27996. type: Boolean,
  27997. default: void 0
  27998. },
  27999. element: ha(),
  28000. handleReset: Function,
  28001. disabled: {
  28002. type: Boolean,
  28003. default: void 0
  28004. },
  28005. direction: {
  28006. type: String
  28007. },
  28008. size: {
  28009. type: String
  28010. },
  28011. suffix: ha(),
  28012. prefix: ha(),
  28013. addonBefore: ha(),
  28014. addonAfter: ha(),
  28015. readonly: {
  28016. type: Boolean,
  28017. default: void 0
  28018. },
  28019. focused: {
  28020. type: Boolean,
  28021. default: void 0
  28022. },
  28023. bordered: {
  28024. type: Boolean,
  28025. default: !0
  28026. },
  28027. triggerFocus: {
  28028. type: Function
  28029. },
  28030. hidden: Boolean,
  28031. status: String,
  28032. hashId: String
  28033. },
  28034. setup(t, e) {
  28035. let {
  28036. slots: n,
  28037. attrs: r
  28038. } = e;
  28039. const i = ao.useInject(), a = (s) => {
  28040. const {
  28041. value: l,
  28042. disabled: u,
  28043. readonly: c,
  28044. handleReset: f,
  28045. suffix: d = n.suffix
  28046. } = t, h = !u && !c && l, p = `${s}-clear-icon`;
  28047. return M(ka, {
  28048. onClick: f,
  28049. onMousedown: (v) => v.preventDefault(),
  28050. class: ye({
  28051. [`${p}-hidden`]: !h,
  28052. [`${p}-has-suffix`]: !!d
  28053. }, p),
  28054. role: "button"
  28055. }, null);
  28056. }, o = (s, l) => {
  28057. const {
  28058. value: u,
  28059. allowClear: c,
  28060. direction: f,
  28061. bordered: d,
  28062. hidden: h,
  28063. status: p,
  28064. addonAfter: v = n.addonAfter,
  28065. addonBefore: g = n.addonBefore,
  28066. hashId: m
  28067. } = t, {
  28068. status: y,
  28069. hasFeedback: b
  28070. } = i;
  28071. if (!c)
  28072. return Pn(l, {
  28073. value: u,
  28074. disabled: t.disabled
  28075. });
  28076. const _ = ye(`${s}-affix-wrapper`, `${s}-affix-wrapper-textarea-with-clear-btn`, Ds(`${s}-affix-wrapper`, y0(y, p), b), {
  28077. [`${s}-affix-wrapper-rtl`]: f === "rtl",
  28078. [`${s}-affix-wrapper-borderless`]: !d,
  28079. // className will go to addon wrapper
  28080. [`${r.class}`]: !oCe({
  28081. addonAfter: v,
  28082. addonBefore: g
  28083. }) && r.class
  28084. }, m);
  28085. return M("span", {
  28086. class: _,
  28087. style: r.style,
  28088. hidden: h
  28089. }, [Pn(l, {
  28090. style: null,
  28091. value: u,
  28092. disabled: t.disabled
  28093. }), a(s)]);
  28094. };
  28095. return () => {
  28096. var s;
  28097. const {
  28098. prefixCls: l,
  28099. inputType: u,
  28100. element: c = (s = n.element) === null || s === void 0 ? void 0 : s.call(n)
  28101. } = t;
  28102. return u === sCe[0] ? o(l, c) : null;
  28103. };
  28104. }
  28105. }), uCe = `
  28106. min-height:0 !important;
  28107. max-height:none !important;
  28108. height:0 !important;
  28109. visibility:hidden !important;
  28110. overflow:hidden !important;
  28111. position:absolute !important;
  28112. z-index:-1000 !important;
  28113. top:0 !important;
  28114. right:0 !important;
  28115. pointer-events: none !important;
  28116. `, cCe = ["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"], AC = {};
  28117. let ta;
  28118. function fCe(t) {
  28119. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  28120. const n = t.getAttribute("id") || t.getAttribute("data-reactid") || t.getAttribute("name");
  28121. if (e && AC[n])
  28122. return AC[n];
  28123. 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 = {
  28124. sizingStyle: cCe.map((u) => `${u}:${r.getPropertyValue(u)}`).join(";"),
  28125. paddingSize: a,
  28126. borderSize: o,
  28127. boxSizing: i
  28128. };
  28129. return e && n && (AC[n] = l), l;
  28130. }
  28131. function dCe(t) {
  28132. 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;
  28133. ta || (ta = document.createElement("textarea"), ta.setAttribute("tab-index", "-1"), ta.setAttribute("aria-hidden", "true"), document.body.appendChild(ta)), t.getAttribute("wrap") ? ta.setAttribute("wrap", t.getAttribute("wrap")) : ta.removeAttribute("wrap");
  28134. const {
  28135. paddingSize: i,
  28136. borderSize: a,
  28137. boxSizing: o,
  28138. sizingStyle: s
  28139. } = fCe(t, e);
  28140. ta.setAttribute("style", `${s};${uCe}`), ta.value = t.value || t.placeholder || "";
  28141. let l, u, c, f = ta.scrollHeight;
  28142. if (o === "border-box" ? f += a : o === "content-box" && (f -= i), n !== null || r !== null) {
  28143. ta.value = " ";
  28144. const h = ta.scrollHeight - i;
  28145. 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));
  28146. }
  28147. const d = {
  28148. height: `${f}px`,
  28149. overflowY: c,
  28150. resize: "none"
  28151. };
  28152. return l && (d.minHeight = `${l}px`), u && (d.maxHeight = `${u}px`), d;
  28153. }
  28154. const EC = 0, MC = 1, IC = 2, hCe = te({
  28155. compatConfig: {
  28156. MODE: 3
  28157. },
  28158. name: "ResizableTextArea",
  28159. inheritAttrs: !1,
  28160. props: rY(),
  28161. setup(t, e) {
  28162. let {
  28163. attrs: n,
  28164. emit: r,
  28165. expose: i
  28166. } = e, a, o;
  28167. const s = U(), l = U({}), u = U(IC);
  28168. yt(() => {
  28169. xt.cancel(a), xt.cancel(o);
  28170. });
  28171. const c = () => {
  28172. try {
  28173. if (s.value && document.activeElement === s.value.input) {
  28174. const S = s.value.getSelectionStart(), x = s.value.getSelectionEnd(), C = s.value.getScrollTop();
  28175. s.value.setSelectionRange(S, x), s.value.setScrollTop(C);
  28176. }
  28177. } catch {
  28178. }
  28179. }, f = U(), d = U();
  28180. ht(() => {
  28181. const S = t.autoSize || t.autosize;
  28182. S ? (f.value = S.minRows, d.value = S.maxRows) : (f.value = void 0, d.value = void 0);
  28183. });
  28184. const h = L(() => !!(t.autoSize || t.autosize)), p = () => {
  28185. u.value = EC;
  28186. };
  28187. se([() => t.value, f, d, h], () => {
  28188. h.value && p();
  28189. }, {
  28190. immediate: !0
  28191. });
  28192. const v = U();
  28193. se([u, s], () => {
  28194. if (s.value)
  28195. if (u.value === EC)
  28196. u.value = MC;
  28197. else if (u.value === MC) {
  28198. const S = dCe(s.value.input, !1, f.value, d.value);
  28199. u.value = IC, v.value = S;
  28200. } else
  28201. c();
  28202. }, {
  28203. immediate: !0,
  28204. flush: "post"
  28205. });
  28206. const g = vn(), m = U(), y = () => {
  28207. xt.cancel(m.value);
  28208. }, b = (S) => {
  28209. u.value === IC && (r("resize", S), h.value && (y(), m.value = xt(() => {
  28210. p();
  28211. })));
  28212. };
  28213. yt(() => {
  28214. y();
  28215. }), i({
  28216. resizeTextarea: () => {
  28217. p();
  28218. },
  28219. textArea: L(() => {
  28220. var S;
  28221. return (S = s.value) === null || S === void 0 ? void 0 : S.input;
  28222. }),
  28223. instance: g
  28224. }), Yr(t.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
  28225. const O = () => {
  28226. const {
  28227. prefixCls: S,
  28228. disabled: x
  28229. } = t, C = or(t, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), T = ye(S, n.class, {
  28230. [`${S}-disabled`]: x
  28231. }), w = h.value ? v.value : null, P = [n.style, l.value, w], $ = I(I(I({}, C), n), {
  28232. style: P,
  28233. class: T
  28234. });
  28235. return (u.value === EC || u.value === MC) && P.push({
  28236. overflowX: "hidden",
  28237. overflowY: "hidden"
  28238. }), $.autofocus || delete $.autofocus, $.rows === 0 && delete $.rows, M(bh, {
  28239. onResize: b,
  28240. disabled: !h.value
  28241. }, {
  28242. default: () => [M(PI, j(j({}, $), {}, {
  28243. ref: s,
  28244. tag: "textarea"
  28245. }), null)]
  28246. });
  28247. };
  28248. return () => O();
  28249. }
  28250. });
  28251. function iY(t, e) {
  28252. return [...t || ""].slice(0, e).join("");
  28253. }
  28254. function e3(t, e, n, r) {
  28255. let i = n;
  28256. return t ? i = iY(n, r) : [...e || ""].length < n.length && [...n || ""].length > r && (i = e), i;
  28257. }
  28258. const pCe = te({
  28259. compatConfig: {
  28260. MODE: 3
  28261. },
  28262. name: "ATextarea",
  28263. inheritAttrs: !1,
  28264. props: rY(),
  28265. setup(t, e) {
  28266. let {
  28267. attrs: n,
  28268. expose: r,
  28269. emit: i
  28270. } = e;
  28271. var a;
  28272. const o = ls(), s = ao.useInject(), l = L(() => y0(s.status, t.status)), u = ae((a = t.value) !== null && a !== void 0 ? a : t.defaultValue), c = ae(), f = ae(""), {
  28273. prefixCls: d,
  28274. size: h,
  28275. direction: p
  28276. } = It("input", t), [v, g] = uD(d), m = Jo(), y = L(() => t.showCount === "" || t.showCount || !1), b = L(() => Number(t.maxlength) > 0), _ = ae(!1), O = ae(), S = ae(0), x = (B) => {
  28277. _.value = !0, O.value = f.value, S.value = B.currentTarget.selectionStart, i("compositionstart", B);
  28278. }, C = (B) => {
  28279. var W;
  28280. _.value = !1;
  28281. let F = B.currentTarget.value;
  28282. if (b.value) {
  28283. const Q = S.value >= t.maxlength + 1 || S.value === ((W = O.value) === null || W === void 0 ? void 0 : W.length);
  28284. F = e3(Q, O.value, F, t.maxlength);
  28285. }
  28286. F !== f.value && ($(F), bg(B.currentTarget, B, E, F)), i("compositionend", B);
  28287. }, T = vn();
  28288. se(() => t.value, () => {
  28289. var B;
  28290. "value" in T.vnode.props, u.value = (B = t.value) !== null && B !== void 0 ? B : "";
  28291. });
  28292. const w = (B) => {
  28293. var W;
  28294. eY((W = c.value) === null || W === void 0 ? void 0 : W.textArea, B);
  28295. }, P = () => {
  28296. var B, W;
  28297. (W = (B = c.value) === null || B === void 0 ? void 0 : B.textArea) === null || W === void 0 || W.blur();
  28298. }, $ = (B, W) => {
  28299. u.value !== B && (t.value === void 0 ? u.value = B : Tt(() => {
  28300. var F, Q, Z;
  28301. c.value.textArea.value !== f.value && ((Z = (F = c.value) === null || F === void 0 ? void 0 : (Q = F.instance).update) === null || Z === void 0 || Z.call(Q));
  28302. }), Tt(() => {
  28303. W && W();
  28304. }));
  28305. }, A = (B) => {
  28306. B.keyCode === 13 && i("pressEnter", B), i("keydown", B);
  28307. }, D = (B) => {
  28308. const {
  28309. onBlur: W
  28310. } = t;
  28311. W == null || W(B), o.onFieldBlur();
  28312. }, E = (B) => {
  28313. i("update:value", B.target.value), i("change", B), i("input", B), o.onFieldChange();
  28314. }, R = (B) => {
  28315. bg(c.value.textArea, B, E), $("", () => {
  28316. w();
  28317. });
  28318. }, N = (B) => {
  28319. let W = B.target.value;
  28320. if (u.value !== W) {
  28321. if (b.value) {
  28322. const F = B.target, Q = F.selectionStart >= t.maxlength + 1 || F.selectionStart === W.length || !F.selectionStart;
  28323. W = e3(Q, f.value, W, t.maxlength);
  28324. }
  28325. bg(B.currentTarget, B, E, W), $(W);
  28326. }
  28327. }, V = () => {
  28328. var B, W;
  28329. const {
  28330. class: F
  28331. } = n, {
  28332. bordered: Q = !0
  28333. } = t, Z = I(I(I({}, or(t, ["allowClear"])), n), {
  28334. class: [{
  28335. [`${d.value}-borderless`]: !Q,
  28336. [`${F}`]: F && !y.value,
  28337. [`${d.value}-sm`]: h.value === "small",
  28338. [`${d.value}-lg`]: h.value === "large"
  28339. }, Ds(d.value, l.value), g.value],
  28340. disabled: m.value,
  28341. showCount: null,
  28342. prefixCls: d.value,
  28343. onInput: N,
  28344. onChange: N,
  28345. onBlur: D,
  28346. onKeydown: A,
  28347. onCompositionstart: x,
  28348. onCompositionend: C
  28349. });
  28350. return !((B = t.valueModifiers) === null || B === void 0) && B.lazy && delete Z.onInput, M(hCe, j(j({}, Z), {}, {
  28351. id: (W = Z == null ? void 0 : Z.id) !== null && W !== void 0 ? W : o.id.value,
  28352. ref: c,
  28353. maxlength: t.maxlength,
  28354. lazy: t.lazy
  28355. }), null);
  28356. };
  28357. return r({
  28358. focus: w,
  28359. blur: P,
  28360. resizableTextArea: c
  28361. }), ht(() => {
  28362. let B = Y2(u.value);
  28363. !_.value && b.value && (t.value === null || t.value === void 0) && (B = iY(B, t.maxlength)), f.value = B;
  28364. }), () => {
  28365. var B;
  28366. const {
  28367. maxlength: W,
  28368. bordered: F = !0,
  28369. hidden: Q
  28370. } = t, {
  28371. style: Z,
  28372. class: ne
  28373. } = n, ee = I(I(I({}, t), n), {
  28374. prefixCls: d.value,
  28375. inputType: "text",
  28376. handleReset: R,
  28377. direction: p.value,
  28378. bordered: F,
  28379. style: y.value ? void 0 : Z,
  28380. hashId: g.value,
  28381. disabled: (B = t.disabled) !== null && B !== void 0 ? B : m.value
  28382. });
  28383. let oe = M(lCe, j(j({}, ee), {}, {
  28384. value: f.value,
  28385. status: t.status
  28386. }), {
  28387. element: V
  28388. });
  28389. if (y.value || s.hasFeedback) {
  28390. const K = [...f.value].length;
  28391. let ie = "";
  28392. typeof y.value == "object" ? ie = y.value.formatter({
  28393. value: f.value,
  28394. count: K,
  28395. maxlength: W
  28396. }) : ie = `${K}${b.value ? ` / ${W}` : ""}`, oe = M("div", {
  28397. hidden: Q,
  28398. class: ye(`${d.value}-textarea`, {
  28399. [`${d.value}-textarea-rtl`]: p.value === "rtl",
  28400. [`${d.value}-textarea-show-count`]: y.value,
  28401. [`${d.value}-textarea-in-form-item`]: s.isFormItemInput
  28402. }, `${d.value}-textarea-show-count`, ne, g.value),
  28403. style: Z,
  28404. "data-count": typeof ie != "object" ? ie : void 0
  28405. }, [oe, s.hasFeedback && M("span", {
  28406. class: `${d.value}-textarea-suffix`
  28407. }, [s.feedbackIcon])]);
  28408. }
  28409. return v(oe);
  28410. };
  28411. }
  28412. });
  28413. var vCe = { 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" };
  28414. function t3(t) {
  28415. for (var e = 1; e < arguments.length; e++) {
  28416. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  28417. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  28418. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  28419. }))), r.forEach(function(i) {
  28420. gCe(t, i, n[i]);
  28421. });
  28422. }
  28423. return t;
  28424. }
  28425. function gCe(t, e, n) {
  28426. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  28427. }
  28428. var Tx = function(e, n) {
  28429. var r = t3({}, e, n.attrs);
  28430. return M(lt, t3({}, r, {
  28431. icon: vCe
  28432. }), null);
  28433. };
  28434. Tx.displayName = "EyeOutlined";
  28435. Tx.inheritAttrs = !1;
  28436. var mCe = { 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" };
  28437. function n3(t) {
  28438. for (var e = 1; e < arguments.length; e++) {
  28439. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  28440. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  28441. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  28442. }))), r.forEach(function(i) {
  28443. yCe(t, i, n[i]);
  28444. });
  28445. }
  28446. return t;
  28447. }
  28448. function yCe(t, e, n) {
  28449. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  28450. }
  28451. var bD = function(e, n) {
  28452. var r = n3({}, e, n.attrs);
  28453. return M(lt, n3({}, r, {
  28454. icon: mCe
  28455. }), null);
  28456. };
  28457. bD.displayName = "EyeInvisibleOutlined";
  28458. bD.inheritAttrs = !1;
  28459. var bCe = function(t, e) {
  28460. var n = {};
  28461. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  28462. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  28463. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  28464. return n;
  28465. };
  28466. const _Ce = {
  28467. click: "onClick",
  28468. hover: "onMouseover"
  28469. }, OCe = (t) => t ? M(Tx, null, null) : M(bD, null, null), SCe = te({
  28470. compatConfig: {
  28471. MODE: 3
  28472. },
  28473. name: "AInputPassword",
  28474. inheritAttrs: !1,
  28475. props: I(I({}, Cx()), {
  28476. prefixCls: String,
  28477. inputPrefixCls: String,
  28478. action: {
  28479. type: String,
  28480. default: "click"
  28481. },
  28482. visibilityToggle: {
  28483. type: Boolean,
  28484. default: !0
  28485. },
  28486. visible: {
  28487. type: Boolean,
  28488. default: void 0
  28489. },
  28490. "onUpdate:visible": Function,
  28491. iconRender: Function
  28492. }),
  28493. setup(t, e) {
  28494. let {
  28495. slots: n,
  28496. attrs: r,
  28497. expose: i,
  28498. emit: a
  28499. } = e;
  28500. const o = ae(!1), s = () => {
  28501. const {
  28502. disabled: g
  28503. } = t;
  28504. g || (o.value = !o.value, a("update:visible", o.value));
  28505. };
  28506. ht(() => {
  28507. t.visible !== void 0 && (o.value = !!t.visible);
  28508. });
  28509. const l = ae();
  28510. i({
  28511. focus: () => {
  28512. var g;
  28513. (g = l.value) === null || g === void 0 || g.focus();
  28514. },
  28515. blur: () => {
  28516. var g;
  28517. (g = l.value) === null || g === void 0 || g.blur();
  28518. }
  28519. });
  28520. const f = (g) => {
  28521. const {
  28522. action: m,
  28523. iconRender: y = n.iconRender || OCe
  28524. } = t, b = _Ce[m] || "", _ = y(o.value), O = {
  28525. [b]: s,
  28526. class: `${g}-icon`,
  28527. key: "passwordIcon",
  28528. onMousedown: (S) => {
  28529. S.preventDefault();
  28530. },
  28531. onMouseup: (S) => {
  28532. S.preventDefault();
  28533. }
  28534. };
  28535. return Pn(Yi(_) ? _ : M("span", null, [_]), O);
  28536. }, {
  28537. prefixCls: d,
  28538. getPrefixCls: h
  28539. } = It("input-password", t), p = L(() => h("input", t.inputPrefixCls)), v = () => {
  28540. const {
  28541. size: g,
  28542. visibilityToggle: m
  28543. } = t, y = bCe(t, ["size", "visibilityToggle"]), b = m && f(d.value), _ = ye(d.value, r.class, {
  28544. [`${d.value}-${g}`]: !!g
  28545. }), O = I(I(I({}, or(y, ["suffix", "iconRender", "action"])), r), {
  28546. type: o.value ? "text" : "password",
  28547. class: _,
  28548. prefixCls: p.value,
  28549. suffix: b
  28550. });
  28551. return g && (O.size = g), M(Hn, j({
  28552. ref: l
  28553. }, O), n);
  28554. };
  28555. return () => v();
  28556. }
  28557. });
  28558. Hn.Group = rCe;
  28559. Hn.Search = aCe;
  28560. Hn.TextArea = pCe;
  28561. Hn.Password = SCe;
  28562. Hn.install = function(t) {
  28563. return t.component(Hn.name, Hn), t.component(Hn.Group.name, Hn.Group), t.component(Hn.Search.name, Hn.Search), t.component(Hn.TextArea.name, Hn.TextArea), t.component(Hn.Password.name, Hn.Password), t;
  28564. };
  28565. function Px() {
  28566. return {
  28567. keyboard: {
  28568. type: Boolean,
  28569. default: void 0
  28570. },
  28571. mask: {
  28572. type: Boolean,
  28573. default: void 0
  28574. },
  28575. afterClose: Function,
  28576. closable: {
  28577. type: Boolean,
  28578. default: void 0
  28579. },
  28580. maskClosable: {
  28581. type: Boolean,
  28582. default: void 0
  28583. },
  28584. visible: {
  28585. type: Boolean,
  28586. default: void 0
  28587. },
  28588. destroyOnClose: {
  28589. type: Boolean,
  28590. default: void 0
  28591. },
  28592. mousePosition: Y.shape({
  28593. x: Number,
  28594. y: Number
  28595. }).loose,
  28596. title: Y.any,
  28597. footer: Y.any,
  28598. transitionName: String,
  28599. maskTransitionName: String,
  28600. animation: Y.any,
  28601. maskAnimation: Y.any,
  28602. wrapStyle: {
  28603. type: Object,
  28604. default: void 0
  28605. },
  28606. bodyStyle: {
  28607. type: Object,
  28608. default: void 0
  28609. },
  28610. maskStyle: {
  28611. type: Object,
  28612. default: void 0
  28613. },
  28614. prefixCls: String,
  28615. wrapClassName: String,
  28616. rootClassName: String,
  28617. width: [String, Number],
  28618. height: [String, Number],
  28619. zIndex: Number,
  28620. bodyProps: Y.any,
  28621. maskProps: Y.any,
  28622. wrapProps: Y.any,
  28623. getContainer: Y.any,
  28624. dialogStyle: {
  28625. type: Object,
  28626. default: void 0
  28627. },
  28628. dialogClass: String,
  28629. closeIcon: Y.any,
  28630. forceRender: {
  28631. type: Boolean,
  28632. default: void 0
  28633. },
  28634. getOpenCount: Function,
  28635. // https://github.com/ant-design/ant-design/issues/19771
  28636. // https://github.com/react-component/dialog/issues/95
  28637. focusTriggerAfterClose: {
  28638. type: Boolean,
  28639. default: void 0
  28640. },
  28641. onClose: Function,
  28642. modalRender: Function
  28643. };
  28644. }
  28645. function r3(t, e, n) {
  28646. let r = e;
  28647. return !r && n && (r = `${t}-${n}`), r;
  28648. }
  28649. let i3 = -1;
  28650. function xCe() {
  28651. return i3 += 1, i3;
  28652. }
  28653. function a3(t, e) {
  28654. let n = t[`page${e ? "Y" : "X"}Offset`];
  28655. const r = `scroll${e ? "Top" : "Left"}`;
  28656. if (typeof n != "number") {
  28657. const i = t.document;
  28658. n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  28659. }
  28660. return n;
  28661. }
  28662. function wCe(t) {
  28663. const e = t.getBoundingClientRect(), n = {
  28664. left: e.left,
  28665. top: e.top
  28666. }, r = t.ownerDocument, i = r.defaultView || r.parentWindow;
  28667. return n.left += a3(i), n.top += a3(i, !0), n;
  28668. }
  28669. const o3 = {
  28670. width: 0,
  28671. height: 0,
  28672. overflow: "hidden",
  28673. outline: "none"
  28674. }, CCe = te({
  28675. compatConfig: {
  28676. MODE: 3
  28677. },
  28678. name: "DialogContent",
  28679. inheritAttrs: !1,
  28680. props: I(I({}, Px()), {
  28681. motionName: String,
  28682. ariaId: String,
  28683. onVisibleChanged: Function,
  28684. onMousedown: Function,
  28685. onMouseup: Function
  28686. }),
  28687. setup(t, e) {
  28688. let {
  28689. expose: n,
  28690. slots: r,
  28691. attrs: i
  28692. } = e;
  28693. const a = U(), o = U(), s = U();
  28694. n({
  28695. focus: () => {
  28696. var d;
  28697. (d = a.value) === null || d === void 0 || d.focus();
  28698. },
  28699. changeActive: (d) => {
  28700. const {
  28701. activeElement: h
  28702. } = document;
  28703. d && h === o.value ? a.value.focus() : !d && h === a.value && o.value.focus();
  28704. }
  28705. });
  28706. const l = U(), u = L(() => {
  28707. const {
  28708. width: d,
  28709. height: h
  28710. } = t, p = {};
  28711. 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;
  28712. }), c = () => {
  28713. Tt(() => {
  28714. if (s.value) {
  28715. const d = wCe(s.value);
  28716. l.value = t.mousePosition ? `${t.mousePosition.x - d.left}px ${t.mousePosition.y - d.top}px` : "";
  28717. }
  28718. });
  28719. }, f = (d) => {
  28720. t.onVisibleChanged(d);
  28721. };
  28722. return () => {
  28723. var d, h, p, v;
  28724. const {
  28725. prefixCls: g,
  28726. footer: m = (d = r.footer) === null || d === void 0 ? void 0 : d.call(r),
  28727. title: y = (h = r.title) === null || h === void 0 ? void 0 : h.call(r),
  28728. ariaId: b,
  28729. closable: _,
  28730. closeIcon: O = (p = r.closeIcon) === null || p === void 0 ? void 0 : p.call(r),
  28731. onClose: S,
  28732. bodyStyle: x,
  28733. bodyProps: C,
  28734. onMousedown: T,
  28735. onMouseup: w,
  28736. visible: P,
  28737. modalRender: $ = r.modalRender,
  28738. destroyOnClose: A,
  28739. motionName: D
  28740. } = t;
  28741. let E;
  28742. m && (E = M("div", {
  28743. class: `${g}-footer`
  28744. }, [m]));
  28745. let R;
  28746. y && (R = M("div", {
  28747. class: `${g}-header`
  28748. }, [M("div", {
  28749. class: `${g}-title`,
  28750. id: b
  28751. }, [y])]));
  28752. let N;
  28753. _ && (N = M("button", {
  28754. type: "button",
  28755. onClick: S,
  28756. "aria-label": "Close",
  28757. class: `${g}-close`
  28758. }, [O || M("span", {
  28759. class: `${g}-close-x`
  28760. }, null)]));
  28761. const V = M("div", {
  28762. class: `${g}-content`
  28763. }, [N, R, M("div", j({
  28764. class: `${g}-body`,
  28765. style: x
  28766. }, C), [(v = r.default) === null || v === void 0 ? void 0 : v.call(r)]), E]), B = m0(D);
  28767. return M(ho, j(j({}, B), {}, {
  28768. onBeforeEnter: c,
  28769. onAfterEnter: () => f(!0),
  28770. onAfterLeave: () => f(!1)
  28771. }), {
  28772. default: () => [P || !A ? Oi(M("div", j(j({}, i), {}, {
  28773. ref: s,
  28774. key: "dialog-element",
  28775. role: "document",
  28776. style: [u.value, i.style],
  28777. class: [g, i.class],
  28778. onMousedown: T,
  28779. onMouseup: w
  28780. }), [M("div", {
  28781. tabindex: 0,
  28782. ref: a,
  28783. style: o3,
  28784. "aria-hidden": "true"
  28785. }, null), $ ? $({
  28786. originVNode: V
  28787. }) : V, M("div", {
  28788. tabindex: 0,
  28789. ref: o,
  28790. style: o3,
  28791. "aria-hidden": "true"
  28792. }, null)]), [[zs, P]]) : null]
  28793. });
  28794. };
  28795. }
  28796. }), TCe = te({
  28797. compatConfig: {
  28798. MODE: 3
  28799. },
  28800. name: "DialogMask",
  28801. props: {
  28802. prefixCls: String,
  28803. visible: Boolean,
  28804. motionName: String,
  28805. maskProps: Object
  28806. },
  28807. setup(t, e) {
  28808. return () => {
  28809. const {
  28810. prefixCls: n,
  28811. visible: r,
  28812. maskProps: i,
  28813. motionName: a
  28814. } = t, o = m0(a);
  28815. return M(ho, o, {
  28816. default: () => [Oi(M("div", j({
  28817. class: `${n}-mask`
  28818. }, i), null), [[zs, r]])]
  28819. });
  28820. };
  28821. }
  28822. }), s3 = te({
  28823. compatConfig: {
  28824. MODE: 3
  28825. },
  28826. name: "VcDialog",
  28827. inheritAttrs: !1,
  28828. props: sr(I(I({}, Px()), {
  28829. getOpenCount: Function,
  28830. scrollLocker: Object
  28831. }), {
  28832. mask: !0,
  28833. visible: !1,
  28834. keyboard: !0,
  28835. closable: !0,
  28836. maskClosable: !0,
  28837. destroyOnClose: !1,
  28838. prefixCls: "rc-dialog",
  28839. getOpenCount: () => null,
  28840. focusTriggerAfterClose: !0
  28841. }),
  28842. setup(t, e) {
  28843. let {
  28844. attrs: n,
  28845. slots: r
  28846. } = e;
  28847. const i = ae(), a = ae(), o = ae(), s = ae(t.visible), l = ae(`vcDialogTitle${xCe()}`), u = (m) => {
  28848. var y, b;
  28849. if (m)
  28850. $l(a.value, document.activeElement) || (i.value = document.activeElement, (y = o.value) === null || y === void 0 || y.focus());
  28851. else {
  28852. const _ = s.value;
  28853. if (s.value = !1, t.mask && i.value && t.focusTriggerAfterClose) {
  28854. try {
  28855. i.value.focus({
  28856. preventScroll: !0
  28857. });
  28858. } catch {
  28859. }
  28860. i.value = null;
  28861. }
  28862. _ && ((b = t.afterClose) === null || b === void 0 || b.call(t));
  28863. }
  28864. }, c = (m) => {
  28865. var y;
  28866. (y = t.onClose) === null || y === void 0 || y.call(t, m);
  28867. }, f = ae(!1), d = ae(), h = () => {
  28868. clearTimeout(d.value), f.value = !0;
  28869. }, p = () => {
  28870. d.value = setTimeout(() => {
  28871. f.value = !1;
  28872. });
  28873. }, v = (m) => {
  28874. if (!t.maskClosable) return null;
  28875. f.value ? f.value = !1 : a.value === m.target && c(m);
  28876. }, g = (m) => {
  28877. if (t.keyboard && m.keyCode === ge.ESC) {
  28878. m.stopPropagation(), c(m);
  28879. return;
  28880. }
  28881. t.visible && m.keyCode === ge.TAB && o.value.changeActive(!m.shiftKey);
  28882. };
  28883. return se(() => t.visible, () => {
  28884. t.visible && (s.value = !0);
  28885. }, {
  28886. flush: "post"
  28887. }), yt(() => {
  28888. var m;
  28889. clearTimeout(d.value), (m = t.scrollLocker) === null || m === void 0 || m.unLock();
  28890. }), ht(() => {
  28891. var m, y;
  28892. (m = t.scrollLocker) === null || m === void 0 || m.unLock(), s.value && ((y = t.scrollLocker) === null || y === void 0 || y.lock());
  28893. }), () => {
  28894. const {
  28895. prefixCls: m,
  28896. mask: y,
  28897. visible: b,
  28898. maskTransitionName: _,
  28899. maskAnimation: O,
  28900. zIndex: S,
  28901. wrapClassName: x,
  28902. rootClassName: C,
  28903. wrapStyle: T,
  28904. closable: w,
  28905. maskProps: P,
  28906. maskStyle: $,
  28907. transitionName: A,
  28908. animation: D,
  28909. wrapProps: E,
  28910. title: R = r.title
  28911. } = t, {
  28912. style: N,
  28913. class: V
  28914. } = n;
  28915. return M("div", j({
  28916. class: [`${m}-root`, C]
  28917. }, tx(t, {
  28918. data: !0
  28919. })), [M(TCe, {
  28920. prefixCls: m,
  28921. visible: y && b,
  28922. motionName: r3(m, _, O),
  28923. style: I({
  28924. zIndex: S
  28925. }, $),
  28926. maskProps: P
  28927. }, null), M("div", j({
  28928. tabIndex: -1,
  28929. onKeydown: g,
  28930. class: ye(`${m}-wrap`, x),
  28931. ref: a,
  28932. onClick: v,
  28933. role: "dialog",
  28934. "aria-labelledby": R ? l.value : null,
  28935. style: I(I({
  28936. zIndex: S
  28937. }, T), {
  28938. display: s.value ? null : "none"
  28939. })
  28940. }, E), [M(CCe, j(j({}, or(t, ["scrollLocker"])), {}, {
  28941. style: N,
  28942. class: V,
  28943. onMousedown: h,
  28944. onMouseup: p,
  28945. ref: o,
  28946. closable: w,
  28947. ariaId: l.value,
  28948. prefixCls: m,
  28949. visible: b,
  28950. onClose: c,
  28951. onVisibleChanged: u,
  28952. motionName: r3(m, A, D)
  28953. }), r)])]);
  28954. };
  28955. }
  28956. }), PCe = Px(), aY = te({
  28957. compatConfig: {
  28958. MODE: 3
  28959. },
  28960. name: "DialogWrap",
  28961. inheritAttrs: !1,
  28962. props: sr(PCe, {
  28963. visible: !1
  28964. }),
  28965. setup(t, e) {
  28966. let {
  28967. attrs: n,
  28968. slots: r
  28969. } = e;
  28970. const i = U(t.visible);
  28971. return TI({}, {
  28972. inTriggerContext: !1
  28973. }), se(() => t.visible, () => {
  28974. t.visible && (i.value = !0);
  28975. }, {
  28976. flush: "post"
  28977. }), () => {
  28978. const {
  28979. visible: a,
  28980. getContainer: o,
  28981. forceRender: s,
  28982. destroyOnClose: l = !1,
  28983. afterClose: u
  28984. } = t;
  28985. let c = I(I(I({}, t), n), {
  28986. ref: "_component",
  28987. key: "dialog"
  28988. });
  28989. return o === !1 ? M(s3, j(j({}, c), {}, {
  28990. getOpenCount: () => 2
  28991. }), r) : !s && l && !i.value ? null : M(MZ, {
  28992. autoLock: !0,
  28993. visible: a,
  28994. forceRender: s,
  28995. getContainer: o
  28996. }, {
  28997. default: (f) => (c = I(I(I({}, c), f), {
  28998. afterClose: () => {
  28999. u == null || u(), i.value = !1;
  29000. }
  29001. }), M(s3, c, r))
  29002. });
  29003. };
  29004. }
  29005. });
  29006. function $Ce(t) {
  29007. const e = U(null), n = tn(I({}, t)), r = U([]), i = (a) => {
  29008. e.value === null && (r.value = [], e.value = xt(() => {
  29009. let o;
  29010. r.value.forEach((s) => {
  29011. o = I(I({}, o), s);
  29012. }), I(n, o), e.value = null;
  29013. })), r.value.push(a);
  29014. };
  29015. return it(() => {
  29016. e.value && xt.cancel(e.value);
  29017. }), [n, i];
  29018. }
  29019. function l3(t, e, n, r) {
  29020. const i = e + n, a = (n - r) / 2;
  29021. if (n > r) {
  29022. if (e > 0)
  29023. return {
  29024. [t]: a
  29025. };
  29026. if (e < 0 && i < r)
  29027. return {
  29028. [t]: -a
  29029. };
  29030. } else if (e < 0 || i > r)
  29031. return {
  29032. [t]: e < 0 ? a : -a
  29033. };
  29034. return {};
  29035. }
  29036. function ACe(t, e, n, r) {
  29037. const {
  29038. width: i,
  29039. height: a
  29040. } = Rve();
  29041. let o = null;
  29042. return t <= i && e <= a ? o = {
  29043. x: 0,
  29044. y: 0
  29045. } : (t > i || e > a) && (o = I(I({}, l3("x", n, t, i)), l3("y", r, e, a))), o;
  29046. }
  29047. var ECe = function(t, e) {
  29048. var n = {};
  29049. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  29050. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  29051. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  29052. return n;
  29053. };
  29054. const u3 = Symbol("previewGroupContext"), _D = {
  29055. provide: (t) => {
  29056. pt(u3, t);
  29057. },
  29058. inject: () => Ge(u3, {
  29059. isPreviewGroup: ae(!1),
  29060. previewUrls: L(() => /* @__PURE__ */ new Map()),
  29061. setPreviewUrls: () => {
  29062. },
  29063. current: U(null),
  29064. setCurrent: () => {
  29065. },
  29066. setShowPreview: () => {
  29067. },
  29068. setMousePosition: () => {
  29069. },
  29070. registerImage: null,
  29071. rootClassName: ""
  29072. })
  29073. }, MCe = () => ({
  29074. previewPrefixCls: String,
  29075. preview: {
  29076. type: [Boolean, Object],
  29077. default: !0
  29078. },
  29079. icons: {
  29080. type: Object,
  29081. default: () => ({})
  29082. }
  29083. }), ICe = te({
  29084. compatConfig: {
  29085. MODE: 3
  29086. },
  29087. name: "PreviewGroup",
  29088. inheritAttrs: !1,
  29089. props: MCe(),
  29090. setup(t, e) {
  29091. let {
  29092. slots: n
  29093. } = e;
  29094. const r = L(() => {
  29095. const O = {
  29096. visible: void 0,
  29097. onVisibleChange: () => {
  29098. },
  29099. getContainer: void 0,
  29100. current: 0
  29101. };
  29102. return typeof t.preview == "object" ? uY(t.preview, O) : O;
  29103. }), i = tn(/* @__PURE__ */ new Map()), a = U(), o = L(() => r.value.visible), s = L(() => r.value.getContainer), l = (O, S) => {
  29104. var x, C;
  29105. (C = (x = r.value).onVisibleChange) === null || C === void 0 || C.call(x, O, S);
  29106. }, [u, c] = Ah(!!o.value, {
  29107. value: o,
  29108. onChange: l
  29109. }), f = U(null), d = L(() => o.value !== void 0), h = L(() => Array.from(i.keys())), p = L(() => h.value[r.value.current]), v = L(() => new Map(Array.from(i).filter((O) => {
  29110. let [, {
  29111. canPreview: S
  29112. }] = O;
  29113. return !!S;
  29114. }).map((O) => {
  29115. let [S, {
  29116. url: x
  29117. }] = O;
  29118. return [S, x];
  29119. }))), g = function(O, S) {
  29120. let x = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
  29121. i.set(O, {
  29122. url: S,
  29123. canPreview: x
  29124. });
  29125. }, m = (O) => {
  29126. a.value = O;
  29127. }, y = (O) => {
  29128. f.value = O;
  29129. }, b = function(O, S) {
  29130. let x = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
  29131. const C = () => {
  29132. i.delete(O);
  29133. };
  29134. return i.set(O, {
  29135. url: S,
  29136. canPreview: x
  29137. }), C;
  29138. }, _ = (O) => {
  29139. O == null || O.stopPropagation(), c(!1), y(null);
  29140. };
  29141. return se(p, (O) => {
  29142. m(O);
  29143. }, {
  29144. immediate: !0,
  29145. flush: "post"
  29146. }), ht(() => {
  29147. u.value && d.value && m(p.value);
  29148. }, {
  29149. flush: "post"
  29150. }), _D.provide({
  29151. isPreviewGroup: ae(!0),
  29152. previewUrls: v,
  29153. setPreviewUrls: g,
  29154. current: a,
  29155. setCurrent: m,
  29156. setShowPreview: c,
  29157. setMousePosition: y,
  29158. registerImage: b
  29159. }), () => {
  29160. const O = ECe(r.value, []);
  29161. return M(wt, null, [n.default && n.default(), M(sY, j(j({}, O), {}, {
  29162. "ria-hidden": !u.value,
  29163. visible: u.value,
  29164. prefixCls: t.previewPrefixCls,
  29165. onClose: _,
  29166. mousePosition: f.value,
  29167. src: v.value.get(a.value),
  29168. icons: t.icons,
  29169. getContainer: s.value
  29170. }), null)]);
  29171. };
  29172. }
  29173. }), oY = ICe, ku = {
  29174. x: 0,
  29175. y: 0
  29176. }, DCe = I(I({}, Px()), {
  29177. src: String,
  29178. alt: String,
  29179. rootClassName: String,
  29180. icons: {
  29181. type: Object,
  29182. default: () => ({})
  29183. }
  29184. }), sY = te({
  29185. compatConfig: {
  29186. MODE: 3
  29187. },
  29188. name: "Preview",
  29189. inheritAttrs: !1,
  29190. props: DCe,
  29191. emits: ["close", "afterClose"],
  29192. setup(t, e) {
  29193. let {
  29194. emit: n,
  29195. attrs: r
  29196. } = e;
  29197. const {
  29198. rotateLeft: i,
  29199. rotateRight: a,
  29200. zoomIn: o,
  29201. zoomOut: s,
  29202. close: l,
  29203. left: u,
  29204. right: c,
  29205. flipX: f,
  29206. flipY: d
  29207. } = tn(t.icons), h = ae(1), p = ae(0), v = tn({
  29208. x: 1,
  29209. y: 1
  29210. }), [g, m] = $Ce(ku), y = () => n("close"), b = ae(), _ = tn({
  29211. originX: 0,
  29212. originY: 0,
  29213. deltaX: 0,
  29214. deltaY: 0
  29215. }), O = ae(!1), S = _D.inject(), {
  29216. previewUrls: x,
  29217. current: C,
  29218. isPreviewGroup: T,
  29219. setCurrent: w
  29220. } = S, P = L(() => x.value.size), $ = L(() => Array.from(x.value.keys())), A = L(() => $.value.indexOf(C.value)), D = L(() => T.value ? x.value.get(C.value) : t.src), E = L(() => T.value && P.value > 1), R = ae({
  29221. wheelDirection: 0
  29222. }), N = () => {
  29223. h.value = 1, p.value = 0, v.x = 1, v.y = 1, m(ku), n("afterClose");
  29224. }, V = (Se) => {
  29225. Se ? h.value += 0.5 : h.value++, m(ku);
  29226. }, B = (Se) => {
  29227. h.value > 1 && (Se ? h.value -= 0.5 : h.value--), m(ku);
  29228. }, W = () => {
  29229. p.value += 90;
  29230. }, F = () => {
  29231. p.value -= 90;
  29232. }, Q = () => {
  29233. v.x = -v.x;
  29234. }, Z = () => {
  29235. v.y = -v.y;
  29236. }, ne = (Se) => {
  29237. Se.preventDefault(), Se.stopPropagation(), A.value > 0 && w($.value[A.value - 1]);
  29238. }, ee = (Se) => {
  29239. Se.preventDefault(), Se.stopPropagation(), A.value < P.value - 1 && w($.value[A.value + 1]);
  29240. }, oe = ye({
  29241. [`${t.prefixCls}-moving`]: O.value
  29242. }), K = `${t.prefixCls}-operations-operation`, ie = `${t.prefixCls}-operations-icon`, X = [{
  29243. icon: l,
  29244. onClick: y,
  29245. type: "close"
  29246. }, {
  29247. icon: o,
  29248. onClick: () => V(),
  29249. type: "zoomIn"
  29250. }, {
  29251. icon: s,
  29252. onClick: () => B(),
  29253. type: "zoomOut",
  29254. disabled: L(() => h.value === 1)
  29255. }, {
  29256. icon: a,
  29257. onClick: W,
  29258. type: "rotateRight"
  29259. }, {
  29260. icon: i,
  29261. onClick: F,
  29262. type: "rotateLeft"
  29263. }, {
  29264. icon: f,
  29265. onClick: Q,
  29266. type: "flipX"
  29267. }, {
  29268. icon: d,
  29269. onClick: Z,
  29270. type: "flipY"
  29271. }], H = () => {
  29272. if (t.visible && O.value) {
  29273. const Se = b.value.offsetWidth * h.value, be = b.value.offsetHeight * h.value, {
  29274. left: he,
  29275. top: Te
  29276. } = IZ(b.value), ze = p.value % 180 !== 0;
  29277. O.value = !1;
  29278. const ut = ACe(ze ? be : Se, ze ? Se : be, he, Te);
  29279. ut && m(I({}, ut));
  29280. }
  29281. }, G = (Se) => {
  29282. Se.button === 0 && (Se.preventDefault(), Se.stopPropagation(), _.deltaX = Se.pageX - g.x, _.deltaY = Se.pageY - g.y, _.originX = g.x, _.originY = g.y, O.value = !0);
  29283. }, re = (Se) => {
  29284. t.visible && O.value && m({
  29285. x: Se.pageX - _.deltaX,
  29286. y: Se.pageY - _.deltaY
  29287. });
  29288. }, fe = (Se) => {
  29289. if (!t.visible) return;
  29290. Se.preventDefault();
  29291. const be = Se.deltaY;
  29292. R.value = {
  29293. wheelDirection: be
  29294. };
  29295. }, de = (Se) => {
  29296. !t.visible || !E.value || (Se.preventDefault(), Se.keyCode === ge.LEFT ? A.value > 0 && w($.value[A.value - 1]) : Se.keyCode === ge.RIGHT && A.value < P.value - 1 && w($.value[A.value + 1]));
  29297. }, Ee = () => {
  29298. t.visible && (h.value !== 1 && (h.value = 1), (g.x !== ku.x || g.y !== ku.y) && m(ku));
  29299. };
  29300. let $e = () => {
  29301. };
  29302. return it(() => {
  29303. se([() => t.visible, O], () => {
  29304. $e();
  29305. let Se, be;
  29306. const he = vr(window, "mouseup", H, !1), Te = vr(window, "mousemove", re, !1), ze = vr(window, "wheel", fe, {
  29307. passive: !1
  29308. }), ut = vr(window, "keydown", de, !1);
  29309. try {
  29310. window.top !== window.self && (Se = vr(window.top, "mouseup", H, !1), be = vr(window.top, "mousemove", re, !1));
  29311. } catch (ct) {
  29312. ff(!1, `[vc-image] ${ct}`);
  29313. }
  29314. $e = () => {
  29315. he.remove(), Te.remove(), ze.remove(), ut.remove(), Se && Se.remove(), be && be.remove();
  29316. };
  29317. }, {
  29318. flush: "post",
  29319. immediate: !0
  29320. }), se([R], () => {
  29321. const {
  29322. wheelDirection: Se
  29323. } = R.value;
  29324. Se > 0 ? B(!0) : Se < 0 && V(!0);
  29325. });
  29326. }), rl(() => {
  29327. $e();
  29328. }), () => {
  29329. const {
  29330. visible: Se,
  29331. prefixCls: be,
  29332. rootClassName: he
  29333. } = t;
  29334. return M(aY, j(j({}, r), {}, {
  29335. transitionName: t.transitionName,
  29336. maskTransitionName: t.maskTransitionName,
  29337. closable: !1,
  29338. keyboard: !0,
  29339. prefixCls: be,
  29340. onClose: y,
  29341. afterClose: N,
  29342. visible: Se,
  29343. wrapClassName: oe,
  29344. rootClassName: he,
  29345. getContainer: t.getContainer
  29346. }), {
  29347. default: () => [M("div", {
  29348. class: [`${t.prefixCls}-operations-wrapper`, he]
  29349. }, [M("ul", {
  29350. class: `${t.prefixCls}-operations`
  29351. }, [X.map((Te) => {
  29352. let {
  29353. icon: ze,
  29354. onClick: ut,
  29355. type: ct,
  29356. disabled: Dt
  29357. } = Te;
  29358. return M("li", {
  29359. class: ye(K, {
  29360. [`${t.prefixCls}-operations-operation-disabled`]: Dt && (Dt == null ? void 0 : Dt.value)
  29361. }),
  29362. onClick: ut,
  29363. key: ct
  29364. }, [Bs(ze, {
  29365. class: ie
  29366. })]);
  29367. })])]), M("div", {
  29368. class: `${t.prefixCls}-img-wrapper`,
  29369. style: {
  29370. transform: `translate3d(${g.x}px, ${g.y}px, 0)`
  29371. }
  29372. }, [M("img", {
  29373. onMousedown: G,
  29374. onDblclick: Ee,
  29375. ref: b,
  29376. class: `${t.prefixCls}-img`,
  29377. src: D.value,
  29378. alt: t.alt,
  29379. style: {
  29380. transform: `scale3d(${v.x * h.value}, ${v.y * h.value}, 1) rotate(${p.value}deg)`
  29381. }
  29382. }, null)]), E.value && M("div", {
  29383. class: ye(`${t.prefixCls}-switch-left`, {
  29384. [`${t.prefixCls}-switch-left-disabled`]: A.value <= 0
  29385. }),
  29386. onClick: ne
  29387. }, [u]), E.value && M("div", {
  29388. class: ye(`${t.prefixCls}-switch-right`, {
  29389. [`${t.prefixCls}-switch-right-disabled`]: A.value >= P.value - 1
  29390. }),
  29391. onClick: ee
  29392. }, [c])]
  29393. });
  29394. };
  29395. }
  29396. });
  29397. var RCe = function(t, e) {
  29398. var n = {};
  29399. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  29400. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  29401. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  29402. return n;
  29403. };
  29404. const lY = () => ({
  29405. src: String,
  29406. wrapperClassName: String,
  29407. wrapperStyle: {
  29408. type: Object,
  29409. default: void 0
  29410. },
  29411. rootClassName: String,
  29412. prefixCls: String,
  29413. previewPrefixCls: String,
  29414. previewMask: {
  29415. type: [Boolean, Function],
  29416. default: void 0
  29417. },
  29418. placeholder: Y.any,
  29419. fallback: String,
  29420. preview: {
  29421. type: [Boolean, Object],
  29422. default: !0
  29423. },
  29424. onClick: {
  29425. type: Function
  29426. },
  29427. onError: {
  29428. type: Function
  29429. }
  29430. }), uY = (t, e) => {
  29431. const n = I({}, t);
  29432. return Object.keys(e).forEach((r) => {
  29433. t[r] === void 0 && (n[r] = e[r]);
  29434. }), n;
  29435. };
  29436. let kCe = 0;
  29437. const cY = te({
  29438. compatConfig: {
  29439. MODE: 3
  29440. },
  29441. name: "VcImage",
  29442. inheritAttrs: !1,
  29443. props: lY(),
  29444. emits: ["click", "error"],
  29445. setup(t, e) {
  29446. let {
  29447. attrs: n,
  29448. slots: r,
  29449. emit: i
  29450. } = e;
  29451. const a = L(() => t.prefixCls), o = L(() => `${a.value}-preview`), s = L(() => {
  29452. const V = {
  29453. visible: void 0,
  29454. onVisibleChange: () => {
  29455. },
  29456. getContainer: void 0
  29457. };
  29458. return typeof t.preview == "object" ? uY(t.preview, V) : V;
  29459. }), l = L(() => {
  29460. var V;
  29461. return (V = s.value.src) !== null && V !== void 0 ? V : t.src;
  29462. }), u = L(() => t.placeholder && t.placeholder !== !0 || r.placeholder), c = L(() => s.value.visible), f = L(() => s.value.getContainer), d = L(() => c.value !== void 0), h = (V, B) => {
  29463. var W, F;
  29464. (F = (W = s.value).onVisibleChange) === null || F === void 0 || F.call(W, V, B);
  29465. }, [p, v] = Ah(!!c.value, {
  29466. value: c,
  29467. onChange: h
  29468. }), g = U(u.value ? "loading" : "normal");
  29469. se(() => t.src, () => {
  29470. g.value = u.value ? "loading" : "normal";
  29471. });
  29472. const m = U(null), y = L(() => g.value === "error"), b = _D.inject(), {
  29473. isPreviewGroup: _,
  29474. setCurrent: O,
  29475. setShowPreview: S,
  29476. setMousePosition: x,
  29477. registerImage: C
  29478. } = b, T = U(kCe++), w = L(() => t.preview && !y.value), P = () => {
  29479. g.value = "normal";
  29480. }, $ = (V) => {
  29481. g.value = "error", i("error", V);
  29482. }, A = (V) => {
  29483. if (!d.value) {
  29484. const {
  29485. left: B,
  29486. top: W
  29487. } = IZ(V.target);
  29488. _.value ? (O(T.value), x({
  29489. x: B,
  29490. y: W
  29491. })) : m.value = {
  29492. x: B,
  29493. y: W
  29494. };
  29495. }
  29496. _.value ? S(!0) : v(!0), i("click", V);
  29497. }, D = () => {
  29498. v(!1), d.value || (m.value = null);
  29499. }, E = U(null);
  29500. se(() => E, () => {
  29501. g.value === "loading" && E.value.complete && (E.value.naturalWidth || E.value.naturalHeight) && P();
  29502. });
  29503. let R = () => {
  29504. };
  29505. it(() => {
  29506. se([l, w], () => {
  29507. if (R(), !_.value)
  29508. return () => {
  29509. };
  29510. R = C(T.value, l.value, w.value), w.value || R();
  29511. }, {
  29512. flush: "post",
  29513. immediate: !0
  29514. });
  29515. }), rl(() => {
  29516. R();
  29517. });
  29518. const N = (V) => Ibe(V) ? V + "px" : V;
  29519. return () => {
  29520. const {
  29521. prefixCls: V,
  29522. wrapperClassName: B,
  29523. fallback: W,
  29524. src: F,
  29525. placeholder: Q,
  29526. wrapperStyle: Z,
  29527. rootClassName: ne
  29528. } = t, {
  29529. width: ee,
  29530. height: oe,
  29531. crossorigin: K,
  29532. decoding: ie,
  29533. alt: X,
  29534. sizes: H,
  29535. srcset: G,
  29536. usemap: re,
  29537. class: fe,
  29538. style: de
  29539. } = n, Ee = s.value, {
  29540. icons: $e,
  29541. maskClassName: Se
  29542. } = Ee, be = RCe(Ee, ["icons", "maskClassName"]), he = ye(V, B, ne, {
  29543. [`${V}-error`]: y.value
  29544. }), Te = y.value && W ? W : l.value, ze = {
  29545. crossorigin: K,
  29546. decoding: ie,
  29547. alt: X,
  29548. sizes: H,
  29549. srcset: G,
  29550. usemap: re,
  29551. width: ee,
  29552. height: oe,
  29553. class: ye(`${V}-img`, {
  29554. [`${V}-img-placeholder`]: Q === !0
  29555. }, fe),
  29556. style: I({
  29557. height: N(oe)
  29558. }, de)
  29559. };
  29560. return M(wt, null, [M("div", {
  29561. class: he,
  29562. onClick: w.value ? A : (ut) => {
  29563. i("click", ut);
  29564. },
  29565. style: I({
  29566. width: N(ee),
  29567. height: N(oe)
  29568. }, Z)
  29569. }, [M("img", j(j(j({}, ze), y.value && W ? {
  29570. src: W
  29571. } : {
  29572. onLoad: P,
  29573. onError: $,
  29574. src: F
  29575. }), {}, {
  29576. ref: E
  29577. }), null), g.value === "loading" && M("div", {
  29578. "aria-hidden": "true",
  29579. class: `${V}-placeholder`
  29580. }, [Q || r.placeholder && r.placeholder()]), r.previewMask && w.value && M("div", {
  29581. class: [`${V}-mask`, Se]
  29582. }, [r.previewMask()])]), !_.value && w.value && M(sY, j(j({}, be), {}, {
  29583. "aria-hidden": !p.value,
  29584. visible: p.value,
  29585. prefixCls: o.value,
  29586. onClose: D,
  29587. mousePosition: m.value,
  29588. src: Te,
  29589. alt: X,
  29590. getContainer: f.value,
  29591. icons: $e,
  29592. rootClassName: ne
  29593. }), null)]);
  29594. };
  29595. }
  29596. });
  29597. cY.PreviewGroup = oY;
  29598. const LCe = cY;
  29599. var NCe = { 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" };
  29600. function c3(t) {
  29601. for (var e = 1; e < arguments.length; e++) {
  29602. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29603. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29604. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29605. }))), r.forEach(function(i) {
  29606. BCe(t, i, n[i]);
  29607. });
  29608. }
  29609. return t;
  29610. }
  29611. function BCe(t, e, n) {
  29612. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29613. }
  29614. var OD = function(e, n) {
  29615. var r = c3({}, e, n.attrs);
  29616. return M(lt, c3({}, r, {
  29617. icon: NCe
  29618. }), null);
  29619. };
  29620. OD.displayName = "RotateLeftOutlined";
  29621. OD.inheritAttrs = !1;
  29622. var zCe = { 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" };
  29623. function f3(t) {
  29624. for (var e = 1; e < arguments.length; e++) {
  29625. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29626. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29627. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29628. }))), r.forEach(function(i) {
  29629. VCe(t, i, n[i]);
  29630. });
  29631. }
  29632. return t;
  29633. }
  29634. function VCe(t, e, n) {
  29635. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29636. }
  29637. var SD = function(e, n) {
  29638. var r = f3({}, e, n.attrs);
  29639. return M(lt, f3({}, r, {
  29640. icon: zCe
  29641. }), null);
  29642. };
  29643. SD.displayName = "RotateRightOutlined";
  29644. SD.inheritAttrs = !1;
  29645. var FCe = { 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" };
  29646. function d3(t) {
  29647. for (var e = 1; e < arguments.length; e++) {
  29648. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29649. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29650. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29651. }))), r.forEach(function(i) {
  29652. WCe(t, i, n[i]);
  29653. });
  29654. }
  29655. return t;
  29656. }
  29657. function WCe(t, e, n) {
  29658. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29659. }
  29660. var xD = function(e, n) {
  29661. var r = d3({}, e, n.attrs);
  29662. return M(lt, d3({}, r, {
  29663. icon: FCe
  29664. }), null);
  29665. };
  29666. xD.displayName = "ZoomInOutlined";
  29667. xD.inheritAttrs = !1;
  29668. var QCe = { 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" };
  29669. function h3(t) {
  29670. for (var e = 1; e < arguments.length; e++) {
  29671. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29672. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29673. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29674. }))), r.forEach(function(i) {
  29675. HCe(t, i, n[i]);
  29676. });
  29677. }
  29678. return t;
  29679. }
  29680. function HCe(t, e, n) {
  29681. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29682. }
  29683. var wD = function(e, n) {
  29684. var r = h3({}, e, n.attrs);
  29685. return M(lt, h3({}, r, {
  29686. icon: QCe
  29687. }), null);
  29688. };
  29689. wD.displayName = "ZoomOutOutlined";
  29690. wD.inheritAttrs = !1;
  29691. var GCe = { 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" };
  29692. function p3(t) {
  29693. for (var e = 1; e < arguments.length; e++) {
  29694. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29695. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29696. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29697. }))), r.forEach(function(i) {
  29698. jCe(t, i, n[i]);
  29699. });
  29700. }
  29701. return t;
  29702. }
  29703. function jCe(t, e, n) {
  29704. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29705. }
  29706. var Q1 = function(e, n) {
  29707. var r = p3({}, e, n.attrs);
  29708. return M(lt, p3({}, r, {
  29709. icon: GCe
  29710. }), null);
  29711. };
  29712. Q1.displayName = "SwapOutlined";
  29713. Q1.inheritAttrs = !1;
  29714. function v3(t) {
  29715. return {
  29716. position: t,
  29717. top: 0,
  29718. insetInlineEnd: 0,
  29719. bottom: 0,
  29720. insetInlineStart: 0
  29721. };
  29722. }
  29723. const fY = (t) => {
  29724. const {
  29725. componentCls: e
  29726. } = t;
  29727. return [{
  29728. [`${e}-root`]: {
  29729. [`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]: {
  29730. // reset scale avoid mousePosition bug
  29731. transform: "none",
  29732. opacity: 0,
  29733. animationDuration: t.motionDurationSlow,
  29734. // https://github.com/ant-design/ant-design/issues/11777
  29735. userSelect: "none"
  29736. },
  29737. [`${e}${t.antCls}-zoom-leave ${e}-content`]: {
  29738. pointerEvents: "none"
  29739. },
  29740. [`${e}-mask`]: I(I({}, v3("fixed")), {
  29741. zIndex: t.zIndexPopupBase,
  29742. height: "100%",
  29743. backgroundColor: t.colorBgMask,
  29744. [`${e}-hidden`]: {
  29745. display: "none"
  29746. }
  29747. }),
  29748. [`${e}-wrap`]: I(I({}, v3("fixed")), {
  29749. overflow: "auto",
  29750. outline: 0,
  29751. WebkitOverflowScrolling: "touch"
  29752. })
  29753. }
  29754. }, {
  29755. [`${e}-root`]: PU(t)
  29756. }];
  29757. }, ZCe = (t) => {
  29758. const {
  29759. componentCls: e
  29760. } = t;
  29761. return [
  29762. // ======================== Root =========================
  29763. {
  29764. [`${e}-root`]: {
  29765. [`${e}-wrap`]: {
  29766. zIndex: t.zIndexPopupBase,
  29767. position: "fixed",
  29768. inset: 0,
  29769. overflow: "auto",
  29770. outline: 0,
  29771. WebkitOverflowScrolling: "touch"
  29772. },
  29773. [`${e}-wrap-rtl`]: {
  29774. direction: "rtl"
  29775. },
  29776. [`${e}-centered`]: {
  29777. textAlign: "center",
  29778. "&::before": {
  29779. display: "inline-block",
  29780. width: 0,
  29781. height: "100%",
  29782. verticalAlign: "middle",
  29783. content: '""'
  29784. },
  29785. [e]: {
  29786. top: 0,
  29787. display: "inline-block",
  29788. paddingBottom: 0,
  29789. textAlign: "start",
  29790. verticalAlign: "middle"
  29791. }
  29792. },
  29793. [`@media (max-width: ${t.screenSMMax})`]: {
  29794. [e]: {
  29795. maxWidth: "calc(100vw - 16px)",
  29796. margin: `${t.marginXS} auto`
  29797. },
  29798. [`${e}-centered`]: {
  29799. [e]: {
  29800. flex: 1
  29801. }
  29802. }
  29803. }
  29804. }
  29805. },
  29806. // ======================== Modal ========================
  29807. {
  29808. [e]: I(I({}, nn(t)), {
  29809. pointerEvents: "none",
  29810. position: "relative",
  29811. top: 100,
  29812. width: "auto",
  29813. maxWidth: `calc(100vw - ${t.margin * 2}px)`,
  29814. margin: "0 auto",
  29815. paddingBottom: t.paddingLG,
  29816. [`${e}-title`]: {
  29817. margin: 0,
  29818. color: t.modalHeadingColor,
  29819. fontWeight: t.fontWeightStrong,
  29820. fontSize: t.modalHeaderTitleFontSize,
  29821. lineHeight: t.modalHeaderTitleLineHeight,
  29822. wordWrap: "break-word"
  29823. },
  29824. [`${e}-content`]: {
  29825. position: "relative",
  29826. backgroundColor: t.modalContentBg,
  29827. backgroundClip: "padding-box",
  29828. border: 0,
  29829. borderRadius: t.borderRadiusLG,
  29830. boxShadow: t.boxShadowSecondary,
  29831. pointerEvents: "auto",
  29832. padding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`
  29833. },
  29834. [`${e}-close`]: I({
  29835. position: "absolute",
  29836. top: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
  29837. insetInlineEnd: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
  29838. zIndex: t.zIndexPopupBase + 10,
  29839. padding: 0,
  29840. color: t.modalCloseColor,
  29841. fontWeight: t.fontWeightStrong,
  29842. lineHeight: 1,
  29843. textDecoration: "none",
  29844. background: "transparent",
  29845. borderRadius: t.borderRadiusSM,
  29846. width: t.modalConfirmIconSize,
  29847. height: t.modalConfirmIconSize,
  29848. border: 0,
  29849. outline: 0,
  29850. cursor: "pointer",
  29851. transition: `color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,
  29852. "&-x": {
  29853. display: "block",
  29854. fontSize: t.fontSizeLG,
  29855. fontStyle: "normal",
  29856. lineHeight: `${t.modalCloseBtnSize}px`,
  29857. textAlign: "center",
  29858. textTransform: "none",
  29859. textRendering: "auto"
  29860. },
  29861. "&:hover": {
  29862. color: t.modalIconHoverColor,
  29863. backgroundColor: t.wireframe ? "transparent" : t.colorFillContent,
  29864. textDecoration: "none"
  29865. },
  29866. "&:active": {
  29867. backgroundColor: t.wireframe ? "transparent" : t.colorFillContentHover
  29868. }
  29869. }, WS(t)),
  29870. [`${e}-header`]: {
  29871. color: t.colorText,
  29872. background: t.modalHeaderBg,
  29873. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
  29874. marginBottom: t.marginXS
  29875. },
  29876. [`${e}-body`]: {
  29877. fontSize: t.fontSize,
  29878. lineHeight: t.lineHeight,
  29879. wordWrap: "break-word"
  29880. },
  29881. [`${e}-footer`]: {
  29882. textAlign: "end",
  29883. background: t.modalFooterBg,
  29884. marginTop: t.marginSM,
  29885. [`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]: {
  29886. marginBottom: 0,
  29887. marginInlineStart: t.marginXS
  29888. }
  29889. },
  29890. [`${e}-open`]: {
  29891. overflow: "hidden"
  29892. }
  29893. })
  29894. },
  29895. // ======================== Pure =========================
  29896. {
  29897. [`${e}-pure-panel`]: {
  29898. top: "auto",
  29899. padding: 0,
  29900. display: "flex",
  29901. flexDirection: "column",
  29902. [`${e}-content,
  29903. ${e}-body,
  29904. ${e}-confirm-body-wrapper`]: {
  29905. display: "flex",
  29906. flexDirection: "column",
  29907. flex: "auto"
  29908. },
  29909. [`${e}-confirm-body`]: {
  29910. marginBottom: "auto"
  29911. }
  29912. }
  29913. }
  29914. ];
  29915. }, UCe = (t) => {
  29916. const {
  29917. componentCls: e
  29918. } = t, n = `${e}-confirm`;
  29919. return {
  29920. [n]: {
  29921. "&-rtl": {
  29922. direction: "rtl"
  29923. },
  29924. [`${t.antCls}-modal-header`]: {
  29925. display: "none"
  29926. },
  29927. [`${n}-body-wrapper`]: I({}, S1()),
  29928. [`${n}-body`]: {
  29929. display: "flex",
  29930. flexWrap: "wrap",
  29931. alignItems: "center",
  29932. [`${n}-title`]: {
  29933. flex: "0 0 100%",
  29934. display: "block",
  29935. // create BFC to avoid
  29936. // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
  29937. overflow: "hidden",
  29938. color: t.colorTextHeading,
  29939. fontWeight: t.fontWeightStrong,
  29940. fontSize: t.modalHeaderTitleFontSize,
  29941. lineHeight: t.modalHeaderTitleLineHeight,
  29942. [`+ ${n}-content`]: {
  29943. marginBlockStart: t.marginXS,
  29944. flexBasis: "100%",
  29945. maxWidth: `calc(100% - ${t.modalConfirmIconSize + t.marginSM}px)`
  29946. }
  29947. },
  29948. [`${n}-content`]: {
  29949. color: t.colorText,
  29950. fontSize: t.fontSize
  29951. },
  29952. [`> ${t.iconCls}`]: {
  29953. flex: "none",
  29954. marginInlineEnd: t.marginSM,
  29955. fontSize: t.modalConfirmIconSize,
  29956. [`+ ${n}-title`]: {
  29957. flex: 1
  29958. },
  29959. // `content` after `icon` should set marginLeft
  29960. [`+ ${n}-title + ${n}-content`]: {
  29961. marginInlineStart: t.modalConfirmIconSize + t.marginSM
  29962. }
  29963. }
  29964. },
  29965. [`${n}-btns`]: {
  29966. textAlign: "end",
  29967. marginTop: t.marginSM,
  29968. [`${t.antCls}-btn + ${t.antCls}-btn`]: {
  29969. marginBottom: 0,
  29970. marginInlineStart: t.marginXS
  29971. }
  29972. }
  29973. },
  29974. [`${n}-error ${n}-body > ${t.iconCls}`]: {
  29975. color: t.colorError
  29976. },
  29977. [`${n}-warning ${n}-body > ${t.iconCls},
  29978. ${n}-confirm ${n}-body > ${t.iconCls}`]: {
  29979. color: t.colorWarning
  29980. },
  29981. [`${n}-info ${n}-body > ${t.iconCls}`]: {
  29982. color: t.colorInfo
  29983. },
  29984. [`${n}-success ${n}-body > ${t.iconCls}`]: {
  29985. color: t.colorSuccess
  29986. },
  29987. // https://github.com/ant-design/ant-design/issues/37329
  29988. [`${e}-zoom-leave ${e}-btns`]: {
  29989. pointerEvents: "none"
  29990. }
  29991. };
  29992. }, XCe = (t) => {
  29993. const {
  29994. componentCls: e
  29995. } = t;
  29996. return {
  29997. [`${e}-root`]: {
  29998. [`${e}-wrap-rtl`]: {
  29999. direction: "rtl",
  30000. [`${e}-confirm-body`]: {
  30001. direction: "rtl"
  30002. }
  30003. }
  30004. }
  30005. };
  30006. }, YCe = (t) => {
  30007. const {
  30008. componentCls: e,
  30009. antCls: n
  30010. } = t, r = `${e}-confirm`;
  30011. return {
  30012. [e]: {
  30013. [`${e}-content`]: {
  30014. padding: 0
  30015. },
  30016. [`${e}-header`]: {
  30017. padding: t.modalHeaderPadding,
  30018. borderBottom: `${t.modalHeaderBorderWidth}px ${t.modalHeaderBorderStyle} ${t.modalHeaderBorderColorSplit}`,
  30019. marginBottom: 0
  30020. },
  30021. [`${e}-body`]: {
  30022. padding: t.modalBodyPadding
  30023. },
  30024. [`${e}-footer`]: {
  30025. padding: `${t.modalFooterPaddingVertical}px ${t.modalFooterPaddingHorizontal}px`,
  30026. borderTop: `${t.modalFooterBorderWidth}px ${t.modalFooterBorderStyle} ${t.modalFooterBorderColorSplit}`,
  30027. borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,
  30028. marginTop: 0
  30029. }
  30030. },
  30031. [r]: {
  30032. [`${n}-modal-body`]: {
  30033. padding: `${t.padding * 2}px ${t.padding * 2}px ${t.paddingLG}px`
  30034. },
  30035. [`${r}-body`]: {
  30036. [`> ${t.iconCls}`]: {
  30037. marginInlineEnd: t.margin,
  30038. // `content` after `icon` should set marginLeft
  30039. [`+ ${r}-title + ${r}-content`]: {
  30040. marginInlineStart: t.modalConfirmIconSize + t.margin
  30041. }
  30042. }
  30043. },
  30044. [`${r}-btns`]: {
  30045. marginTop: t.marginLG
  30046. }
  30047. }
  30048. };
  30049. }, qCe = Sn("Modal", (t) => {
  30050. const e = t.padding, n = t.fontSizeHeading5, r = t.lineHeightHeading5, i = Bt(t, {
  30051. modalBodyPadding: t.paddingLG,
  30052. modalHeaderBg: t.colorBgElevated,
  30053. modalHeaderPadding: `${e}px ${t.paddingLG}px`,
  30054. modalHeaderBorderWidth: t.lineWidth,
  30055. modalHeaderBorderStyle: t.lineType,
  30056. modalHeaderTitleLineHeight: r,
  30057. modalHeaderTitleFontSize: n,
  30058. modalHeaderBorderColorSplit: t.colorSplit,
  30059. modalHeaderCloseSize: r * n + e * 2,
  30060. modalContentBg: t.colorBgElevated,
  30061. modalHeadingColor: t.colorTextHeading,
  30062. modalCloseColor: t.colorTextDescription,
  30063. modalFooterBg: "transparent",
  30064. modalFooterBorderColorSplit: t.colorSplit,
  30065. modalFooterBorderStyle: t.lineType,
  30066. modalFooterPaddingVertical: t.paddingXS,
  30067. modalFooterPaddingHorizontal: t.padding,
  30068. modalFooterBorderWidth: t.lineWidth,
  30069. modalConfirmTitleFontSize: t.fontSizeLG,
  30070. modalIconHoverColor: t.colorIconHover,
  30071. modalConfirmIconSize: t.fontSize * t.lineHeight,
  30072. modalCloseBtnSize: t.controlHeightLG * 0.55
  30073. });
  30074. return [ZCe(i), UCe(i), XCe(i), fY(i), t.wireframe && YCe(i), fx(i, "zoom")];
  30075. }), q2 = (t) => ({
  30076. position: t || "absolute",
  30077. inset: 0
  30078. }), KCe = (t) => {
  30079. const {
  30080. iconCls: e,
  30081. motionDurationSlow: n,
  30082. paddingXXS: r,
  30083. marginXXS: i,
  30084. prefixCls: a
  30085. } = t;
  30086. return {
  30087. position: "absolute",
  30088. inset: 0,
  30089. display: "flex",
  30090. alignItems: "center",
  30091. justifyContent: "center",
  30092. color: "#fff",
  30093. background: new en("#000").setAlpha(0.5).toRgbString(),
  30094. cursor: "pointer",
  30095. opacity: 0,
  30096. transition: `opacity ${n}`,
  30097. [`.${a}-mask-info`]: I(I({}, Sh), {
  30098. padding: `0 ${r}px`,
  30099. [e]: {
  30100. marginInlineEnd: i,
  30101. svg: {
  30102. verticalAlign: "baseline"
  30103. }
  30104. }
  30105. })
  30106. };
  30107. }, JCe = (t) => {
  30108. const {
  30109. previewCls: e,
  30110. modalMaskBg: n,
  30111. paddingSM: r,
  30112. previewOperationColorDisabled: i,
  30113. motionDurationSlow: a
  30114. } = t, o = new en(n).setAlpha(0.1), s = o.clone().setAlpha(0.2);
  30115. return {
  30116. [`${e}-operations`]: I(I({}, nn(t)), {
  30117. display: "flex",
  30118. flexDirection: "row-reverse",
  30119. alignItems: "center",
  30120. color: t.previewOperationColor,
  30121. listStyle: "none",
  30122. background: o.toRgbString(),
  30123. pointerEvents: "auto",
  30124. "&-operation": {
  30125. marginInlineStart: r,
  30126. padding: r,
  30127. cursor: "pointer",
  30128. transition: `all ${a}`,
  30129. userSelect: "none",
  30130. "&:hover": {
  30131. background: s.toRgbString()
  30132. },
  30133. "&-disabled": {
  30134. color: i,
  30135. pointerEvents: "none"
  30136. },
  30137. "&:last-of-type": {
  30138. marginInlineStart: 0
  30139. }
  30140. },
  30141. "&-progress": {
  30142. position: "absolute",
  30143. left: {
  30144. _skip_check_: !0,
  30145. value: "50%"
  30146. },
  30147. transform: "translateX(-50%)"
  30148. },
  30149. "&-icon": {
  30150. fontSize: t.previewOperationSize
  30151. }
  30152. })
  30153. };
  30154. }, eTe = (t) => {
  30155. const {
  30156. modalMaskBg: e,
  30157. iconCls: n,
  30158. previewOperationColorDisabled: r,
  30159. previewCls: i,
  30160. zIndexPopup: a,
  30161. motionDurationSlow: o
  30162. } = t, s = new en(e).setAlpha(0.1), l = s.clone().setAlpha(0.2);
  30163. return {
  30164. [`${i}-switch-left, ${i}-switch-right`]: {
  30165. position: "fixed",
  30166. insetBlockStart: "50%",
  30167. zIndex: a + 1,
  30168. display: "flex",
  30169. alignItems: "center",
  30170. justifyContent: "center",
  30171. width: t.imagePreviewSwitchSize,
  30172. height: t.imagePreviewSwitchSize,
  30173. marginTop: -t.imagePreviewSwitchSize / 2,
  30174. color: t.previewOperationColor,
  30175. background: s.toRgbString(),
  30176. borderRadius: "50%",
  30177. transform: "translateY(-50%)",
  30178. cursor: "pointer",
  30179. transition: `all ${o}`,
  30180. pointerEvents: "auto",
  30181. userSelect: "none",
  30182. "&:hover": {
  30183. background: l.toRgbString()
  30184. },
  30185. "&-disabled": {
  30186. "&, &:hover": {
  30187. color: r,
  30188. background: "transparent",
  30189. cursor: "not-allowed",
  30190. [`> ${n}`]: {
  30191. cursor: "not-allowed"
  30192. }
  30193. }
  30194. },
  30195. [`> ${n}`]: {
  30196. fontSize: t.previewOperationSize
  30197. }
  30198. },
  30199. [`${i}-switch-left`]: {
  30200. insetInlineStart: t.marginSM
  30201. },
  30202. [`${i}-switch-right`]: {
  30203. insetInlineEnd: t.marginSM
  30204. }
  30205. };
  30206. }, tTe = (t) => {
  30207. const {
  30208. motionEaseOut: e,
  30209. previewCls: n,
  30210. motionDurationSlow: r,
  30211. componentCls: i
  30212. } = t;
  30213. return [
  30214. {
  30215. [`${i}-preview-root`]: {
  30216. [n]: {
  30217. height: "100%",
  30218. textAlign: "center",
  30219. pointerEvents: "none"
  30220. },
  30221. [`${n}-body`]: I(I({}, q2()), {
  30222. overflow: "hidden"
  30223. }),
  30224. [`${n}-img`]: {
  30225. maxWidth: "100%",
  30226. maxHeight: "100%",
  30227. verticalAlign: "middle",
  30228. transform: "scale3d(1, 1, 1)",
  30229. cursor: "grab",
  30230. transition: `transform ${r} ${e} 0s`,
  30231. userSelect: "none",
  30232. pointerEvents: "auto",
  30233. "&-wrapper": I(I({}, q2()), {
  30234. transition: `transform ${r} ${e} 0s`,
  30235. // https://github.com/ant-design/ant-design/issues/39913
  30236. // TailwindCSS will reset img default style.
  30237. // Let's set back.
  30238. display: "flex",
  30239. justifyContent: "center",
  30240. alignItems: "center",
  30241. "&::before": {
  30242. display: "inline-block",
  30243. width: 1,
  30244. height: "50%",
  30245. marginInlineEnd: -1,
  30246. content: '""'
  30247. }
  30248. })
  30249. },
  30250. [`${n}-moving`]: {
  30251. [`${n}-preview-img`]: {
  30252. cursor: "grabbing",
  30253. "&-wrapper": {
  30254. transitionDuration: "0s"
  30255. }
  30256. }
  30257. }
  30258. }
  30259. },
  30260. // Override
  30261. {
  30262. [`${i}-preview-root`]: {
  30263. [`${n}-wrap`]: {
  30264. zIndex: t.zIndexPopup
  30265. }
  30266. }
  30267. },
  30268. // Preview operations & switch
  30269. {
  30270. [`${i}-preview-operations-wrapper`]: {
  30271. position: "fixed",
  30272. insetBlockStart: 0,
  30273. insetInlineEnd: 0,
  30274. zIndex: t.zIndexPopup + 1,
  30275. width: "100%"
  30276. },
  30277. "&": [JCe(t), eTe(t)]
  30278. }
  30279. ];
  30280. }, nTe = (t) => {
  30281. const {
  30282. componentCls: e
  30283. } = t;
  30284. return {
  30285. // ============================== image ==============================
  30286. [e]: {
  30287. position: "relative",
  30288. display: "inline-block",
  30289. [`${e}-img`]: {
  30290. width: "100%",
  30291. height: "auto",
  30292. verticalAlign: "middle"
  30293. },
  30294. [`${e}-img-placeholder`]: {
  30295. backgroundColor: t.colorBgContainerDisabled,
  30296. backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
  30297. backgroundRepeat: "no-repeat",
  30298. backgroundPosition: "center center",
  30299. backgroundSize: "30%"
  30300. },
  30301. [`${e}-mask`]: I({}, KCe(t)),
  30302. [`${e}-mask:hover`]: {
  30303. opacity: 1
  30304. },
  30305. [`${e}-placeholder`]: I({}, q2())
  30306. }
  30307. };
  30308. }, rTe = (t) => {
  30309. const {
  30310. previewCls: e
  30311. } = t;
  30312. return {
  30313. [`${e}-root`]: fx(t, "zoom"),
  30314. "&": PU(t, !0)
  30315. };
  30316. }, dY = Sn("Image", (t) => {
  30317. const e = `${t.componentCls}-preview`, n = Bt(t, {
  30318. previewCls: e,
  30319. modalMaskBg: new en("#000").setAlpha(0.45).toRgbString(),
  30320. imagePreviewSwitchSize: t.controlHeightLG
  30321. });
  30322. return [nTe(n), tTe(n), fY(Bt(n, {
  30323. componentCls: e
  30324. })), rTe(n)];
  30325. }, (t) => ({
  30326. zIndexPopup: t.zIndexPopupBase + 80,
  30327. previewOperationColor: new en(t.colorTextLightSolid).toRgbString(),
  30328. previewOperationColorDisabled: new en(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
  30329. previewOperationSize: t.fontSizeIcon * 1.5
  30330. // FIXME: fontSizeIconLG
  30331. })), hY = {
  30332. rotateLeft: M(OD, null, null),
  30333. rotateRight: M(SD, null, null),
  30334. zoomIn: M(xD, null, null),
  30335. zoomOut: M(wD, null, null),
  30336. close: M(ol, null, null),
  30337. left: M(cD, null, null),
  30338. right: M(gx, null, null),
  30339. flipX: M(Q1, null, null),
  30340. flipY: M(Q1, {
  30341. rotate: 90
  30342. }, null)
  30343. }, iTe = () => ({
  30344. previewPrefixCls: String,
  30345. preview: ha()
  30346. }), aTe = te({
  30347. compatConfig: {
  30348. MODE: 3
  30349. },
  30350. name: "AImagePreviewGroup",
  30351. inheritAttrs: !1,
  30352. props: iTe(),
  30353. setup(t, e) {
  30354. let {
  30355. attrs: n,
  30356. slots: r
  30357. } = e;
  30358. const {
  30359. prefixCls: i,
  30360. rootPrefixCls: a
  30361. } = It("image", t), o = L(() => `${i.value}-preview`), [s, l] = dY(i), u = L(() => {
  30362. const {
  30363. preview: c
  30364. } = t;
  30365. if (c === !1)
  30366. return c;
  30367. const f = typeof c == "object" ? c : {};
  30368. return I(I({}, f), {
  30369. rootClassName: l.value,
  30370. transitionName: ts(a.value, "zoom", f.transitionName),
  30371. maskTransitionName: ts(a.value, "fade", f.maskTransitionName)
  30372. });
  30373. });
  30374. return () => s(M(oY, j(j({}, I(I({}, n), t)), {}, {
  30375. preview: u.value,
  30376. icons: hY,
  30377. previewPrefixCls: o.value
  30378. }), r));
  30379. }
  30380. }), oTe = aTe, Al = te({
  30381. name: "AImage",
  30382. inheritAttrs: !1,
  30383. props: lY(),
  30384. setup(t, e) {
  30385. let {
  30386. slots: n,
  30387. attrs: r
  30388. } = e;
  30389. const {
  30390. prefixCls: i,
  30391. rootPrefixCls: a,
  30392. configProvider: o
  30393. } = It("image", t), [s, l] = dY(i), u = L(() => {
  30394. const {
  30395. preview: c
  30396. } = t;
  30397. if (c === !1)
  30398. return c;
  30399. const f = typeof c == "object" ? c : {};
  30400. return I(I({
  30401. icons: hY
  30402. }, f), {
  30403. transitionName: ts(a.value, "zoom", f.transitionName),
  30404. maskTransitionName: ts(a.value, "fade", f.maskTransitionName)
  30405. });
  30406. });
  30407. return () => {
  30408. var c, f;
  30409. const d = ((f = (c = o.locale) === null || c === void 0 ? void 0 : c.value) === null || f === void 0 ? void 0 : f.Image) || Vs.Image, h = () => M("div", {
  30410. class: `${i.value}-mask-info`
  30411. }, [M(Tx, null, null), d == null ? void 0 : d.preview]), {
  30412. previewMask: p = n.previewMask || h
  30413. } = t;
  30414. return s(M(LCe, j(j({}, I(I(I({}, r), t), {
  30415. prefixCls: i.value
  30416. })), {}, {
  30417. preview: u.value,
  30418. rootClassName: ye(t.rootClassName, l.value)
  30419. }), I(I({}, n), {
  30420. previewMask: typeof p == "function" ? p : null
  30421. })));
  30422. };
  30423. }
  30424. });
  30425. Al.PreviewGroup = oTe;
  30426. Al.install = function(t) {
  30427. return t.component(Al.name, Al), t.component(Al.PreviewGroup.name, Al.PreviewGroup), t;
  30428. };
  30429. var sTe = { 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" };
  30430. function g3(t) {
  30431. for (var e = 1; e < arguments.length; e++) {
  30432. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  30433. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  30434. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  30435. }))), r.forEach(function(i) {
  30436. lTe(t, i, n[i]);
  30437. });
  30438. }
  30439. return t;
  30440. }
  30441. function lTe(t, e, n) {
  30442. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  30443. }
  30444. var CD = function(e, n) {
  30445. var r = g3({}, e, n.attrs);
  30446. return M(lt, g3({}, r, {
  30447. icon: sTe
  30448. }), null);
  30449. };
  30450. CD.displayName = "UpOutlined";
  30451. CD.inheritAttrs = !1;
  30452. function K2() {
  30453. return typeof BigInt == "function";
  30454. }
  30455. function _g(t) {
  30456. let e = t.trim(), n = e.startsWith("-");
  30457. n && (e = e.slice(1)), e = e.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), e.startsWith(".") && (e = `0${e}`);
  30458. const r = e || "0", i = r.split("."), a = i[0] || "0", o = i[1] || "0";
  30459. a === "0" && o === "0" && (n = !1);
  30460. const s = n ? "-" : "";
  30461. return {
  30462. negative: n,
  30463. negativeStr: s,
  30464. trimStr: r,
  30465. integerStr: a,
  30466. decimalStr: o,
  30467. fullStr: `${s}${r}`
  30468. };
  30469. }
  30470. function TD(t) {
  30471. const e = String(t);
  30472. return !Number.isNaN(Number(e)) && e.includes("e");
  30473. }
  30474. function fm(t) {
  30475. const e = String(t);
  30476. if (TD(t)) {
  30477. let n = Number(e.slice(e.indexOf("e-") + 2));
  30478. const r = e.match(/\.(\d+)/);
  30479. return r != null && r[1] && (n += r[1].length), n;
  30480. }
  30481. return e.includes(".") && $D(e) ? e.length - e.indexOf(".") - 1 : 0;
  30482. }
  30483. function PD(t) {
  30484. let e = String(t);
  30485. if (TD(t)) {
  30486. if (t > Number.MAX_SAFE_INTEGER)
  30487. return String(K2() ? BigInt(t).toString() : Number.MAX_SAFE_INTEGER);
  30488. if (t < Number.MIN_SAFE_INTEGER)
  30489. return String(K2() ? BigInt(t).toString() : Number.MIN_SAFE_INTEGER);
  30490. e = t.toFixed(fm(e));
  30491. }
  30492. return _g(e).fullStr;
  30493. }
  30494. function $D(t) {
  30495. return typeof t == "number" ? !Number.isNaN(t) : t ? (
  30496. // Normal type: 11.28
  30497. /^\s*-?\d+(\.\d+)?\s*$/.test(t) || // Pre-number: 1.
  30498. /^\s*-?\d+\.\s*$/.test(t) || // Post-number: .1
  30499. /^\s*-?\.\d+\s*$/.test(t)
  30500. ) : !1;
  30501. }
  30502. function pY(t) {
  30503. return !t && t !== 0 && !Number.isNaN(t) || !String(t).trim();
  30504. }
  30505. class Oc {
  30506. constructor(e) {
  30507. if (this.origin = "", pY(e)) {
  30508. this.empty = !0;
  30509. return;
  30510. }
  30511. this.origin = String(e), this.number = Number(e);
  30512. }
  30513. negate() {
  30514. return new Oc(-this.toNumber());
  30515. }
  30516. add(e) {
  30517. if (this.isInvalidate())
  30518. return new Oc(e);
  30519. const n = Number(e);
  30520. if (Number.isNaN(n))
  30521. return this;
  30522. const r = this.number + n;
  30523. if (r > Number.MAX_SAFE_INTEGER)
  30524. return new Oc(Number.MAX_SAFE_INTEGER);
  30525. if (r < Number.MIN_SAFE_INTEGER)
  30526. return new Oc(Number.MIN_SAFE_INTEGER);
  30527. const i = Math.max(fm(this.number), fm(n));
  30528. return new Oc(r.toFixed(i));
  30529. }
  30530. isEmpty() {
  30531. return this.empty;
  30532. }
  30533. isNaN() {
  30534. return Number.isNaN(this.number);
  30535. }
  30536. isInvalidate() {
  30537. return this.isEmpty() || this.isNaN();
  30538. }
  30539. equals(e) {
  30540. return this.toNumber() === (e == null ? void 0 : e.toNumber());
  30541. }
  30542. lessEquals(e) {
  30543. return this.add(e.negate().toString()).toNumber() <= 0;
  30544. }
  30545. toNumber() {
  30546. return this.number;
  30547. }
  30548. toString() {
  30549. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : PD(this.number) : this.origin;
  30550. }
  30551. }
  30552. class zd {
  30553. constructor(e) {
  30554. if (this.origin = "", pY(e)) {
  30555. this.empty = !0;
  30556. return;
  30557. }
  30558. if (this.origin = String(e), e === "-" || Number.isNaN(e)) {
  30559. this.nan = !0;
  30560. return;
  30561. }
  30562. let n = e;
  30563. if (TD(n) && (n = Number(n)), n = typeof n == "string" ? n : PD(n), $D(n)) {
  30564. const r = _g(n);
  30565. this.negative = r.negative;
  30566. const i = r.trimStr.split(".");
  30567. this.integer = BigInt(i[0]);
  30568. const a = i[1] || "0";
  30569. this.decimal = BigInt(a), this.decimalLen = a.length;
  30570. } else
  30571. this.nan = !0;
  30572. }
  30573. getMark() {
  30574. return this.negative ? "-" : "";
  30575. }
  30576. getIntegerStr() {
  30577. return this.integer.toString();
  30578. }
  30579. getDecimalStr() {
  30580. return this.decimal.toString().padStart(this.decimalLen, "0");
  30581. }
  30582. /**
  30583. * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
  30584. * This is used for add function only.
  30585. */
  30586. alignDecimal(e) {
  30587. const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e, "0")}`;
  30588. return BigInt(n);
  30589. }
  30590. negate() {
  30591. const e = new zd(this.toString());
  30592. return e.negative = !e.negative, e;
  30593. }
  30594. add(e) {
  30595. if (this.isInvalidate())
  30596. return new zd(e);
  30597. const n = new zd(e);
  30598. if (n.isInvalidate())
  30599. return this;
  30600. const r = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(r), a = n.alignDecimal(r), o = (i + a).toString(), {
  30601. negativeStr: s,
  30602. trimStr: l
  30603. } = _g(o), u = `${s}${l.padStart(r + 1, "0")}`;
  30604. return new zd(`${u.slice(0, -r)}.${u.slice(-r)}`);
  30605. }
  30606. isEmpty() {
  30607. return this.empty;
  30608. }
  30609. isNaN() {
  30610. return this.nan;
  30611. }
  30612. isInvalidate() {
  30613. return this.isEmpty() || this.isNaN();
  30614. }
  30615. equals(e) {
  30616. return this.toString() === (e == null ? void 0 : e.toString());
  30617. }
  30618. lessEquals(e) {
  30619. return this.add(e.negate().toString()).toNumber() <= 0;
  30620. }
  30621. toNumber() {
  30622. return this.isNaN() ? NaN : Number(this.toString());
  30623. }
  30624. toString() {
  30625. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : _g(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  30626. }
  30627. }
  30628. function Io(t) {
  30629. return K2() ? new zd(t) : new Oc(t);
  30630. }
  30631. function J2(t, e, n) {
  30632. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  30633. if (t === "")
  30634. return "";
  30635. const {
  30636. negativeStr: i,
  30637. integerStr: a,
  30638. decimalStr: o
  30639. } = _g(t), s = `${e}${o}`, l = `${i}${a}`;
  30640. if (n >= 0) {
  30641. const u = Number(o[n]);
  30642. if (u >= 5 && !r) {
  30643. const c = Io(t).add(`${i}0.${"0".repeat(n)}${10 - u}`);
  30644. return J2(c.toString(), e, n, r);
  30645. }
  30646. return n === 0 ? l : `${l}${e}${o.padEnd(n, "0").slice(0, n)}`;
  30647. }
  30648. return s === ".0" ? l : `${l}${s}`;
  30649. }
  30650. const uTe = 200, cTe = 600, fTe = te({
  30651. compatConfig: {
  30652. MODE: 3
  30653. },
  30654. name: "StepHandler",
  30655. inheritAttrs: !1,
  30656. props: {
  30657. prefixCls: String,
  30658. upDisabled: Boolean,
  30659. downDisabled: Boolean,
  30660. onStep: tt()
  30661. },
  30662. slots: Object,
  30663. setup(t, e) {
  30664. let {
  30665. slots: n,
  30666. emit: r
  30667. } = e;
  30668. const i = U(), a = (s, l) => {
  30669. s.preventDefault(), r("step", l);
  30670. function u() {
  30671. r("step", l), i.value = setTimeout(u, uTe);
  30672. }
  30673. i.value = setTimeout(u, cTe);
  30674. }, o = () => {
  30675. clearTimeout(i.value);
  30676. };
  30677. return yt(() => {
  30678. o();
  30679. }), () => {
  30680. if (EI())
  30681. return null;
  30682. const {
  30683. prefixCls: s,
  30684. upDisabled: l,
  30685. downDisabled: u
  30686. } = t, c = `${s}-handler`, f = ye(c, `${c}-up`, {
  30687. [`${c}-up-disabled`]: l
  30688. }), d = ye(c, `${c}-down`, {
  30689. [`${c}-down-disabled`]: u
  30690. }), h = {
  30691. unselectable: "on",
  30692. role: "button",
  30693. onMouseup: o,
  30694. onMouseleave: o
  30695. }, {
  30696. upNode: p,
  30697. downNode: v
  30698. } = n;
  30699. return M("div", {
  30700. class: `${c}-wrap`
  30701. }, [M("span", j(j({}, h), {}, {
  30702. onMousedown: (g) => {
  30703. a(g, !0);
  30704. },
  30705. "aria-label": "Increase Value",
  30706. "aria-disabled": l,
  30707. class: f
  30708. }), [(p == null ? void 0 : p()) || M("span", {
  30709. unselectable: "on",
  30710. class: `${s}-handler-up-inner`
  30711. }, null)]), M("span", j(j({}, h), {}, {
  30712. onMousedown: (g) => {
  30713. a(g, !1);
  30714. },
  30715. "aria-label": "Decrease Value",
  30716. "aria-disabled": u,
  30717. class: d
  30718. }), [(v == null ? void 0 : v()) || M("span", {
  30719. unselectable: "on",
  30720. class: `${s}-handler-down-inner`
  30721. }, null)])]);
  30722. };
  30723. }
  30724. });
  30725. function dTe(t, e) {
  30726. const n = U(null);
  30727. function r() {
  30728. try {
  30729. const {
  30730. selectionStart: a,
  30731. selectionEnd: o,
  30732. value: s
  30733. } = t.value, l = s.substring(0, a), u = s.substring(o);
  30734. n.value = {
  30735. start: a,
  30736. end: o,
  30737. value: s,
  30738. beforeTxt: l,
  30739. afterTxt: u
  30740. };
  30741. } catch {
  30742. }
  30743. }
  30744. function i() {
  30745. if (t.value && n.value && e.value)
  30746. try {
  30747. const {
  30748. value: a
  30749. } = t.value, {
  30750. beforeTxt: o,
  30751. afterTxt: s,
  30752. start: l
  30753. } = n.value;
  30754. let u = a.length;
  30755. if (a.endsWith(s))
  30756. u = a.length - n.value.afterTxt.length;
  30757. else if (a.startsWith(o))
  30758. u = o.length;
  30759. else {
  30760. const c = o[l - 1], f = a.indexOf(c, l - 1);
  30761. f !== -1 && (u = f + 1);
  30762. }
  30763. t.value.setSelectionRange(u, u);
  30764. } catch (a) {
  30765. ff(!1, `Something warning of cursor restore. Please fire issue about this: ${a.message}`);
  30766. }
  30767. }
  30768. return [r, i];
  30769. }
  30770. const hTe = () => {
  30771. const t = ae(0), e = () => {
  30772. xt.cancel(t.value);
  30773. };
  30774. return yt(() => {
  30775. e();
  30776. }), (n) => {
  30777. e(), t.value = xt(() => {
  30778. n();
  30779. });
  30780. };
  30781. };
  30782. var pTe = function(t, e) {
  30783. var n = {};
  30784. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  30785. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  30786. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  30787. return n;
  30788. };
  30789. const m3 = (t, e) => t || e.isEmpty() ? e.toString() : e.toNumber(), y3 = (t) => {
  30790. const e = Io(t);
  30791. return e.isInvalidate() ? null : e;
  30792. }, vY = () => ({
  30793. /** value will show as string */
  30794. stringMode: nt(),
  30795. defaultValue: gn([String, Number]),
  30796. value: gn([String, Number]),
  30797. prefixCls: hn(),
  30798. min: gn([String, Number]),
  30799. max: gn([String, Number]),
  30800. step: gn([String, Number], 1),
  30801. tabindex: Number,
  30802. controls: nt(!0),
  30803. readonly: nt(),
  30804. disabled: nt(),
  30805. autofocus: nt(),
  30806. keyboard: nt(!0),
  30807. /** Parse display value to validate number */
  30808. parser: tt(),
  30809. /** Transform `value` to display value show in input */
  30810. formatter: tt(),
  30811. /** Syntactic sugar of `formatter`. Config precision of display. */
  30812. precision: Number,
  30813. /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  30814. decimalSeparator: String,
  30815. onInput: tt(),
  30816. onChange: tt(),
  30817. onPressEnter: tt(),
  30818. onStep: tt(),
  30819. onBlur: tt(),
  30820. onFocus: tt()
  30821. }), vTe = te({
  30822. compatConfig: {
  30823. MODE: 3
  30824. },
  30825. name: "InnerInputNumber",
  30826. inheritAttrs: !1,
  30827. props: I(I({}, vY()), {
  30828. lazy: Boolean
  30829. }),
  30830. slots: Object,
  30831. setup(t, e) {
  30832. let {
  30833. attrs: n,
  30834. slots: r,
  30835. emit: i,
  30836. expose: a
  30837. } = e;
  30838. const o = ae(), s = ae(!1), l = ae(!1), u = ae(!1), c = ae(Io(t.value));
  30839. function f(F) {
  30840. t.value === void 0 && (c.value = F);
  30841. }
  30842. const d = (F, Q) => {
  30843. if (!Q)
  30844. return t.precision >= 0 ? t.precision : Math.max(fm(F), fm(t.step));
  30845. }, h = (F) => {
  30846. const Q = String(F);
  30847. if (t.parser)
  30848. return t.parser(Q);
  30849. let Z = Q;
  30850. return t.decimalSeparator && (Z = Z.replace(t.decimalSeparator, ".")), Z.replace(/[^\w.-]+/g, "");
  30851. }, p = ae(""), v = (F, Q) => {
  30852. if (t.formatter)
  30853. return t.formatter(F, {
  30854. userTyping: Q,
  30855. input: String(p.value)
  30856. });
  30857. let Z = typeof F == "number" ? PD(F) : F;
  30858. if (!Q) {
  30859. const ne = d(Z, Q);
  30860. if ($D(Z) && (t.decimalSeparator || ne >= 0)) {
  30861. const ee = t.decimalSeparator || ".";
  30862. Z = J2(Z, ee, ne);
  30863. }
  30864. }
  30865. return Z;
  30866. }, g = (() => {
  30867. const F = t.value;
  30868. return c.value.isInvalidate() && ["string", "number"].includes(typeof F) ? Number.isNaN(F) ? "" : F : v(c.value.toString(), !1);
  30869. })();
  30870. p.value = g;
  30871. function m(F, Q) {
  30872. p.value = v(
  30873. // Invalidate number is sometime passed by external control, we should let it go
  30874. // Otherwise is controlled by internal interactive logic which check by userTyping
  30875. // You can ref 'show limited value when input is not focused' test for more info.
  30876. F.isInvalidate() ? F.toString(!1) : F.toString(!Q),
  30877. Q
  30878. );
  30879. }
  30880. const y = L(() => y3(t.max)), b = L(() => y3(t.min)), _ = L(() => !y.value || !c.value || c.value.isInvalidate() ? !1 : y.value.lessEquals(c.value)), O = L(() => !b.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(b.value)), [S, x] = dTe(o, s), C = (F) => y.value && !F.lessEquals(y.value) ? y.value : b.value && !b.value.lessEquals(F) ? b.value : null, T = (F) => !C(F), w = (F, Q) => {
  30881. var Z;
  30882. let ne = F, ee = T(ne) || ne.isEmpty();
  30883. if (!ne.isEmpty() && !Q && (ne = C(ne) || ne, ee = !0), !t.readonly && !t.disabled && ee) {
  30884. const oe = ne.toString(), K = d(oe, Q);
  30885. return K >= 0 && (ne = Io(J2(oe, ".", K))), ne.equals(c.value) || (f(ne), (Z = t.onChange) === null || Z === void 0 || Z.call(t, ne.isEmpty() ? null : m3(t.stringMode, ne)), t.value === void 0 && m(ne, Q)), ne;
  30886. }
  30887. return c.value;
  30888. }, P = hTe(), $ = (F) => {
  30889. var Q;
  30890. if (S(), p.value = F, !u.value) {
  30891. const Z = h(F), ne = Io(Z);
  30892. ne.isNaN() || w(ne, !0);
  30893. }
  30894. (Q = t.onInput) === null || Q === void 0 || Q.call(t, F), P(() => {
  30895. let Z = F;
  30896. t.parser || (Z = F.replace(/。/g, ".")), Z !== F && $(Z);
  30897. });
  30898. }, A = () => {
  30899. u.value = !0;
  30900. }, D = () => {
  30901. u.value = !1, $(o.value.value);
  30902. }, E = (F) => {
  30903. $(F.target.value);
  30904. }, R = (F) => {
  30905. var Q, Z;
  30906. if (F && _.value || !F && O.value)
  30907. return;
  30908. l.value = !1;
  30909. let ne = Io(t.step);
  30910. F || (ne = ne.negate());
  30911. const ee = (c.value || Io(0)).add(ne.toString()), oe = w(ee, !1);
  30912. (Q = t.onStep) === null || Q === void 0 || Q.call(t, m3(t.stringMode, oe), {
  30913. offset: t.step,
  30914. type: F ? "up" : "down"
  30915. }), (Z = o.value) === null || Z === void 0 || Z.focus();
  30916. }, N = (F) => {
  30917. const Q = Io(h(p.value));
  30918. let Z = Q;
  30919. Q.isNaN() ? Z = c.value : Z = w(Q, F), t.value !== void 0 ? m(c.value, !1) : Z.isNaN() || m(Z, !1);
  30920. }, V = (F) => {
  30921. var Q;
  30922. const {
  30923. which: Z
  30924. } = F;
  30925. l.value = !0, Z === ge.ENTER && (u.value || (l.value = !1), N(!1), (Q = t.onPressEnter) === null || Q === void 0 || Q.call(t, F)), t.keyboard !== !1 && !u.value && [ge.UP, ge.DOWN].includes(Z) && (R(ge.UP === Z), F.preventDefault());
  30926. }, B = () => {
  30927. l.value = !1;
  30928. }, W = (F) => {
  30929. N(!1), s.value = !1, l.value = !1, i("blur", F);
  30930. };
  30931. return se(() => t.precision, () => {
  30932. c.value.isInvalidate() || m(c.value, !1);
  30933. }, {
  30934. flush: "post"
  30935. }), se(() => t.value, () => {
  30936. const F = Io(t.value);
  30937. c.value = F;
  30938. const Q = Io(h(p.value));
  30939. (!F.equals(Q) || !l.value || t.formatter) && m(F, l.value);
  30940. }, {
  30941. flush: "post"
  30942. }), se(p, () => {
  30943. t.formatter && x();
  30944. }, {
  30945. flush: "post"
  30946. }), se(() => t.disabled, (F) => {
  30947. F && (s.value = !1);
  30948. }), a({
  30949. focus: () => {
  30950. var F;
  30951. (F = o.value) === null || F === void 0 || F.focus();
  30952. },
  30953. blur: () => {
  30954. var F;
  30955. (F = o.value) === null || F === void 0 || F.blur();
  30956. }
  30957. }), () => {
  30958. const F = I(I({}, n), t), {
  30959. prefixCls: Q = "rc-input-number",
  30960. min: Z,
  30961. max: ne,
  30962. step: ee = 1,
  30963. defaultValue: oe,
  30964. value: K,
  30965. disabled: ie,
  30966. readonly: X,
  30967. keyboard: H,
  30968. controls: G = !0,
  30969. autofocus: re,
  30970. stringMode: fe,
  30971. parser: de,
  30972. formatter: Ee,
  30973. precision: $e,
  30974. decimalSeparator: Se,
  30975. onChange: be,
  30976. onInput: he,
  30977. onPressEnter: Te,
  30978. onStep: ze,
  30979. lazy: ut,
  30980. class: ct,
  30981. style: Dt
  30982. } = F, ve = pTe(F, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
  30983. upHandler: Xe,
  30984. downHandler: Rt
  30985. } = r, An = `${Q}-input`, sn = {};
  30986. return ut ? sn.onChange = E : sn.onInput = E, M("div", {
  30987. class: ye(Q, ct, {
  30988. [`${Q}-focused`]: s.value,
  30989. [`${Q}-disabled`]: ie,
  30990. [`${Q}-readonly`]: X,
  30991. [`${Q}-not-a-number`]: c.value.isNaN(),
  30992. [`${Q}-out-of-range`]: !c.value.isInvalidate() && !T(c.value)
  30993. }),
  30994. style: Dt,
  30995. onKeydown: V,
  30996. onKeyup: B
  30997. }, [G && M(fTe, {
  30998. prefixCls: Q,
  30999. upDisabled: _.value,
  31000. downDisabled: O.value,
  31001. onStep: R
  31002. }, {
  31003. upNode: Xe,
  31004. downNode: Rt
  31005. }), M("div", {
  31006. class: `${An}-wrap`
  31007. }, [M("input", j(j(j({
  31008. autofocus: re,
  31009. autocomplete: "off",
  31010. role: "spinbutton",
  31011. "aria-valuemin": Z,
  31012. "aria-valuemax": ne,
  31013. "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
  31014. step: ee
  31015. }, ve), {}, {
  31016. ref: o,
  31017. class: An,
  31018. value: p.value,
  31019. disabled: ie,
  31020. readonly: X,
  31021. onFocus: (Ar) => {
  31022. s.value = !0, i("focus", Ar);
  31023. }
  31024. }, sn), {}, {
  31025. onBlur: W,
  31026. onCompositionstart: A,
  31027. onCompositionend: D
  31028. }), null)])]);
  31029. };
  31030. }
  31031. });
  31032. function DC(t) {
  31033. return t != null;
  31034. }
  31035. const gTe = (t) => {
  31036. const {
  31037. componentCls: e,
  31038. lineWidth: n,
  31039. lineType: r,
  31040. colorBorder: i,
  31041. borderRadius: a,
  31042. fontSizeLG: o,
  31043. controlHeightLG: s,
  31044. controlHeightSM: l,
  31045. colorError: u,
  31046. inputPaddingHorizontalSM: c,
  31047. colorTextDescription: f,
  31048. motionDurationMid: d,
  31049. colorPrimary: h,
  31050. controlHeight: p,
  31051. inputPaddingHorizontal: v,
  31052. colorBgContainer: g,
  31053. colorTextDisabled: m,
  31054. borderRadiusSM: y,
  31055. borderRadiusLG: b,
  31056. controlWidth: _,
  31057. handleVisible: O
  31058. } = t;
  31059. return [
  31060. {
  31061. [e]: I(I(I(I({}, nn(t)), bx(t)), yx(t, e)), {
  31062. display: "inline-block",
  31063. width: _,
  31064. margin: 0,
  31065. padding: 0,
  31066. border: `${n}px ${r} ${i}`,
  31067. borderRadius: a,
  31068. "&-rtl": {
  31069. direction: "rtl",
  31070. [`${e}-input`]: {
  31071. direction: "rtl"
  31072. }
  31073. },
  31074. "&-lg": {
  31075. padding: 0,
  31076. fontSize: o,
  31077. borderRadius: b,
  31078. [`input${e}-input`]: {
  31079. height: s - 2 * n
  31080. }
  31081. },
  31082. "&-sm": {
  31083. padding: 0,
  31084. borderRadius: y,
  31085. [`input${e}-input`]: {
  31086. height: l - 2 * n,
  31087. padding: `0 ${c}px`
  31088. }
  31089. },
  31090. "&:hover": I({}, _0(t)),
  31091. "&-focused": I({}, z1(t)),
  31092. "&-disabled": I(I({}, aX(t)), {
  31093. [`${e}-input`]: {
  31094. cursor: "not-allowed"
  31095. }
  31096. }),
  31097. // ===================== Out Of Range =====================
  31098. "&-out-of-range": {
  31099. input: {
  31100. color: u
  31101. }
  31102. },
  31103. // Style for input-group: input with label, with button or dropdown...
  31104. "&-group": I(I(I({}, nn(t)), lX(t)), {
  31105. "&-wrapper": {
  31106. display: "inline-block",
  31107. textAlign: "start",
  31108. verticalAlign: "top",
  31109. [`${e}-affix-wrapper`]: {
  31110. width: "100%"
  31111. },
  31112. // Size
  31113. "&-lg": {
  31114. [`${e}-group-addon`]: {
  31115. borderRadius: b
  31116. }
  31117. },
  31118. "&-sm": {
  31119. [`${e}-group-addon`]: {
  31120. borderRadius: y
  31121. }
  31122. }
  31123. }
  31124. }),
  31125. [e]: {
  31126. "&-input": I(I({
  31127. width: "100%",
  31128. height: p - 2 * n,
  31129. padding: `0 ${v}px`,
  31130. textAlign: "start",
  31131. backgroundColor: "transparent",
  31132. border: 0,
  31133. borderRadius: a,
  31134. outline: 0,
  31135. transition: `all ${d} linear`,
  31136. appearance: "textfield",
  31137. color: t.colorText,
  31138. fontSize: "inherit",
  31139. verticalAlign: "top"
  31140. }, iX(t.colorTextPlaceholder)), {
  31141. '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
  31142. margin: 0,
  31143. /* stylelint-disable-next-line property-no-vendor-prefix */
  31144. webkitAppearance: "none",
  31145. appearance: "none"
  31146. }
  31147. })
  31148. }
  31149. })
  31150. },
  31151. // Handler
  31152. {
  31153. [e]: {
  31154. [`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]: {
  31155. opacity: 1
  31156. },
  31157. [`${e}-handler-wrap`]: {
  31158. position: "absolute",
  31159. insetBlockStart: 0,
  31160. insetInlineEnd: 0,
  31161. width: t.handleWidth,
  31162. height: "100%",
  31163. background: g,
  31164. borderStartStartRadius: 0,
  31165. borderStartEndRadius: a,
  31166. borderEndEndRadius: a,
  31167. borderEndStartRadius: 0,
  31168. opacity: O === !0 ? 1 : 0,
  31169. display: "flex",
  31170. flexDirection: "column",
  31171. alignItems: "stretch",
  31172. transition: `opacity ${d} linear ${d}`,
  31173. // Fix input number inside Menu makes icon too large
  31174. // We arise the selector priority by nest selector here
  31175. // https://github.com/ant-design/ant-design/issues/14367
  31176. [`${e}-handler`]: {
  31177. display: "flex",
  31178. alignItems: "center",
  31179. justifyContent: "center",
  31180. flex: "auto",
  31181. height: "40%",
  31182. [`
  31183. ${e}-handler-up-inner,
  31184. ${e}-handler-down-inner
  31185. `]: {
  31186. marginInlineEnd: 0,
  31187. fontSize: t.handleFontSize
  31188. }
  31189. }
  31190. },
  31191. [`${e}-handler`]: {
  31192. height: "50%",
  31193. overflow: "hidden",
  31194. color: f,
  31195. fontWeight: "bold",
  31196. lineHeight: 0,
  31197. textAlign: "center",
  31198. cursor: "pointer",
  31199. borderInlineStart: `${n}px ${r} ${i}`,
  31200. transition: `all ${d} linear`,
  31201. "&:active": {
  31202. background: t.colorFillAlter
  31203. },
  31204. // Hover
  31205. "&:hover": {
  31206. height: "60%",
  31207. [`
  31208. ${e}-handler-up-inner,
  31209. ${e}-handler-down-inner
  31210. `]: {
  31211. color: h
  31212. }
  31213. },
  31214. "&-up-inner, &-down-inner": I(I({}, up()), {
  31215. color: f,
  31216. transition: `all ${d} linear`,
  31217. userSelect: "none"
  31218. })
  31219. },
  31220. [`${e}-handler-up`]: {
  31221. borderStartEndRadius: a
  31222. },
  31223. [`${e}-handler-down`]: {
  31224. borderBlockStart: `${n}px ${r} ${i}`,
  31225. borderEndEndRadius: a
  31226. },
  31227. // Disabled
  31228. "&-disabled, &-readonly": {
  31229. [`${e}-handler-wrap`]: {
  31230. display: "none"
  31231. }
  31232. },
  31233. [`
  31234. ${e}-handler-up-disabled,
  31235. ${e}-handler-down-disabled
  31236. `]: {
  31237. cursor: "not-allowed"
  31238. },
  31239. [`
  31240. ${e}-handler-up-disabled:hover &-handler-up-inner,
  31241. ${e}-handler-down-disabled:hover &-handler-down-inner
  31242. `]: {
  31243. color: m
  31244. }
  31245. }
  31246. },
  31247. // Border-less
  31248. {
  31249. [`${e}-borderless`]: {
  31250. borderColor: "transparent",
  31251. boxShadow: "none",
  31252. [`${e}-handler-down`]: {
  31253. borderBlockStartWidth: 0
  31254. }
  31255. }
  31256. }
  31257. ];
  31258. }, mTe = (t) => {
  31259. const {
  31260. componentCls: e,
  31261. inputPaddingHorizontal: n,
  31262. inputAffixPadding: r,
  31263. controlWidth: i,
  31264. borderRadiusLG: a,
  31265. borderRadiusSM: o
  31266. } = t;
  31267. return {
  31268. [`${e}-affix-wrapper`]: I(I(I({}, bx(t)), yx(t, `${e}-affix-wrapper`)), {
  31269. // or number handler will cover form status
  31270. position: "relative",
  31271. display: "inline-flex",
  31272. width: i,
  31273. padding: 0,
  31274. paddingInlineStart: n,
  31275. "&-lg": {
  31276. borderRadius: a
  31277. },
  31278. "&-sm": {
  31279. borderRadius: o
  31280. },
  31281. [`&:not(${e}-affix-wrapper-disabled):hover`]: I(I({}, _0(t)), {
  31282. zIndex: 1
  31283. }),
  31284. "&-focused, &:focus": {
  31285. zIndex: 1
  31286. },
  31287. "&-disabled": {
  31288. [`${e}[disabled]`]: {
  31289. background: "transparent"
  31290. }
  31291. },
  31292. [`> div${e}`]: {
  31293. width: "100%",
  31294. border: "none",
  31295. outline: "none",
  31296. [`&${e}-focused`]: {
  31297. boxShadow: "none !important"
  31298. }
  31299. },
  31300. [`input${e}-input`]: {
  31301. padding: 0
  31302. },
  31303. "&::before": {
  31304. width: 0,
  31305. visibility: "hidden",
  31306. content: '"\\a0"'
  31307. },
  31308. [`${e}-handler-wrap`]: {
  31309. zIndex: 2
  31310. },
  31311. [e]: {
  31312. "&-prefix, &-suffix": {
  31313. display: "flex",
  31314. flex: "none",
  31315. alignItems: "center",
  31316. pointerEvents: "none"
  31317. },
  31318. "&-prefix": {
  31319. marginInlineEnd: r
  31320. },
  31321. "&-suffix": {
  31322. position: "absolute",
  31323. insetBlockStart: 0,
  31324. insetInlineEnd: 0,
  31325. zIndex: 1,
  31326. height: "100%",
  31327. marginInlineEnd: n,
  31328. marginInlineStart: r
  31329. }
  31330. }
  31331. })
  31332. };
  31333. }, yTe = Sn("InputNumber", (t) => {
  31334. const e = uX(t);
  31335. return [
  31336. gTe(e),
  31337. mTe(e),
  31338. // =====================================================
  31339. // == Space Compact ==
  31340. // =====================================================
  31341. dx(e)
  31342. ];
  31343. }, (t) => ({
  31344. controlWidth: 90,
  31345. handleWidth: t.controlHeightSM - t.lineWidth * 2,
  31346. handleFontSize: t.fontSize / 2,
  31347. handleVisible: "auto"
  31348. }));
  31349. var bTe = function(t, e) {
  31350. var n = {};
  31351. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31352. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31353. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31354. return n;
  31355. };
  31356. const b3 = vY(), _Te = () => I(I({}, b3), {
  31357. size: hn(),
  31358. bordered: nt(!0),
  31359. placeholder: String,
  31360. name: String,
  31361. id: String,
  31362. type: String,
  31363. addonBefore: Y.any,
  31364. addonAfter: Y.any,
  31365. prefix: Y.any,
  31366. "onUpdate:value": b3.onChange,
  31367. valueModifiers: Object,
  31368. status: hn()
  31369. }), RC = te({
  31370. compatConfig: {
  31371. MODE: 3
  31372. },
  31373. name: "AInputNumber",
  31374. inheritAttrs: !1,
  31375. props: _Te(),
  31376. // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  31377. slots: Object,
  31378. setup(t, e) {
  31379. let {
  31380. emit: n,
  31381. expose: r,
  31382. attrs: i,
  31383. slots: a
  31384. } = e;
  31385. var o;
  31386. const s = ls(), l = ao.useInject(), u = L(() => y0(l.status, t.status)), {
  31387. prefixCls: c,
  31388. size: f,
  31389. direction: d,
  31390. disabled: h
  31391. } = It("input-number", t), {
  31392. compactSize: p,
  31393. compactItemClassnames: v
  31394. } = ux(c, d), g = Jo(), m = L(() => {
  31395. var A;
  31396. return (A = h.value) !== null && A !== void 0 ? A : g.value;
  31397. }), [y, b] = yTe(c), _ = L(() => p.value || f.value), O = ae((o = t.value) !== null && o !== void 0 ? o : t.defaultValue), S = ae(!1);
  31398. se(() => t.value, () => {
  31399. O.value = t.value;
  31400. });
  31401. const x = ae(null), C = () => {
  31402. var A;
  31403. (A = x.value) === null || A === void 0 || A.focus();
  31404. };
  31405. r({
  31406. focus: C,
  31407. blur: () => {
  31408. var A;
  31409. (A = x.value) === null || A === void 0 || A.blur();
  31410. }
  31411. });
  31412. const w = (A) => {
  31413. t.value === void 0 && (O.value = A), n("update:value", A), n("change", A), s.onFieldChange();
  31414. }, P = (A) => {
  31415. S.value = !1, n("blur", A), s.onFieldBlur();
  31416. }, $ = (A) => {
  31417. S.value = !0, n("focus", A);
  31418. };
  31419. return () => {
  31420. var A, D, E, R;
  31421. const {
  31422. hasFeedback: N,
  31423. isFormItemInput: V,
  31424. feedbackIcon: B
  31425. } = l, W = (A = t.id) !== null && A !== void 0 ? A : s.id.value, F = I(I(I({}, i), t), {
  31426. id: W,
  31427. disabled: m.value
  31428. }), {
  31429. class: Q,
  31430. bordered: Z,
  31431. readonly: ne,
  31432. style: ee,
  31433. addonBefore: oe = (D = a.addonBefore) === null || D === void 0 ? void 0 : D.call(a),
  31434. addonAfter: K = (E = a.addonAfter) === null || E === void 0 ? void 0 : E.call(a),
  31435. prefix: ie = (R = a.prefix) === null || R === void 0 ? void 0 : R.call(a),
  31436. valueModifiers: X = {}
  31437. } = F, H = bTe(F, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), G = c.value, re = ye({
  31438. [`${G}-lg`]: _.value === "large",
  31439. [`${G}-sm`]: _.value === "small",
  31440. [`${G}-rtl`]: d.value === "rtl",
  31441. [`${G}-readonly`]: ne,
  31442. [`${G}-borderless`]: !Z,
  31443. [`${G}-in-form-item`]: V
  31444. }, Ds(G, u.value), Q, v.value, b.value);
  31445. let fe = M(vTe, j(j({}, or(H, ["size", "defaultValue"])), {}, {
  31446. ref: x,
  31447. lazy: !!X.lazy,
  31448. value: O.value,
  31449. class: re,
  31450. prefixCls: G,
  31451. readonly: ne,
  31452. onChange: w,
  31453. onBlur: P,
  31454. onFocus: $
  31455. }), {
  31456. upHandler: a.upIcon ? () => M("span", {
  31457. class: `${G}-handler-up-inner`
  31458. }, [a.upIcon()]) : () => M(CD, {
  31459. class: `${G}-handler-up-inner`
  31460. }, null),
  31461. downHandler: a.downIcon ? () => M("span", {
  31462. class: `${G}-handler-down-inner`
  31463. }, [a.downIcon()]) : () => M(rx, {
  31464. class: `${G}-handler-down-inner`
  31465. }, null)
  31466. });
  31467. const de = DC(oe) || DC(K), Ee = DC(ie);
  31468. if (Ee || N) {
  31469. const $e = ye(`${G}-affix-wrapper`, Ds(`${G}-affix-wrapper`, u.value, N), {
  31470. [`${G}-affix-wrapper-focused`]: S.value,
  31471. [`${G}-affix-wrapper-disabled`]: m.value,
  31472. [`${G}-affix-wrapper-sm`]: _.value === "small",
  31473. [`${G}-affix-wrapper-lg`]: _.value === "large",
  31474. [`${G}-affix-wrapper-rtl`]: d.value === "rtl",
  31475. [`${G}-affix-wrapper-readonly`]: ne,
  31476. [`${G}-affix-wrapper-borderless`]: !Z,
  31477. // className will go to addon wrapper
  31478. [`${Q}`]: !de && Q
  31479. }, b.value);
  31480. fe = M("div", {
  31481. class: $e,
  31482. style: ee,
  31483. onClick: C
  31484. }, [Ee && M("span", {
  31485. class: `${G}-prefix`
  31486. }, [ie]), fe, N && M("span", {
  31487. class: `${G}-suffix`
  31488. }, [B])]);
  31489. }
  31490. if (de) {
  31491. const $e = `${G}-group`, Se = `${$e}-addon`, be = oe ? M("div", {
  31492. class: Se
  31493. }, [oe]) : null, he = K ? M("div", {
  31494. class: Se
  31495. }, [K]) : null, Te = ye(`${G}-wrapper`, $e, {
  31496. [`${$e}-rtl`]: d.value === "rtl"
  31497. }, b.value), ze = ye(`${G}-group-wrapper`, {
  31498. [`${G}-group-wrapper-sm`]: _.value === "small",
  31499. [`${G}-group-wrapper-lg`]: _.value === "large",
  31500. [`${G}-group-wrapper-rtl`]: d.value === "rtl"
  31501. }, Ds(`${c}-group-wrapper`, u.value, N), Q, b.value);
  31502. fe = M("div", {
  31503. class: ze,
  31504. style: ee
  31505. }, [M("div", {
  31506. class: Te
  31507. }, [be && M(I1, null, {
  31508. default: () => [M(A1, null, {
  31509. default: () => [be]
  31510. })]
  31511. }), fe, he && M(I1, null, {
  31512. default: () => [M(A1, null, {
  31513. default: () => [he]
  31514. })]
  31515. })])]);
  31516. }
  31517. return y(Pn(fe, {
  31518. style: ee
  31519. }));
  31520. };
  31521. }
  31522. }), S0 = I(RC, {
  31523. install: (t) => (t.component(RC.name, RC), t)
  31524. });
  31525. function OTe(t, e, n) {
  31526. 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;
  31527. function h() {
  31528. c && clearTimeout(c);
  31529. }
  31530. function p(g) {
  31531. var m = g || {}, y = m.upcomingOnly, b = y === void 0 ? !1 : y;
  31532. h(), f = !b;
  31533. }
  31534. function v() {
  31535. for (var g = arguments.length, m = new Array(g), y = 0; y < g; y++)
  31536. m[y] = arguments[y];
  31537. var b = this, _ = Date.now() - d;
  31538. if (f)
  31539. return;
  31540. function O() {
  31541. d = Date.now(), e.apply(b, m);
  31542. }
  31543. function S() {
  31544. c = void 0;
  31545. }
  31546. !s && u && !c && O(), h(), u === void 0 && _ > t ? s ? (d = Date.now(), a || (c = setTimeout(u ? S : O, t))) : O() : a !== !0 && (c = setTimeout(u ? S : O, u === void 0 ? t - _ : t));
  31547. }
  31548. return v.cancel = p, v;
  31549. }
  31550. function STe(t, e, n) {
  31551. var r = {}, i = r.atBegin, a = i === void 0 ? !1 : i;
  31552. return OTe(t, e, {
  31553. debounceMode: a !== !1
  31554. });
  31555. }
  31556. const xTe = new Ot("antSpinMove", {
  31557. to: {
  31558. opacity: 1
  31559. }
  31560. }), wTe = new Ot("antRotate", {
  31561. to: {
  31562. transform: "rotate(405deg)"
  31563. }
  31564. }), CTe = (t) => ({
  31565. [`${t.componentCls}`]: I(I({}, nn(t)), {
  31566. position: "absolute",
  31567. display: "none",
  31568. color: t.colorPrimary,
  31569. textAlign: "center",
  31570. verticalAlign: "middle",
  31571. opacity: 0,
  31572. transition: `transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,
  31573. "&-spinning": {
  31574. position: "static",
  31575. display: "inline-block",
  31576. opacity: 1
  31577. },
  31578. "&-nested-loading": {
  31579. position: "relative",
  31580. [`> div > ${t.componentCls}`]: {
  31581. position: "absolute",
  31582. top: 0,
  31583. insetInlineStart: 0,
  31584. zIndex: 4,
  31585. display: "block",
  31586. width: "100%",
  31587. height: "100%",
  31588. maxHeight: t.contentHeight,
  31589. [`${t.componentCls}-dot`]: {
  31590. position: "absolute",
  31591. top: "50%",
  31592. insetInlineStart: "50%",
  31593. margin: -t.spinDotSize / 2
  31594. },
  31595. [`${t.componentCls}-text`]: {
  31596. position: "absolute",
  31597. top: "50%",
  31598. width: "100%",
  31599. paddingTop: (t.spinDotSize - t.fontSize) / 2 + 2,
  31600. textShadow: `0 1px 2px ${t.colorBgContainer}`
  31601. // FIXME: shadow
  31602. },
  31603. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31604. marginTop: -(t.spinDotSize / 2) - 10
  31605. },
  31606. "&-sm": {
  31607. [`${t.componentCls}-dot`]: {
  31608. margin: -t.spinDotSizeSM / 2
  31609. },
  31610. [`${t.componentCls}-text`]: {
  31611. paddingTop: (t.spinDotSizeSM - t.fontSize) / 2 + 2
  31612. },
  31613. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31614. marginTop: -(t.spinDotSizeSM / 2) - 10
  31615. }
  31616. },
  31617. "&-lg": {
  31618. [`${t.componentCls}-dot`]: {
  31619. margin: -(t.spinDotSizeLG / 2)
  31620. },
  31621. [`${t.componentCls}-text`]: {
  31622. paddingTop: (t.spinDotSizeLG - t.fontSize) / 2 + 2
  31623. },
  31624. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31625. marginTop: -(t.spinDotSizeLG / 2) - 10
  31626. }
  31627. }
  31628. },
  31629. [`${t.componentCls}-container`]: {
  31630. position: "relative",
  31631. transition: `opacity ${t.motionDurationSlow}`,
  31632. "&::after": {
  31633. position: "absolute",
  31634. top: 0,
  31635. insetInlineEnd: 0,
  31636. bottom: 0,
  31637. insetInlineStart: 0,
  31638. zIndex: 10,
  31639. width: "100%",
  31640. height: "100%",
  31641. background: t.colorBgContainer,
  31642. opacity: 0,
  31643. transition: `all ${t.motionDurationSlow}`,
  31644. content: '""',
  31645. pointerEvents: "none"
  31646. }
  31647. },
  31648. [`${t.componentCls}-blur`]: {
  31649. clear: "both",
  31650. opacity: 0.5,
  31651. userSelect: "none",
  31652. pointerEvents: "none",
  31653. "&::after": {
  31654. opacity: 0.4,
  31655. pointerEvents: "auto"
  31656. }
  31657. }
  31658. },
  31659. // tip
  31660. // ------------------------------
  31661. "&-tip": {
  31662. color: t.spinDotDefault
  31663. },
  31664. // dots
  31665. // ------------------------------
  31666. [`${t.componentCls}-dot`]: {
  31667. position: "relative",
  31668. display: "inline-block",
  31669. fontSize: t.spinDotSize,
  31670. width: "1em",
  31671. height: "1em",
  31672. "&-item": {
  31673. position: "absolute",
  31674. display: "block",
  31675. width: (t.spinDotSize - t.marginXXS / 2) / 2,
  31676. height: (t.spinDotSize - t.marginXXS / 2) / 2,
  31677. backgroundColor: t.colorPrimary,
  31678. borderRadius: "100%",
  31679. transform: "scale(0.75)",
  31680. transformOrigin: "50% 50%",
  31681. opacity: 0.3,
  31682. animationName: xTe,
  31683. animationDuration: "1s",
  31684. animationIterationCount: "infinite",
  31685. animationTimingFunction: "linear",
  31686. animationDirection: "alternate",
  31687. "&:nth-child(1)": {
  31688. top: 0,
  31689. insetInlineStart: 0
  31690. },
  31691. "&:nth-child(2)": {
  31692. top: 0,
  31693. insetInlineEnd: 0,
  31694. animationDelay: "0.4s"
  31695. },
  31696. "&:nth-child(3)": {
  31697. insetInlineEnd: 0,
  31698. bottom: 0,
  31699. animationDelay: "0.8s"
  31700. },
  31701. "&:nth-child(4)": {
  31702. bottom: 0,
  31703. insetInlineStart: 0,
  31704. animationDelay: "1.2s"
  31705. }
  31706. },
  31707. "&-spin": {
  31708. transform: "rotate(45deg)",
  31709. animationName: wTe,
  31710. animationDuration: "1.2s",
  31711. animationIterationCount: "infinite",
  31712. animationTimingFunction: "linear"
  31713. }
  31714. },
  31715. // Sizes
  31716. // ------------------------------
  31717. // small
  31718. [`&-sm ${t.componentCls}-dot`]: {
  31719. fontSize: t.spinDotSizeSM,
  31720. i: {
  31721. width: (t.spinDotSizeSM - t.marginXXS / 2) / 2,
  31722. height: (t.spinDotSizeSM - t.marginXXS / 2) / 2
  31723. }
  31724. },
  31725. // large
  31726. [`&-lg ${t.componentCls}-dot`]: {
  31727. fontSize: t.spinDotSizeLG,
  31728. i: {
  31729. width: (t.spinDotSizeLG - t.marginXXS) / 2,
  31730. height: (t.spinDotSizeLG - t.marginXXS) / 2
  31731. }
  31732. },
  31733. [`&${t.componentCls}-show-text ${t.componentCls}-text`]: {
  31734. display: "block"
  31735. }
  31736. })
  31737. }), TTe = Sn("Spin", (t) => {
  31738. const e = Bt(t, {
  31739. spinDotDefault: t.colorTextDescription,
  31740. spinDotSize: t.controlHeightLG / 2,
  31741. spinDotSizeSM: t.controlHeightLG * 0.35,
  31742. spinDotSizeLG: t.controlHeight
  31743. });
  31744. return [CTe(e)];
  31745. }, {
  31746. contentHeight: 400
  31747. });
  31748. var PTe = function(t, e) {
  31749. var n = {};
  31750. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31751. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31752. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31753. return n;
  31754. };
  31755. const $Te = () => ({
  31756. prefixCls: String,
  31757. spinning: {
  31758. type: Boolean,
  31759. default: void 0
  31760. },
  31761. size: String,
  31762. wrapperClassName: String,
  31763. tip: Y.any,
  31764. delay: Number,
  31765. indicator: Y.any
  31766. });
  31767. let I_ = null;
  31768. function ATe(t, e) {
  31769. return !!t && !!e && !isNaN(Number(e));
  31770. }
  31771. function ETe(t) {
  31772. const e = t.indicator;
  31773. I_ = typeof e == "function" ? e : () => M(e, null, null);
  31774. }
  31775. const Og = te({
  31776. compatConfig: {
  31777. MODE: 3
  31778. },
  31779. name: "ASpin",
  31780. inheritAttrs: !1,
  31781. props: sr($Te(), {
  31782. size: "default",
  31783. spinning: !0,
  31784. wrapperClassName: ""
  31785. }),
  31786. setup(t, e) {
  31787. let {
  31788. attrs: n,
  31789. slots: r
  31790. } = e;
  31791. const {
  31792. prefixCls: i,
  31793. size: a,
  31794. direction: o
  31795. } = It("spin", t), [s, l] = TTe(i), u = ae(t.spinning && !ATe(t.spinning, t.delay));
  31796. let c;
  31797. return se([() => t.spinning, () => t.delay], () => {
  31798. c == null || c.cancel(), c = STe(t.delay, () => {
  31799. u.value = t.spinning;
  31800. }), c == null || c();
  31801. }, {
  31802. immediate: !0,
  31803. flush: "post"
  31804. }), yt(() => {
  31805. c == null || c.cancel();
  31806. }), () => {
  31807. var f, d;
  31808. const {
  31809. class: h
  31810. } = n, p = PTe(n, ["class"]), {
  31811. tip: v = (f = r.tip) === null || f === void 0 ? void 0 : f.call(r)
  31812. } = t, g = (d = r.default) === null || d === void 0 ? void 0 : d.call(r), m = {
  31813. [l.value]: !0,
  31814. [i.value]: !0,
  31815. [`${i.value}-sm`]: a.value === "small",
  31816. [`${i.value}-lg`]: a.value === "large",
  31817. [`${i.value}-spinning`]: u.value,
  31818. [`${i.value}-show-text`]: !!v,
  31819. [`${i.value}-rtl`]: o.value === "rtl",
  31820. [h]: !!h
  31821. };
  31822. function y(_) {
  31823. const O = `${_}-dot`;
  31824. let S = RS(r, t, "indicator");
  31825. return S === null ? null : (Array.isArray(S) && (S = S.length === 1 ? S[0] : S), nu(S) ? Bs(S, {
  31826. class: O
  31827. }) : I_ && nu(I_()) ? Bs(I_(), {
  31828. class: O
  31829. }) : M("span", {
  31830. class: `${O} ${_}-dot-spin`
  31831. }, [M("i", {
  31832. class: `${_}-dot-item`
  31833. }, null), M("i", {
  31834. class: `${_}-dot-item`
  31835. }, null), M("i", {
  31836. class: `${_}-dot-item`
  31837. }, null), M("i", {
  31838. class: `${_}-dot-item`
  31839. }, null)]));
  31840. }
  31841. const b = M("div", j(j({}, p), {}, {
  31842. class: m,
  31843. "aria-live": "polite",
  31844. "aria-busy": u.value
  31845. }), [y(i.value), v ? M("div", {
  31846. class: `${i.value}-text`
  31847. }, [v]) : null]);
  31848. if (g && ss(g).length) {
  31849. const _ = {
  31850. [`${i.value}-container`]: !0,
  31851. [`${i.value}-blur`]: u.value
  31852. };
  31853. return s(M("div", {
  31854. class: [`${i.value}-nested-loading`, t.wrapperClassName, l.value]
  31855. }, [u.value && M("div", {
  31856. key: "loading"
  31857. }, [b]), M("div", {
  31858. class: _,
  31859. key: "container"
  31860. }, [g])]));
  31861. }
  31862. return s(b);
  31863. };
  31864. }
  31865. });
  31866. Og.setDefaultIndicator = ETe;
  31867. Og.install = function(t) {
  31868. return t.component(Og.name, Og), t;
  31869. };
  31870. var MTe = function(t, e) {
  31871. var n = {};
  31872. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31873. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31874. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31875. return n;
  31876. };
  31877. let eA;
  31878. const ITe = (t) => {
  31879. eA = {
  31880. x: t.pageX,
  31881. y: t.pageY
  31882. }, setTimeout(() => eA = null, 100);
  31883. };
  31884. gX() && vr(document.documentElement, "click", ITe, !0);
  31885. const DTe = () => ({
  31886. prefixCls: String,
  31887. /** @deprecated Please use `open` instead. */
  31888. visible: {
  31889. type: Boolean,
  31890. default: void 0
  31891. },
  31892. open: {
  31893. type: Boolean,
  31894. default: void 0
  31895. },
  31896. confirmLoading: {
  31897. type: Boolean,
  31898. default: void 0
  31899. },
  31900. title: Y.any,
  31901. closable: {
  31902. type: Boolean,
  31903. default: void 0
  31904. },
  31905. closeIcon: Y.any,
  31906. onOk: Function,
  31907. onCancel: Function,
  31908. "onUpdate:visible": Function,
  31909. "onUpdate:open": Function,
  31910. onChange: Function,
  31911. afterClose: Function,
  31912. centered: {
  31913. type: Boolean,
  31914. default: void 0
  31915. },
  31916. width: [String, Number],
  31917. footer: Y.any,
  31918. okText: Y.any,
  31919. okType: String,
  31920. cancelText: Y.any,
  31921. icon: Y.any,
  31922. maskClosable: {
  31923. type: Boolean,
  31924. default: void 0
  31925. },
  31926. forceRender: {
  31927. type: Boolean,
  31928. default: void 0
  31929. },
  31930. okButtonProps: $t(),
  31931. cancelButtonProps: $t(),
  31932. destroyOnClose: {
  31933. type: Boolean,
  31934. default: void 0
  31935. },
  31936. wrapClassName: String,
  31937. maskTransitionName: String,
  31938. transitionName: String,
  31939. getContainer: {
  31940. type: [String, Function, Boolean, Object],
  31941. default: void 0
  31942. },
  31943. zIndex: Number,
  31944. bodyStyle: $t(),
  31945. maskStyle: $t(),
  31946. mask: {
  31947. type: Boolean,
  31948. default: void 0
  31949. },
  31950. keyboard: {
  31951. type: Boolean,
  31952. default: void 0
  31953. },
  31954. wrapProps: Object,
  31955. focusTriggerAfterClose: {
  31956. type: Boolean,
  31957. default: void 0
  31958. },
  31959. modalRender: Function,
  31960. mousePosition: $t()
  31961. }), ji = te({
  31962. compatConfig: {
  31963. MODE: 3
  31964. },
  31965. name: "AModal",
  31966. inheritAttrs: !1,
  31967. props: sr(DTe(), {
  31968. width: 520,
  31969. confirmLoading: !1,
  31970. okType: "primary"
  31971. }),
  31972. setup(t, e) {
  31973. let {
  31974. emit: n,
  31975. slots: r,
  31976. attrs: i
  31977. } = e;
  31978. const [a] = LS("Modal"), {
  31979. prefixCls: o,
  31980. rootPrefixCls: s,
  31981. direction: l,
  31982. getPopupContainer: u
  31983. } = It("modal", t), [c, f] = qCe(o);
  31984. Yr(t.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
  31985. const d = (v) => {
  31986. n("update:visible", !1), n("update:open", !1), n("cancel", v), n("change", !1);
  31987. }, h = (v) => {
  31988. n("ok", v);
  31989. }, p = () => {
  31990. var v, g;
  31991. const {
  31992. okText: m = (v = r.okText) === null || v === void 0 ? void 0 : v.call(r),
  31993. okType: y,
  31994. cancelText: b = (g = r.cancelText) === null || g === void 0 ? void 0 : g.call(r),
  31995. confirmLoading: _
  31996. } = t;
  31997. return M(wt, null, [M(Xr, j({
  31998. onClick: d
  31999. }, t.cancelButtonProps), {
  32000. default: () => [b || a.value.cancelText]
  32001. }), M(Xr, j(j({}, NU(y)), {}, {
  32002. loading: _,
  32003. onClick: h
  32004. }, t.okButtonProps), {
  32005. default: () => [m || a.value.okText]
  32006. })]);
  32007. };
  32008. return () => {
  32009. var v, g;
  32010. const {
  32011. prefixCls: m,
  32012. visible: y,
  32013. open: b,
  32014. wrapClassName: _,
  32015. centered: O,
  32016. getContainer: S,
  32017. closeIcon: x = (v = r.closeIcon) === null || v === void 0 ? void 0 : v.call(r),
  32018. focusTriggerAfterClose: C = !0
  32019. } = t, T = MTe(t, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), w = ye(_, {
  32020. [`${o.value}-centered`]: !!O,
  32021. [`${o.value}-wrap-rtl`]: l.value === "rtl"
  32022. });
  32023. return c(M(aY, j(j(j({}, T), i), {}, {
  32024. rootClassName: f.value,
  32025. class: ye(f.value, i.class),
  32026. getContainer: S || (u == null ? void 0 : u.value),
  32027. prefixCls: o.value,
  32028. wrapClassName: w,
  32029. visible: b ?? y,
  32030. onClose: d,
  32031. focusTriggerAfterClose: C,
  32032. transitionName: ts(s.value, "zoom", t.transitionName),
  32033. maskTransitionName: ts(s.value, "fade", t.maskTransitionName),
  32034. mousePosition: (g = T.mousePosition) !== null && g !== void 0 ? g : eA
  32035. }), I(I({}, r), {
  32036. footer: r.footer || p,
  32037. closeIcon: () => M("span", {
  32038. class: `${o.value}-close-x`
  32039. }, [x || M(ol, {
  32040. class: `${o.value}-close-icon`
  32041. }, null)])
  32042. })));
  32043. };
  32044. }
  32045. }), RTe = () => {
  32046. const t = ae(!1);
  32047. return yt(() => {
  32048. t.value = !0;
  32049. }), t;
  32050. }, kTe = {
  32051. type: {
  32052. type: String
  32053. },
  32054. actionFn: Function,
  32055. close: Function,
  32056. autofocus: Boolean,
  32057. prefixCls: String,
  32058. buttonProps: $t(),
  32059. emitEvent: Boolean,
  32060. quitOnNullishReturnValue: Boolean
  32061. };
  32062. function _3(t) {
  32063. return !!(t && t.then);
  32064. }
  32065. const O3 = te({
  32066. compatConfig: {
  32067. MODE: 3
  32068. },
  32069. name: "ActionButton",
  32070. props: kTe,
  32071. setup(t, e) {
  32072. let {
  32073. slots: n
  32074. } = e;
  32075. const r = ae(!1), i = ae(), a = ae(!1);
  32076. let o;
  32077. const s = RTe();
  32078. it(() => {
  32079. t.autofocus && (o = setTimeout(() => {
  32080. var f, d;
  32081. return (d = (f = Ts(i.value)) === null || f === void 0 ? void 0 : f.focus) === null || d === void 0 ? void 0 : d.call(f);
  32082. }));
  32083. }), yt(() => {
  32084. clearTimeout(o);
  32085. });
  32086. const l = function() {
  32087. for (var f, d = arguments.length, h = new Array(d), p = 0; p < d; p++)
  32088. h[p] = arguments[p];
  32089. (f = t.close) === null || f === void 0 || f.call(t, ...h);
  32090. }, u = (f) => {
  32091. _3(f) && (a.value = !0, f.then(function() {
  32092. s.value || (a.value = !1), l(...arguments), r.value = !1;
  32093. }, (d) => (s.value || (a.value = !1), r.value = !1, Promise.reject(d))));
  32094. }, c = (f) => {
  32095. const {
  32096. actionFn: d
  32097. } = t;
  32098. if (r.value)
  32099. return;
  32100. if (r.value = !0, !d) {
  32101. l();
  32102. return;
  32103. }
  32104. let h;
  32105. if (t.emitEvent) {
  32106. if (h = d(f), t.quitOnNullishReturnValue && !_3(h)) {
  32107. r.value = !1, l(f);
  32108. return;
  32109. }
  32110. } else if (d.length)
  32111. h = d(t.close), r.value = !1;
  32112. else if (h = d(), !h) {
  32113. l();
  32114. return;
  32115. }
  32116. u(h);
  32117. };
  32118. return () => {
  32119. const {
  32120. type: f,
  32121. prefixCls: d,
  32122. buttonProps: h
  32123. } = t;
  32124. return M(Xr, j(j(j({}, NU(f)), {}, {
  32125. onClick: c,
  32126. loading: a.value,
  32127. prefixCls: d
  32128. }, h), {}, {
  32129. ref: i
  32130. }), n);
  32131. };
  32132. }
  32133. });
  32134. function Jf(t) {
  32135. return typeof t == "function" ? t() : t;
  32136. }
  32137. const gY = te({
  32138. name: "ConfirmDialog",
  32139. inheritAttrs: !1,
  32140. 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"],
  32141. setup(t, e) {
  32142. let {
  32143. attrs: n
  32144. } = e;
  32145. const [r] = LS("Modal");
  32146. return process.env.NODE_ENV !== "production" && Yr(t.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
  32147. const {
  32148. icon: i,
  32149. onCancel: a,
  32150. onOk: o,
  32151. close: s,
  32152. okText: l,
  32153. closable: u = !1,
  32154. zIndex: c,
  32155. afterClose: f,
  32156. keyboard: d,
  32157. centered: h,
  32158. getContainer: p,
  32159. maskStyle: v,
  32160. okButtonProps: g,
  32161. cancelButtonProps: m,
  32162. okCancel: y,
  32163. width: b = 416,
  32164. mask: _ = !0,
  32165. maskClosable: O = !1,
  32166. type: S,
  32167. open: x,
  32168. title: C,
  32169. content: T,
  32170. direction: w,
  32171. closeIcon: P,
  32172. modalRender: $,
  32173. focusTriggerAfterClose: A,
  32174. rootPrefixCls: D,
  32175. bodyStyle: E,
  32176. wrapClassName: R,
  32177. footer: N
  32178. } = t;
  32179. let V = i;
  32180. if (!i && i !== null)
  32181. switch (S) {
  32182. case "info":
  32183. V = M(Df, null, null);
  32184. break;
  32185. case "success":
  32186. V = M(Ou, null, null);
  32187. break;
  32188. case "error":
  32189. V = M(ka, null, null);
  32190. break;
  32191. default:
  32192. V = M(Su, null, null);
  32193. }
  32194. const B = t.okType || "primary", W = t.prefixCls || "ant-modal", F = `${W}-confirm`, Q = n.style || {}, Z = y ?? S === "confirm", ne = t.autoFocusButton === null ? !1 : t.autoFocusButton || "ok", ee = `${W}-confirm`, oe = ye(ee, `${ee}-${t.type}`, {
  32195. [`${ee}-rtl`]: w === "rtl"
  32196. }, n.class), K = r.value, ie = Z && M(O3, {
  32197. actionFn: a,
  32198. close: s,
  32199. autofocus: ne === "cancel",
  32200. buttonProps: m,
  32201. prefixCls: `${D}-btn`
  32202. }, {
  32203. default: () => [Jf(t.cancelText) || K.cancelText]
  32204. });
  32205. return M(ji, {
  32206. prefixCls: W,
  32207. class: oe,
  32208. wrapClassName: ye({
  32209. [`${ee}-centered`]: !!h
  32210. }, R),
  32211. onCancel: (X) => s == null ? void 0 : s({
  32212. triggerCancel: !0
  32213. }, X),
  32214. open: x,
  32215. title: "",
  32216. footer: "",
  32217. transitionName: ts(D, "zoom", t.transitionName),
  32218. maskTransitionName: ts(D, "fade", t.maskTransitionName),
  32219. mask: _,
  32220. maskClosable: O,
  32221. maskStyle: v,
  32222. style: Q,
  32223. bodyStyle: E,
  32224. width: b,
  32225. zIndex: c,
  32226. afterClose: f,
  32227. keyboard: d,
  32228. centered: h,
  32229. getContainer: p,
  32230. closable: u,
  32231. closeIcon: P,
  32232. modalRender: $,
  32233. focusTriggerAfterClose: A
  32234. }, {
  32235. default: () => [M("div", {
  32236. class: `${F}-body-wrapper`
  32237. }, [M("div", {
  32238. class: `${F}-body`
  32239. }, [Jf(V), C === void 0 ? null : M("span", {
  32240. class: `${F}-title`
  32241. }, [Jf(C)]), M("div", {
  32242. class: `${F}-content`
  32243. }, [Jf(T)])]), N !== void 0 ? Jf(N) : M("div", {
  32244. class: `${F}-btns`
  32245. }, [ie, M(O3, {
  32246. type: B,
  32247. actionFn: o,
  32248. close: s,
  32249. autofocus: ne === "ok",
  32250. buttonProps: g,
  32251. prefixCls: `${D}-btn`
  32252. }, {
  32253. default: () => [Jf(l) || (Z ? K.okText : K.justOkText)]
  32254. })])])]
  32255. });
  32256. };
  32257. }
  32258. }), Dc = [], x0 = (t) => {
  32259. const e = document.createDocumentFragment();
  32260. let n = I(I({}, or(t, ["parentContext", "appContext"])), {
  32261. close: a,
  32262. open: !0
  32263. }), r = null;
  32264. function i() {
  32265. r && (lf(null, e), r = null);
  32266. for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
  32267. c[f] = arguments[f];
  32268. const d = c.some((h) => h && h.triggerCancel);
  32269. t.onCancel && d && t.onCancel(() => {
  32270. }, ...c.slice(1));
  32271. for (let h = 0; h < Dc.length; h++)
  32272. if (Dc[h] === a) {
  32273. Dc.splice(h, 1);
  32274. break;
  32275. }
  32276. }
  32277. function a() {
  32278. for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
  32279. c[f] = arguments[f];
  32280. n = I(I({}, n), {
  32281. open: !1,
  32282. afterClose: () => {
  32283. typeof t.afterClose == "function" && t.afterClose(), i.apply(this, c);
  32284. }
  32285. }), n.visible && delete n.visible, o(n);
  32286. }
  32287. function o(u) {
  32288. typeof u == "function" ? n = u(n) : n = I(I({}, n), u), r && Vde(r, n, e);
  32289. }
  32290. const s = (u) => {
  32291. const c = hr, f = c.prefixCls, d = u.prefixCls || `${f}-modal`, h = c.iconPrefixCls, p = Kxe();
  32292. return M(qd, j(j({}, c), {}, {
  32293. prefixCls: f
  32294. }), {
  32295. default: () => [M(gY, j(j({}, u), {}, {
  32296. rootPrefixCls: f,
  32297. prefixCls: d,
  32298. iconPrefixCls: h,
  32299. locale: p,
  32300. cancelText: u.cancelText || p.cancelText
  32301. }), null)]
  32302. });
  32303. };
  32304. function l(u) {
  32305. const c = M(s, I({}, u));
  32306. return c.appContext = t.parentContext || t.appContext || c.appContext, lf(c, e), c;
  32307. }
  32308. return r = l(n), Dc.push(a), {
  32309. destroy: a,
  32310. update: o
  32311. };
  32312. };
  32313. function mY(t) {
  32314. return I(I({}, t), {
  32315. type: "warning"
  32316. });
  32317. }
  32318. function yY(t) {
  32319. return I(I({}, t), {
  32320. type: "info"
  32321. });
  32322. }
  32323. function bY(t) {
  32324. return I(I({}, t), {
  32325. type: "success"
  32326. });
  32327. }
  32328. function _Y(t) {
  32329. return I(I({}, t), {
  32330. type: "error"
  32331. });
  32332. }
  32333. function OY(t) {
  32334. return I(I({}, t), {
  32335. type: "confirm"
  32336. });
  32337. }
  32338. const LTe = () => ({
  32339. config: Object,
  32340. afterClose: Function,
  32341. destroyAction: Function,
  32342. open: Boolean
  32343. }), NTe = te({
  32344. name: "HookModal",
  32345. inheritAttrs: !1,
  32346. props: sr(LTe(), {
  32347. config: {
  32348. width: 520,
  32349. okType: "primary"
  32350. }
  32351. }),
  32352. setup(t, e) {
  32353. let {
  32354. expose: n
  32355. } = e;
  32356. var r;
  32357. const i = L(() => t.open), a = L(() => t.config), {
  32358. direction: o,
  32359. getPrefixCls: s
  32360. } = kS(), l = s("modal"), u = s(), c = () => {
  32361. var p, v;
  32362. t == null || t.afterClose(), (v = (p = a.value).afterClose) === null || v === void 0 || v.call(p);
  32363. }, f = function() {
  32364. t.destroyAction(...arguments);
  32365. };
  32366. n({
  32367. destroy: f
  32368. });
  32369. const d = (r = a.value.okCancel) !== null && r !== void 0 ? r : a.value.type === "confirm", [h] = LS("Modal", Vs.Modal);
  32370. return () => M(gY, j(j({
  32371. prefixCls: l,
  32372. rootPrefixCls: u
  32373. }, a.value), {}, {
  32374. close: f,
  32375. open: i.value,
  32376. afterClose: c,
  32377. okText: a.value.okText || (d ? h == null ? void 0 : h.value.okText : h == null ? void 0 : h.value.justOkText),
  32378. direction: a.value.direction || o.value,
  32379. cancelText: a.value.cancelText || (h == null ? void 0 : h.value.cancelText)
  32380. }), null);
  32381. }
  32382. });
  32383. let S3 = 0;
  32384. const BTe = te({
  32385. name: "ElementsHolder",
  32386. inheritAttrs: !1,
  32387. setup(t, e) {
  32388. let {
  32389. expose: n
  32390. } = e;
  32391. const r = ae([]);
  32392. return n({
  32393. addModal: (a) => (r.value.push(a), r.value = r.value.slice(), () => {
  32394. r.value = r.value.filter((o) => o !== a);
  32395. })
  32396. }), () => r.value.map((a) => a());
  32397. }
  32398. });
  32399. function zTe() {
  32400. const t = ae(null), e = ae([]);
  32401. se(e, () => {
  32402. e.value.length && ([...e.value].forEach((o) => {
  32403. o();
  32404. }), e.value = []);
  32405. }, {
  32406. immediate: !0
  32407. });
  32408. const n = (a) => function(s) {
  32409. var l;
  32410. S3 += 1;
  32411. const u = ae(!0), c = ae(null), f = ae(z(s)), d = ae({});
  32412. se(() => s, (b) => {
  32413. g(I(I({}, op(b) ? b.value : b), d.value));
  32414. });
  32415. const h = function() {
  32416. u.value = !1;
  32417. for (var b = arguments.length, _ = new Array(b), O = 0; O < b; O++)
  32418. _[O] = arguments[O];
  32419. const S = _.some((x) => x && x.triggerCancel);
  32420. f.value.onCancel && S && f.value.onCancel(() => {
  32421. }, ..._.slice(1));
  32422. };
  32423. let p;
  32424. const v = () => M(NTe, {
  32425. key: `modal-${S3}`,
  32426. config: a(f.value),
  32427. ref: c,
  32428. open: u.value,
  32429. destroyAction: h,
  32430. afterClose: () => {
  32431. p == null || p();
  32432. }
  32433. }, null);
  32434. p = (l = t.value) === null || l === void 0 ? void 0 : l.addModal(v), p && Dc.push(p);
  32435. const g = (b) => {
  32436. f.value = I(I({}, f.value), b);
  32437. };
  32438. return {
  32439. destroy: () => {
  32440. c.value ? h() : e.value = [...e.value, h];
  32441. },
  32442. update: (b) => {
  32443. d.value = b, c.value ? g(b) : e.value = [...e.value, () => g(b)];
  32444. }
  32445. };
  32446. }, r = L(() => ({
  32447. info: n(yY),
  32448. success: n(bY),
  32449. error: n(_Y),
  32450. warning: n(mY),
  32451. confirm: n(OY)
  32452. })), i = Symbol("modalHolderKey");
  32453. return [r.value, () => M(BTe, {
  32454. key: i,
  32455. ref: t
  32456. }, null)];
  32457. }
  32458. function SY(t) {
  32459. return x0(mY(t));
  32460. }
  32461. ji.useModal = zTe;
  32462. ji.info = function(e) {
  32463. return x0(yY(e));
  32464. };
  32465. ji.success = function(e) {
  32466. return x0(bY(e));
  32467. };
  32468. ji.error = function(e) {
  32469. return x0(_Y(e));
  32470. };
  32471. ji.warning = SY;
  32472. ji.warn = SY;
  32473. ji.confirm = function(e) {
  32474. return x0(OY(e));
  32475. };
  32476. ji.destroyAll = function() {
  32477. for (; Dc.length; ) {
  32478. const e = Dc.pop();
  32479. e && e();
  32480. }
  32481. };
  32482. ji.install = function(t) {
  32483. return t.component(ji.name, ji), t;
  32484. };
  32485. const AD = (t, e) => {
  32486. let {
  32487. attrs: n
  32488. } = e;
  32489. const {
  32490. included: r,
  32491. vertical: i,
  32492. style: a,
  32493. class: o
  32494. } = n;
  32495. let {
  32496. length: s,
  32497. offset: l,
  32498. reverse: u
  32499. } = n;
  32500. s < 0 && (u = !u, s = Math.abs(s), l = 100 - l);
  32501. const c = i ? {
  32502. [u ? "top" : "bottom"]: `${l}%`,
  32503. [u ? "bottom" : "top"]: "auto",
  32504. height: `${s}%`
  32505. } : {
  32506. [u ? "right" : "left"]: `${l}%`,
  32507. [u ? "left" : "right"]: "auto",
  32508. width: `${s}%`
  32509. }, f = I(I({}, a), c);
  32510. return r ? M("div", {
  32511. class: o,
  32512. style: f
  32513. }, null) : null;
  32514. };
  32515. AD.inheritAttrs = !1;
  32516. const VTe = (t, e, n, r, i, a) => {
  32517. Yr(n ? r > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  32518. const o = Object.keys(e).map(parseFloat).sort((s, l) => s - l);
  32519. if (n && r)
  32520. for (let s = i; s <= a; s += r)
  32521. o.indexOf(s) === -1 && o.push(s);
  32522. return o;
  32523. }, xY = (t, e) => {
  32524. let {
  32525. attrs: n
  32526. } = e;
  32527. const {
  32528. prefixCls: r,
  32529. vertical: i,
  32530. reverse: a,
  32531. marks: o,
  32532. dots: s,
  32533. step: l,
  32534. included: u,
  32535. lowerBound: c,
  32536. upperBound: f,
  32537. max: d,
  32538. min: h,
  32539. dotStyle: p,
  32540. activeDotStyle: v
  32541. } = n, g = d - h, m = VTe(i, o, s, l, h, d).map((y) => {
  32542. const b = `${Math.abs(y - h) / g * 100}%`, _ = !u && y === f || u && y <= f && y >= c;
  32543. let O = i ? I(I({}, p), {
  32544. [a ? "top" : "bottom"]: b
  32545. }) : I(I({}, p), {
  32546. [a ? "right" : "left"]: b
  32547. });
  32548. _ && (O = I(I({}, O), v));
  32549. const S = ye({
  32550. [`${r}-dot`]: !0,
  32551. [`${r}-dot-active`]: _,
  32552. [`${r}-dot-reverse`]: a
  32553. });
  32554. return M("span", {
  32555. class: S,
  32556. style: O,
  32557. key: y
  32558. }, null);
  32559. });
  32560. return M("div", {
  32561. class: `${r}-step`
  32562. }, [m]);
  32563. };
  32564. xY.inheritAttrs = !1;
  32565. const wY = (t, e) => {
  32566. let {
  32567. attrs: n,
  32568. slots: r
  32569. } = e;
  32570. const {
  32571. class: i,
  32572. vertical: a,
  32573. reverse: o,
  32574. marks: s,
  32575. included: l,
  32576. upperBound: u,
  32577. lowerBound: c,
  32578. max: f,
  32579. min: d,
  32580. onClickLabel: h
  32581. } = n, p = Object.keys(s), v = r.mark, g = f - d, m = p.map(parseFloat).sort((y, b) => y - b).map((y) => {
  32582. const b = typeof s[y] == "function" ? s[y]() : s[y], _ = typeof b == "object" && !Yi(b);
  32583. let O = _ ? b.label : b;
  32584. if (!O && O !== 0)
  32585. return null;
  32586. v && (O = v({
  32587. point: y,
  32588. label: O
  32589. }));
  32590. const S = !l && y === u || l && y <= u && y >= c, x = ye({
  32591. [`${i}-text`]: !0,
  32592. [`${i}-text-active`]: S
  32593. }), C = {
  32594. marginBottom: "-50%",
  32595. [o ? "top" : "bottom"]: `${(y - d) / g * 100}%`
  32596. }, T = {
  32597. transform: `translateX(${o ? "50%" : "-50%"})`,
  32598. msTransform: `translateX(${o ? "50%" : "-50%"})`,
  32599. [o ? "right" : "left"]: `${(y - d) / g * 100}%`
  32600. }, w = a ? C : T, P = _ ? I(I({}, w), b.style) : w, $ = {
  32601. [pr ? "onTouchstartPassive" : "onTouchstart"]: (A) => h(A, y)
  32602. };
  32603. return M("span", j({
  32604. class: x,
  32605. style: P,
  32606. key: y,
  32607. onMousedown: (A) => h(A, y)
  32608. }, $), [O]);
  32609. });
  32610. return M("div", {
  32611. class: i
  32612. }, [m]);
  32613. };
  32614. wY.inheritAttrs = !1;
  32615. const CY = te({
  32616. compatConfig: {
  32617. MODE: 3
  32618. },
  32619. name: "Handle",
  32620. inheritAttrs: !1,
  32621. props: {
  32622. prefixCls: String,
  32623. vertical: {
  32624. type: Boolean,
  32625. default: void 0
  32626. },
  32627. offset: Number,
  32628. disabled: {
  32629. type: Boolean,
  32630. default: void 0
  32631. },
  32632. min: Number,
  32633. max: Number,
  32634. value: Number,
  32635. tabindex: Y.oneOfType([Y.number, Y.string]),
  32636. reverse: {
  32637. type: Boolean,
  32638. default: void 0
  32639. },
  32640. ariaLabel: String,
  32641. ariaLabelledBy: String,
  32642. ariaValueTextFormatter: Function,
  32643. onMouseenter: {
  32644. type: Function
  32645. },
  32646. onMouseleave: {
  32647. type: Function
  32648. },
  32649. onMousedown: {
  32650. type: Function
  32651. }
  32652. },
  32653. setup(t, e) {
  32654. let {
  32655. attrs: n,
  32656. emit: r,
  32657. expose: i
  32658. } = e;
  32659. const a = ae(!1), o = ae(), s = () => {
  32660. document.activeElement === o.value && (a.value = !0);
  32661. }, l = (g) => {
  32662. a.value = !1, r("blur", g);
  32663. }, u = () => {
  32664. a.value = !1;
  32665. }, c = () => {
  32666. var g;
  32667. (g = o.value) === null || g === void 0 || g.focus();
  32668. }, f = () => {
  32669. var g;
  32670. (g = o.value) === null || g === void 0 || g.blur();
  32671. }, d = () => {
  32672. a.value = !0, c();
  32673. }, h = (g) => {
  32674. g.preventDefault(), c(), r("mousedown", g);
  32675. };
  32676. i({
  32677. focus: c,
  32678. blur: f,
  32679. clickFocus: d,
  32680. ref: o
  32681. });
  32682. let p = null;
  32683. it(() => {
  32684. p = vr(document, "mouseup", s);
  32685. }), yt(() => {
  32686. p == null || p.remove();
  32687. });
  32688. const v = L(() => {
  32689. const {
  32690. vertical: g,
  32691. offset: m,
  32692. reverse: y
  32693. } = t;
  32694. return g ? {
  32695. [y ? "top" : "bottom"]: `${m}%`,
  32696. [y ? "bottom" : "top"]: "auto",
  32697. transform: y ? null : "translateY(+50%)"
  32698. } : {
  32699. [y ? "right" : "left"]: `${m}%`,
  32700. [y ? "left" : "right"]: "auto",
  32701. transform: `translateX(${y ? "+" : "-"}50%)`
  32702. };
  32703. });
  32704. return () => {
  32705. const {
  32706. prefixCls: g,
  32707. disabled: m,
  32708. min: y,
  32709. max: b,
  32710. value: _,
  32711. tabindex: O,
  32712. ariaLabel: S,
  32713. ariaLabelledBy: x,
  32714. ariaValueTextFormatter: C,
  32715. onMouseenter: T,
  32716. onMouseleave: w
  32717. } = t, P = ye(n.class, {
  32718. [`${g}-handle-click-focused`]: a.value
  32719. }), $ = {
  32720. "aria-valuemin": y,
  32721. "aria-valuemax": b,
  32722. "aria-valuenow": _,
  32723. "aria-disabled": !!m
  32724. }, A = [n.style, v.value];
  32725. let D = O || 0;
  32726. (m || O === null) && (D = null);
  32727. let E;
  32728. C && (E = C(_));
  32729. const R = I(I(I(I({}, n), {
  32730. role: "slider",
  32731. tabindex: D
  32732. }), $), {
  32733. class: P,
  32734. onBlur: l,
  32735. onKeydown: u,
  32736. onMousedown: h,
  32737. onMouseenter: T,
  32738. onMouseleave: w,
  32739. ref: o,
  32740. style: A
  32741. });
  32742. return M("div", j(j({}, R), {}, {
  32743. "aria-label": S,
  32744. "aria-labelledby": x,
  32745. "aria-valuetext": E
  32746. }), null);
  32747. };
  32748. }
  32749. });
  32750. function kC(t, e) {
  32751. try {
  32752. return Object.keys(e).some((n) => t.target === e[n].ref);
  32753. } catch {
  32754. return !1;
  32755. }
  32756. }
  32757. function TY(t, e) {
  32758. let {
  32759. min: n,
  32760. max: r
  32761. } = e;
  32762. return t < n || t > r;
  32763. }
  32764. function x3(t) {
  32765. return t.touches.length > 1 || t.type.toLowerCase() === "touchend" && t.touches.length > 0;
  32766. }
  32767. function w3(t, e) {
  32768. let {
  32769. marks: n,
  32770. step: r,
  32771. min: i,
  32772. max: a
  32773. } = e;
  32774. const o = Object.keys(n).map(parseFloat);
  32775. if (r !== null) {
  32776. const l = Math.pow(10, PY(r)), u = Math.floor((a * l - i * l) / (r * l)), c = Math.min((t - i) / r, u), f = Math.round(c) * r + i;
  32777. o.push(f);
  32778. }
  32779. const s = o.map((l) => Math.abs(t - l));
  32780. return o[s.indexOf(Math.min(...s))];
  32781. }
  32782. function PY(t) {
  32783. const e = t.toString();
  32784. let n = 0;
  32785. return e.indexOf(".") >= 0 && (n = e.length - e.indexOf(".") - 1), n;
  32786. }
  32787. function C3(t, e) {
  32788. let n = 1;
  32789. return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.clientY : e.pageX) / n;
  32790. }
  32791. function T3(t, e) {
  32792. let n = 1;
  32793. return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.touches[0].clientY : e.touches[0].pageX) / n;
  32794. }
  32795. function P3(t, e) {
  32796. const n = e.getBoundingClientRect();
  32797. return t ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
  32798. }
  32799. function ED(t, e) {
  32800. let {
  32801. max: n,
  32802. min: r
  32803. } = e;
  32804. return t <= r ? r : t >= n ? n : t;
  32805. }
  32806. function $Y(t, e) {
  32807. const {
  32808. step: n
  32809. } = e, r = isFinite(w3(t, e)) ? w3(t, e) : 0;
  32810. return n === null ? r : parseFloat(r.toFixed(PY(n)));
  32811. }
  32812. function kh(t) {
  32813. t.stopPropagation(), t.preventDefault();
  32814. }
  32815. function FTe(t, e, n) {
  32816. const r = {
  32817. increase: (o, s) => o + s,
  32818. decrease: (o, s) => o - s
  32819. }, i = r[t](Object.keys(n.marks).indexOf(JSON.stringify(e)), 1), a = Object.keys(n.marks)[i];
  32820. return n.step ? r[t](e, n.step) : Object.keys(n.marks).length && n.marks[a] ? n.marks[a] : e;
  32821. }
  32822. function AY(t, e, n) {
  32823. const r = "increase", i = "decrease";
  32824. let a = r;
  32825. switch (t.keyCode) {
  32826. case ge.UP:
  32827. a = e && n ? i : r;
  32828. break;
  32829. case ge.RIGHT:
  32830. a = !e && n ? i : r;
  32831. break;
  32832. case ge.DOWN:
  32833. a = e && n ? r : i;
  32834. break;
  32835. case ge.LEFT:
  32836. a = !e && n ? r : i;
  32837. break;
  32838. case ge.END:
  32839. return (o, s) => s.max;
  32840. case ge.HOME:
  32841. return (o, s) => s.min;
  32842. case ge.PAGE_UP:
  32843. return (o, s) => o + s.step * 2;
  32844. case ge.PAGE_DOWN:
  32845. return (o, s) => o - s.step * 2;
  32846. default:
  32847. return;
  32848. }
  32849. return (o, s) => FTe(a, o, s);
  32850. }
  32851. var WTe = function(t, e) {
  32852. var n = {};
  32853. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  32854. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  32855. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  32856. return n;
  32857. };
  32858. function Lu() {
  32859. }
  32860. function EY(t) {
  32861. const e = {
  32862. id: String,
  32863. min: Number,
  32864. max: Number,
  32865. step: Number,
  32866. marks: Y.object,
  32867. included: {
  32868. type: Boolean,
  32869. default: void 0
  32870. },
  32871. prefixCls: String,
  32872. disabled: {
  32873. type: Boolean,
  32874. default: void 0
  32875. },
  32876. handle: Function,
  32877. dots: {
  32878. type: Boolean,
  32879. default: void 0
  32880. },
  32881. vertical: {
  32882. type: Boolean,
  32883. default: void 0
  32884. },
  32885. reverse: {
  32886. type: Boolean,
  32887. default: void 0
  32888. },
  32889. minimumTrackStyle: Y.object,
  32890. maximumTrackStyle: Y.object,
  32891. handleStyle: Y.oneOfType([Y.object, Y.arrayOf(Y.object)]),
  32892. trackStyle: Y.oneOfType([Y.object, Y.arrayOf(Y.object)]),
  32893. railStyle: Y.object,
  32894. dotStyle: Y.object,
  32895. activeDotStyle: Y.object,
  32896. autofocus: {
  32897. type: Boolean,
  32898. default: void 0
  32899. },
  32900. draggableTrack: {
  32901. type: Boolean,
  32902. default: void 0
  32903. }
  32904. };
  32905. return te({
  32906. compatConfig: {
  32907. MODE: 3
  32908. },
  32909. name: "CreateSlider",
  32910. mixins: [JS, t],
  32911. inheritAttrs: !1,
  32912. props: sr(e, {
  32913. prefixCls: "rc-slider",
  32914. min: 0,
  32915. max: 100,
  32916. step: 1,
  32917. marks: {},
  32918. included: !0,
  32919. disabled: !1,
  32920. dots: !1,
  32921. vertical: !1,
  32922. reverse: !1,
  32923. trackStyle: [{}],
  32924. handleStyle: [{}],
  32925. railStyle: {},
  32926. dotStyle: {},
  32927. activeDotStyle: {}
  32928. }),
  32929. emits: ["change", "blur", "focus"],
  32930. data() {
  32931. const {
  32932. step: n,
  32933. max: r,
  32934. min: i
  32935. } = this, a = isFinite(r - i) ? (r - i) % n === 0 : !0;
  32936. return Yr(n && Math.floor(n) === n ? a : !0, `Slider[max] - Slider[min] (${r - i}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
  32937. },
  32938. mounted() {
  32939. this.$nextTick(() => {
  32940. this.document = this.sliderRef && this.sliderRef.ownerDocument;
  32941. const {
  32942. autofocus: n,
  32943. disabled: r
  32944. } = this;
  32945. n && !r && this.focus();
  32946. });
  32947. },
  32948. beforeUnmount() {
  32949. this.$nextTick(() => {
  32950. this.removeDocumentEvents();
  32951. });
  32952. },
  32953. methods: {
  32954. defaultHandle(n) {
  32955. var {
  32956. index: r,
  32957. directives: i,
  32958. className: a,
  32959. style: o
  32960. } = n, s = WTe(n, ["index", "directives", "className", "style"]);
  32961. if (delete s.dragging, s.value === null)
  32962. return null;
  32963. const l = I(I({}, s), {
  32964. class: a,
  32965. style: o,
  32966. key: r
  32967. });
  32968. return M(CY, l, null);
  32969. },
  32970. onDown(n, r) {
  32971. let i = r;
  32972. const {
  32973. draggableTrack: a,
  32974. vertical: o
  32975. } = this.$props, {
  32976. bounds: s
  32977. } = this.$data, l = a && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = kC(n, this.handlesRefs);
  32978. if (this.dragTrack = a && s.length >= 2 && !u && !l.map((c, f) => {
  32979. const d = f ? !0 : c >= s[f];
  32980. return f === l.length - 1 ? c <= s[f] : d;
  32981. }).some((c) => !c), this.dragTrack)
  32982. this.dragOffset = i, this.startBounds = [...s];
  32983. else {
  32984. if (!u)
  32985. this.dragOffset = 0;
  32986. else {
  32987. const c = P3(o, n.target);
  32988. this.dragOffset = i - c, i = c;
  32989. }
  32990. this.onStart(i);
  32991. }
  32992. },
  32993. onMouseDown(n) {
  32994. if (n.button !== 0)
  32995. return;
  32996. this.removeDocumentEvents();
  32997. const r = this.$props.vertical, i = C3(r, n);
  32998. this.onDown(n, i), this.addDocumentMouseEvents();
  32999. },
  33000. onTouchStart(n) {
  33001. if (x3(n)) return;
  33002. const r = this.vertical, i = T3(r, n);
  33003. this.onDown(n, i), this.addDocumentTouchEvents(), kh(n);
  33004. },
  33005. onFocus(n) {
  33006. const {
  33007. vertical: r
  33008. } = this;
  33009. if (kC(n, this.handlesRefs) && !this.dragTrack) {
  33010. const i = P3(r, n.target);
  33011. this.dragOffset = 0, this.onStart(i), kh(n), this.$emit("focus", n);
  33012. }
  33013. },
  33014. onBlur(n) {
  33015. this.dragTrack || this.onEnd(), this.$emit("blur", n);
  33016. },
  33017. onMouseUp() {
  33018. this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
  33019. },
  33020. onMouseMove(n) {
  33021. if (!this.sliderRef) {
  33022. this.onEnd();
  33023. return;
  33024. }
  33025. const r = C3(this.vertical, n);
  33026. this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
  33027. },
  33028. onTouchMove(n) {
  33029. if (x3(n) || !this.sliderRef) {
  33030. this.onEnd();
  33031. return;
  33032. }
  33033. const r = T3(this.vertical, n);
  33034. this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
  33035. },
  33036. onKeyDown(n) {
  33037. this.sliderRef && kC(n, this.handlesRefs) && this.onKeyboard(n);
  33038. },
  33039. onClickMarkLabel(n, r) {
  33040. n.stopPropagation(), this.onChange({
  33041. sValue: r
  33042. }), this.setState({
  33043. sValue: r
  33044. }, () => this.onEnd(!0));
  33045. },
  33046. getSliderStart() {
  33047. const n = this.sliderRef, {
  33048. vertical: r,
  33049. reverse: i
  33050. } = this, a = n.getBoundingClientRect();
  33051. return r ? i ? a.bottom : a.top : window.scrollX + (i ? a.right : a.left);
  33052. },
  33053. getSliderLength() {
  33054. const n = this.sliderRef;
  33055. if (!n)
  33056. return 0;
  33057. const r = n.getBoundingClientRect();
  33058. return this.vertical ? r.height : r.width;
  33059. },
  33060. addDocumentTouchEvents() {
  33061. this.onTouchMoveListener = vr(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = vr(this.document, "touchend", this.onEnd);
  33062. },
  33063. addDocumentMouseEvents() {
  33064. this.onMouseMoveListener = vr(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = vr(this.document, "mouseup", this.onEnd);
  33065. },
  33066. removeDocumentEvents() {
  33067. this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
  33068. },
  33069. focus() {
  33070. var n;
  33071. this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
  33072. },
  33073. blur() {
  33074. this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
  33075. var r, i;
  33076. (i = (r = this.handlesRefs[n]) === null || r === void 0 ? void 0 : r.blur) === null || i === void 0 || i.call(r);
  33077. });
  33078. },
  33079. calcValue(n) {
  33080. const {
  33081. vertical: r,
  33082. min: i,
  33083. max: a
  33084. } = this, o = Math.abs(Math.max(n, 0) / this.getSliderLength());
  33085. return r ? (1 - o) * (a - i) + i : o * (a - i) + i;
  33086. },
  33087. calcValueByPos(n) {
  33088. const i = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
  33089. return this.trimAlignValue(this.calcValue(i));
  33090. },
  33091. calcOffset(n) {
  33092. const {
  33093. min: r,
  33094. max: i
  33095. } = this, a = (n - r) / (i - r);
  33096. return Math.max(0, a * 100);
  33097. },
  33098. saveSlider(n) {
  33099. this.sliderRef = n;
  33100. },
  33101. saveHandle(n, r) {
  33102. this.handlesRefs[n] = r;
  33103. }
  33104. },
  33105. render() {
  33106. const {
  33107. prefixCls: n,
  33108. marks: r,
  33109. dots: i,
  33110. step: a,
  33111. included: o,
  33112. disabled: s,
  33113. vertical: l,
  33114. reverse: u,
  33115. min: c,
  33116. max: f,
  33117. maximumTrackStyle: d,
  33118. railStyle: h,
  33119. dotStyle: p,
  33120. activeDotStyle: v,
  33121. id: g
  33122. } = this, {
  33123. class: m,
  33124. style: y
  33125. } = this.$attrs, {
  33126. tracks: b,
  33127. handles: _
  33128. } = this.renderSlider(), O = ye(n, m, {
  33129. [`${n}-with-marks`]: Object.keys(r).length,
  33130. [`${n}-disabled`]: s,
  33131. [`${n}-vertical`]: l,
  33132. [`${n}-horizontal`]: !l
  33133. }), S = {
  33134. vertical: l,
  33135. marks: r,
  33136. included: o,
  33137. lowerBound: this.getLowerBound(),
  33138. upperBound: this.getUpperBound(),
  33139. max: f,
  33140. min: c,
  33141. reverse: u,
  33142. class: `${n}-mark`,
  33143. onClickLabel: s ? Lu : this.onClickMarkLabel
  33144. }, x = {
  33145. [pr ? "onTouchstartPassive" : "onTouchstart"]: s ? Lu : this.onTouchStart
  33146. };
  33147. return M("div", j(j({
  33148. id: g,
  33149. ref: this.saveSlider,
  33150. tabindex: "-1",
  33151. class: O
  33152. }, x), {}, {
  33153. onMousedown: s ? Lu : this.onMouseDown,
  33154. onMouseup: s ? Lu : this.onMouseUp,
  33155. onKeydown: s ? Lu : this.onKeyDown,
  33156. onFocus: s ? Lu : this.onFocus,
  33157. onBlur: s ? Lu : this.onBlur,
  33158. style: y
  33159. }), [M("div", {
  33160. class: `${n}-rail`,
  33161. style: I(I({}, d), h)
  33162. }, null), b, M(xY, {
  33163. prefixCls: n,
  33164. vertical: l,
  33165. reverse: u,
  33166. marks: r,
  33167. dots: i,
  33168. step: a,
  33169. included: o,
  33170. lowerBound: this.getLowerBound(),
  33171. upperBound: this.getUpperBound(),
  33172. max: f,
  33173. min: c,
  33174. dotStyle: p,
  33175. activeDotStyle: v
  33176. }, null), _, M(wY, S, {
  33177. mark: this.$slots.mark
  33178. }), ij(this)]);
  33179. }
  33180. });
  33181. }
  33182. const QTe = te({
  33183. compatConfig: {
  33184. MODE: 3
  33185. },
  33186. name: "Slider",
  33187. mixins: [JS],
  33188. inheritAttrs: !1,
  33189. props: {
  33190. defaultValue: Number,
  33191. value: Number,
  33192. disabled: {
  33193. type: Boolean,
  33194. default: void 0
  33195. },
  33196. autofocus: {
  33197. type: Boolean,
  33198. default: void 0
  33199. },
  33200. tabindex: Y.oneOfType([Y.number, Y.string]),
  33201. reverse: {
  33202. type: Boolean,
  33203. default: void 0
  33204. },
  33205. min: Number,
  33206. max: Number,
  33207. ariaLabelForHandle: String,
  33208. ariaLabelledByForHandle: String,
  33209. ariaValueTextFormatterForHandle: String,
  33210. startPoint: Number
  33211. },
  33212. emits: ["beforeChange", "afterChange", "change"],
  33213. data() {
  33214. const t = this.defaultValue !== void 0 ? this.defaultValue : this.min, e = this.value !== void 0 ? this.value : t;
  33215. return {
  33216. sValue: this.trimAlignValue(e),
  33217. dragging: !1
  33218. };
  33219. },
  33220. watch: {
  33221. value: {
  33222. handler(t) {
  33223. this.setChangeValue(t);
  33224. },
  33225. deep: !0
  33226. },
  33227. min() {
  33228. const {
  33229. sValue: t
  33230. } = this;
  33231. this.setChangeValue(t);
  33232. },
  33233. max() {
  33234. const {
  33235. sValue: t
  33236. } = this;
  33237. this.setChangeValue(t);
  33238. }
  33239. },
  33240. methods: {
  33241. setChangeValue(t) {
  33242. const e = t !== void 0 ? t : this.sValue, n = this.trimAlignValue(e, this.$props);
  33243. n !== this.sValue && (this.setState({
  33244. sValue: n
  33245. }), TY(e, this.$props) && this.$emit("change", n));
  33246. },
  33247. onChange(t) {
  33248. const e = !m1(this, "value"), n = t.sValue > this.max ? I(I({}, t), {
  33249. sValue: this.max
  33250. }) : t;
  33251. e && this.setState(n);
  33252. const r = n.sValue;
  33253. this.$emit("change", r);
  33254. },
  33255. onStart(t) {
  33256. this.setState({
  33257. dragging: !0
  33258. });
  33259. const {
  33260. sValue: e
  33261. } = this;
  33262. this.$emit("beforeChange", e);
  33263. const n = this.calcValueByPos(t);
  33264. this.startValue = n, this.startPosition = t, n !== e && (this.prevMovedHandleIndex = 0, this.onChange({
  33265. sValue: n
  33266. }));
  33267. },
  33268. onEnd(t) {
  33269. const {
  33270. dragging: e
  33271. } = this;
  33272. this.removeDocumentEvents(), (e || t) && this.$emit("afterChange", this.sValue), this.setState({
  33273. dragging: !1
  33274. });
  33275. },
  33276. onMove(t, e) {
  33277. kh(t);
  33278. const {
  33279. sValue: n
  33280. } = this, r = this.calcValueByPos(e);
  33281. r !== n && this.onChange({
  33282. sValue: r
  33283. });
  33284. },
  33285. onKeyboard(t) {
  33286. const {
  33287. reverse: e,
  33288. vertical: n
  33289. } = this.$props, r = AY(t, n, e);
  33290. if (r) {
  33291. kh(t);
  33292. const {
  33293. sValue: i
  33294. } = this, a = r(i, this.$props), o = this.trimAlignValue(a);
  33295. if (o === i) return;
  33296. this.onChange({
  33297. sValue: o
  33298. }), this.$emit("afterChange", o), this.onEnd();
  33299. }
  33300. },
  33301. getLowerBound() {
  33302. const t = this.$props.startPoint || this.$props.min;
  33303. return this.$data.sValue > t ? t : this.$data.sValue;
  33304. },
  33305. getUpperBound() {
  33306. return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
  33307. },
  33308. trimAlignValue(t) {
  33309. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  33310. if (t === null)
  33311. return null;
  33312. const n = I(I({}, this.$props), e), r = ED(t, n);
  33313. return $Y(r, n);
  33314. },
  33315. getTrack(t) {
  33316. let {
  33317. prefixCls: e,
  33318. reverse: n,
  33319. vertical: r,
  33320. included: i,
  33321. minimumTrackStyle: a,
  33322. mergedTrackStyle: o,
  33323. length: s,
  33324. offset: l
  33325. } = t;
  33326. return M(AD, {
  33327. class: `${e}-track`,
  33328. vertical: r,
  33329. included: i,
  33330. offset: l,
  33331. reverse: n,
  33332. length: s,
  33333. style: I(I({}, a), o)
  33334. }, null);
  33335. },
  33336. renderSlider() {
  33337. const {
  33338. prefixCls: t,
  33339. vertical: e,
  33340. included: n,
  33341. disabled: r,
  33342. minimumTrackStyle: i,
  33343. trackStyle: a,
  33344. handleStyle: o,
  33345. tabindex: s,
  33346. ariaLabelForHandle: l,
  33347. ariaLabelledByForHandle: u,
  33348. ariaValueTextFormatterForHandle: c,
  33349. min: f,
  33350. max: d,
  33351. startPoint: h,
  33352. reverse: p,
  33353. handle: v,
  33354. defaultHandle: g
  33355. } = this, m = v || g, {
  33356. sValue: y,
  33357. dragging: b
  33358. } = this, _ = this.calcOffset(y), O = m({
  33359. class: `${t}-handle`,
  33360. prefixCls: t,
  33361. vertical: e,
  33362. offset: _,
  33363. value: y,
  33364. dragging: b,
  33365. disabled: r,
  33366. min: f,
  33367. max: d,
  33368. reverse: p,
  33369. index: 0,
  33370. tabindex: s,
  33371. ariaLabel: l,
  33372. ariaLabelledBy: u,
  33373. ariaValueTextFormatter: c,
  33374. style: o[0] || o,
  33375. ref: (C) => this.saveHandle(0, C),
  33376. onFocus: this.onFocus,
  33377. onBlur: this.onBlur
  33378. }), S = h !== void 0 ? this.calcOffset(h) : 0, x = a[0] || a;
  33379. return {
  33380. tracks: this.getTrack({
  33381. prefixCls: t,
  33382. reverse: p,
  33383. vertical: e,
  33384. included: n,
  33385. offset: S,
  33386. minimumTrackStyle: i,
  33387. mergedTrackStyle: x,
  33388. length: _ - S
  33389. }),
  33390. handles: O
  33391. };
  33392. }
  33393. }
  33394. }), HTe = EY(QTe), Jp = (t) => {
  33395. let {
  33396. value: e,
  33397. handle: n,
  33398. bounds: r,
  33399. props: i
  33400. } = t;
  33401. const {
  33402. allowCross: a,
  33403. pushable: o
  33404. } = i, s = Number(o), l = ED(e, i);
  33405. let u = l;
  33406. 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)), $Y(u, i);
  33407. }, GTe = {
  33408. defaultValue: Y.arrayOf(Y.number),
  33409. value: Y.arrayOf(Y.number),
  33410. count: Number,
  33411. pushable: tde(Y.oneOfType([Y.looseBool, Y.number])),
  33412. allowCross: {
  33413. type: Boolean,
  33414. default: void 0
  33415. },
  33416. disabled: {
  33417. type: Boolean,
  33418. default: void 0
  33419. },
  33420. reverse: {
  33421. type: Boolean,
  33422. default: void 0
  33423. },
  33424. tabindex: Y.arrayOf(Y.number),
  33425. prefixCls: String,
  33426. min: Number,
  33427. max: Number,
  33428. autofocus: {
  33429. type: Boolean,
  33430. default: void 0
  33431. },
  33432. ariaLabelGroupForHandles: Array,
  33433. ariaLabelledByGroupForHandles: Array,
  33434. ariaValueTextFormatterGroupForHandles: Array,
  33435. draggableTrack: {
  33436. type: Boolean,
  33437. default: void 0
  33438. }
  33439. }, jTe = te({
  33440. compatConfig: {
  33441. MODE: 3
  33442. },
  33443. name: "Range",
  33444. mixins: [JS],
  33445. inheritAttrs: !1,
  33446. props: sr(GTe, {
  33447. count: 1,
  33448. allowCross: !0,
  33449. pushable: !1,
  33450. tabindex: [],
  33451. draggableTrack: !1,
  33452. ariaLabelGroupForHandles: [],
  33453. ariaLabelledByGroupForHandles: [],
  33454. ariaValueTextFormatterGroupForHandles: []
  33455. }),
  33456. emits: ["beforeChange", "afterChange", "change"],
  33457. displayName: "Range",
  33458. data() {
  33459. const {
  33460. count: t,
  33461. min: e,
  33462. max: n
  33463. } = this, r = Array(...Array(t + 1)).map(() => e), i = m1(this, "defaultValue") ? this.defaultValue : r;
  33464. let {
  33465. value: a
  33466. } = this;
  33467. a === void 0 && (a = i);
  33468. const o = a.map((l, u) => Jp({
  33469. value: l,
  33470. handle: u,
  33471. props: this.$props
  33472. }));
  33473. return {
  33474. sHandle: null,
  33475. recent: o[0] === n ? 0 : o.length - 1,
  33476. bounds: o
  33477. };
  33478. },
  33479. watch: {
  33480. value: {
  33481. handler(t) {
  33482. const {
  33483. bounds: e
  33484. } = this;
  33485. this.setChangeValue(t || e);
  33486. },
  33487. deep: !0
  33488. },
  33489. min() {
  33490. const {
  33491. value: t
  33492. } = this;
  33493. this.setChangeValue(t || this.bounds);
  33494. },
  33495. max() {
  33496. const {
  33497. value: t
  33498. } = this;
  33499. this.setChangeValue(t || this.bounds);
  33500. }
  33501. },
  33502. methods: {
  33503. setChangeValue(t) {
  33504. const {
  33505. bounds: e
  33506. } = this;
  33507. let n = t.map((r, i) => Jp({
  33508. value: r,
  33509. handle: i,
  33510. bounds: e,
  33511. props: this.$props
  33512. }));
  33513. if (e.length === n.length) {
  33514. if (n.every((r, i) => r === e[i]))
  33515. return null;
  33516. } else
  33517. n = t.map((r, i) => Jp({
  33518. value: r,
  33519. handle: i,
  33520. props: this.$props
  33521. }));
  33522. if (this.setState({
  33523. bounds: n
  33524. }), t.some((r) => TY(r, this.$props))) {
  33525. const r = t.map((i) => ED(i, this.$props));
  33526. this.$emit("change", r);
  33527. }
  33528. },
  33529. onChange(t) {
  33530. if (!m1(this, "value"))
  33531. this.setState(t);
  33532. else {
  33533. const i = {};
  33534. ["sHandle", "recent"].forEach((a) => {
  33535. t[a] !== void 0 && (i[a] = t[a]);
  33536. }), Object.keys(i).length && this.setState(i);
  33537. }
  33538. const r = I(I({}, this.$data), t).bounds;
  33539. this.$emit("change", r);
  33540. },
  33541. positionGetValue(t) {
  33542. const e = this.getValue(), n = this.calcValueByPos(t), r = this.getClosestBound(n), i = this.getBoundNeedMoving(n, r), a = e[i];
  33543. if (n === a) return null;
  33544. const o = [...e];
  33545. return o[i] = n, o;
  33546. },
  33547. onStart(t) {
  33548. const {
  33549. bounds: e
  33550. } = this;
  33551. this.$emit("beforeChange", e);
  33552. const n = this.calcValueByPos(t);
  33553. this.startValue = n, this.startPosition = t;
  33554. const r = this.getClosestBound(n);
  33555. this.prevMovedHandleIndex = this.getBoundNeedMoving(n, r), this.setState({
  33556. sHandle: this.prevMovedHandleIndex,
  33557. recent: this.prevMovedHandleIndex
  33558. });
  33559. const i = e[this.prevMovedHandleIndex];
  33560. if (n === i) return;
  33561. const a = [...e];
  33562. a[this.prevMovedHandleIndex] = n, this.onChange({
  33563. bounds: a
  33564. });
  33565. },
  33566. onEnd(t) {
  33567. const {
  33568. sHandle: e
  33569. } = this;
  33570. this.removeDocumentEvents(), e || (this.dragTrack = !1), (e !== null || t) && this.$emit("afterChange", this.bounds), this.setState({
  33571. sHandle: null
  33572. });
  33573. },
  33574. onMove(t, e, n, r) {
  33575. kh(t);
  33576. const {
  33577. $data: i,
  33578. $props: a
  33579. } = this, o = a.max || 100, s = a.min || 0;
  33580. if (n) {
  33581. let d = a.vertical ? -e : e;
  33582. d = a.reverse ? -d : d;
  33583. 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)));
  33584. i.bounds.map((m, y) => m === g[y]).some((m) => !m) && this.onChange({
  33585. bounds: g
  33586. });
  33587. return;
  33588. }
  33589. const {
  33590. bounds: l,
  33591. sHandle: u
  33592. } = this, c = this.calcValueByPos(e), f = l[u];
  33593. c !== f && this.moveTo(c);
  33594. },
  33595. onKeyboard(t) {
  33596. const {
  33597. reverse: e,
  33598. vertical: n
  33599. } = this.$props, r = AY(t, n, e);
  33600. if (r) {
  33601. kh(t);
  33602. const {
  33603. bounds: i,
  33604. sHandle: a
  33605. } = this, o = i[a === null ? this.recent : a], s = r(o, this.$props), l = Jp({
  33606. value: s,
  33607. handle: a,
  33608. bounds: i,
  33609. props: this.$props
  33610. });
  33611. if (l === o) return;
  33612. this.moveTo(l, !0);
  33613. }
  33614. },
  33615. getClosestBound(t) {
  33616. const {
  33617. bounds: e
  33618. } = this;
  33619. let n = 0;
  33620. for (let r = 1; r < e.length - 1; r += 1)
  33621. t >= e[r] && (n = r);
  33622. return Math.abs(e[n + 1] - t) < Math.abs(e[n] - t) && (n += 1), n;
  33623. },
  33624. getBoundNeedMoving(t, e) {
  33625. const {
  33626. bounds: n,
  33627. recent: r
  33628. } = this;
  33629. let i = e;
  33630. const a = n[e + 1] === n[e];
  33631. return a && n[r] === n[e] && (i = r), a && t !== n[e + 1] && (i = t < n[e + 1] ? e : e + 1), i;
  33632. },
  33633. getLowerBound() {
  33634. return this.bounds[0];
  33635. },
  33636. getUpperBound() {
  33637. const {
  33638. bounds: t
  33639. } = this;
  33640. return t[t.length - 1];
  33641. },
  33642. /**
  33643. * Returns an array of possible slider points, taking into account both
  33644. * `marks` and `step`. The result is cached.
  33645. */
  33646. getPoints() {
  33647. const {
  33648. marks: t,
  33649. step: e,
  33650. min: n,
  33651. max: r
  33652. } = this, i = this.internalPointsCache;
  33653. if (!i || i.marks !== t || i.step !== e) {
  33654. const a = I({}, t);
  33655. if (e !== null)
  33656. for (let s = n; s <= r; s += e)
  33657. a[s] = s;
  33658. const o = Object.keys(a).map(parseFloat);
  33659. o.sort((s, l) => s - l), this.internalPointsCache = {
  33660. marks: t,
  33661. step: e,
  33662. points: o
  33663. };
  33664. }
  33665. return this.internalPointsCache.points;
  33666. },
  33667. moveTo(t, e) {
  33668. const n = [...this.bounds], {
  33669. sHandle: r,
  33670. recent: i
  33671. } = this, a = r === null ? i : r;
  33672. n[a] = t;
  33673. let o = a;
  33674. this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, o) : this.$props.allowCross && (n.sort((s, l) => s - l), o = n.indexOf(t)), this.onChange({
  33675. recent: o,
  33676. sHandle: o,
  33677. bounds: n
  33678. }), e && (this.$emit("afterChange", n), this.setState({}, () => {
  33679. this.handlesRefs[o].focus();
  33680. }), this.onEnd());
  33681. },
  33682. pushSurroundingHandles(t, e) {
  33683. const n = t[e], {
  33684. pushable: r
  33685. } = this, i = Number(r);
  33686. let a = 0;
  33687. if (t[e + 1] - n < i && (a = 1), n - t[e - 1] < i && (a = -1), a === 0)
  33688. return;
  33689. const o = e + a, s = a * (t[o] - n);
  33690. this.pushHandle(t, o, a, i - s) || (t[e] = t[o] - a * i);
  33691. },
  33692. pushHandle(t, e, n, r) {
  33693. const i = t[e];
  33694. let a = t[e];
  33695. for (; n * (a - i) < r; ) {
  33696. if (!this.pushHandleOnePoint(t, e, n))
  33697. return t[e] = i, !1;
  33698. a = t[e];
  33699. }
  33700. return !0;
  33701. },
  33702. pushHandleOnePoint(t, e, n) {
  33703. const r = this.getPoints(), a = r.indexOf(t[e]) + n;
  33704. if (a >= r.length || a < 0)
  33705. return !1;
  33706. const o = e + n, s = r[a], {
  33707. pushable: l
  33708. } = this, u = Number(l), c = n * (t[o] - s);
  33709. return this.pushHandle(t, o, n, u - c) ? (t[e] = s, !0) : !1;
  33710. },
  33711. trimAlignValue(t) {
  33712. const {
  33713. sHandle: e,
  33714. bounds: n
  33715. } = this;
  33716. return Jp({
  33717. value: t,
  33718. handle: e,
  33719. bounds: n,
  33720. props: this.$props
  33721. });
  33722. },
  33723. ensureValueNotConflict(t, e, n) {
  33724. let {
  33725. allowCross: r,
  33726. pushable: i
  33727. } = n;
  33728. const a = this.$data || {}, {
  33729. bounds: o
  33730. } = a;
  33731. if (t = t === void 0 ? a.sHandle : t, i = Number(i), !r && t != null && o !== void 0) {
  33732. if (t > 0 && e <= o[t - 1] + i)
  33733. return o[t - 1] + i;
  33734. if (t < o.length - 1 && e >= o[t + 1] - i)
  33735. return o[t + 1] - i;
  33736. }
  33737. return e;
  33738. },
  33739. getTrack(t) {
  33740. let {
  33741. bounds: e,
  33742. prefixCls: n,
  33743. reverse: r,
  33744. vertical: i,
  33745. included: a,
  33746. offsets: o,
  33747. trackStyle: s
  33748. } = t;
  33749. return e.slice(0, -1).map((l, u) => {
  33750. const c = u + 1, f = ye({
  33751. [`${n}-track`]: !0,
  33752. [`${n}-track-${c}`]: !0
  33753. });
  33754. return M(AD, {
  33755. class: f,
  33756. vertical: i,
  33757. reverse: r,
  33758. included: a,
  33759. offset: o[c - 1],
  33760. length: o[c] - o[c - 1],
  33761. style: s[u],
  33762. key: c
  33763. }, null);
  33764. });
  33765. },
  33766. renderSlider() {
  33767. const {
  33768. sHandle: t,
  33769. bounds: e,
  33770. prefixCls: n,
  33771. vertical: r,
  33772. included: i,
  33773. disabled: a,
  33774. min: o,
  33775. max: s,
  33776. reverse: l,
  33777. handle: u,
  33778. defaultHandle: c,
  33779. trackStyle: f,
  33780. handleStyle: d,
  33781. tabindex: h,
  33782. ariaLabelGroupForHandles: p,
  33783. ariaLabelledByGroupForHandles: v,
  33784. ariaValueTextFormatterGroupForHandles: g
  33785. } = this, m = u || c, y = e.map((O) => this.calcOffset(O)), b = `${n}-handle`, _ = e.map((O, S) => {
  33786. let x = h[S] || 0;
  33787. (a || h[S] === null) && (x = null);
  33788. const C = t === S;
  33789. return m({
  33790. class: ye({
  33791. [b]: !0,
  33792. [`${b}-${S + 1}`]: !0,
  33793. [`${b}-dragging`]: C
  33794. }),
  33795. prefixCls: n,
  33796. vertical: r,
  33797. dragging: C,
  33798. offset: y[S],
  33799. value: O,
  33800. index: S,
  33801. tabindex: x,
  33802. min: o,
  33803. max: s,
  33804. reverse: l,
  33805. disabled: a,
  33806. style: d[S],
  33807. ref: (T) => this.saveHandle(S, T),
  33808. onFocus: this.onFocus,
  33809. onBlur: this.onBlur,
  33810. ariaLabel: p[S],
  33811. ariaLabelledBy: v[S],
  33812. ariaValueTextFormatter: g[S]
  33813. });
  33814. });
  33815. return {
  33816. tracks: this.getTrack({
  33817. bounds: e,
  33818. prefixCls: n,
  33819. reverse: l,
  33820. vertical: r,
  33821. included: i,
  33822. offsets: y,
  33823. trackStyle: f
  33824. }),
  33825. handles: _
  33826. };
  33827. }
  33828. }
  33829. }), ZTe = EY(jTe), UTe = te({
  33830. compatConfig: {
  33831. MODE: 3
  33832. },
  33833. name: "SliderTooltip",
  33834. inheritAttrs: !1,
  33835. props: LU(),
  33836. setup(t, e) {
  33837. let {
  33838. attrs: n,
  33839. slots: r
  33840. } = e;
  33841. const i = U(null), a = U(null);
  33842. function o() {
  33843. xt.cancel(a.value), a.value = null;
  33844. }
  33845. function s() {
  33846. a.value = xt(() => {
  33847. var u;
  33848. (u = i.value) === null || u === void 0 || u.forcePopupAlign(), a.value = null;
  33849. });
  33850. }
  33851. const l = () => {
  33852. o(), t.open && s();
  33853. };
  33854. return se([() => t.open, () => t.title], () => {
  33855. l();
  33856. }, {
  33857. flush: "post",
  33858. immediate: !0
  33859. }), Wle(() => {
  33860. l();
  33861. }), yt(() => {
  33862. o();
  33863. }), () => M(px, j(j({
  33864. ref: i
  33865. }, t), n), r);
  33866. }
  33867. }), XTe = (t) => {
  33868. const {
  33869. componentCls: e,
  33870. controlSize: n,
  33871. dotSize: r,
  33872. marginFull: i,
  33873. marginPart: a,
  33874. colorFillContentHover: o
  33875. } = t;
  33876. return {
  33877. [e]: I(I({}, nn(t)), {
  33878. position: "relative",
  33879. height: n,
  33880. margin: `${a}px ${i}px`,
  33881. padding: 0,
  33882. cursor: "pointer",
  33883. touchAction: "none",
  33884. "&-vertical": {
  33885. margin: `${i}px ${a}px`
  33886. },
  33887. [`${e}-rail`]: {
  33888. position: "absolute",
  33889. backgroundColor: t.colorFillTertiary,
  33890. borderRadius: t.borderRadiusXS,
  33891. transition: `background-color ${t.motionDurationMid}`
  33892. },
  33893. [`${e}-track`]: {
  33894. position: "absolute",
  33895. backgroundColor: t.colorPrimaryBorder,
  33896. borderRadius: t.borderRadiusXS,
  33897. transition: `background-color ${t.motionDurationMid}`
  33898. },
  33899. "&:hover": {
  33900. [`${e}-rail`]: {
  33901. backgroundColor: t.colorFillSecondary
  33902. },
  33903. [`${e}-track`]: {
  33904. backgroundColor: t.colorPrimaryBorderHover
  33905. },
  33906. [`${e}-dot`]: {
  33907. borderColor: o
  33908. },
  33909. [`${e}-handle::after`]: {
  33910. boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorderHover}`
  33911. },
  33912. [`${e}-dot-active`]: {
  33913. borderColor: t.colorPrimary
  33914. }
  33915. },
  33916. [`${e}-handle`]: {
  33917. position: "absolute",
  33918. width: t.handleSize,
  33919. height: t.handleSize,
  33920. outline: "none",
  33921. [`${e}-dragging`]: {
  33922. zIndex: 1
  33923. },
  33924. // 扩大选区
  33925. "&::before": {
  33926. content: '""',
  33927. position: "absolute",
  33928. insetInlineStart: -t.handleLineWidth,
  33929. insetBlockStart: -t.handleLineWidth,
  33930. width: t.handleSize + t.handleLineWidth * 2,
  33931. height: t.handleSize + t.handleLineWidth * 2,
  33932. backgroundColor: "transparent"
  33933. },
  33934. "&::after": {
  33935. content: '""',
  33936. position: "absolute",
  33937. insetBlockStart: 0,
  33938. insetInlineStart: 0,
  33939. width: t.handleSize,
  33940. height: t.handleSize,
  33941. backgroundColor: t.colorBgElevated,
  33942. boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorder}`,
  33943. borderRadius: "50%",
  33944. cursor: "pointer",
  33945. transition: `
  33946. inset-inline-start ${t.motionDurationMid},
  33947. inset-block-start ${t.motionDurationMid},
  33948. width ${t.motionDurationMid},
  33949. height ${t.motionDurationMid},
  33950. box-shadow ${t.motionDurationMid}
  33951. `
  33952. },
  33953. "&:hover, &:active, &:focus": {
  33954. "&::before": {
  33955. insetInlineStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
  33956. insetBlockStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
  33957. width: t.handleSizeHover + t.handleLineWidthHover * 2,
  33958. height: t.handleSizeHover + t.handleLineWidthHover * 2
  33959. },
  33960. "&::after": {
  33961. boxShadow: `0 0 0 ${t.handleLineWidthHover}px ${t.colorPrimary}`,
  33962. width: t.handleSizeHover,
  33963. height: t.handleSizeHover,
  33964. insetInlineStart: (t.handleSize - t.handleSizeHover) / 2,
  33965. insetBlockStart: (t.handleSize - t.handleSizeHover) / 2
  33966. }
  33967. }
  33968. },
  33969. [`${e}-mark`]: {
  33970. position: "absolute",
  33971. fontSize: t.fontSize
  33972. },
  33973. [`${e}-mark-text`]: {
  33974. position: "absolute",
  33975. display: "inline-block",
  33976. color: t.colorTextDescription,
  33977. textAlign: "center",
  33978. wordBreak: "keep-all",
  33979. cursor: "pointer",
  33980. userSelect: "none",
  33981. "&-active": {
  33982. color: t.colorText
  33983. }
  33984. },
  33985. [`${e}-step`]: {
  33986. position: "absolute",
  33987. background: "transparent",
  33988. pointerEvents: "none"
  33989. },
  33990. [`${e}-dot`]: {
  33991. position: "absolute",
  33992. width: r,
  33993. height: r,
  33994. backgroundColor: t.colorBgElevated,
  33995. border: `${t.handleLineWidth}px solid ${t.colorBorderSecondary}`,
  33996. borderRadius: "50%",
  33997. cursor: "pointer",
  33998. transition: `border-color ${t.motionDurationSlow}`,
  33999. "&-active": {
  34000. borderColor: t.colorPrimaryBorder
  34001. }
  34002. },
  34003. [`&${e}-disabled`]: {
  34004. cursor: "not-allowed",
  34005. [`${e}-rail`]: {
  34006. backgroundColor: `${t.colorFillSecondary} !important`
  34007. },
  34008. [`${e}-track`]: {
  34009. backgroundColor: `${t.colorTextDisabled} !important`
  34010. },
  34011. [`
  34012. ${e}-dot
  34013. `]: {
  34014. backgroundColor: t.colorBgElevated,
  34015. borderColor: t.colorTextDisabled,
  34016. boxShadow: "none",
  34017. cursor: "not-allowed"
  34018. },
  34019. [`${e}-handle::after`]: {
  34020. backgroundColor: t.colorBgElevated,
  34021. cursor: "not-allowed",
  34022. width: t.handleSize,
  34023. height: t.handleSize,
  34024. boxShadow: `0 0 0 ${t.handleLineWidth}px ${new en(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString()}`,
  34025. insetInlineStart: 0,
  34026. insetBlockStart: 0
  34027. },
  34028. [`
  34029. ${e}-mark-text,
  34030. ${e}-dot
  34031. `]: {
  34032. cursor: "not-allowed !important"
  34033. }
  34034. }
  34035. })
  34036. };
  34037. }, MY = (t, e) => {
  34038. const {
  34039. componentCls: n,
  34040. railSize: r,
  34041. handleSize: i,
  34042. dotSize: a
  34043. } = t, o = e ? "paddingBlock" : "paddingInline", s = e ? "width" : "height", l = e ? "height" : "width", u = e ? "insetBlockStart" : "insetInlineStart", c = e ? "top" : "insetInlineStart";
  34044. return {
  34045. [o]: r,
  34046. [l]: r * 3,
  34047. [`${n}-rail`]: {
  34048. [s]: "100%",
  34049. [l]: r
  34050. },
  34051. [`${n}-track`]: {
  34052. [l]: r
  34053. },
  34054. [`${n}-handle`]: {
  34055. [u]: (r * 3 - i) / 2
  34056. },
  34057. [`${n}-mark`]: {
  34058. // Reset all
  34059. insetInlineStart: 0,
  34060. top: 0,
  34061. [c]: i,
  34062. [s]: "100%"
  34063. },
  34064. [`${n}-step`]: {
  34065. // Reset all
  34066. insetInlineStart: 0,
  34067. top: 0,
  34068. [c]: r,
  34069. [s]: "100%",
  34070. [l]: r
  34071. },
  34072. [`${n}-dot`]: {
  34073. position: "absolute",
  34074. [u]: (r - a) / 2
  34075. }
  34076. };
  34077. }, YTe = (t) => {
  34078. const {
  34079. componentCls: e,
  34080. marginPartWithMark: n
  34081. } = t;
  34082. return {
  34083. [`${e}-horizontal`]: I(I({}, MY(t, !0)), {
  34084. [`&${e}-with-marks`]: {
  34085. marginBottom: n
  34086. }
  34087. })
  34088. };
  34089. }, qTe = (t) => {
  34090. const {
  34091. componentCls: e
  34092. } = t;
  34093. return {
  34094. [`${e}-vertical`]: I(I({}, MY(t, !1)), {
  34095. height: "100%"
  34096. })
  34097. };
  34098. }, KTe = Sn("Slider", (t) => {
  34099. const e = Bt(t, {
  34100. marginPart: (t.controlHeight - t.controlSize) / 2,
  34101. marginFull: t.controlSize / 2,
  34102. marginPartWithMark: t.controlHeightLG - t.controlSize
  34103. });
  34104. return [XTe(e), YTe(e), qTe(e)];
  34105. }, (t) => {
  34106. const n = t.controlHeightLG / 4, r = t.controlHeightSM / 2, i = t.lineWidth + 1, a = t.lineWidth + 1 * 3;
  34107. return {
  34108. controlSize: n,
  34109. railSize: 4,
  34110. handleSize: n,
  34111. handleSizeHover: r,
  34112. dotSize: 8,
  34113. handleLineWidth: i,
  34114. handleLineWidthHover: a
  34115. };
  34116. });
  34117. var $3 = function(t, e) {
  34118. var n = {};
  34119. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  34120. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  34121. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  34122. return n;
  34123. };
  34124. const JTe = (t) => typeof t == "number" ? t.toString() : "", ePe = () => ({
  34125. id: String,
  34126. prefixCls: String,
  34127. tooltipPrefixCls: String,
  34128. range: gn([Boolean, Object]),
  34129. reverse: nt(),
  34130. min: Number,
  34131. max: Number,
  34132. step: gn([Object, Number]),
  34133. marks: $t(),
  34134. dots: nt(),
  34135. value: gn([Array, Number]),
  34136. defaultValue: gn([Array, Number]),
  34137. included: nt(),
  34138. disabled: nt(),
  34139. vertical: nt(),
  34140. tipFormatter: gn([Function, Object], () => JTe),
  34141. tooltipOpen: nt(),
  34142. /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  34143. tooltipVisible: nt(),
  34144. tooltipPlacement: hn(),
  34145. getTooltipPopupContainer: tt(),
  34146. autofocus: nt(),
  34147. handleStyle: gn([Array, Object]),
  34148. trackStyle: gn([Array, Object]),
  34149. onChange: tt(),
  34150. onAfterChange: tt(),
  34151. onFocus: tt(),
  34152. onBlur: tt(),
  34153. "onUpdate:value": tt()
  34154. }), tPe = te({
  34155. compatConfig: {
  34156. MODE: 3
  34157. },
  34158. name: "ASlider",
  34159. inheritAttrs: !1,
  34160. props: ePe(),
  34161. // emits: ['update:value', 'change', 'afterChange', 'blur'],
  34162. slots: Object,
  34163. setup(t, e) {
  34164. let {
  34165. attrs: n,
  34166. slots: r,
  34167. emit: i,
  34168. expose: a
  34169. } = e;
  34170. process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((x) => {
  34171. let [C, T] = x;
  34172. Gi(t.tooltipVisible === void 0, "Slider", `\`${C}\` is deprecated, please use \`${T}\` instead.`);
  34173. });
  34174. const {
  34175. prefixCls: o,
  34176. rootPrefixCls: s,
  34177. direction: l,
  34178. getPopupContainer: u,
  34179. configProvider: c
  34180. } = It("slider", t), [f, d] = KTe(o), h = ls(), p = U(), v = U({}), g = (x, C) => {
  34181. v.value[x] = C;
  34182. }, m = L(() => t.tooltipPlacement ? t.tooltipPlacement : t.vertical ? l.value === "rtl" ? "left" : "right" : "top"), y = () => {
  34183. var x;
  34184. (x = p.value) === null || x === void 0 || x.focus();
  34185. }, b = () => {
  34186. var x;
  34187. (x = p.value) === null || x === void 0 || x.blur();
  34188. }, _ = (x) => {
  34189. i("update:value", x), i("change", x), h.onFieldChange();
  34190. }, O = (x) => {
  34191. i("blur", x);
  34192. };
  34193. a({
  34194. focus: y,
  34195. blur: b
  34196. });
  34197. const S = (x) => {
  34198. var {
  34199. tooltipPrefixCls: C
  34200. } = x, T = x.info, {
  34201. value: w,
  34202. dragging: P,
  34203. index: $
  34204. } = T, A = $3(T, ["value", "dragging", "index"]);
  34205. const {
  34206. tipFormatter: D,
  34207. tooltipOpen: E = t.tooltipVisible,
  34208. getTooltipPopupContainer: R
  34209. } = t, N = D ? v.value[$] || P : !1, V = E || E === void 0 && N;
  34210. return M(UTe, {
  34211. prefixCls: C,
  34212. title: D ? D(w) : "",
  34213. open: V,
  34214. placement: m.value,
  34215. transitionName: `${s.value}-zoom-down`,
  34216. key: $,
  34217. overlayClassName: `${o.value}-tooltip`,
  34218. getPopupContainer: R || (u == null ? void 0 : u.value)
  34219. }, {
  34220. default: () => [M(CY, j(j({}, A), {}, {
  34221. value: w,
  34222. onMouseenter: () => g($, !0),
  34223. onMouseleave: () => g($, !1)
  34224. }), null)]
  34225. });
  34226. };
  34227. return () => {
  34228. const {
  34229. tooltipPrefixCls: x,
  34230. range: C,
  34231. id: T = h.id.value
  34232. } = t, w = $3(t, ["tooltipPrefixCls", "range", "id"]), P = c.getPrefixCls("tooltip", x), $ = ye(n.class, {
  34233. [`${o.value}-rtl`]: l.value === "rtl"
  34234. }, d.value);
  34235. l.value === "rtl" && !w.vertical && (w.reverse = !w.reverse);
  34236. let A;
  34237. return typeof C == "object" && (A = C.draggableTrack), f(C ? M(ZTe, j(j(j({}, n), w), {}, {
  34238. step: w.step,
  34239. draggableTrack: A,
  34240. class: $,
  34241. ref: p,
  34242. handle: (D) => S({
  34243. tooltipPrefixCls: P,
  34244. prefixCls: o.value,
  34245. info: D
  34246. }),
  34247. prefixCls: o.value,
  34248. onChange: _,
  34249. onBlur: O
  34250. }), {
  34251. mark: r.mark
  34252. }) : M(HTe, j(j(j({}, n), w), {}, {
  34253. id: T,
  34254. step: w.step,
  34255. class: $,
  34256. ref: p,
  34257. handle: (D) => S({
  34258. tooltipPrefixCls: P,
  34259. prefixCls: o.value,
  34260. info: D
  34261. }),
  34262. prefixCls: o.value,
  34263. onChange: _,
  34264. onBlur: O
  34265. }), {
  34266. mark: r.mark
  34267. }));
  34268. };
  34269. }
  34270. }), nPe = sp(tPe);
  34271. var rPe = { 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" };
  34272. function A3(t) {
  34273. for (var e = 1; e < arguments.length; e++) {
  34274. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34275. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34276. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34277. }))), r.forEach(function(i) {
  34278. iPe(t, i, n[i]);
  34279. });
  34280. }
  34281. return t;
  34282. }
  34283. function iPe(t, e, n) {
  34284. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34285. }
  34286. var MD = function(e, n) {
  34287. var r = A3({}, e, n.attrs);
  34288. return M(lt, A3({}, r, {
  34289. icon: rPe
  34290. }), null);
  34291. };
  34292. MD.displayName = "AlignCenterOutlined";
  34293. MD.inheritAttrs = !1;
  34294. var aPe = { 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" };
  34295. function E3(t) {
  34296. for (var e = 1; e < arguments.length; e++) {
  34297. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34298. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34299. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34300. }))), r.forEach(function(i) {
  34301. oPe(t, i, n[i]);
  34302. });
  34303. }
  34304. return t;
  34305. }
  34306. function oPe(t, e, n) {
  34307. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34308. }
  34309. var ID = function(e, n) {
  34310. var r = E3({}, e, n.attrs);
  34311. return M(lt, E3({}, r, {
  34312. icon: aPe
  34313. }), null);
  34314. };
  34315. ID.displayName = "AlignLeftOutlined";
  34316. ID.inheritAttrs = !1;
  34317. var sPe = { 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" };
  34318. function M3(t) {
  34319. for (var e = 1; e < arguments.length; e++) {
  34320. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34321. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34322. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34323. }))), r.forEach(function(i) {
  34324. lPe(t, i, n[i]);
  34325. });
  34326. }
  34327. return t;
  34328. }
  34329. function lPe(t, e, n) {
  34330. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34331. }
  34332. var DD = function(e, n) {
  34333. var r = M3({}, e, n.attrs);
  34334. return M(lt, M3({}, r, {
  34335. icon: sPe
  34336. }), null);
  34337. };
  34338. DD.displayName = "AlignRightOutlined";
  34339. DD.inheritAttrs = !1;
  34340. var uPe = { 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" };
  34341. function I3(t) {
  34342. for (var e = 1; e < arguments.length; e++) {
  34343. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34344. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34345. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34346. }))), r.forEach(function(i) {
  34347. cPe(t, i, n[i]);
  34348. });
  34349. }
  34350. return t;
  34351. }
  34352. function cPe(t, e, n) {
  34353. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34354. }
  34355. var RD = function(e, n) {
  34356. var r = I3({}, e, n.attrs);
  34357. return M(lt, I3({}, r, {
  34358. icon: uPe
  34359. }), null);
  34360. };
  34361. RD.displayName = "BoldOutlined";
  34362. RD.inheritAttrs = !1;
  34363. var fPe = { 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" };
  34364. function D3(t) {
  34365. for (var e = 1; e < arguments.length; e++) {
  34366. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34367. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34368. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34369. }))), r.forEach(function(i) {
  34370. dPe(t, i, n[i]);
  34371. });
  34372. }
  34373. return t;
  34374. }
  34375. function dPe(t, e, n) {
  34376. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34377. }
  34378. var kD = function(e, n) {
  34379. var r = D3({}, e, n.attrs);
  34380. return M(lt, D3({}, r, {
  34381. icon: fPe
  34382. }), null);
  34383. };
  34384. kD.displayName = "BorderBottomOutlined";
  34385. kD.inheritAttrs = !1;
  34386. var hPe = { 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" };
  34387. function R3(t) {
  34388. for (var e = 1; e < arguments.length; e++) {
  34389. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34390. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34391. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34392. }))), r.forEach(function(i) {
  34393. pPe(t, i, n[i]);
  34394. });
  34395. }
  34396. return t;
  34397. }
  34398. function pPe(t, e, n) {
  34399. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34400. }
  34401. var LD = function(e, n) {
  34402. var r = R3({}, e, n.attrs);
  34403. return M(lt, R3({}, r, {
  34404. icon: hPe
  34405. }), null);
  34406. };
  34407. LD.displayName = "BorderLeftOutlined";
  34408. LD.inheritAttrs = !1;
  34409. var vPe = { 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" };
  34410. function k3(t) {
  34411. for (var e = 1; e < arguments.length; e++) {
  34412. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34413. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34414. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34415. }))), r.forEach(function(i) {
  34416. gPe(t, i, n[i]);
  34417. });
  34418. }
  34419. return t;
  34420. }
  34421. function gPe(t, e, n) {
  34422. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34423. }
  34424. var ND = function(e, n) {
  34425. var r = k3({}, e, n.attrs);
  34426. return M(lt, k3({}, r, {
  34427. icon: vPe
  34428. }), null);
  34429. };
  34430. ND.displayName = "BorderRightOutlined";
  34431. ND.inheritAttrs = !1;
  34432. var mPe = { 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" };
  34433. function L3(t) {
  34434. for (var e = 1; e < arguments.length; e++) {
  34435. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34436. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34437. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34438. }))), r.forEach(function(i) {
  34439. yPe(t, i, n[i]);
  34440. });
  34441. }
  34442. return t;
  34443. }
  34444. function yPe(t, e, n) {
  34445. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34446. }
  34447. var BD = function(e, n) {
  34448. var r = L3({}, e, n.attrs);
  34449. return M(lt, L3({}, r, {
  34450. icon: mPe
  34451. }), null);
  34452. };
  34453. BD.displayName = "BorderTopOutlined";
  34454. BD.inheritAttrs = !1;
  34455. var bPe = { 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" };
  34456. function N3(t) {
  34457. for (var e = 1; e < arguments.length; e++) {
  34458. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34459. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34460. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34461. }))), r.forEach(function(i) {
  34462. _Pe(t, i, n[i]);
  34463. });
  34464. }
  34465. return t;
  34466. }
  34467. function _Pe(t, e, n) {
  34468. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34469. }
  34470. var w0 = function(e, n) {
  34471. var r = N3({}, e, n.attrs);
  34472. return M(lt, N3({}, r, {
  34473. icon: bPe
  34474. }), null);
  34475. };
  34476. w0.displayName = "DatabaseOutlined";
  34477. w0.inheritAttrs = !1;
  34478. var OPe = { 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" };
  34479. function B3(t) {
  34480. for (var e = 1; e < arguments.length; e++) {
  34481. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34482. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34483. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34484. }))), r.forEach(function(i) {
  34485. SPe(t, i, n[i]);
  34486. });
  34487. }
  34488. return t;
  34489. }
  34490. function SPe(t, e, n) {
  34491. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34492. }
  34493. var zD = function(e, n) {
  34494. var r = B3({}, e, n.attrs);
  34495. return M(lt, B3({}, r, {
  34496. icon: OPe
  34497. }), null);
  34498. };
  34499. zD.displayName = "FontColorsOutlined";
  34500. zD.inheritAttrs = !1;
  34501. var xPe = { 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" };
  34502. function z3(t) {
  34503. for (var e = 1; e < arguments.length; e++) {
  34504. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34505. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34506. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34507. }))), r.forEach(function(i) {
  34508. wPe(t, i, n[i]);
  34509. });
  34510. }
  34511. return t;
  34512. }
  34513. function wPe(t, e, n) {
  34514. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34515. }
  34516. var VD = function(e, n) {
  34517. var r = z3({}, e, n.attrs);
  34518. return M(lt, z3({}, r, {
  34519. icon: xPe
  34520. }), null);
  34521. };
  34522. VD.displayName = "ItalicOutlined";
  34523. VD.inheritAttrs = !1;
  34524. var CPe = { 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" };
  34525. function V3(t) {
  34526. for (var e = 1; e < arguments.length; e++) {
  34527. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34528. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34529. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34530. }))), r.forEach(function(i) {
  34531. TPe(t, i, n[i]);
  34532. });
  34533. }
  34534. return t;
  34535. }
  34536. function TPe(t, e, n) {
  34537. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34538. }
  34539. var FD = function(e, n) {
  34540. var r = V3({}, e, n.attrs);
  34541. return M(lt, V3({}, r, {
  34542. icon: CPe
  34543. }), null);
  34544. };
  34545. FD.displayName = "RadiusBottomleftOutlined";
  34546. FD.inheritAttrs = !1;
  34547. var PPe = { 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" };
  34548. function F3(t) {
  34549. for (var e = 1; e < arguments.length; e++) {
  34550. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34551. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34552. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34553. }))), r.forEach(function(i) {
  34554. $Pe(t, i, n[i]);
  34555. });
  34556. }
  34557. return t;
  34558. }
  34559. function $Pe(t, e, n) {
  34560. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34561. }
  34562. var WD = function(e, n) {
  34563. var r = F3({}, e, n.attrs);
  34564. return M(lt, F3({}, r, {
  34565. icon: PPe
  34566. }), null);
  34567. };
  34568. WD.displayName = "RadiusBottomrightOutlined";
  34569. WD.inheritAttrs = !1;
  34570. var APe = { 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" };
  34571. function W3(t) {
  34572. for (var e = 1; e < arguments.length; e++) {
  34573. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34574. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34575. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34576. }))), r.forEach(function(i) {
  34577. EPe(t, i, n[i]);
  34578. });
  34579. }
  34580. return t;
  34581. }
  34582. function EPe(t, e, n) {
  34583. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34584. }
  34585. var QD = function(e, n) {
  34586. var r = W3({}, e, n.attrs);
  34587. return M(lt, W3({}, r, {
  34588. icon: APe
  34589. }), null);
  34590. };
  34591. QD.displayName = "RadiusUpleftOutlined";
  34592. QD.inheritAttrs = !1;
  34593. var MPe = { 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" };
  34594. function Q3(t) {
  34595. for (var e = 1; e < arguments.length; e++) {
  34596. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34597. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34598. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34599. }))), r.forEach(function(i) {
  34600. IPe(t, i, n[i]);
  34601. });
  34602. }
  34603. return t;
  34604. }
  34605. function IPe(t, e, n) {
  34606. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34607. }
  34608. var HD = function(e, n) {
  34609. var r = Q3({}, e, n.attrs);
  34610. return M(lt, Q3({}, r, {
  34611. icon: MPe
  34612. }), null);
  34613. };
  34614. HD.displayName = "RadiusUprightOutlined";
  34615. HD.inheritAttrs = !1;
  34616. var DPe = { 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" };
  34617. function H3(t) {
  34618. for (var e = 1; e < arguments.length; e++) {
  34619. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34620. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34621. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34622. }))), r.forEach(function(i) {
  34623. RPe(t, i, n[i]);
  34624. });
  34625. }
  34626. return t;
  34627. }
  34628. function RPe(t, e, n) {
  34629. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34630. }
  34631. var C0 = function(e, n) {
  34632. var r = H3({}, e, n.attrs);
  34633. return M(lt, H3({}, r, {
  34634. icon: DPe
  34635. }), null);
  34636. };
  34637. C0.displayName = "SkinOutlined";
  34638. C0.inheritAttrs = !1;
  34639. const _s = (t, e, { checkForDefaultPrevented: n = !0 } = {}) => (i) => {
  34640. const a = t == null ? void 0 : t(i);
  34641. if (n === !1 || !a)
  34642. return e == null ? void 0 : e(i);
  34643. };
  34644. var G3;
  34645. const qr = typeof window < "u", kPe = (t) => typeof t == "string", IY = () => {
  34646. }, LPe = qr && ((G3 = window == null ? void 0 : window.navigator) == null ? void 0 : G3.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
  34647. function DY(t) {
  34648. return typeof t == "function" ? t() : z(t);
  34649. }
  34650. function NPe(t) {
  34651. return t;
  34652. }
  34653. function GD(t) {
  34654. return Z9() ? (d0(t), !0) : !1;
  34655. }
  34656. function BPe(t, e = !0) {
  34657. vn() ? it(t) : e ? t() : Tt(t);
  34658. }
  34659. function Rl(t) {
  34660. var e;
  34661. const n = DY(t);
  34662. return (e = n == null ? void 0 : n.$el) != null ? e : n;
  34663. }
  34664. const jD = qr ? window : void 0;
  34665. function D_(...t) {
  34666. let e, n, r, i;
  34667. if (kPe(t[0]) || Array.isArray(t[0]) ? ([n, r, i] = t, e = jD) : [e, n, r, i] = t, !e)
  34668. return IY;
  34669. Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  34670. const a = [], o = () => {
  34671. a.forEach((c) => c()), a.length = 0;
  34672. }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = se(() => [Rl(e), DY(i)], ([c, f]) => {
  34673. o(), c && a.push(...n.flatMap((d) => r.map((h) => s(c, d, h, f))));
  34674. }, { immediate: !0, flush: "post" }), u = () => {
  34675. l(), o();
  34676. };
  34677. return GD(u), u;
  34678. }
  34679. let j3 = !1;
  34680. function zPe(t, e, n = {}) {
  34681. const { window: r = jD, ignore: i = [], capture: a = !0, detectIframe: o = !1 } = n;
  34682. if (!r)
  34683. return;
  34684. LPe && !j3 && (j3 = !0, Array.from(r.document.body.children).forEach((d) => d.addEventListener("click", IY)));
  34685. let s = !0;
  34686. const l = (d) => i.some((h) => {
  34687. if (typeof h == "string")
  34688. return Array.from(r.document.querySelectorAll(h)).some((p) => p === d.target || d.composedPath().includes(p));
  34689. {
  34690. const p = Rl(h);
  34691. return p && (d.target === p || d.composedPath().includes(p));
  34692. }
  34693. }), c = [
  34694. D_(r, "click", (d) => {
  34695. const h = Rl(t);
  34696. if (!(!h || h === d.target || d.composedPath().includes(h))) {
  34697. if (d.detail === 0 && (s = !l(d)), !s) {
  34698. s = !0;
  34699. return;
  34700. }
  34701. e(d);
  34702. }
  34703. }, { passive: !0, capture: a }),
  34704. D_(r, "pointerdown", (d) => {
  34705. const h = Rl(t);
  34706. h && (s = !d.composedPath().includes(h) && !l(d));
  34707. }, { passive: !0 }),
  34708. o && D_(r, "blur", (d) => {
  34709. var h;
  34710. const p = Rl(t);
  34711. ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && e(d);
  34712. })
  34713. ].filter(Boolean);
  34714. return () => c.forEach((d) => d());
  34715. }
  34716. function VPe(t, e = !1) {
  34717. const n = U(), r = () => n.value = !!t();
  34718. return r(), BPe(r, e), n;
  34719. }
  34720. const Z3 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, U3 = "__vueuse_ssr_handlers__";
  34721. Z3[U3] = Z3[U3] || {};
  34722. var X3 = Object.getOwnPropertySymbols, FPe = Object.prototype.hasOwnProperty, WPe = Object.prototype.propertyIsEnumerable, QPe = (t, e) => {
  34723. var n = {};
  34724. for (var r in t)
  34725. FPe.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  34726. if (t != null && X3)
  34727. for (var r of X3(t))
  34728. e.indexOf(r) < 0 && WPe.call(t, r) && (n[r] = t[r]);
  34729. return n;
  34730. };
  34731. function HPe(t, e, n = {}) {
  34732. const r = n, { window: i = jD } = r, a = QPe(r, ["window"]);
  34733. let o;
  34734. const s = VPe(() => i && "ResizeObserver" in i), l = () => {
  34735. o && (o.disconnect(), o = void 0);
  34736. }, u = se(() => Rl(t), (f) => {
  34737. l(), s.value && i && f && (o = new ResizeObserver(e), o.observe(f, a));
  34738. }, { immediate: !0, flush: "post" }), c = () => {
  34739. l(), u();
  34740. };
  34741. return GD(c), {
  34742. isSupported: s,
  34743. stop: c
  34744. };
  34745. }
  34746. var Y3;
  34747. (function(t) {
  34748. t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
  34749. })(Y3 || (Y3 = {}));
  34750. var GPe = Object.defineProperty, q3 = Object.getOwnPropertySymbols, jPe = Object.prototype.hasOwnProperty, ZPe = Object.prototype.propertyIsEnumerable, K3 = (t, e, n) => e in t ? GPe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, UPe = (t, e) => {
  34751. for (var n in e || (e = {}))
  34752. jPe.call(e, n) && K3(t, n, e[n]);
  34753. if (q3)
  34754. for (var n of q3(e))
  34755. ZPe.call(e, n) && K3(t, n, e[n]);
  34756. return t;
  34757. };
  34758. const XPe = {
  34759. easeInSine: [0.12, 0, 0.39, 0],
  34760. easeOutSine: [0.61, 1, 0.88, 1],
  34761. easeInOutSine: [0.37, 0, 0.63, 1],
  34762. easeInQuad: [0.11, 0, 0.5, 0],
  34763. easeOutQuad: [0.5, 1, 0.89, 1],
  34764. easeInOutQuad: [0.45, 0, 0.55, 1],
  34765. easeInCubic: [0.32, 0, 0.67, 0],
  34766. easeOutCubic: [0.33, 1, 0.68, 1],
  34767. easeInOutCubic: [0.65, 0, 0.35, 1],
  34768. easeInQuart: [0.5, 0, 0.75, 0],
  34769. easeOutQuart: [0.25, 1, 0.5, 1],
  34770. easeInOutQuart: [0.76, 0, 0.24, 1],
  34771. easeInQuint: [0.64, 0, 0.78, 0],
  34772. easeOutQuint: [0.22, 1, 0.36, 1],
  34773. easeInOutQuint: [0.83, 0, 0.17, 1],
  34774. easeInExpo: [0.7, 0, 0.84, 0],
  34775. easeOutExpo: [0.16, 1, 0.3, 1],
  34776. easeInOutExpo: [0.87, 0, 0.13, 1],
  34777. easeInCirc: [0.55, 0, 1, 0.45],
  34778. easeOutCirc: [0, 0.55, 0.45, 1],
  34779. easeInOutCirc: [0.85, 0, 0.15, 1],
  34780. easeInBack: [0.36, 0, 0.66, -0.56],
  34781. easeOutBack: [0.34, 1.56, 0.64, 1],
  34782. easeInOutBack: [0.68, -0.6, 0.32, 1.6]
  34783. };
  34784. UPe({
  34785. linear: NPe
  34786. }, XPe);
  34787. const YPe = () => qr && /firefox/i.test(window.navigator.userAgent), ZD = (t) => {
  34788. let e, n;
  34789. 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), {
  34790. clientX: e,
  34791. clientY: n
  34792. };
  34793. };
  34794. /**
  34795. * @vue/shared v3.4.31
  34796. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  34797. * @license MIT
  34798. **/
  34799. process.env.NODE_ENV !== "production" && Object.freeze({});
  34800. process.env.NODE_ENV !== "production" && Object.freeze([]);
  34801. const dm = () => {
  34802. }, qPe = Object.prototype.hasOwnProperty, H1 = (t, e) => qPe.call(t, e), KPe = Array.isArray, Hv = (t) => typeof t == "function", Oa = (t) => typeof t == "string", hm = (t) => t !== null && typeof t == "object", JPe = (t) => t === void 0, G1 = (t) => typeof t == "boolean", Qs = (t) => typeof t == "number", pm = (t) => typeof Element > "u" ? !1 : t instanceof Element, J3 = (t) => Gl(t), e$e = (t) => Oa(t) ? !Number.isNaN(Number(t)) : !1;
  34803. class t$e extends Error {
  34804. constructor(e) {
  34805. super(e), this.name = "ElementPlusError";
  34806. }
  34807. }
  34808. function Zi(t, e) {
  34809. if (process.env.NODE_ENV !== "production") {
  34810. const n = Oa(t) ? new t$e(`[${t}] ${e}`) : t;
  34811. console.warn(n);
  34812. }
  34813. }
  34814. const n$e = "utils/dom/style";
  34815. function tA(t, e = "px") {
  34816. if (!t)
  34817. return "";
  34818. if (Qs(t) || e$e(t))
  34819. return `${t}${e}`;
  34820. if (Oa(t))
  34821. return t;
  34822. Zi(n$e, "binding value must be a string or number");
  34823. }
  34824. /*! Element Plus Icons Vue v2.3.1 */
  34825. var r$e = /* @__PURE__ */ te({
  34826. name: "ArrowDown",
  34827. __name: "arrow-down",
  34828. setup(t) {
  34829. return (e, n) => (pe(), Qe("svg", {
  34830. xmlns: "http://www.w3.org/2000/svg",
  34831. viewBox: "0 0 1024 1024"
  34832. }, [
  34833. He("path", {
  34834. fill: "currentColor",
  34835. 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"
  34836. })
  34837. ]));
  34838. }
  34839. }), i$e = r$e, a$e = /* @__PURE__ */ te({
  34840. name: "CircleCheck",
  34841. __name: "circle-check",
  34842. setup(t) {
  34843. return (e, n) => (pe(), Qe("svg", {
  34844. xmlns: "http://www.w3.org/2000/svg",
  34845. viewBox: "0 0 1024 1024"
  34846. }, [
  34847. He("path", {
  34848. fill: "currentColor",
  34849. 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"
  34850. }),
  34851. He("path", {
  34852. fill: "currentColor",
  34853. 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"
  34854. })
  34855. ]));
  34856. }
  34857. }), o$e = a$e, s$e = /* @__PURE__ */ te({
  34858. name: "CircleClose",
  34859. __name: "circle-close",
  34860. setup(t) {
  34861. return (e, n) => (pe(), Qe("svg", {
  34862. xmlns: "http://www.w3.org/2000/svg",
  34863. viewBox: "0 0 1024 1024"
  34864. }, [
  34865. He("path", {
  34866. fill: "currentColor",
  34867. 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"
  34868. }),
  34869. He("path", {
  34870. fill: "currentColor",
  34871. 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"
  34872. })
  34873. ]));
  34874. }
  34875. }), RY = s$e, l$e = /* @__PURE__ */ te({
  34876. name: "Close",
  34877. __name: "close",
  34878. setup(t) {
  34879. return (e, n) => (pe(), Qe("svg", {
  34880. xmlns: "http://www.w3.org/2000/svg",
  34881. viewBox: "0 0 1024 1024"
  34882. }, [
  34883. He("path", {
  34884. fill: "currentColor",
  34885. 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"
  34886. })
  34887. ]));
  34888. }
  34889. }), u$e = l$e, c$e = /* @__PURE__ */ te({
  34890. name: "Hide",
  34891. __name: "hide",
  34892. setup(t) {
  34893. return (e, n) => (pe(), Qe("svg", {
  34894. xmlns: "http://www.w3.org/2000/svg",
  34895. viewBox: "0 0 1024 1024"
  34896. }, [
  34897. He("path", {
  34898. fill: "currentColor",
  34899. 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"
  34900. }),
  34901. He("path", {
  34902. fill: "currentColor",
  34903. 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"
  34904. })
  34905. ]));
  34906. }
  34907. }), f$e = c$e, d$e = /* @__PURE__ */ te({
  34908. name: "Loading",
  34909. __name: "loading",
  34910. setup(t) {
  34911. return (e, n) => (pe(), Qe("svg", {
  34912. xmlns: "http://www.w3.org/2000/svg",
  34913. viewBox: "0 0 1024 1024"
  34914. }, [
  34915. He("path", {
  34916. fill: "currentColor",
  34917. 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"
  34918. })
  34919. ]));
  34920. }
  34921. }), kY = d$e, h$e = /* @__PURE__ */ te({
  34922. name: "View",
  34923. __name: "view",
  34924. setup(t) {
  34925. return (e, n) => (pe(), Qe("svg", {
  34926. xmlns: "http://www.w3.org/2000/svg",
  34927. viewBox: "0 0 1024 1024"
  34928. }, [
  34929. He("path", {
  34930. fill: "currentColor",
  34931. 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"
  34932. })
  34933. ]));
  34934. }
  34935. }), p$e = h$e;
  34936. const LY = "__epPropKey", jt = (t) => t, v$e = (t) => hm(t) && !!t[LY], $x = (t, e) => {
  34937. if (!hm(t) || v$e(t))
  34938. return t;
  34939. const { values: n, required: r, default: i, type: a, validator: o } = t, l = {
  34940. type: a,
  34941. required: !!r,
  34942. validator: n || o ? (u) => {
  34943. let c = !1, f = [];
  34944. if (n && (f = Array.from(n), H1(t, "default") && f.push(i), c || (c = f.includes(u))), o && (c || (c = o(u))), !c && f.length > 0) {
  34945. const d = [...new Set(f)].map((h) => JSON.stringify(h)).join(", ");
  34946. Qle(`Invalid prop: validation failed${e ? ` for prop "${e}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`);
  34947. }
  34948. return c;
  34949. } : void 0,
  34950. [LY]: !0
  34951. };
  34952. return H1(t, "default") && (l.default = i), l;
  34953. }, rr = (t) => M1(Object.entries(t).map(([e, n]) => [
  34954. e,
  34955. $x(n, e)
  34956. ])), j1 = jt([
  34957. String,
  34958. Object,
  34959. Function
  34960. ]), g$e = {
  34961. validating: kY,
  34962. success: o$e,
  34963. error: RY
  34964. }, Rf = (t, e) => {
  34965. if (t.install = (n) => {
  34966. for (const r of [t, ...Object.values(e ?? {})])
  34967. n.component(r.name, r);
  34968. }, e)
  34969. for (const [n, r] of Object.entries(e))
  34970. t[n] = r;
  34971. return t;
  34972. }, UD = (t) => (t.install = dm, t), Xc = {
  34973. tab: "Tab",
  34974. enter: "Enter",
  34975. space: "Space",
  34976. left: "ArrowLeft",
  34977. up: "ArrowUp",
  34978. right: "ArrowRight",
  34979. down: "ArrowDown",
  34980. esc: "Escape",
  34981. delete: "Delete",
  34982. backspace: "Backspace",
  34983. numpadEnter: "NumpadEnter",
  34984. pageUp: "PageUp",
  34985. pageDown: "PageDown",
  34986. home: "Home",
  34987. end: "End"
  34988. }, Hs = "update:modelValue", NY = "change", m$e = ["", "default", "small", "large"], y$e = (t) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t), b$e = (t) => t, _$e = ["class", "style"], O$e = /^on[A-Z]/, S$e = (t = {}) => {
  34989. const { excludeListeners: e = !1, excludeKeys: n } = t, r = L(() => ((n == null ? void 0 : n.value) || []).concat(_$e)), i = vn();
  34990. return i ? L(() => {
  34991. var a;
  34992. return M1(Object.entries((a = i.proxy) == null ? void 0 : a.$attrs).filter(([o]) => !r.value.includes(o) && !(e && O$e.test(o))));
  34993. }) : (Zi("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), L(() => ({})));
  34994. }, T0 = ({ from: t, replacement: e, scope: n, version: r, ref: i, type: a = "API" }, o) => {
  34995. se(() => z(o), (s) => {
  34996. s && Zi(n, `[${a}] ${t} is about to be deprecated in version ${r}, please use ${e} instead.
  34997. For more detail, please visit: ${i}
  34998. `);
  34999. }, {
  35000. immediate: !0
  35001. });
  35002. };
  35003. var x$e = {
  35004. name: "en",
  35005. el: {
  35006. breadcrumb: {
  35007. label: "Breadcrumb"
  35008. },
  35009. colorpicker: {
  35010. confirm: "OK",
  35011. clear: "Clear",
  35012. defaultLabel: "color picker",
  35013. description: "current color is {color}. press enter to select a new color."
  35014. },
  35015. datepicker: {
  35016. now: "Now",
  35017. today: "Today",
  35018. cancel: "Cancel",
  35019. clear: "Clear",
  35020. confirm: "OK",
  35021. dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
  35022. monthTablePrompt: "Use the arrow keys and enter to select the month",
  35023. yearTablePrompt: "Use the arrow keys and enter to select the year",
  35024. selectedDate: "Selected date",
  35025. selectDate: "Select date",
  35026. selectTime: "Select time",
  35027. startDate: "Start Date",
  35028. startTime: "Start Time",
  35029. endDate: "End Date",
  35030. endTime: "End Time",
  35031. prevYear: "Previous Year",
  35032. nextYear: "Next Year",
  35033. prevMonth: "Previous Month",
  35034. nextMonth: "Next Month",
  35035. year: "",
  35036. month1: "January",
  35037. month2: "February",
  35038. month3: "March",
  35039. month4: "April",
  35040. month5: "May",
  35041. month6: "June",
  35042. month7: "July",
  35043. month8: "August",
  35044. month9: "September",
  35045. month10: "October",
  35046. month11: "November",
  35047. month12: "December",
  35048. week: "week",
  35049. weeks: {
  35050. sun: "Sun",
  35051. mon: "Mon",
  35052. tue: "Tue",
  35053. wed: "Wed",
  35054. thu: "Thu",
  35055. fri: "Fri",
  35056. sat: "Sat"
  35057. },
  35058. weeksFull: {
  35059. sun: "Sunday",
  35060. mon: "Monday",
  35061. tue: "Tuesday",
  35062. wed: "Wednesday",
  35063. thu: "Thursday",
  35064. fri: "Friday",
  35065. sat: "Saturday"
  35066. },
  35067. months: {
  35068. jan: "Jan",
  35069. feb: "Feb",
  35070. mar: "Mar",
  35071. apr: "Apr",
  35072. may: "May",
  35073. jun: "Jun",
  35074. jul: "Jul",
  35075. aug: "Aug",
  35076. sep: "Sep",
  35077. oct: "Oct",
  35078. nov: "Nov",
  35079. dec: "Dec"
  35080. }
  35081. },
  35082. inputNumber: {
  35083. decrease: "decrease number",
  35084. increase: "increase number"
  35085. },
  35086. select: {
  35087. loading: "Loading",
  35088. noMatch: "No matching data",
  35089. noData: "No data",
  35090. placeholder: "Select"
  35091. },
  35092. dropdown: {
  35093. toggleDropdown: "Toggle Dropdown"
  35094. },
  35095. cascader: {
  35096. noMatch: "No matching data",
  35097. loading: "Loading",
  35098. placeholder: "Select",
  35099. noData: "No data"
  35100. },
  35101. pagination: {
  35102. goto: "Go to",
  35103. pagesize: "/page",
  35104. total: "Total {total}",
  35105. pageClassifier: "",
  35106. page: "Page",
  35107. prev: "Go to previous page",
  35108. next: "Go to next page",
  35109. currentPage: "page {pager}",
  35110. prevPages: "Previous {pager} pages",
  35111. nextPages: "Next {pager} pages",
  35112. deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
  35113. },
  35114. dialog: {
  35115. close: "Close this dialog"
  35116. },
  35117. drawer: {
  35118. close: "Close this dialog"
  35119. },
  35120. messagebox: {
  35121. title: "Message",
  35122. confirm: "OK",
  35123. cancel: "Cancel",
  35124. error: "Illegal input",
  35125. close: "Close this dialog"
  35126. },
  35127. upload: {
  35128. deleteTip: "press delete to remove",
  35129. delete: "Delete",
  35130. preview: "Preview",
  35131. continue: "Continue"
  35132. },
  35133. slider: {
  35134. defaultLabel: "slider between {min} and {max}",
  35135. defaultRangeStartLabel: "pick start value",
  35136. defaultRangeEndLabel: "pick end value"
  35137. },
  35138. table: {
  35139. emptyText: "No Data",
  35140. confirmFilter: "Confirm",
  35141. resetFilter: "Reset",
  35142. clearFilter: "All",
  35143. sumText: "Sum"
  35144. },
  35145. tour: {
  35146. next: "Next",
  35147. previous: "Previous",
  35148. finish: "Finish"
  35149. },
  35150. tree: {
  35151. emptyText: "No Data"
  35152. },
  35153. transfer: {
  35154. noMatch: "No matching data",
  35155. noData: "No data",
  35156. titles: ["List 1", "List 2"],
  35157. filterPlaceholder: "Enter keyword",
  35158. noCheckedFormat: "{total} items",
  35159. hasCheckedFormat: "{checked}/{total} checked"
  35160. },
  35161. image: {
  35162. error: "FAILED"
  35163. },
  35164. pageHeader: {
  35165. title: "Back"
  35166. },
  35167. popconfirm: {
  35168. confirmButtonText: "Yes",
  35169. cancelButtonText: "No"
  35170. },
  35171. carousel: {
  35172. leftArrow: "Carousel arrow left",
  35173. rightArrow: "Carousel arrow right",
  35174. indicator: "Carousel switch to index {index}"
  35175. }
  35176. }
  35177. };
  35178. const w$e = (t) => (e, n) => C$e(e, n, z(t)), C$e = (t, e, n) => kt(n, t, t).replace(/\{(\w+)\}/g, (r, i) => {
  35179. var a;
  35180. return `${(a = e == null ? void 0 : e[i]) != null ? a : `{${i}}`}`;
  35181. }), T$e = (t) => {
  35182. const e = L(() => z(t).name), n = op(t) ? t : U(t);
  35183. return {
  35184. lang: e,
  35185. locale: n,
  35186. t: w$e(t)
  35187. };
  35188. }, P$e = Symbol("localeContextKey"), $$e = (t) => {
  35189. const e = Ge(P$e, U());
  35190. return T$e(L(() => e.value || x$e));
  35191. }, LC = "el", A$e = "is-", Nu = (t, e, n, r, i) => {
  35192. let a = `${t}-${e}`;
  35193. return n && (a += `-${n}`), r && (a += `__${r}`), i && (a += `--${i}`), a;
  35194. }, E$e = Symbol("namespaceContextKey"), XD = (t) => {
  35195. const e = vn() ? Ge(E$e, U(LC)) : U(LC);
  35196. return L(() => z(e) || LC);
  35197. }, Jn = (t, e) => {
  35198. const n = XD();
  35199. return {
  35200. namespace: n,
  35201. b: (v = "") => Nu(n.value, t, v, "", ""),
  35202. e: (v) => v ? Nu(n.value, t, "", v, "") : "",
  35203. m: (v) => v ? Nu(n.value, t, "", "", v) : "",
  35204. be: (v, g) => v && g ? Nu(n.value, t, v, g, "") : "",
  35205. em: (v, g) => v && g ? Nu(n.value, t, "", v, g) : "",
  35206. bm: (v, g) => v && g ? Nu(n.value, t, v, "", g) : "",
  35207. bem: (v, g, m) => v && g && m ? Nu(n.value, t, v, g, m) : "",
  35208. is: (v, ...g) => {
  35209. const m = g.length >= 1 ? g[0] : !0;
  35210. return v && m ? `${A$e}${v}` : "";
  35211. },
  35212. cssVar: (v) => {
  35213. const g = {};
  35214. for (const m in v)
  35215. v[m] && (g[`--${n.value}-${m}`] = v[m]);
  35216. return g;
  35217. },
  35218. cssVarName: (v) => `--${n.value}-${v}`,
  35219. cssVarBlock: (v) => {
  35220. const g = {};
  35221. for (const m in v)
  35222. v[m] && (g[`--${n.value}-${t}-${m}`] = v[m]);
  35223. return g;
  35224. },
  35225. cssVarBlockName: (v) => `--${n.value}-${t}-${v}`
  35226. };
  35227. }, M$e = $x({
  35228. type: jt(Boolean),
  35229. default: null
  35230. }), I$e = $x({
  35231. type: jt(Function)
  35232. }), BY = (t) => {
  35233. const e = `update:${t}`, n = `onUpdate:${t}`, r = [e], i = {
  35234. [t]: M$e,
  35235. [n]: I$e
  35236. };
  35237. return {
  35238. useModelToggle: ({
  35239. indicator: o,
  35240. toggleReason: s,
  35241. shouldHideWhenRouteChanges: l,
  35242. shouldProceed: u,
  35243. onShow: c,
  35244. onHide: f
  35245. }) => {
  35246. const d = vn(), { emit: h } = d, p = d.props, v = L(() => Hv(p[n])), g = L(() => p[t] === null), m = (x) => {
  35247. o.value !== !0 && (o.value = !0, s && (s.value = x), Hv(c) && c(x));
  35248. }, y = (x) => {
  35249. o.value !== !1 && (o.value = !1, s && (s.value = x), Hv(f) && f(x));
  35250. }, b = (x) => {
  35251. if (p.disabled === !0 || Hv(u) && !u())
  35252. return;
  35253. const C = v.value && qr;
  35254. C && h(e, !0), (g.value || !C) && m(x);
  35255. }, _ = (x) => {
  35256. if (p.disabled === !0 || !qr)
  35257. return;
  35258. const C = v.value && qr;
  35259. C && h(e, !1), (g.value || !C) && y(x);
  35260. }, O = (x) => {
  35261. G1(x) && (p.disabled && x ? v.value && h(e, !1) : o.value !== x && (x ? m() : y()));
  35262. }, S = () => {
  35263. o.value ? _() : b();
  35264. };
  35265. return se(() => p[t], O), l && d.appContext.config.globalProperties.$route !== void 0 && se(() => ({
  35266. ...d.proxy.$route
  35267. }), () => {
  35268. l.value && o.value && _();
  35269. }), it(() => {
  35270. O(p[t]);
  35271. }), {
  35272. hide: _,
  35273. show: b,
  35274. toggle: S,
  35275. hasUpdateHandler: v
  35276. };
  35277. },
  35278. useModelToggleProps: i,
  35279. useModelToggleEmits: r
  35280. };
  35281. };
  35282. BY("modelValue");
  35283. const zY = (t) => {
  35284. const e = vn();
  35285. return L(() => {
  35286. var n, r;
  35287. return (r = (n = e == null ? void 0 : e.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[t];
  35288. });
  35289. };
  35290. var Si = "top", Aa = "bottom", Ea = "right", xi = "left", YD = "auto", P0 = [Si, Aa, Ea, xi], Lh = "start", vm = "end", D$e = "clippingParents", VY = "viewport", ev = "popper", R$e = "reference", e6 = P0.reduce(function(t, e) {
  35291. return t.concat([e + "-" + Lh, e + "-" + vm]);
  35292. }, []), qD = [].concat(P0, [YD]).reduce(function(t, e) {
  35293. return t.concat([e, e + "-" + Lh, e + "-" + vm]);
  35294. }, []), k$e = "beforeRead", L$e = "read", N$e = "afterRead", B$e = "beforeMain", z$e = "main", V$e = "afterMain", F$e = "beforeWrite", W$e = "write", Q$e = "afterWrite", H$e = [k$e, L$e, N$e, B$e, z$e, V$e, F$e, W$e, Q$e];
  35295. function rs(t) {
  35296. return t ? (t.nodeName || "").toLowerCase() : null;
  35297. }
  35298. function vo(t) {
  35299. if (t == null) return window;
  35300. if (t.toString() !== "[object Window]") {
  35301. var e = t.ownerDocument;
  35302. return e && e.defaultView || window;
  35303. }
  35304. return t;
  35305. }
  35306. function Nh(t) {
  35307. var e = vo(t).Element;
  35308. return t instanceof e || t instanceof Element;
  35309. }
  35310. function Sa(t) {
  35311. var e = vo(t).HTMLElement;
  35312. return t instanceof e || t instanceof HTMLElement;
  35313. }
  35314. function KD(t) {
  35315. if (typeof ShadowRoot > "u") return !1;
  35316. var e = vo(t).ShadowRoot;
  35317. return t instanceof e || t instanceof ShadowRoot;
  35318. }
  35319. function G$e(t) {
  35320. var e = t.state;
  35321. Object.keys(e.elements).forEach(function(n) {
  35322. var r = e.styles[n] || {}, i = e.attributes[n] || {}, a = e.elements[n];
  35323. !Sa(a) || !rs(a) || (Object.assign(a.style, r), Object.keys(i).forEach(function(o) {
  35324. var s = i[o];
  35325. s === !1 ? a.removeAttribute(o) : a.setAttribute(o, s === !0 ? "" : s);
  35326. }));
  35327. });
  35328. }
  35329. function j$e(t) {
  35330. var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
  35331. return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
  35332. Object.keys(e.elements).forEach(function(r) {
  35333. 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) {
  35334. return l[u] = "", l;
  35335. }, {});
  35336. !Sa(i) || !rs(i) || (Object.assign(i.style, s), Object.keys(a).forEach(function(l) {
  35337. i.removeAttribute(l);
  35338. }));
  35339. });
  35340. };
  35341. }
  35342. var FY = { name: "applyStyles", enabled: !0, phase: "write", fn: G$e, effect: j$e, requires: ["computeStyles"] };
  35343. function Zo(t) {
  35344. return t.split("-")[0];
  35345. }
  35346. var Yc = Math.max, Z1 = Math.min, Bh = Math.round;
  35347. function zh(t, e) {
  35348. e === void 0 && (e = !1);
  35349. var n = t.getBoundingClientRect(), r = 1, i = 1;
  35350. if (Sa(t) && e) {
  35351. var a = t.offsetHeight, o = t.offsetWidth;
  35352. o > 0 && (r = Bh(n.width) / o || 1), a > 0 && (i = Bh(n.height) / a || 1);
  35353. }
  35354. 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 };
  35355. }
  35356. function JD(t) {
  35357. var e = zh(t), n = t.offsetWidth, r = t.offsetHeight;
  35358. 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 };
  35359. }
  35360. function WY(t, e) {
  35361. var n = e.getRootNode && e.getRootNode();
  35362. if (t.contains(e)) return !0;
  35363. if (n && KD(n)) {
  35364. var r = e;
  35365. do {
  35366. if (r && t.isSameNode(r)) return !0;
  35367. r = r.parentNode || r.host;
  35368. } while (r);
  35369. }
  35370. return !1;
  35371. }
  35372. function Gs(t) {
  35373. return vo(t).getComputedStyle(t);
  35374. }
  35375. function Z$e(t) {
  35376. return ["table", "td", "th"].indexOf(rs(t)) >= 0;
  35377. }
  35378. function xu(t) {
  35379. return ((Nh(t) ? t.ownerDocument : t.document) || window.document).documentElement;
  35380. }
  35381. function Ax(t) {
  35382. return rs(t) === "html" ? t : t.assignedSlot || t.parentNode || (KD(t) ? t.host : null) || xu(t);
  35383. }
  35384. function t6(t) {
  35385. return !Sa(t) || Gs(t).position === "fixed" ? null : t.offsetParent;
  35386. }
  35387. function U$e(t) {
  35388. var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
  35389. if (n && Sa(t)) {
  35390. var r = Gs(t);
  35391. if (r.position === "fixed") return null;
  35392. }
  35393. var i = Ax(t);
  35394. for (KD(i) && (i = i.host); Sa(i) && ["html", "body"].indexOf(rs(i)) < 0; ) {
  35395. var a = Gs(i);
  35396. 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;
  35397. i = i.parentNode;
  35398. }
  35399. return null;
  35400. }
  35401. function $0(t) {
  35402. for (var e = vo(t), n = t6(t); n && Z$e(n) && Gs(n).position === "static"; ) n = t6(n);
  35403. return n && (rs(n) === "html" || rs(n) === "body" && Gs(n).position === "static") ? e : n || U$e(t) || e;
  35404. }
  35405. function eR(t) {
  35406. return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
  35407. }
  35408. function Sg(t, e, n) {
  35409. return Yc(t, Z1(e, n));
  35410. }
  35411. function X$e(t, e, n) {
  35412. var r = Sg(t, e, n);
  35413. return r > n ? n : r;
  35414. }
  35415. function QY() {
  35416. return { top: 0, right: 0, bottom: 0, left: 0 };
  35417. }
  35418. function HY(t) {
  35419. return Object.assign({}, QY(), t);
  35420. }
  35421. function GY(t, e) {
  35422. return e.reduce(function(n, r) {
  35423. return n[r] = t, n;
  35424. }, {});
  35425. }
  35426. var Y$e = function(t, e) {
  35427. return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, HY(typeof t != "number" ? t : GY(t, P0));
  35428. };
  35429. function q$e(t) {
  35430. var e, n = t.state, r = t.name, i = t.options, a = n.elements.arrow, o = n.modifiersData.popperOffsets, s = Zo(n.placement), l = eR(s), u = [xi, Ea].indexOf(s) >= 0, c = u ? "height" : "width";
  35431. if (!(!a || !o)) {
  35432. var f = Y$e(i.padding, n), d = JD(a), h = l === "y" ? Si : xi, p = l === "y" ? Aa : Ea, v = n.rects.reference[c] + n.rects.reference[l] - o[l] - n.rects.popper[c], g = o[l] - n.rects.reference[l], m = $0(a), y = m ? l === "y" ? m.clientHeight || 0 : m.clientWidth || 0 : 0, b = v / 2 - g / 2, _ = f[h], O = y - d[c] - f[p], S = y / 2 - d[c] / 2 + b, x = Sg(_, S, O), C = l;
  35433. n.modifiersData[r] = (e = {}, e[C] = x, e.centerOffset = x - S, e);
  35434. }
  35435. }
  35436. function K$e(t) {
  35437. var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
  35438. i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || !WY(e.elements.popper, i) || (e.elements.arrow = i));
  35439. }
  35440. var J$e = { name: "arrow", enabled: !0, phase: "main", fn: q$e, effect: K$e, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
  35441. function Vh(t) {
  35442. return t.split("-")[1];
  35443. }
  35444. var e2e = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
  35445. function t2e(t) {
  35446. var e = t.x, n = t.y, r = window, i = r.devicePixelRatio || 1;
  35447. return { x: Bh(e * i) / i || 0, y: Bh(n * i) / i || 0 };
  35448. }
  35449. function n6(t) {
  35450. 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 };
  35451. h = g.x, v = g.y;
  35452. var m = o.hasOwnProperty("x"), y = o.hasOwnProperty("y"), b = xi, _ = Si, O = window;
  35453. if (u) {
  35454. var S = $0(n), x = "clientHeight", C = "clientWidth";
  35455. if (S === vo(n) && (S = xu(n), Gs(S).position !== "static" && s === "absolute" && (x = "scrollHeight", C = "scrollWidth")), S = S, i === Si || (i === xi || i === Ea) && a === vm) {
  35456. _ = Aa;
  35457. var T = f && S === O && O.visualViewport ? O.visualViewport.height : S[x];
  35458. v -= T - r.height, v *= l ? 1 : -1;
  35459. }
  35460. if (i === xi || (i === Si || i === Aa) && a === vm) {
  35461. b = Ea;
  35462. var w = f && S === O && O.visualViewport ? O.visualViewport.width : S[C];
  35463. h -= w - r.width, h *= l ? 1 : -1;
  35464. }
  35465. }
  35466. var P = Object.assign({ position: s }, u && e2e), $ = c === !0 ? t2e({ x: h, y: v }) : { x: h, y: v };
  35467. if (h = $.x, v = $.y, l) {
  35468. var A;
  35469. return Object.assign({}, P, (A = {}, A[_] = y ? "0" : "", A[b] = m ? "0" : "", A.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", A));
  35470. }
  35471. return Object.assign({}, P, (e = {}, e[_] = y ? v + "px" : "", e[b] = m ? h + "px" : "", e.transform = "", e));
  35472. }
  35473. function n2e(t) {
  35474. 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: Zo(e.placement), variation: Vh(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: i, isFixed: e.options.strategy === "fixed" };
  35475. e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, n6(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, n6(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 });
  35476. }
  35477. var jY = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: n2e, data: {} }, Ly = { passive: !0 };
  35478. function r2e(t) {
  35479. 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 = vo(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
  35480. return a && u.forEach(function(c) {
  35481. c.addEventListener("scroll", n.update, Ly);
  35482. }), s && l.addEventListener("resize", n.update, Ly), function() {
  35483. a && u.forEach(function(c) {
  35484. c.removeEventListener("scroll", n.update, Ly);
  35485. }), s && l.removeEventListener("resize", n.update, Ly);
  35486. };
  35487. }
  35488. var ZY = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
  35489. }, effect: r2e, data: {} }, i2e = { left: "right", right: "left", bottom: "top", top: "bottom" };
  35490. function R_(t) {
  35491. return t.replace(/left|right|bottom|top/g, function(e) {
  35492. return i2e[e];
  35493. });
  35494. }
  35495. var a2e = { start: "end", end: "start" };
  35496. function r6(t) {
  35497. return t.replace(/start|end/g, function(e) {
  35498. return a2e[e];
  35499. });
  35500. }
  35501. function tR(t) {
  35502. var e = vo(t), n = e.pageXOffset, r = e.pageYOffset;
  35503. return { scrollLeft: n, scrollTop: r };
  35504. }
  35505. function nR(t) {
  35506. return zh(xu(t)).left + tR(t).scrollLeft;
  35507. }
  35508. function o2e(t) {
  35509. var e = vo(t), n = xu(t), r = e.visualViewport, i = n.clientWidth, a = n.clientHeight, o = 0, s = 0;
  35510. 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 + nR(t), y: s };
  35511. }
  35512. function s2e(t) {
  35513. var e, n = xu(t), r = tR(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, a = Yc(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = Yc(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -r.scrollLeft + nR(t), l = -r.scrollTop;
  35514. return Gs(i || n).direction === "rtl" && (s += Yc(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: o, x: s, y: l };
  35515. }
  35516. function rR(t) {
  35517. var e = Gs(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
  35518. return /auto|scroll|overlay|hidden/.test(n + i + r);
  35519. }
  35520. function UY(t) {
  35521. return ["html", "body", "#document"].indexOf(rs(t)) >= 0 ? t.ownerDocument.body : Sa(t) && rR(t) ? t : UY(Ax(t));
  35522. }
  35523. function xg(t, e) {
  35524. var n;
  35525. e === void 0 && (e = []);
  35526. var r = UY(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), a = vo(r), o = i ? [a].concat(a.visualViewport || [], rR(r) ? r : []) : r, s = e.concat(o);
  35527. return i ? s : s.concat(xg(Ax(o)));
  35528. }
  35529. function nA(t) {
  35530. return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
  35531. }
  35532. function l2e(t) {
  35533. var e = zh(t);
  35534. 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;
  35535. }
  35536. function i6(t, e) {
  35537. return e === VY ? nA(o2e(t)) : Nh(e) ? l2e(e) : nA(s2e(xu(t)));
  35538. }
  35539. function u2e(t) {
  35540. var e = xg(Ax(t)), n = ["absolute", "fixed"].indexOf(Gs(t).position) >= 0, r = n && Sa(t) ? $0(t) : t;
  35541. return Nh(r) ? e.filter(function(i) {
  35542. return Nh(i) && WY(i, r) && rs(i) !== "body";
  35543. }) : [];
  35544. }
  35545. function c2e(t, e, n) {
  35546. var r = e === "clippingParents" ? u2e(t) : [].concat(e), i = [].concat(r, [n]), a = i[0], o = i.reduce(function(s, l) {
  35547. var u = i6(t, l);
  35548. return s.top = Yc(u.top, s.top), s.right = Z1(u.right, s.right), s.bottom = Z1(u.bottom, s.bottom), s.left = Yc(u.left, s.left), s;
  35549. }, i6(t, a));
  35550. return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
  35551. }
  35552. function XY(t) {
  35553. var e = t.reference, n = t.element, r = t.placement, i = r ? Zo(r) : null, a = r ? Vh(r) : null, o = e.x + e.width / 2 - n.width / 2, s = e.y + e.height / 2 - n.height / 2, l;
  35554. switch (i) {
  35555. case Si:
  35556. l = { x: o, y: e.y - n.height };
  35557. break;
  35558. case Aa:
  35559. l = { x: o, y: e.y + e.height };
  35560. break;
  35561. case Ea:
  35562. l = { x: e.x + e.width, y: s };
  35563. break;
  35564. case xi:
  35565. l = { x: e.x - n.width, y: s };
  35566. break;
  35567. default:
  35568. l = { x: e.x, y: e.y };
  35569. }
  35570. var u = i ? eR(i) : null;
  35571. if (u != null) {
  35572. var c = u === "y" ? "height" : "width";
  35573. switch (a) {
  35574. case Lh:
  35575. l[u] = l[u] - (e[c] / 2 - n[c] / 2);
  35576. break;
  35577. case vm:
  35578. l[u] = l[u] + (e[c] / 2 - n[c] / 2);
  35579. break;
  35580. }
  35581. }
  35582. return l;
  35583. }
  35584. function gm(t, e) {
  35585. e === void 0 && (e = {});
  35586. var n = e, r = n.placement, i = r === void 0 ? t.placement : r, a = n.boundary, o = a === void 0 ? D$e : a, s = n.rootBoundary, l = s === void 0 ? VY : s, u = n.elementContext, c = u === void 0 ? ev : u, f = n.altBoundary, d = f === void 0 ? !1 : f, h = n.padding, p = h === void 0 ? 0 : h, v = HY(typeof p != "number" ? p : GY(p, P0)), g = c === ev ? R$e : ev, m = t.rects.popper, y = t.elements[d ? g : c], b = c2e(Nh(y) ? y : y.contextElement || xu(t.elements.popper), o, l), _ = zh(t.elements.reference), O = XY({ reference: _, element: m, strategy: "absolute", placement: i }), S = nA(Object.assign({}, m, O)), x = c === ev ? S : _, C = { top: b.top - x.top + v.top, bottom: x.bottom - b.bottom + v.bottom, left: b.left - x.left + v.left, right: x.right - b.right + v.right }, T = t.modifiersData.offset;
  35587. if (c === ev && T) {
  35588. var w = T[i];
  35589. Object.keys(C).forEach(function(P) {
  35590. var $ = [Ea, Aa].indexOf(P) >= 0 ? 1 : -1, A = [Si, Aa].indexOf(P) >= 0 ? "y" : "x";
  35591. C[P] += w[A] * $;
  35592. });
  35593. }
  35594. return C;
  35595. }
  35596. function f2e(t, e) {
  35597. e === void 0 && (e = {});
  35598. 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 ? qD : l, c = Vh(r), f = c ? s ? e6 : e6.filter(function(p) {
  35599. return Vh(p) === c;
  35600. }) : P0, d = f.filter(function(p) {
  35601. return u.indexOf(p) >= 0;
  35602. });
  35603. d.length === 0 && (d = f);
  35604. var h = d.reduce(function(p, v) {
  35605. return p[v] = gm(t, { placement: v, boundary: i, rootBoundary: a, padding: o })[Zo(v)], p;
  35606. }, {});
  35607. return Object.keys(h).sort(function(p, v) {
  35608. return h[p] - h[v];
  35609. });
  35610. }
  35611. function d2e(t) {
  35612. if (Zo(t) === YD) return [];
  35613. var e = R_(t);
  35614. return [r6(t), e, r6(e)];
  35615. }
  35616. function h2e(t) {
  35617. var e = t.state, n = t.options, r = t.name;
  35618. if (!e.modifiersData[r]._skip) {
  35619. 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 = Zo(g), y = m === g, b = l || (y || !p ? [R_(g)] : d2e(g)), _ = [g].concat(b).reduce(function(ne, ee) {
  35620. return ne.concat(Zo(ee) === YD ? f2e(e, { placement: ee, boundary: c, rootBoundary: f, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ee);
  35621. }, []), O = e.rects.reference, S = e.rects.popper, x = /* @__PURE__ */ new Map(), C = !0, T = _[0], w = 0; w < _.length; w++) {
  35622. var P = _[w], $ = Zo(P), A = Vh(P) === Lh, D = [Si, Aa].indexOf($) >= 0, E = D ? "width" : "height", R = gm(e, { placement: P, boundary: c, rootBoundary: f, altBoundary: d, padding: u }), N = D ? A ? Ea : xi : A ? Aa : Si;
  35623. O[E] > S[E] && (N = R_(N));
  35624. var V = R_(N), B = [];
  35625. if (a && B.push(R[$] <= 0), s && B.push(R[N] <= 0, R[V] <= 0), B.every(function(ne) {
  35626. return ne;
  35627. })) {
  35628. T = P, C = !1;
  35629. break;
  35630. }
  35631. x.set(P, B);
  35632. }
  35633. if (C) for (var W = p ? 3 : 1, F = function(ne) {
  35634. var ee = _.find(function(oe) {
  35635. var K = x.get(oe);
  35636. if (K) return K.slice(0, ne).every(function(ie) {
  35637. return ie;
  35638. });
  35639. });
  35640. if (ee) return T = ee, "break";
  35641. }, Q = W; Q > 0; Q--) {
  35642. var Z = F(Q);
  35643. if (Z === "break") break;
  35644. }
  35645. e.placement !== T && (e.modifiersData[r]._skip = !0, e.placement = T, e.reset = !0);
  35646. }
  35647. }
  35648. var p2e = { name: "flip", enabled: !0, phase: "main", fn: h2e, requiresIfExists: ["offset"], data: { _skip: !1 } };
  35649. function a6(t, e, n) {
  35650. 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 };
  35651. }
  35652. function o6(t) {
  35653. return [Si, Ea, Aa, xi].some(function(e) {
  35654. return t[e] >= 0;
  35655. });
  35656. }
  35657. function v2e(t) {
  35658. var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, a = e.modifiersData.preventOverflow, o = gm(e, { elementContext: "reference" }), s = gm(e, { altBoundary: !0 }), l = a6(o, r), u = a6(s, i, a), c = o6(l), f = o6(u);
  35659. 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 });
  35660. }
  35661. var g2e = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: v2e };
  35662. function m2e(t, e, n) {
  35663. var r = Zo(t), i = [xi, Si].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, o = a[0], s = a[1];
  35664. return o = o || 0, s = (s || 0) * i, [xi, Ea].indexOf(r) >= 0 ? { x: s, y: o } : { x: o, y: s };
  35665. }
  35666. function y2e(t) {
  35667. var e = t.state, n = t.options, r = t.name, i = n.offset, a = i === void 0 ? [0, 0] : i, o = qD.reduce(function(c, f) {
  35668. return c[f] = m2e(f, e.rects, a), c;
  35669. }, {}), s = o[e.placement], l = s.x, u = s.y;
  35670. e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += u), e.modifiersData[r] = o;
  35671. }
  35672. var b2e = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: y2e };
  35673. function _2e(t) {
  35674. var e = t.state, n = t.name;
  35675. e.modifiersData[n] = XY({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
  35676. }
  35677. var YY = { name: "popperOffsets", enabled: !0, phase: "read", fn: _2e, data: {} };
  35678. function O2e(t) {
  35679. return t === "x" ? "y" : "x";
  35680. }
  35681. function S2e(t) {
  35682. 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 = gm(e, { boundary: l, rootBoundary: u, padding: f, altBoundary: c }), m = Zo(e.placement), y = Vh(e.placement), b = !y, _ = eR(m), O = O2e(_), S = e.modifiersData.popperOffsets, x = e.rects.reference, C = e.rects.popper, T = typeof v == "function" ? v(Object.assign({}, e.rects, { placement: e.placement })) : v, w = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), P = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, $ = { x: 0, y: 0 };
  35683. if (S) {
  35684. if (a) {
  35685. var A, D = _ === "y" ? Si : xi, E = _ === "y" ? Aa : Ea, R = _ === "y" ? "height" : "width", N = S[_], V = N + g[D], B = N - g[E], W = h ? -C[R] / 2 : 0, F = y === Lh ? x[R] : C[R], Q = y === Lh ? -C[R] : -x[R], Z = e.elements.arrow, ne = h && Z ? JD(Z) : { width: 0, height: 0 }, ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : QY(), oe = ee[D], K = ee[E], ie = Sg(0, x[R], ne[R]), X = b ? x[R] / 2 - W - ie - oe - w.mainAxis : F - ie - oe - w.mainAxis, H = b ? -x[R] / 2 + W + ie + K + w.mainAxis : Q + ie + K + w.mainAxis, G = e.elements.arrow && $0(e.elements.arrow), re = G ? _ === "y" ? G.clientTop || 0 : G.clientLeft || 0 : 0, fe = (A = P == null ? void 0 : P[_]) != null ? A : 0, de = N + X - fe - re, Ee = N + H - fe, $e = Sg(h ? Z1(V, de) : V, N, h ? Yc(B, Ee) : B);
  35686. S[_] = $e, $[_] = $e - N;
  35687. }
  35688. if (s) {
  35689. var Se, be = _ === "x" ? Si : xi, he = _ === "x" ? Aa : Ea, Te = S[O], ze = O === "y" ? "height" : "width", ut = Te + g[be], ct = Te - g[he], Dt = [Si, xi].indexOf(m) !== -1, ve = (Se = P == null ? void 0 : P[O]) != null ? Se : 0, Xe = Dt ? ut : Te - x[ze] - C[ze] - ve + w.altAxis, Rt = Dt ? Te + x[ze] + C[ze] - ve - w.altAxis : ct, An = h && Dt ? X$e(Xe, Te, Rt) : Sg(h ? Xe : ut, Te, h ? Rt : ct);
  35690. S[O] = An, $[O] = An - Te;
  35691. }
  35692. e.modifiersData[r] = $;
  35693. }
  35694. }
  35695. var x2e = { name: "preventOverflow", enabled: !0, phase: "main", fn: S2e, requiresIfExists: ["offset"] };
  35696. function w2e(t) {
  35697. return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
  35698. }
  35699. function C2e(t) {
  35700. return t === vo(t) || !Sa(t) ? tR(t) : w2e(t);
  35701. }
  35702. function T2e(t) {
  35703. var e = t.getBoundingClientRect(), n = Bh(e.width) / t.offsetWidth || 1, r = Bh(e.height) / t.offsetHeight || 1;
  35704. return n !== 1 || r !== 1;
  35705. }
  35706. function P2e(t, e, n) {
  35707. n === void 0 && (n = !1);
  35708. var r = Sa(e), i = Sa(e) && T2e(e), a = xu(e), o = zh(t, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
  35709. return (r || !r && !n) && ((rs(e) !== "body" || rR(a)) && (s = C2e(e)), Sa(e) ? (l = zh(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : a && (l.x = nR(a))), { x: o.left + s.scrollLeft - l.x, y: o.top + s.scrollTop - l.y, width: o.width, height: o.height };
  35710. }
  35711. function $2e(t) {
  35712. var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
  35713. t.forEach(function(a) {
  35714. e.set(a.name, a);
  35715. });
  35716. function i(a) {
  35717. n.add(a.name);
  35718. var o = [].concat(a.requires || [], a.requiresIfExists || []);
  35719. o.forEach(function(s) {
  35720. if (!n.has(s)) {
  35721. var l = e.get(s);
  35722. l && i(l);
  35723. }
  35724. }), r.push(a);
  35725. }
  35726. return t.forEach(function(a) {
  35727. n.has(a.name) || i(a);
  35728. }), r;
  35729. }
  35730. function A2e(t) {
  35731. var e = $2e(t);
  35732. return H$e.reduce(function(n, r) {
  35733. return n.concat(e.filter(function(i) {
  35734. return i.phase === r;
  35735. }));
  35736. }, []);
  35737. }
  35738. function E2e(t) {
  35739. var e;
  35740. return function() {
  35741. return e || (e = new Promise(function(n) {
  35742. Promise.resolve().then(function() {
  35743. e = void 0, n(t());
  35744. });
  35745. })), e;
  35746. };
  35747. }
  35748. function M2e(t) {
  35749. var e = t.reduce(function(n, r) {
  35750. var i = n[r.name];
  35751. 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;
  35752. }, {});
  35753. return Object.keys(e).map(function(n) {
  35754. return e[n];
  35755. });
  35756. }
  35757. var s6 = { placement: "bottom", modifiers: [], strategy: "absolute" };
  35758. function l6() {
  35759. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
  35760. return !e.some(function(r) {
  35761. return !(r && typeof r.getBoundingClientRect == "function");
  35762. });
  35763. }
  35764. function iR(t) {
  35765. t === void 0 && (t = {});
  35766. var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, a = i === void 0 ? s6 : i;
  35767. return function(o, s, l) {
  35768. l === void 0 && (l = a);
  35769. var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, s6, a), modifiersData: {}, elements: { reference: o, popper: s }, attributes: {}, styles: {} }, c = [], f = !1, d = { state: u, setOptions: function(v) {
  35770. var g = typeof v == "function" ? v(u.options) : v;
  35771. p(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = { reference: Nh(o) ? xg(o) : o.contextElement ? xg(o.contextElement) : [], popper: xg(s) };
  35772. var m = A2e(M2e([].concat(r, u.options.modifiers)));
  35773. return u.orderedModifiers = m.filter(function(y) {
  35774. return y.enabled;
  35775. }), h(), d.update();
  35776. }, forceUpdate: function() {
  35777. if (!f) {
  35778. var v = u.elements, g = v.reference, m = v.popper;
  35779. if (l6(g, m)) {
  35780. u.rects = { reference: P2e(g, $0(m), u.options.strategy === "fixed"), popper: JD(m) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(C) {
  35781. return u.modifiersData[C.name] = Object.assign({}, C.data);
  35782. });
  35783. for (var y = 0; y < u.orderedModifiers.length; y++) {
  35784. if (u.reset === !0) {
  35785. u.reset = !1, y = -1;
  35786. continue;
  35787. }
  35788. var b = u.orderedModifiers[y], _ = b.fn, O = b.options, S = O === void 0 ? {} : O, x = b.name;
  35789. typeof _ == "function" && (u = _({ state: u, options: S, name: x, instance: d }) || u);
  35790. }
  35791. }
  35792. }
  35793. }, update: E2e(function() {
  35794. return new Promise(function(v) {
  35795. d.forceUpdate(), v(u);
  35796. });
  35797. }), destroy: function() {
  35798. p(), f = !0;
  35799. } };
  35800. if (!l6(o, s)) return d;
  35801. d.setOptions(l).then(function(v) {
  35802. !f && l.onFirstUpdate && l.onFirstUpdate(v);
  35803. });
  35804. function h() {
  35805. u.orderedModifiers.forEach(function(v) {
  35806. var g = v.name, m = v.options, y = m === void 0 ? {} : m, b = v.effect;
  35807. if (typeof b == "function") {
  35808. var _ = b({ state: u, name: g, instance: d, options: y }), O = function() {
  35809. };
  35810. c.push(_ || O);
  35811. }
  35812. });
  35813. }
  35814. function p() {
  35815. c.forEach(function(v) {
  35816. return v();
  35817. }), c = [];
  35818. }
  35819. return d;
  35820. };
  35821. }
  35822. iR();
  35823. var I2e = [ZY, YY, jY, FY];
  35824. iR({ defaultModifiers: I2e });
  35825. var D2e = [ZY, YY, jY, FY, b2e, p2e, x2e, J$e, g2e], R2e = iR({ defaultModifiers: D2e });
  35826. const k2e = (t, e, n = {}) => {
  35827. const r = {
  35828. name: "updateState",
  35829. enabled: !0,
  35830. phase: "write",
  35831. fn: ({ state: l }) => {
  35832. const u = L2e(l);
  35833. Object.assign(o.value, u);
  35834. },
  35835. requires: ["computeStyles"]
  35836. }, i = L(() => {
  35837. const { onFirstUpdate: l, placement: u, strategy: c, modifiers: f } = z(n);
  35838. return {
  35839. onFirstUpdate: l,
  35840. placement: u || "bottom",
  35841. strategy: c || "absolute",
  35842. modifiers: [
  35843. ...f || [],
  35844. r,
  35845. { name: "applyStyles", enabled: !1 }
  35846. ]
  35847. };
  35848. }), a = ae(), o = U({
  35849. styles: {
  35850. popper: {
  35851. position: z(i).strategy,
  35852. left: "0",
  35853. top: "0"
  35854. },
  35855. arrow: {
  35856. position: "absolute"
  35857. }
  35858. },
  35859. attributes: {}
  35860. }), s = () => {
  35861. a.value && (a.value.destroy(), a.value = void 0);
  35862. };
  35863. return se(i, (l) => {
  35864. const u = z(a);
  35865. u && u.setOptions(l);
  35866. }, {
  35867. deep: !0
  35868. }), se([t, e], ([l, u]) => {
  35869. s(), !(!l || !u) && (a.value = R2e(l, u, z(i)));
  35870. }), yt(() => {
  35871. s();
  35872. }), {
  35873. state: L(() => {
  35874. var l;
  35875. return { ...((l = z(a)) == null ? void 0 : l.state) || {} };
  35876. }),
  35877. styles: L(() => z(o).styles),
  35878. attributes: L(() => z(o).attributes),
  35879. update: () => {
  35880. var l;
  35881. return (l = z(a)) == null ? void 0 : l.update();
  35882. },
  35883. forceUpdate: () => {
  35884. var l;
  35885. return (l = z(a)) == null ? void 0 : l.forceUpdate();
  35886. },
  35887. instanceRef: L(() => z(a))
  35888. };
  35889. };
  35890. function L2e(t) {
  35891. const e = Object.keys(t.elements), n = M1(e.map((i) => [i, t.styles[i] || {}])), r = M1(e.map((i) => [i, t.attributes[i]]));
  35892. return {
  35893. styles: n,
  35894. attributes: r
  35895. };
  35896. }
  35897. function u6() {
  35898. let t;
  35899. const e = (r, i) => {
  35900. n(), t = window.setTimeout(r, i);
  35901. }, n = () => window.clearTimeout(t);
  35902. return GD(() => n()), {
  35903. registerTimeout: e,
  35904. cancelTimeout: n
  35905. };
  35906. }
  35907. const rA = {
  35908. prefix: Math.floor(Math.random() * 1e4),
  35909. current: 0
  35910. }, N2e = Symbol("elIdInjection"), qY = () => vn() ? Ge(N2e, rA) : rA, aR = (t) => {
  35911. const e = qY();
  35912. !qr && e === rA && Zi("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
  35913. usage: app.provide(ID_INJECTION_KEY, {
  35914. prefix: number,
  35915. current: number,
  35916. })`);
  35917. const n = XD();
  35918. return L(() => z(t) || `${n.value}-id-${e.prefix}-${e.current++}`);
  35919. };
  35920. let $d = [];
  35921. const c6 = (t) => {
  35922. const e = t;
  35923. e.key === Xc.esc && $d.forEach((n) => n(e));
  35924. }, B2e = (t) => {
  35925. it(() => {
  35926. $d.length === 0 && document.addEventListener("keydown", c6), qr && $d.push(t);
  35927. }), yt(() => {
  35928. $d = $d.filter((e) => e !== t), $d.length === 0 && qr && document.removeEventListener("keydown", c6);
  35929. });
  35930. };
  35931. let f6;
  35932. const KY = () => {
  35933. const t = XD(), e = qY(), n = L(() => `${t.value}-popper-container-${e.prefix}`), r = L(() => `#${n.value}`);
  35934. return {
  35935. id: n,
  35936. selector: r
  35937. };
  35938. }, z2e = (t) => {
  35939. const e = document.createElement("div");
  35940. return e.id = t, document.body.appendChild(e), e;
  35941. }, V2e = () => {
  35942. const { id: t, selector: e } = KY();
  35943. return G9(() => {
  35944. qr && (process.env.NODE_ENV === "test" || !f6 && !document.body.querySelector(e.value)) && (f6 = z2e(t.value));
  35945. }), {
  35946. id: t,
  35947. selector: e
  35948. };
  35949. }, F2e = rr({
  35950. showAfter: {
  35951. type: Number,
  35952. default: 0
  35953. },
  35954. hideAfter: {
  35955. type: Number,
  35956. default: 200
  35957. },
  35958. autoClose: {
  35959. type: Number,
  35960. default: 0
  35961. }
  35962. }), W2e = ({
  35963. showAfter: t,
  35964. hideAfter: e,
  35965. autoClose: n,
  35966. open: r,
  35967. close: i
  35968. }) => {
  35969. const { registerTimeout: a } = u6(), {
  35970. registerTimeout: o,
  35971. cancelTimeout: s
  35972. } = u6();
  35973. return {
  35974. onOpen: (c) => {
  35975. a(() => {
  35976. r(c);
  35977. const f = z(n);
  35978. Qs(f) && f > 0 && o(() => {
  35979. i(c);
  35980. }, f);
  35981. }, z(t));
  35982. },
  35983. onClose: (c) => {
  35984. s(), a(() => {
  35985. i(c);
  35986. }, z(e));
  35987. }
  35988. };
  35989. }, JY = Symbol("elForwardRef"), Q2e = (t) => {
  35990. pt(JY, {
  35991. setForwardRef: (n) => {
  35992. t.value = n;
  35993. }
  35994. });
  35995. }, H2e = (t) => ({
  35996. mounted(e) {
  35997. t(e);
  35998. },
  35999. updated(e) {
  36000. t(e);
  36001. },
  36002. unmounted() {
  36003. t(null);
  36004. }
  36005. }), d6 = {
  36006. current: 0
  36007. }, h6 = U(0), G2e = 2e3, p6 = Symbol("elZIndexContextKey"), j2e = Symbol("zIndexContextKey"), Z2e = (t) => {
  36008. const e = vn() ? Ge(p6, d6) : d6, n = vn() ? Ge(j2e, void 0) : void 0, r = L(() => {
  36009. const o = z(n);
  36010. return Qs(o) ? o : G2e;
  36011. }), i = L(() => r.value + h6.value), a = () => (e.current++, h6.value = e.current, i.value);
  36012. return !qr && !Ge(p6) && Zi("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
  36013. usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
  36014. initialZIndex: r,
  36015. currentZIndex: i,
  36016. nextZIndex: a
  36017. };
  36018. };
  36019. function U2e(t) {
  36020. const e = U();
  36021. function n() {
  36022. if (t.value == null)
  36023. return;
  36024. const { selectionStart: i, selectionEnd: a, value: o } = t.value;
  36025. if (i == null || a == null)
  36026. return;
  36027. const s = o.slice(0, Math.max(0, i)), l = o.slice(Math.max(0, a));
  36028. e.value = {
  36029. selectionStart: i,
  36030. selectionEnd: a,
  36031. value: o,
  36032. beforeTxt: s,
  36033. afterTxt: l
  36034. };
  36035. }
  36036. function r() {
  36037. if (t.value == null || e.value == null)
  36038. return;
  36039. const { value: i } = t.value, { beforeTxt: a, afterTxt: o, selectionStart: s } = e.value;
  36040. if (a == null || o == null || s == null)
  36041. return;
  36042. let l = i.length;
  36043. if (i.endsWith(o))
  36044. l = i.length - o.length;
  36045. else if (i.startsWith(a))
  36046. l = a.length;
  36047. else {
  36048. const u = a[s - 1], c = i.indexOf(u, s - 1);
  36049. c !== -1 && (l = c + 1);
  36050. }
  36051. t.value.setSelectionRange(l, l);
  36052. }
  36053. return [n, r];
  36054. }
  36055. const A0 = $x({
  36056. type: String,
  36057. values: m$e,
  36058. required: !1
  36059. }), X2e = Symbol("size"), Y2e = () => {
  36060. const t = Ge(X2e, {});
  36061. return L(() => z(t.size) || "");
  36062. };
  36063. function eq(t, { afterFocus: e, beforeBlur: n, afterBlur: r } = {}) {
  36064. const i = vn(), { emit: a } = i, o = ae(), s = U(!1), l = (f) => {
  36065. s.value || (s.value = !0, a("focus", f), e == null || e());
  36066. }, u = (f) => {
  36067. var d;
  36068. Hv(n) && n(f) || f.relatedTarget && ((d = o.value) != null && d.contains(f.relatedTarget)) || (s.value = !1, a("blur", f), r == null || r());
  36069. }, c = () => {
  36070. var f;
  36071. (f = t.value) == null || f.focus();
  36072. };
  36073. return se(o, (f) => {
  36074. f && f.setAttribute("tabindex", "-1");
  36075. }), D_(o, "click", c), {
  36076. wrapperRef: o,
  36077. isFocused: s,
  36078. handleFocus: l,
  36079. handleBlur: u
  36080. };
  36081. }
  36082. const q2e = rr({
  36083. ariaLabel: String,
  36084. ariaOrientation: {
  36085. type: String,
  36086. values: ["horizontal", "vertical", "undefined"]
  36087. },
  36088. ariaControls: String
  36089. }), E0 = (t) => um(q2e, t), K2e = Symbol(), v6 = U();
  36090. function J2e(t, e = void 0) {
  36091. const n = vn() ? Ge(K2e, v6) : v6;
  36092. return L(() => {
  36093. var r, i;
  36094. return (i = (r = n.value) == null ? void 0 : r[t]) != null ? i : e;
  36095. });
  36096. }
  36097. var Qn = (t, e) => {
  36098. const n = t.__vccOpts || t;
  36099. for (const [r, i] of e)
  36100. n[r] = i;
  36101. return n;
  36102. };
  36103. const eAe = rr({
  36104. size: {
  36105. type: jt([Number, String])
  36106. },
  36107. color: {
  36108. type: String
  36109. }
  36110. }), tAe = te({
  36111. name: "ElIcon",
  36112. inheritAttrs: !1
  36113. }), nAe = /* @__PURE__ */ te({
  36114. ...tAe,
  36115. props: eAe,
  36116. setup(t) {
  36117. const e = t, n = Jn("icon"), r = L(() => {
  36118. const { size: i, color: a } = e;
  36119. return !i && !a ? {} : {
  36120. fontSize: JPe(i) ? void 0 : tA(i),
  36121. "--color": a
  36122. };
  36123. });
  36124. return (i, a) => (pe(), Qe("i", _n({
  36125. class: z(n).b(),
  36126. style: z(r)
  36127. }, i.$attrs), [
  36128. zn(i.$slots, "default")
  36129. ], 16));
  36130. }
  36131. });
  36132. var rAe = /* @__PURE__ */ Qn(nAe, [["__file", "icon.vue"]]);
  36133. const Cs = Rf(rAe), oR = Symbol("formContextKey"), U1 = Symbol("formItemContextKey"), Ex = (t, e = {}) => {
  36134. const n = U(void 0), r = e.prop ? n : zY("size"), i = e.global ? n : Y2e(), a = e.form ? { size: void 0 } : Ge(oR, void 0), o = e.formItem ? { size: void 0 } : Ge(U1, void 0);
  36135. return L(() => r.value || z(t) || (o == null ? void 0 : o.size) || (a == null ? void 0 : a.size) || i.value || "");
  36136. }, M0 = (t) => {
  36137. const e = zY("disabled"), n = Ge(oR, void 0);
  36138. return L(() => e.value || z(t) || (n == null ? void 0 : n.disabled) || !1);
  36139. }, Mx = () => {
  36140. const t = Ge(oR, void 0), e = Ge(U1, void 0);
  36141. return {
  36142. form: t,
  36143. formItem: e
  36144. };
  36145. }, sR = (t, {
  36146. formItemContext: e,
  36147. disableIdGeneration: n,
  36148. disableIdManagement: r
  36149. }) => {
  36150. n || (n = U(!1)), r || (r = U(!1));
  36151. const i = U();
  36152. let a;
  36153. const o = L(() => {
  36154. var s;
  36155. return !!(!(t.label || t.ariaLabel) && e && e.inputIds && ((s = e.inputIds) == null ? void 0 : s.length) <= 1);
  36156. });
  36157. return it(() => {
  36158. a = se([Nn(t, "id"), n], ([s, l]) => {
  36159. const u = s ?? (l ? void 0 : aR().value);
  36160. 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);
  36161. }, { immediate: !0 });
  36162. }), rl(() => {
  36163. a && a(), e != null && e.removeInputId && i.value && e.removeInputId(i.value);
  36164. }), {
  36165. isLabeledByFormItem: o,
  36166. inputId: i
  36167. };
  36168. };
  36169. let Qa;
  36170. const iAe = `
  36171. height:0 !important;
  36172. visibility:hidden !important;
  36173. ${YPe() ? "" : "overflow:hidden !important;"}
  36174. position:absolute !important;
  36175. z-index:-1000 !important;
  36176. top:0 !important;
  36177. right:0 !important;
  36178. `, aAe = [
  36179. "letter-spacing",
  36180. "line-height",
  36181. "padding-top",
  36182. "padding-bottom",
  36183. "font-family",
  36184. "font-weight",
  36185. "font-size",
  36186. "text-rendering",
  36187. "text-transform",
  36188. "width",
  36189. "text-indent",
  36190. "padding-left",
  36191. "padding-right",
  36192. "border-width",
  36193. "box-sizing"
  36194. ];
  36195. function oAe(t) {
  36196. 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"));
  36197. return { contextStyle: aAe.map((o) => `${o}:${e.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: i, boxSizing: n };
  36198. }
  36199. function g6(t, e = 1, n) {
  36200. var r;
  36201. Qa || (Qa = document.createElement("textarea"), document.body.appendChild(Qa));
  36202. const { paddingSize: i, borderSize: a, boxSizing: o, contextStyle: s } = oAe(t);
  36203. Qa.setAttribute("style", `${s};${iAe}`), Qa.value = t.value || t.placeholder || "";
  36204. let l = Qa.scrollHeight;
  36205. const u = {};
  36206. o === "border-box" ? l = l + a : o === "content-box" && (l = l - i), Qa.value = "";
  36207. const c = Qa.scrollHeight - i;
  36208. if (Qs(e)) {
  36209. let f = c * e;
  36210. o === "border-box" && (f = f + i + a), l = Math.max(f, l), u.minHeight = `${f}px`;
  36211. }
  36212. if (Qs(n)) {
  36213. let f = c * n;
  36214. o === "border-box" && (f = f + i + a), l = Math.min(f, l);
  36215. }
  36216. return u.height = `${l}px`, (r = Qa.parentNode) == null || r.removeChild(Qa), Qa = void 0, u;
  36217. }
  36218. const sAe = rr({
  36219. id: {
  36220. type: String,
  36221. default: void 0
  36222. },
  36223. size: A0,
  36224. disabled: Boolean,
  36225. modelValue: {
  36226. type: jt([
  36227. String,
  36228. Number,
  36229. Object
  36230. ]),
  36231. default: ""
  36232. },
  36233. maxlength: {
  36234. type: [String, Number]
  36235. },
  36236. minlength: {
  36237. type: [String, Number]
  36238. },
  36239. type: {
  36240. type: String,
  36241. default: "text"
  36242. },
  36243. resize: {
  36244. type: String,
  36245. values: ["none", "both", "horizontal", "vertical"]
  36246. },
  36247. autosize: {
  36248. type: jt([Boolean, Object]),
  36249. default: !1
  36250. },
  36251. autocomplete: {
  36252. type: String,
  36253. default: "off"
  36254. },
  36255. formatter: {
  36256. type: Function
  36257. },
  36258. parser: {
  36259. type: Function
  36260. },
  36261. placeholder: {
  36262. type: String
  36263. },
  36264. form: {
  36265. type: String
  36266. },
  36267. readonly: {
  36268. type: Boolean,
  36269. default: !1
  36270. },
  36271. clearable: {
  36272. type: Boolean,
  36273. default: !1
  36274. },
  36275. showPassword: {
  36276. type: Boolean,
  36277. default: !1
  36278. },
  36279. showWordLimit: {
  36280. type: Boolean,
  36281. default: !1
  36282. },
  36283. suffixIcon: {
  36284. type: j1
  36285. },
  36286. prefixIcon: {
  36287. type: j1
  36288. },
  36289. containerRole: {
  36290. type: String,
  36291. default: void 0
  36292. },
  36293. label: {
  36294. type: String,
  36295. default: void 0
  36296. },
  36297. tabindex: {
  36298. type: [String, Number],
  36299. default: 0
  36300. },
  36301. validateEvent: {
  36302. type: Boolean,
  36303. default: !0
  36304. },
  36305. inputStyle: {
  36306. type: jt([Object, Array, String]),
  36307. default: () => b$e({})
  36308. },
  36309. autofocus: {
  36310. type: Boolean,
  36311. default: !1
  36312. },
  36313. ...E0(["ariaLabel"])
  36314. }), lAe = {
  36315. [Hs]: (t) => Oa(t),
  36316. input: (t) => Oa(t),
  36317. change: (t) => Oa(t),
  36318. focus: (t) => t instanceof FocusEvent,
  36319. blur: (t) => t instanceof FocusEvent,
  36320. clear: () => !0,
  36321. mouseleave: (t) => t instanceof MouseEvent,
  36322. mouseenter: (t) => t instanceof MouseEvent,
  36323. keydown: (t) => t instanceof Event,
  36324. compositionstart: (t) => t instanceof CompositionEvent,
  36325. compositionupdate: (t) => t instanceof CompositionEvent,
  36326. compositionend: (t) => t instanceof CompositionEvent
  36327. }, uAe = ["role"], cAe = ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"], fAe = ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"], dAe = te({
  36328. name: "ElInput",
  36329. inheritAttrs: !1
  36330. }), hAe = /* @__PURE__ */ te({
  36331. ...dAe,
  36332. props: sAe,
  36333. emits: lAe,
  36334. setup(t, { expose: e, emit: n }) {
  36335. const r = t, i = Hle(), a = U9(), o = L(() => {
  36336. const ve = {};
  36337. return r.containerRole === "combobox" && (ve["aria-haspopup"] = i["aria-haspopup"], ve["aria-owns"] = i["aria-owns"], ve["aria-expanded"] = i["aria-expanded"]), ve;
  36338. }), s = L(() => [
  36339. r.type === "textarea" ? g.b() : v.b(),
  36340. v.m(h.value),
  36341. v.is("disabled", p.value),
  36342. v.is("exceed", ne.value),
  36343. {
  36344. [v.b("group")]: a.prepend || a.append,
  36345. [v.m("prefix")]: a.prefix || r.prefixIcon,
  36346. [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword,
  36347. [v.bm("suffix", "password-clear")]: W.value && F.value,
  36348. [v.b("hidden")]: r.type === "hidden"
  36349. },
  36350. i.class
  36351. ]), l = L(() => [
  36352. v.e("wrapper"),
  36353. v.is("focus", w.value)
  36354. ]), u = S$e({
  36355. excludeKeys: L(() => Object.keys(o.value))
  36356. }), { form: c, formItem: f } = Mx(), { inputId: d } = sR(r, {
  36357. formItemContext: f
  36358. }), h = Ex(), p = M0(), v = Jn("input"), g = Jn("textarea"), m = ae(), y = ae(), b = U(!1), _ = U(!1), O = U(!1), S = U(), x = ae(r.inputStyle), C = L(() => m.value || y.value), { wrapperRef: T, isFocused: w, handleFocus: P, handleBlur: $ } = eq(C, {
  36359. afterBlur() {
  36360. var ve;
  36361. r.validateEvent && ((ve = f == null ? void 0 : f.validate) == null || ve.call(f, "blur").catch((Xe) => Zi(Xe)));
  36362. }
  36363. }), A = L(() => {
  36364. var ve;
  36365. return (ve = c == null ? void 0 : c.statusIcon) != null ? ve : !1;
  36366. }), D = L(() => (f == null ? void 0 : f.validateState) || ""), E = L(() => D.value && g$e[D.value]), R = L(() => O.value ? p$e : f$e), N = L(() => [
  36367. i.style
  36368. ]), V = L(() => [
  36369. r.inputStyle,
  36370. x.value,
  36371. { resize: r.resize }
  36372. ]), B = L(() => Gl(r.modelValue) ? "" : String(r.modelValue)), W = L(() => r.clearable && !p.value && !r.readonly && !!B.value && (w.value || b.value)), F = L(() => r.showPassword && !p.value && !r.readonly && !!B.value && (!!B.value || w.value)), Q = L(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), Z = L(() => B.value.length), ne = L(() => !!Q.value && Z.value > Number(r.maxlength)), ee = L(() => !!a.suffix || !!r.suffixIcon || W.value || r.showPassword || Q.value || !!D.value && A.value), [oe, K] = U2e(m);
  36373. HPe(y, (ve) => {
  36374. if (H(), !Q.value || r.resize !== "both")
  36375. return;
  36376. const Xe = ve[0], { width: Rt } = Xe.contentRect;
  36377. S.value = {
  36378. right: `calc(100% - ${Rt + 15 + 6}px)`
  36379. };
  36380. });
  36381. const ie = () => {
  36382. const { type: ve, autosize: Xe } = r;
  36383. if (!(!qr || ve !== "textarea" || !y.value))
  36384. if (Xe) {
  36385. const Rt = hm(Xe) ? Xe.minRows : void 0, An = hm(Xe) ? Xe.maxRows : void 0, sn = g6(y.value, Rt, An);
  36386. x.value = {
  36387. overflowY: "hidden",
  36388. ...sn
  36389. }, Tt(() => {
  36390. y.value.offsetHeight, x.value = sn;
  36391. });
  36392. } else
  36393. x.value = {
  36394. minHeight: g6(y.value).minHeight
  36395. };
  36396. }, H = ((ve) => {
  36397. let Xe = !1;
  36398. return () => {
  36399. var Rt;
  36400. if (Xe || !r.autosize)
  36401. return;
  36402. ((Rt = y.value) == null ? void 0 : Rt.offsetParent) === null || (ve(), Xe = !0);
  36403. };
  36404. })(ie), G = () => {
  36405. const ve = C.value, Xe = r.formatter ? r.formatter(B.value) : B.value;
  36406. !ve || ve.value === Xe || (ve.value = Xe);
  36407. }, re = async (ve) => {
  36408. oe();
  36409. let { value: Xe } = ve.target;
  36410. if (r.formatter && (Xe = r.parser ? r.parser(Xe) : Xe), !_.value) {
  36411. if (Xe === B.value) {
  36412. G();
  36413. return;
  36414. }
  36415. n(Hs, Xe), n("input", Xe), await Tt(), G(), K();
  36416. }
  36417. }, fe = (ve) => {
  36418. n("change", ve.target.value);
  36419. }, de = (ve) => {
  36420. n("compositionstart", ve), _.value = !0;
  36421. }, Ee = (ve) => {
  36422. var Xe;
  36423. n("compositionupdate", ve);
  36424. const Rt = (Xe = ve.target) == null ? void 0 : Xe.value, An = Rt[Rt.length - 1] || "";
  36425. _.value = !y$e(An);
  36426. }, $e = (ve) => {
  36427. n("compositionend", ve), _.value && (_.value = !1, re(ve));
  36428. }, Se = () => {
  36429. O.value = !O.value, be();
  36430. }, be = async () => {
  36431. var ve;
  36432. await Tt(), (ve = C.value) == null || ve.focus();
  36433. }, he = () => {
  36434. var ve;
  36435. return (ve = C.value) == null ? void 0 : ve.blur();
  36436. }, Te = (ve) => {
  36437. b.value = !1, n("mouseleave", ve);
  36438. }, ze = (ve) => {
  36439. b.value = !0, n("mouseenter", ve);
  36440. }, ut = (ve) => {
  36441. n("keydown", ve);
  36442. }, ct = () => {
  36443. var ve;
  36444. (ve = C.value) == null || ve.select();
  36445. }, Dt = () => {
  36446. n(Hs, ""), n("change", ""), n("clear"), n("input", "");
  36447. };
  36448. return se(() => r.modelValue, () => {
  36449. var ve;
  36450. Tt(() => ie()), r.validateEvent && ((ve = f == null ? void 0 : f.validate) == null || ve.call(f, "change").catch((Xe) => Zi(Xe)));
  36451. }), se(B, () => G()), se(() => r.type, async () => {
  36452. await Tt(), G(), ie();
  36453. }), it(() => {
  36454. !r.formatter && r.parser && Zi("ElInput", "If you set the parser, you also need to set the formatter."), G(), Tt(ie);
  36455. }), T0({
  36456. from: "label",
  36457. replacement: "aria-label",
  36458. version: "2.8.0",
  36459. scope: "el-input",
  36460. ref: "https://element-plus.org/en-US/component/input.html"
  36461. }, L(() => !!r.label)), e({
  36462. input: m,
  36463. textarea: y,
  36464. ref: C,
  36465. textareaStyle: V,
  36466. autosize: Nn(r, "autosize"),
  36467. focus: be,
  36468. blur: he,
  36469. select: ct,
  36470. clear: Dt,
  36471. resizeTextarea: ie
  36472. }), (ve, Xe) => (pe(), Qe("div", _n(z(o), {
  36473. class: [
  36474. z(s),
  36475. {
  36476. [z(v).bm("group", "append")]: ve.$slots.append,
  36477. [z(v).bm("group", "prepend")]: ve.$slots.prepend
  36478. }
  36479. ],
  36480. style: z(N),
  36481. role: ve.containerRole,
  36482. onMouseenter: ze,
  36483. onMouseleave: Te
  36484. }), [
  36485. _t(" input "),
  36486. ve.type !== "textarea" ? (pe(), Qe(wt, { key: 0 }, [
  36487. _t(" prepend slot "),
  36488. ve.$slots.prepend ? (pe(), Qe("div", {
  36489. key: 0,
  36490. class: Ye(z(v).be("group", "prepend"))
  36491. }, [
  36492. zn(ve.$slots, "prepend")
  36493. ], 2)) : _t("v-if", !0),
  36494. He("div", {
  36495. ref_key: "wrapperRef",
  36496. ref: T,
  36497. class: Ye(z(l))
  36498. }, [
  36499. _t(" prefix slot "),
  36500. ve.$slots.prefix || ve.prefixIcon ? (pe(), Qe("span", {
  36501. key: 0,
  36502. class: Ye(z(v).e("prefix"))
  36503. }, [
  36504. He("span", {
  36505. class: Ye(z(v).e("prefix-inner"))
  36506. }, [
  36507. zn(ve.$slots, "prefix"),
  36508. ve.prefixIcon ? (pe(), je(z(Cs), {
  36509. key: 0,
  36510. class: Ye(z(v).e("icon"))
  36511. }, {
  36512. default: we(() => [
  36513. (pe(), je(Ec(ve.prefixIcon)))
  36514. ]),
  36515. _: 1
  36516. }, 8, ["class"])) : _t("v-if", !0)
  36517. ], 2)
  36518. ], 2)) : _t("v-if", !0),
  36519. He("input", _n({
  36520. id: z(d),
  36521. ref_key: "input",
  36522. ref: m,
  36523. class: z(v).e("inner")
  36524. }, z(u), {
  36525. minlength: ve.minlength,
  36526. maxlength: ve.maxlength,
  36527. type: ve.showPassword ? O.value ? "text" : "password" : ve.type,
  36528. disabled: z(p),
  36529. readonly: ve.readonly,
  36530. autocomplete: ve.autocomplete,
  36531. tabindex: ve.tabindex,
  36532. "aria-label": ve.label || ve.ariaLabel,
  36533. placeholder: ve.placeholder,
  36534. style: ve.inputStyle,
  36535. form: ve.form,
  36536. autofocus: ve.autofocus,
  36537. onCompositionstart: de,
  36538. onCompositionupdate: Ee,
  36539. onCompositionend: $e,
  36540. onInput: re,
  36541. onFocus: Xe[0] || (Xe[0] = (...Rt) => z(P) && z(P)(...Rt)),
  36542. onBlur: Xe[1] || (Xe[1] = (...Rt) => z($) && z($)(...Rt)),
  36543. onChange: fe,
  36544. onKeydown: ut
  36545. }), null, 16, cAe),
  36546. _t(" suffix slot "),
  36547. z(ee) ? (pe(), Qe("span", {
  36548. key: 1,
  36549. class: Ye(z(v).e("suffix"))
  36550. }, [
  36551. He("span", {
  36552. class: Ye(z(v).e("suffix-inner"))
  36553. }, [
  36554. !z(W) || !z(F) || !z(Q) ? (pe(), Qe(wt, { key: 0 }, [
  36555. zn(ve.$slots, "suffix"),
  36556. ve.suffixIcon ? (pe(), je(z(Cs), {
  36557. key: 0,
  36558. class: Ye(z(v).e("icon"))
  36559. }, {
  36560. default: we(() => [
  36561. (pe(), je(Ec(ve.suffixIcon)))
  36562. ]),
  36563. _: 1
  36564. }, 8, ["class"])) : _t("v-if", !0)
  36565. ], 64)) : _t("v-if", !0),
  36566. z(W) ? (pe(), je(z(Cs), {
  36567. key: 1,
  36568. class: Ye([z(v).e("icon"), z(v).e("clear")]),
  36569. onMousedown: uf(z(dm), ["prevent"]),
  36570. onClick: Dt
  36571. }, {
  36572. default: we(() => [
  36573. M(z(RY))
  36574. ]),
  36575. _: 1
  36576. }, 8, ["class", "onMousedown"])) : _t("v-if", !0),
  36577. z(F) ? (pe(), je(z(Cs), {
  36578. key: 2,
  36579. class: Ye([z(v).e("icon"), z(v).e("password")]),
  36580. onClick: Se
  36581. }, {
  36582. default: we(() => [
  36583. (pe(), je(Ec(z(R))))
  36584. ]),
  36585. _: 1
  36586. }, 8, ["class"])) : _t("v-if", !0),
  36587. z(Q) ? (pe(), Qe("span", {
  36588. key: 3,
  36589. class: Ye(z(v).e("count"))
  36590. }, [
  36591. He("span", {
  36592. class: Ye(z(v).e("count-inner"))
  36593. }, Vi(z(Z)) + " / " + Vi(ve.maxlength), 3)
  36594. ], 2)) : _t("v-if", !0),
  36595. z(D) && z(E) && z(A) ? (pe(), je(z(Cs), {
  36596. key: 4,
  36597. class: Ye([
  36598. z(v).e("icon"),
  36599. z(v).e("validateIcon"),
  36600. z(v).is("loading", z(D) === "validating")
  36601. ])
  36602. }, {
  36603. default: we(() => [
  36604. (pe(), je(Ec(z(E))))
  36605. ]),
  36606. _: 1
  36607. }, 8, ["class"])) : _t("v-if", !0)
  36608. ], 2)
  36609. ], 2)) : _t("v-if", !0)
  36610. ], 2),
  36611. _t(" append slot "),
  36612. ve.$slots.append ? (pe(), Qe("div", {
  36613. key: 1,
  36614. class: Ye(z(v).be("group", "append"))
  36615. }, [
  36616. zn(ve.$slots, "append")
  36617. ], 2)) : _t("v-if", !0)
  36618. ], 64)) : (pe(), Qe(wt, { key: 1 }, [
  36619. _t(" textarea "),
  36620. He("textarea", _n({
  36621. id: z(d),
  36622. ref_key: "textarea",
  36623. ref: y,
  36624. class: [z(g).e("inner"), z(v).is("focus", z(w))]
  36625. }, z(u), {
  36626. minlength: ve.minlength,
  36627. maxlength: ve.maxlength,
  36628. tabindex: ve.tabindex,
  36629. disabled: z(p),
  36630. readonly: ve.readonly,
  36631. autocomplete: ve.autocomplete,
  36632. style: z(V),
  36633. "aria-label": ve.label || ve.ariaLabel,
  36634. placeholder: ve.placeholder,
  36635. form: ve.form,
  36636. autofocus: ve.autofocus,
  36637. onCompositionstart: de,
  36638. onCompositionupdate: Ee,
  36639. onCompositionend: $e,
  36640. onInput: re,
  36641. onFocus: Xe[2] || (Xe[2] = (...Rt) => z(P) && z(P)(...Rt)),
  36642. onBlur: Xe[3] || (Xe[3] = (...Rt) => z($) && z($)(...Rt)),
  36643. onChange: fe,
  36644. onKeydown: ut
  36645. }), null, 16, fAe),
  36646. z(Q) ? (pe(), Qe("span", {
  36647. key: 0,
  36648. style: Sr(S.value),
  36649. class: Ye(z(v).e("count"))
  36650. }, Vi(z(Z)) + " / " + Vi(ve.maxlength), 7)) : _t("v-if", !0)
  36651. ], 64))
  36652. ], 16, uAe));
  36653. }
  36654. });
  36655. var pAe = /* @__PURE__ */ Qn(hAe, [["__file", "input.vue"]]);
  36656. const lR = Rf(pAe), uR = Symbol("popper"), tq = Symbol("popperContent"), vAe = [
  36657. "dialog",
  36658. "grid",
  36659. "group",
  36660. "listbox",
  36661. "menu",
  36662. "navigation",
  36663. "tooltip",
  36664. "tree"
  36665. ], nq = rr({
  36666. role: {
  36667. type: String,
  36668. values: vAe,
  36669. default: "tooltip"
  36670. }
  36671. }), gAe = te({
  36672. name: "ElPopper",
  36673. inheritAttrs: !1
  36674. }), mAe = /* @__PURE__ */ te({
  36675. ...gAe,
  36676. props: nq,
  36677. setup(t, { expose: e }) {
  36678. const n = t, r = U(), i = U(), a = U(), o = U(), s = L(() => n.role), l = {
  36679. triggerRef: r,
  36680. popperInstanceRef: i,
  36681. contentRef: a,
  36682. referenceRef: o,
  36683. role: s
  36684. };
  36685. return e(l), pt(uR, l), (u, c) => zn(u.$slots, "default");
  36686. }
  36687. });
  36688. var yAe = /* @__PURE__ */ Qn(mAe, [["__file", "popper.vue"]]);
  36689. const rq = rr({
  36690. arrowOffset: {
  36691. type: Number,
  36692. default: 5
  36693. }
  36694. }), bAe = te({
  36695. name: "ElPopperArrow",
  36696. inheritAttrs: !1
  36697. }), _Ae = /* @__PURE__ */ te({
  36698. ...bAe,
  36699. props: rq,
  36700. setup(t, { expose: e }) {
  36701. const n = t, r = Jn("popper"), { arrowOffset: i, arrowRef: a, arrowStyle: o } = Ge(tq, void 0);
  36702. return se(() => n.arrowOffset, (s) => {
  36703. i.value = s;
  36704. }), yt(() => {
  36705. a.value = void 0;
  36706. }), e({
  36707. arrowRef: a
  36708. }), (s, l) => (pe(), Qe("span", {
  36709. ref_key: "arrowRef",
  36710. ref: a,
  36711. class: Ye(z(r).e("arrow")),
  36712. style: Sr(z(o)),
  36713. "data-popper-arrow": ""
  36714. }, null, 6));
  36715. }
  36716. });
  36717. var OAe = /* @__PURE__ */ Qn(_Ae, [["__file", "arrow.vue"]]);
  36718. const NC = "ElOnlyChild", SAe = te({
  36719. name: NC,
  36720. setup(t, {
  36721. slots: e,
  36722. attrs: n
  36723. }) {
  36724. var r;
  36725. const i = Ge(JY), a = H2e((r = i == null ? void 0 : i.setForwardRef) != null ? r : dm);
  36726. return () => {
  36727. var o;
  36728. const s = (o = e.default) == null ? void 0 : o.call(e, n);
  36729. if (!s)
  36730. return null;
  36731. if (s.length > 1)
  36732. return Zi(NC, "requires exact only one valid child."), null;
  36733. const l = iq(s);
  36734. return l ? Oi(Bs(l, n), [[a]]) : (Zi(NC, "no valid child node found"), null);
  36735. };
  36736. }
  36737. });
  36738. function iq(t) {
  36739. if (!t)
  36740. return null;
  36741. const e = t;
  36742. for (const n of e) {
  36743. if (hm(n))
  36744. switch (n.type) {
  36745. case H9:
  36746. continue;
  36747. case $S:
  36748. case "svg":
  36749. return m6(n);
  36750. case wt:
  36751. return iq(n.children);
  36752. default:
  36753. return n;
  36754. }
  36755. return m6(n);
  36756. }
  36757. return null;
  36758. }
  36759. function m6(t) {
  36760. const e = Jn("only-child");
  36761. return M("span", {
  36762. class: e.e("content")
  36763. }, [t]);
  36764. }
  36765. const aq = rr({
  36766. virtualRef: {
  36767. type: jt(Object)
  36768. },
  36769. virtualTriggering: Boolean,
  36770. onMouseenter: {
  36771. type: jt(Function)
  36772. },
  36773. onMouseleave: {
  36774. type: jt(Function)
  36775. },
  36776. onClick: {
  36777. type: jt(Function)
  36778. },
  36779. onKeydown: {
  36780. type: jt(Function)
  36781. },
  36782. onFocus: {
  36783. type: jt(Function)
  36784. },
  36785. onBlur: {
  36786. type: jt(Function)
  36787. },
  36788. onContextmenu: {
  36789. type: jt(Function)
  36790. },
  36791. id: String,
  36792. open: Boolean
  36793. }), xAe = te({
  36794. name: "ElPopperTrigger",
  36795. inheritAttrs: !1
  36796. }), wAe = /* @__PURE__ */ te({
  36797. ...xAe,
  36798. props: aq,
  36799. setup(t, { expose: e }) {
  36800. const n = t, { role: r, triggerRef: i } = Ge(uR, void 0);
  36801. Q2e(i);
  36802. const a = L(() => s.value ? n.id : void 0), o = L(() => {
  36803. if (r && r.value === "tooltip")
  36804. return n.open && n.id ? n.id : void 0;
  36805. }), s = L(() => {
  36806. if (r && r.value !== "tooltip")
  36807. return r.value;
  36808. }), l = L(() => s.value ? `${n.open}` : void 0);
  36809. let u;
  36810. return it(() => {
  36811. se(() => n.virtualRef, (c) => {
  36812. c && (i.value = Rl(c));
  36813. }, {
  36814. immediate: !0
  36815. }), se(i, (c, f) => {
  36816. u == null || u(), u = void 0, pm(c) && ([
  36817. "onMouseenter",
  36818. "onMouseleave",
  36819. "onClick",
  36820. "onKeydown",
  36821. "onFocus",
  36822. "onBlur",
  36823. "onContextmenu"
  36824. ].forEach((d) => {
  36825. var h;
  36826. const p = n[d];
  36827. p && (c.addEventListener(d.slice(2).toLowerCase(), p), (h = f == null ? void 0 : f.removeEventListener) == null || h.call(f, d.slice(2).toLowerCase(), p));
  36828. }), u = se([a, o, s, l], (d) => {
  36829. [
  36830. "aria-controls",
  36831. "aria-describedby",
  36832. "aria-haspopup",
  36833. "aria-expanded"
  36834. ].forEach((h, p) => {
  36835. Gl(d[p]) ? c.removeAttribute(h) : c.setAttribute(h, d[p]);
  36836. });
  36837. }, { immediate: !0 })), pm(f) && [
  36838. "aria-controls",
  36839. "aria-describedby",
  36840. "aria-haspopup",
  36841. "aria-expanded"
  36842. ].forEach((d) => f.removeAttribute(d));
  36843. }, {
  36844. immediate: !0
  36845. });
  36846. }), yt(() => {
  36847. u == null || u(), u = void 0;
  36848. }), e({
  36849. triggerRef: i
  36850. }), (c, f) => c.virtualTriggering ? _t("v-if", !0) : (pe(), je(z(SAe), _n({ key: 0 }, c.$attrs, {
  36851. "aria-controls": z(a),
  36852. "aria-describedby": z(o),
  36853. "aria-expanded": z(l),
  36854. "aria-haspopup": z(s)
  36855. }), {
  36856. default: we(() => [
  36857. zn(c.$slots, "default")
  36858. ]),
  36859. _: 3
  36860. }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
  36861. }
  36862. });
  36863. var CAe = /* @__PURE__ */ Qn(wAe, [["__file", "trigger.vue"]]);
  36864. const BC = "focus-trap.focus-after-trapped", zC = "focus-trap.focus-after-released", TAe = "focus-trap.focusout-prevented", y6 = {
  36865. cancelable: !0,
  36866. bubbles: !1
  36867. }, PAe = {
  36868. cancelable: !0,
  36869. bubbles: !1
  36870. }, b6 = "focusAfterTrapped", _6 = "focusAfterReleased", $Ae = Symbol("elFocusTrap"), cR = U(), Ix = U(0), fR = U(0);
  36871. let Ny = 0;
  36872. const oq = (t) => {
  36873. const e = [], n = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
  36874. acceptNode: (r) => {
  36875. const i = r.tagName === "INPUT" && r.type === "hidden";
  36876. return r.disabled || r.hidden || i ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
  36877. }
  36878. });
  36879. for (; n.nextNode(); )
  36880. e.push(n.currentNode);
  36881. return e;
  36882. }, O6 = (t, e) => {
  36883. for (const n of t)
  36884. if (!AAe(n, e))
  36885. return n;
  36886. }, AAe = (t, e) => {
  36887. if (process.env.NODE_ENV === "test")
  36888. return !1;
  36889. if (getComputedStyle(t).visibility === "hidden")
  36890. return !0;
  36891. for (; t; ) {
  36892. if (e && t === e)
  36893. return !1;
  36894. if (getComputedStyle(t).display === "none")
  36895. return !0;
  36896. t = t.parentElement;
  36897. }
  36898. return !1;
  36899. }, EAe = (t) => {
  36900. const e = oq(t), n = O6(e, t), r = O6(e.reverse(), t);
  36901. return [n, r];
  36902. }, MAe = (t) => t instanceof HTMLInputElement && "select" in t, _l = (t, e) => {
  36903. if (t && t.focus) {
  36904. const n = document.activeElement;
  36905. t.focus({ preventScroll: !0 }), fR.value = window.performance.now(), t !== n && MAe(t) && e && t.select();
  36906. }
  36907. };
  36908. function S6(t, e) {
  36909. const n = [...t], r = t.indexOf(e);
  36910. return r !== -1 && n.splice(r, 1), n;
  36911. }
  36912. const IAe = () => {
  36913. let t = [];
  36914. return {
  36915. push: (r) => {
  36916. const i = t[0];
  36917. i && r !== i && i.pause(), t = S6(t, r), t.unshift(r);
  36918. },
  36919. remove: (r) => {
  36920. var i, a;
  36921. t = S6(t, r), (a = (i = t[0]) == null ? void 0 : i.resume) == null || a.call(i);
  36922. }
  36923. };
  36924. }, DAe = (t, e = !1) => {
  36925. const n = document.activeElement;
  36926. for (const r of t)
  36927. if (_l(r, e), document.activeElement !== n)
  36928. return;
  36929. }, x6 = IAe(), RAe = () => Ix.value > fR.value, By = () => {
  36930. cR.value = "pointer", Ix.value = window.performance.now();
  36931. }, w6 = () => {
  36932. cR.value = "keyboard", Ix.value = window.performance.now();
  36933. }, kAe = () => (it(() => {
  36934. Ny === 0 && (document.addEventListener("mousedown", By), document.addEventListener("touchstart", By), document.addEventListener("keydown", w6)), Ny++;
  36935. }), yt(() => {
  36936. Ny--, Ny <= 0 && (document.removeEventListener("mousedown", By), document.removeEventListener("touchstart", By), document.removeEventListener("keydown", w6));
  36937. }), {
  36938. focusReason: cR,
  36939. lastUserFocusTimestamp: Ix,
  36940. lastAutomatedFocusTimestamp: fR
  36941. }), zy = (t) => new CustomEvent(TAe, {
  36942. ...PAe,
  36943. detail: t
  36944. }), LAe = te({
  36945. name: "ElFocusTrap",
  36946. inheritAttrs: !1,
  36947. props: {
  36948. loop: Boolean,
  36949. trapped: Boolean,
  36950. focusTrapEl: Object,
  36951. focusStartEl: {
  36952. type: [Object, String],
  36953. default: "first"
  36954. }
  36955. },
  36956. emits: [
  36957. b6,
  36958. _6,
  36959. "focusin",
  36960. "focusout",
  36961. "focusout-prevented",
  36962. "release-requested"
  36963. ],
  36964. setup(t, { emit: e }) {
  36965. const n = U();
  36966. let r, i;
  36967. const { focusReason: a } = kAe();
  36968. B2e((p) => {
  36969. t.trapped && !o.paused && e("release-requested", p);
  36970. });
  36971. const o = {
  36972. paused: !1,
  36973. pause() {
  36974. this.paused = !0;
  36975. },
  36976. resume() {
  36977. this.paused = !1;
  36978. }
  36979. }, s = (p) => {
  36980. if (!t.loop && !t.trapped || o.paused)
  36981. return;
  36982. const { key: v, altKey: g, ctrlKey: m, metaKey: y, currentTarget: b, shiftKey: _ } = p, { loop: O } = t, S = v === Xc.tab && !g && !m && !y, x = document.activeElement;
  36983. if (S && x) {
  36984. const C = b, [T, w] = EAe(C);
  36985. if (T && w) {
  36986. if (!_ && x === w) {
  36987. const $ = zy({
  36988. focusReason: a.value
  36989. });
  36990. e("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), O && _l(T, !0));
  36991. } else if (_ && [T, C].includes(x)) {
  36992. const $ = zy({
  36993. focusReason: a.value
  36994. });
  36995. e("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), O && _l(w, !0));
  36996. }
  36997. } else if (x === C) {
  36998. const $ = zy({
  36999. focusReason: a.value
  37000. });
  37001. e("focusout-prevented", $), $.defaultPrevented || p.preventDefault();
  37002. }
  37003. }
  37004. };
  37005. pt($Ae, {
  37006. focusTrapRef: n,
  37007. onKeydown: s
  37008. }), se(() => t.focusTrapEl, (p) => {
  37009. p && (n.value = p);
  37010. }, { immediate: !0 }), se([n], ([p], [v]) => {
  37011. 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));
  37012. });
  37013. const l = (p) => {
  37014. e(b6, p);
  37015. }, u = (p) => e(_6, p), c = (p) => {
  37016. const v = z(n);
  37017. if (!v)
  37018. return;
  37019. const g = p.target, m = p.relatedTarget, y = g && v.contains(g);
  37020. t.trapped || m && v.contains(m) || (r = m), y && e("focusin", p), !o.paused && t.trapped && (y ? i = g : _l(i, !0));
  37021. }, f = (p) => {
  37022. const v = z(n);
  37023. if (!(o.paused || !v))
  37024. if (t.trapped) {
  37025. const g = p.relatedTarget;
  37026. !Gl(g) && !v.contains(g) && setTimeout(() => {
  37027. if (!o.paused && t.trapped) {
  37028. const m = zy({
  37029. focusReason: a.value
  37030. });
  37031. e("focusout-prevented", m), m.defaultPrevented || _l(i, !0);
  37032. }
  37033. }, 0);
  37034. } else {
  37035. const g = p.target;
  37036. g && v.contains(g) || e("focusout", p);
  37037. }
  37038. };
  37039. async function d() {
  37040. await Tt();
  37041. const p = z(n);
  37042. if (p) {
  37043. x6.push(o);
  37044. const v = p.contains(document.activeElement) ? r : document.activeElement;
  37045. if (r = v, !p.contains(v)) {
  37046. const m = new Event(BC, y6);
  37047. p.addEventListener(BC, l), p.dispatchEvent(m), m.defaultPrevented || Tt(() => {
  37048. let y = t.focusStartEl;
  37049. Oa(y) || (_l(y), document.activeElement !== y && (y = "first")), y === "first" && DAe(oq(p), !0), (document.activeElement === v || y === "container") && _l(p);
  37050. });
  37051. }
  37052. }
  37053. }
  37054. function h() {
  37055. const p = z(n);
  37056. if (p) {
  37057. p.removeEventListener(BC, l);
  37058. const v = new CustomEvent(zC, {
  37059. ...y6,
  37060. detail: {
  37061. focusReason: a.value
  37062. }
  37063. });
  37064. p.addEventListener(zC, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !RAe() || p.contains(document.activeElement)) && _l(r ?? document.body), p.removeEventListener(zC, u), x6.remove(o);
  37065. }
  37066. }
  37067. return it(() => {
  37068. t.trapped && d(), se(() => t.trapped, (p) => {
  37069. p ? d() : h();
  37070. });
  37071. }), yt(() => {
  37072. t.trapped && h();
  37073. }), {
  37074. onKeydown: s
  37075. };
  37076. }
  37077. });
  37078. function NAe(t, e, n, r, i, a) {
  37079. return zn(t.$slots, "default", { handleKeydown: t.onKeydown });
  37080. }
  37081. var BAe = /* @__PURE__ */ Qn(LAe, [["render", NAe], ["__file", "focus-trap.vue"]]);
  37082. const zAe = ["fixed", "absolute"], VAe = rr({
  37083. boundariesPadding: {
  37084. type: Number,
  37085. default: 0
  37086. },
  37087. fallbackPlacements: {
  37088. type: jt(Array),
  37089. default: void 0
  37090. },
  37091. gpuAcceleration: {
  37092. type: Boolean,
  37093. default: !0
  37094. },
  37095. offset: {
  37096. type: Number,
  37097. default: 12
  37098. },
  37099. placement: {
  37100. type: String,
  37101. values: qD,
  37102. default: "bottom"
  37103. },
  37104. popperOptions: {
  37105. type: jt(Object),
  37106. default: () => ({})
  37107. },
  37108. strategy: {
  37109. type: String,
  37110. values: zAe,
  37111. default: "absolute"
  37112. }
  37113. }), sq = rr({
  37114. ...VAe,
  37115. id: String,
  37116. style: {
  37117. type: jt([String, Array, Object])
  37118. },
  37119. className: {
  37120. type: jt([String, Array, Object])
  37121. },
  37122. effect: {
  37123. type: String,
  37124. default: "dark"
  37125. },
  37126. visible: Boolean,
  37127. enterable: {
  37128. type: Boolean,
  37129. default: !0
  37130. },
  37131. pure: Boolean,
  37132. focusOnShow: {
  37133. type: Boolean,
  37134. default: !1
  37135. },
  37136. trapping: {
  37137. type: Boolean,
  37138. default: !1
  37139. },
  37140. popperClass: {
  37141. type: jt([String, Array, Object])
  37142. },
  37143. popperStyle: {
  37144. type: jt([String, Array, Object])
  37145. },
  37146. referenceEl: {
  37147. type: jt(Object)
  37148. },
  37149. triggerTargetEl: {
  37150. type: jt(Object)
  37151. },
  37152. stopPopperMouseEvent: {
  37153. type: Boolean,
  37154. default: !0
  37155. },
  37156. virtualTriggering: Boolean,
  37157. zIndex: Number,
  37158. ...E0(["ariaLabel"])
  37159. }), FAe = {
  37160. mouseenter: (t) => t instanceof MouseEvent,
  37161. mouseleave: (t) => t instanceof MouseEvent,
  37162. focus: () => !0,
  37163. blur: () => !0,
  37164. close: () => !0
  37165. }, WAe = (t, e = []) => {
  37166. const { placement: n, strategy: r, popperOptions: i } = t, a = {
  37167. placement: n,
  37168. strategy: r,
  37169. ...i,
  37170. modifiers: [...HAe(t), ...e]
  37171. };
  37172. return GAe(a, i == null ? void 0 : i.modifiers), a;
  37173. }, QAe = (t) => {
  37174. if (qr)
  37175. return Rl(t);
  37176. };
  37177. function HAe(t) {
  37178. const { offset: e, gpuAcceleration: n, fallbackPlacements: r } = t;
  37179. return [
  37180. {
  37181. name: "offset",
  37182. options: {
  37183. offset: [0, e ?? 12]
  37184. }
  37185. },
  37186. {
  37187. name: "preventOverflow",
  37188. options: {
  37189. padding: {
  37190. top: 2,
  37191. bottom: 2,
  37192. left: 5,
  37193. right: 5
  37194. }
  37195. }
  37196. },
  37197. {
  37198. name: "flip",
  37199. options: {
  37200. padding: 5,
  37201. fallbackPlacements: r
  37202. }
  37203. },
  37204. {
  37205. name: "computeStyles",
  37206. options: {
  37207. gpuAcceleration: n
  37208. }
  37209. }
  37210. ];
  37211. }
  37212. function GAe(t, e) {
  37213. e && (t.modifiers = [...t.modifiers, ...e ?? []]);
  37214. }
  37215. const jAe = 0, ZAe = (t) => {
  37216. const { popperInstanceRef: e, contentRef: n, triggerRef: r, role: i } = Ge(uR, void 0), a = U(), o = U(), s = L(() => ({
  37217. name: "eventListeners",
  37218. enabled: !!t.visible
  37219. })), l = L(() => {
  37220. var m;
  37221. const y = z(a), b = (m = z(o)) != null ? m : jAe;
  37222. return {
  37223. name: "arrow",
  37224. enabled: !Dbe(y),
  37225. options: {
  37226. element: y,
  37227. padding: b
  37228. }
  37229. };
  37230. }), u = L(() => ({
  37231. onFirstUpdate: () => {
  37232. p();
  37233. },
  37234. ...WAe(t, [
  37235. z(l),
  37236. z(s)
  37237. ])
  37238. })), c = L(() => QAe(t.referenceEl) || z(r)), { attributes: f, state: d, styles: h, update: p, forceUpdate: v, instanceRef: g } = k2e(c, n, u);
  37239. return se(g, (m) => e.value = m), it(() => {
  37240. se(() => {
  37241. var m;
  37242. return (m = z(c)) == null ? void 0 : m.getBoundingClientRect();
  37243. }, () => {
  37244. p();
  37245. });
  37246. }), {
  37247. attributes: f,
  37248. arrowRef: a,
  37249. contentRef: n,
  37250. instanceRef: g,
  37251. state: d,
  37252. styles: h,
  37253. role: i,
  37254. forceUpdate: v,
  37255. update: p
  37256. };
  37257. }, UAe = (t, {
  37258. attributes: e,
  37259. styles: n,
  37260. role: r
  37261. }) => {
  37262. const { nextZIndex: i } = Z2e(), a = Jn("popper"), o = L(() => z(e).popper), s = U(Qs(t.zIndex) ? t.zIndex : i()), l = L(() => [
  37263. a.b(),
  37264. a.is("pure", t.pure),
  37265. a.is(t.effect),
  37266. t.popperClass
  37267. ]), u = L(() => [
  37268. { zIndex: z(s) },
  37269. z(n).popper,
  37270. t.popperStyle || {}
  37271. ]), c = L(() => r.value === "dialog" ? "false" : void 0), f = L(() => z(n).arrow || {});
  37272. return {
  37273. ariaModal: c,
  37274. arrowStyle: f,
  37275. contentAttrs: o,
  37276. contentClass: l,
  37277. contentStyle: u,
  37278. contentZIndex: s,
  37279. updateZIndex: () => {
  37280. s.value = Qs(t.zIndex) ? t.zIndex : i();
  37281. }
  37282. };
  37283. }, XAe = (t, e) => {
  37284. const n = U(!1), r = U();
  37285. return {
  37286. focusStartRef: r,
  37287. trapped: n,
  37288. onFocusAfterReleased: (u) => {
  37289. var c;
  37290. ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", e("blur"));
  37291. },
  37292. onFocusAfterTrapped: () => {
  37293. e("focus");
  37294. },
  37295. onFocusInTrap: (u) => {
  37296. t.visible && !n.value && (u.target && (r.value = u.target), n.value = !0);
  37297. },
  37298. onFocusoutPrevented: (u) => {
  37299. t.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1);
  37300. },
  37301. onReleaseRequested: () => {
  37302. n.value = !1, e("close");
  37303. }
  37304. };
  37305. }, YAe = te({
  37306. name: "ElPopperContent"
  37307. }), qAe = /* @__PURE__ */ te({
  37308. ...YAe,
  37309. props: sq,
  37310. emits: FAe,
  37311. setup(t, { expose: e, emit: n }) {
  37312. const r = t, {
  37313. focusStartRef: i,
  37314. trapped: a,
  37315. onFocusAfterReleased: o,
  37316. onFocusAfterTrapped: s,
  37317. onFocusInTrap: l,
  37318. onFocusoutPrevented: u,
  37319. onReleaseRequested: c
  37320. } = XAe(r, n), { attributes: f, arrowRef: d, contentRef: h, styles: p, instanceRef: v, role: g, update: m } = ZAe(r), {
  37321. ariaModal: y,
  37322. arrowStyle: b,
  37323. contentAttrs: _,
  37324. contentClass: O,
  37325. contentStyle: S,
  37326. updateZIndex: x
  37327. } = UAe(r, {
  37328. styles: p,
  37329. attributes: f,
  37330. role: g
  37331. }), C = Ge(U1, void 0), T = U();
  37332. pt(tq, {
  37333. arrowStyle: b,
  37334. arrowRef: d,
  37335. arrowOffset: T
  37336. }), C && pt(U1, {
  37337. ...C,
  37338. addInputId: dm,
  37339. removeInputId: dm
  37340. });
  37341. let w;
  37342. const P = (A = !0) => {
  37343. m(), A && x();
  37344. }, $ = () => {
  37345. P(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
  37346. };
  37347. return it(() => {
  37348. se(() => r.triggerTargetEl, (A, D) => {
  37349. w == null || w(), w = void 0;
  37350. const E = z(A || h.value), R = z(D || h.value);
  37351. pm(E) && (w = se([g, () => r.ariaLabel, y, () => r.id], (N) => {
  37352. ["role", "aria-label", "aria-modal", "id"].forEach((V, B) => {
  37353. Gl(N[B]) ? E.removeAttribute(V) : E.setAttribute(V, N[B]);
  37354. });
  37355. }, { immediate: !0 })), R !== E && pm(R) && ["role", "aria-label", "aria-modal", "id"].forEach((N) => {
  37356. R.removeAttribute(N);
  37357. });
  37358. }, { immediate: !0 }), se(() => r.visible, $, { immediate: !0 });
  37359. }), yt(() => {
  37360. w == null || w(), w = void 0;
  37361. }), e({
  37362. popperContentRef: h,
  37363. popperInstanceRef: v,
  37364. updatePopper: P,
  37365. contentStyle: S
  37366. }), (A, D) => (pe(), Qe("div", _n({
  37367. ref_key: "contentRef",
  37368. ref: h
  37369. }, z(_), {
  37370. style: z(S),
  37371. class: z(O),
  37372. tabindex: "-1",
  37373. onMouseenter: D[0] || (D[0] = (E) => A.$emit("mouseenter", E)),
  37374. onMouseleave: D[1] || (D[1] = (E) => A.$emit("mouseleave", E))
  37375. }), [
  37376. M(z(BAe), {
  37377. trapped: z(a),
  37378. "trap-on-focus-in": !0,
  37379. "focus-trap-el": z(h),
  37380. "focus-start-el": z(i),
  37381. onFocusAfterTrapped: z(s),
  37382. onFocusAfterReleased: z(o),
  37383. onFocusin: z(l),
  37384. onFocusoutPrevented: z(u),
  37385. onReleaseRequested: z(c)
  37386. }, {
  37387. default: we(() => [
  37388. zn(A.$slots, "default")
  37389. ]),
  37390. _: 3
  37391. }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
  37392. ], 16));
  37393. }
  37394. });
  37395. var KAe = /* @__PURE__ */ Qn(qAe, [["__file", "content.vue"]]);
  37396. const JAe = Rf(yAe), dR = Symbol("elTooltip"), hR = rr({
  37397. ...F2e,
  37398. ...sq,
  37399. appendTo: {
  37400. type: jt([String, Object])
  37401. },
  37402. content: {
  37403. type: String,
  37404. default: ""
  37405. },
  37406. rawContent: {
  37407. type: Boolean,
  37408. default: !1
  37409. },
  37410. persistent: Boolean,
  37411. visible: {
  37412. type: jt(Boolean),
  37413. default: null
  37414. },
  37415. transition: String,
  37416. teleported: {
  37417. type: Boolean,
  37418. default: !0
  37419. },
  37420. disabled: Boolean,
  37421. ...E0(["ariaLabel"])
  37422. }), lq = rr({
  37423. ...aq,
  37424. disabled: Boolean,
  37425. trigger: {
  37426. type: jt([String, Array]),
  37427. default: "hover"
  37428. },
  37429. triggerKeys: {
  37430. type: jt(Array),
  37431. default: () => [Xc.enter, Xc.space]
  37432. }
  37433. }), {
  37434. useModelToggleProps: eEe,
  37435. useModelToggleEmits: tEe,
  37436. useModelToggle: nEe
  37437. } = BY("visible"), rEe = rr({
  37438. ...nq,
  37439. ...eEe,
  37440. ...hR,
  37441. ...lq,
  37442. ...rq,
  37443. showArrow: {
  37444. type: Boolean,
  37445. default: !0
  37446. }
  37447. }), iEe = [
  37448. ...tEe,
  37449. "before-show",
  37450. "before-hide",
  37451. "show",
  37452. "hide",
  37453. "open",
  37454. "close"
  37455. ], aEe = (t, e) => KPe(t) ? t.includes(e) : t === e, ed = (t, e, n) => (r) => {
  37456. aEe(z(t), e) && n(r);
  37457. }, oEe = te({
  37458. name: "ElTooltipTrigger"
  37459. }), sEe = /* @__PURE__ */ te({
  37460. ...oEe,
  37461. props: lq,
  37462. setup(t, { expose: e }) {
  37463. const n = t, r = Jn("tooltip"), { controlled: i, id: a, open: o, onOpen: s, onClose: l, onToggle: u } = Ge(dR, void 0), c = U(null), f = () => {
  37464. if (z(i) || n.disabled)
  37465. return !0;
  37466. }, d = Nn(n, "trigger"), h = _s(f, ed(d, "hover", s)), p = _s(f, ed(d, "hover", l)), v = _s(f, ed(d, "click", (_) => {
  37467. _.button === 0 && u(_);
  37468. })), g = _s(f, ed(d, "focus", s)), m = _s(f, ed(d, "focus", l)), y = _s(f, ed(d, "contextmenu", (_) => {
  37469. _.preventDefault(), u(_);
  37470. })), b = _s(f, (_) => {
  37471. const { code: O } = _;
  37472. n.triggerKeys.includes(O) && (_.preventDefault(), u(_));
  37473. });
  37474. return e({
  37475. triggerRef: c
  37476. }), (_, O) => (pe(), je(z(CAe), {
  37477. id: z(a),
  37478. "virtual-ref": _.virtualRef,
  37479. open: z(o),
  37480. "virtual-triggering": _.virtualTriggering,
  37481. class: Ye(z(r).e("trigger")),
  37482. onBlur: z(m),
  37483. onClick: z(v),
  37484. onContextmenu: z(y),
  37485. onFocus: z(g),
  37486. onMouseenter: z(h),
  37487. onMouseleave: z(p),
  37488. onKeydown: z(b)
  37489. }, {
  37490. default: we(() => [
  37491. zn(_.$slots, "default")
  37492. ]),
  37493. _: 3
  37494. }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
  37495. }
  37496. });
  37497. var lEe = /* @__PURE__ */ Qn(sEe, [["__file", "trigger.vue"]]);
  37498. const uEe = te({
  37499. name: "ElTooltipContent",
  37500. inheritAttrs: !1
  37501. }), cEe = /* @__PURE__ */ te({
  37502. ...uEe,
  37503. props: hR,
  37504. setup(t, { expose: e }) {
  37505. const n = t, { selector: r } = KY(), i = Jn("tooltip"), a = U(null), o = U(!1), {
  37506. controlled: s,
  37507. id: l,
  37508. open: u,
  37509. trigger: c,
  37510. onClose: f,
  37511. onOpen: d,
  37512. onShow: h,
  37513. onHide: p,
  37514. onBeforeShow: v,
  37515. onBeforeHide: g
  37516. } = Ge(dR, void 0), m = L(() => n.transition || `${i.namespace.value}-fade-in-linear`), y = L(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
  37517. yt(() => {
  37518. o.value = !0;
  37519. });
  37520. const b = L(() => z(y) ? !0 : z(u)), _ = L(() => n.disabled ? !1 : z(u)), O = L(() => n.appendTo || r.value), S = L(() => {
  37521. var N;
  37522. return (N = n.style) != null ? N : {};
  37523. }), x = L(() => !z(u)), C = () => {
  37524. p();
  37525. }, T = () => {
  37526. if (z(s))
  37527. return !0;
  37528. }, w = _s(T, () => {
  37529. n.enterable && z(c) === "hover" && d();
  37530. }), P = _s(T, () => {
  37531. z(c) === "hover" && f();
  37532. }), $ = () => {
  37533. var N, V;
  37534. (V = (N = a.value) == null ? void 0 : N.updatePopper) == null || V.call(N), v == null || v();
  37535. }, A = () => {
  37536. g == null || g();
  37537. }, D = () => {
  37538. h(), R = zPe(L(() => {
  37539. var N;
  37540. return (N = a.value) == null ? void 0 : N.popperContentRef;
  37541. }), () => {
  37542. if (z(s))
  37543. return;
  37544. z(c) !== "hover" && f();
  37545. });
  37546. }, E = () => {
  37547. n.virtualTriggering || f();
  37548. };
  37549. let R;
  37550. return se(() => z(u), (N) => {
  37551. N || R == null || R();
  37552. }, {
  37553. flush: "post"
  37554. }), se(() => n.content, () => {
  37555. var N, V;
  37556. (V = (N = a.value) == null ? void 0 : N.updatePopper) == null || V.call(N);
  37557. }), e({
  37558. contentRef: a
  37559. }), (N, V) => (pe(), je(AS, {
  37560. disabled: !N.teleported,
  37561. to: z(O)
  37562. }, [
  37563. M(ho, {
  37564. name: z(m),
  37565. onAfterLeave: C,
  37566. onBeforeEnter: $,
  37567. onAfterEnter: D,
  37568. onBeforeLeave: A
  37569. }, {
  37570. default: we(() => [
  37571. z(b) ? Oi((pe(), je(z(KAe), _n({
  37572. key: 0,
  37573. id: z(l),
  37574. ref_key: "contentRef",
  37575. ref: a
  37576. }, N.$attrs, {
  37577. "aria-label": N.ariaLabel,
  37578. "aria-hidden": z(x),
  37579. "boundaries-padding": N.boundariesPadding,
  37580. "fallback-placements": N.fallbackPlacements,
  37581. "gpu-acceleration": N.gpuAcceleration,
  37582. offset: N.offset,
  37583. placement: N.placement,
  37584. "popper-options": N.popperOptions,
  37585. strategy: N.strategy,
  37586. effect: N.effect,
  37587. enterable: N.enterable,
  37588. pure: N.pure,
  37589. "popper-class": N.popperClass,
  37590. "popper-style": [N.popperStyle, z(S)],
  37591. "reference-el": N.referenceEl,
  37592. "trigger-target-el": N.triggerTargetEl,
  37593. visible: z(_),
  37594. "z-index": N.zIndex,
  37595. onMouseenter: z(w),
  37596. onMouseleave: z(P),
  37597. onBlur: E,
  37598. onClose: z(f)
  37599. }), {
  37600. default: we(() => [
  37601. o.value ? _t("v-if", !0) : zn(N.$slots, "default", { key: 0 })
  37602. ]),
  37603. _: 3
  37604. }, 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"])), [
  37605. [zs, z(_)]
  37606. ]) : _t("v-if", !0)
  37607. ]),
  37608. _: 3
  37609. }, 8, ["name"])
  37610. ], 8, ["disabled", "to"]));
  37611. }
  37612. });
  37613. var fEe = /* @__PURE__ */ Qn(cEe, [["__file", "content.vue"]]);
  37614. const dEe = ["innerHTML"], hEe = { key: 1 }, pEe = te({
  37615. name: "ElTooltip"
  37616. }), vEe = /* @__PURE__ */ te({
  37617. ...pEe,
  37618. props: rEe,
  37619. emits: iEe,
  37620. setup(t, { expose: e, emit: n }) {
  37621. const r = t;
  37622. V2e();
  37623. const i = aR(), a = U(), o = U(), s = () => {
  37624. var m;
  37625. const y = z(a);
  37626. y && ((m = y.popperInstanceRef) == null || m.update());
  37627. }, l = U(!1), u = U(), { show: c, hide: f, hasUpdateHandler: d } = nEe({
  37628. indicator: l,
  37629. toggleReason: u
  37630. }), { onOpen: h, onClose: p } = W2e({
  37631. showAfter: Nn(r, "showAfter"),
  37632. hideAfter: Nn(r, "hideAfter"),
  37633. autoClose: Nn(r, "autoClose"),
  37634. open: c,
  37635. close: f
  37636. }), v = L(() => G1(r.visible) && !d.value);
  37637. pt(dR, {
  37638. controlled: v,
  37639. id: i,
  37640. open: Gle(l),
  37641. trigger: Nn(r, "trigger"),
  37642. onOpen: (m) => {
  37643. h(m);
  37644. },
  37645. onClose: (m) => {
  37646. p(m);
  37647. },
  37648. onToggle: (m) => {
  37649. z(l) ? p(m) : h(m);
  37650. },
  37651. onShow: () => {
  37652. n("show", u.value);
  37653. },
  37654. onHide: () => {
  37655. n("hide", u.value);
  37656. },
  37657. onBeforeShow: () => {
  37658. n("before-show", u.value);
  37659. },
  37660. onBeforeHide: () => {
  37661. n("before-hide", u.value);
  37662. },
  37663. updatePopper: s
  37664. }), se(() => r.disabled, (m) => {
  37665. m && l.value && (l.value = !1);
  37666. });
  37667. const g = (m) => {
  37668. var y, b;
  37669. const _ = (b = (y = o.value) == null ? void 0 : y.contentRef) == null ? void 0 : b.popperContentRef, O = (m == null ? void 0 : m.relatedTarget) || document.activeElement;
  37670. return _ && _.contains(O);
  37671. };
  37672. return jle(() => l.value && f()), e({
  37673. popperRef: a,
  37674. contentRef: o,
  37675. isFocusInsideContent: g,
  37676. updatePopper: s,
  37677. onOpen: h,
  37678. onClose: p,
  37679. hide: f
  37680. }), (m, y) => (pe(), je(z(JAe), {
  37681. ref_key: "popperRef",
  37682. ref: a,
  37683. role: m.role
  37684. }, {
  37685. default: we(() => [
  37686. M(lEe, {
  37687. disabled: m.disabled,
  37688. trigger: m.trigger,
  37689. "trigger-keys": m.triggerKeys,
  37690. "virtual-ref": m.virtualRef,
  37691. "virtual-triggering": m.virtualTriggering
  37692. }, {
  37693. default: we(() => [
  37694. m.$slots.default ? zn(m.$slots, "default", { key: 0 }) : _t("v-if", !0)
  37695. ]),
  37696. _: 3
  37697. }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
  37698. M(fEe, {
  37699. ref_key: "contentRef",
  37700. ref: o,
  37701. "aria-label": m.ariaLabel,
  37702. "boundaries-padding": m.boundariesPadding,
  37703. content: m.content,
  37704. disabled: m.disabled,
  37705. effect: m.effect,
  37706. enterable: m.enterable,
  37707. "fallback-placements": m.fallbackPlacements,
  37708. "hide-after": m.hideAfter,
  37709. "gpu-acceleration": m.gpuAcceleration,
  37710. offset: m.offset,
  37711. persistent: m.persistent,
  37712. "popper-class": m.popperClass,
  37713. "popper-style": m.popperStyle,
  37714. placement: m.placement,
  37715. "popper-options": m.popperOptions,
  37716. pure: m.pure,
  37717. "raw-content": m.rawContent,
  37718. "reference-el": m.referenceEl,
  37719. "trigger-target-el": m.triggerTargetEl,
  37720. "show-after": m.showAfter,
  37721. strategy: m.strategy,
  37722. teleported: m.teleported,
  37723. transition: m.transition,
  37724. "virtual-triggering": m.virtualTriggering,
  37725. "z-index": m.zIndex,
  37726. "append-to": m.appendTo
  37727. }, {
  37728. default: we(() => [
  37729. zn(m.$slots, "content", {}, () => [
  37730. m.rawContent ? (pe(), Qe("span", {
  37731. key: 0,
  37732. innerHTML: m.content
  37733. }, null, 8, dEe)) : (pe(), Qe("span", hEe, Vi(m.content), 1))
  37734. ]),
  37735. m.showArrow ? (pe(), je(z(OAe), {
  37736. key: 0,
  37737. "arrow-offset": m.arrowOffset
  37738. }, null, 8, ["arrow-offset"])) : _t("v-if", !0)
  37739. ]),
  37740. _: 3
  37741. }, 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"])
  37742. ]),
  37743. _: 3
  37744. }, 8, ["role"]));
  37745. }
  37746. });
  37747. var gEe = /* @__PURE__ */ Qn(vEe, [["__file", "tooltip.vue"]]);
  37748. const mEe = Rf(gEe), uq = Symbol("buttonGroupContextKey"), yEe = (t, e) => {
  37749. T0({
  37750. from: "type.text",
  37751. replacement: "link",
  37752. version: "3.0.0",
  37753. scope: "props",
  37754. ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  37755. }, L(() => t.type === "text"));
  37756. const n = Ge(uq, void 0), r = J2e("button"), { form: i } = Mx(), a = Ex(L(() => n == null ? void 0 : n.size)), o = M0(), s = U(), l = U9(), u = L(() => t.type || (n == null ? void 0 : n.type) || ""), c = L(() => {
  37757. var p, v, g;
  37758. return (g = (v = t.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? g : !1;
  37759. }), f = L(() => t.tag === "button" ? {
  37760. ariaDisabled: o.value || t.loading,
  37761. disabled: o.value || t.loading,
  37762. autofocus: t.autofocus,
  37763. type: t.nativeType
  37764. } : {}), d = L(() => {
  37765. var p;
  37766. const v = (p = l.default) == null ? void 0 : p.call(l);
  37767. if (c.value && (v == null ? void 0 : v.length) === 1) {
  37768. const g = v[0];
  37769. if ((g == null ? void 0 : g.type) === $S) {
  37770. const m = g.children;
  37771. return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim());
  37772. }
  37773. }
  37774. return !1;
  37775. });
  37776. return {
  37777. _disabled: o,
  37778. _size: a,
  37779. _type: u,
  37780. _ref: s,
  37781. _props: f,
  37782. shouldAddSpace: d,
  37783. handleClick: (p) => {
  37784. t.nativeType === "reset" && (i == null || i.resetFields()), e("click", p);
  37785. }
  37786. };
  37787. }, bEe = [
  37788. "default",
  37789. "primary",
  37790. "success",
  37791. "warning",
  37792. "info",
  37793. "danger",
  37794. "text",
  37795. ""
  37796. ], _Ee = ["button", "submit", "reset"], iA = rr({
  37797. size: A0,
  37798. disabled: Boolean,
  37799. type: {
  37800. type: String,
  37801. values: bEe,
  37802. default: ""
  37803. },
  37804. icon: {
  37805. type: j1
  37806. },
  37807. nativeType: {
  37808. type: String,
  37809. values: _Ee,
  37810. default: "button"
  37811. },
  37812. loading: Boolean,
  37813. loadingIcon: {
  37814. type: j1,
  37815. default: () => kY
  37816. },
  37817. plain: Boolean,
  37818. text: Boolean,
  37819. link: Boolean,
  37820. bg: Boolean,
  37821. autofocus: Boolean,
  37822. round: Boolean,
  37823. circle: Boolean,
  37824. color: String,
  37825. dark: Boolean,
  37826. autoInsertSpace: {
  37827. type: Boolean,
  37828. default: void 0
  37829. },
  37830. tag: {
  37831. type: jt([String, Object]),
  37832. default: "button"
  37833. }
  37834. }), OEe = {
  37835. click: (t) => t instanceof MouseEvent
  37836. };
  37837. function fl(t, e = 20) {
  37838. return t.mix("#141414", e).toString();
  37839. }
  37840. function SEe(t) {
  37841. const e = M0(), n = Jn("button");
  37842. return L(() => {
  37843. let r = {}, i = t.color;
  37844. if (i) {
  37845. const a = i.match(/var\((.*?)\)/);
  37846. a && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
  37847. const o = new en(i), s = t.dark ? o.tint(20).toString() : fl(o, 20);
  37848. if (t.plain)
  37849. r = n.cssVarBlock({
  37850. "bg-color": t.dark ? fl(o, 90) : o.tint(90).toString(),
  37851. "text-color": i,
  37852. "border-color": t.dark ? fl(o, 50) : o.tint(50).toString(),
  37853. "hover-text-color": `var(${n.cssVarName("color-white")})`,
  37854. "hover-bg-color": i,
  37855. "hover-border-color": i,
  37856. "active-bg-color": s,
  37857. "active-text-color": `var(${n.cssVarName("color-white")})`,
  37858. "active-border-color": s
  37859. }), e.value && (r[n.cssVarBlockName("disabled-bg-color")] = t.dark ? fl(o, 90) : o.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = t.dark ? fl(o, 50) : o.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = t.dark ? fl(o, 80) : o.tint(80).toString());
  37860. else {
  37861. const l = t.dark ? fl(o, 30) : o.tint(30).toString(), u = o.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
  37862. if (r = n.cssVarBlock({
  37863. "bg-color": i,
  37864. "text-color": u,
  37865. "border-color": i,
  37866. "hover-bg-color": l,
  37867. "hover-text-color": u,
  37868. "hover-border-color": l,
  37869. "active-bg-color": s,
  37870. "active-border-color": s
  37871. }), e.value) {
  37872. const c = t.dark ? fl(o, 50) : o.tint(50).toString();
  37873. 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;
  37874. }
  37875. }
  37876. }
  37877. return r;
  37878. });
  37879. }
  37880. const xEe = te({
  37881. name: "ElButton"
  37882. }), wEe = /* @__PURE__ */ te({
  37883. ...xEe,
  37884. props: iA,
  37885. emits: OEe,
  37886. setup(t, { expose: e, emit: n }) {
  37887. const r = t, i = SEe(r), a = Jn("button"), { _ref: o, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: f, handleClick: d } = yEe(r, n), h = L(() => [
  37888. a.b(),
  37889. a.m(l.value),
  37890. a.m(s.value),
  37891. a.is("disabled", u.value),
  37892. a.is("loading", r.loading),
  37893. a.is("plain", r.plain),
  37894. a.is("round", r.round),
  37895. a.is("circle", r.circle),
  37896. a.is("text", r.text),
  37897. a.is("link", r.link),
  37898. a.is("has-bg", r.bg)
  37899. ]);
  37900. return e({
  37901. ref: o,
  37902. size: s,
  37903. type: l,
  37904. disabled: u,
  37905. shouldAddSpace: f
  37906. }), (p, v) => (pe(), je(Ec(p.tag), _n({
  37907. ref_key: "_ref",
  37908. ref: o
  37909. }, z(c), {
  37910. class: z(h),
  37911. style: z(i),
  37912. onClick: z(d)
  37913. }), {
  37914. default: we(() => [
  37915. p.loading ? (pe(), Qe(wt, { key: 0 }, [
  37916. p.$slots.loading ? zn(p.$slots, "loading", { key: 0 }) : (pe(), je(z(Cs), {
  37917. key: 1,
  37918. class: Ye(z(a).is("loading"))
  37919. }, {
  37920. default: we(() => [
  37921. (pe(), je(Ec(p.loadingIcon)))
  37922. ]),
  37923. _: 1
  37924. }, 8, ["class"]))
  37925. ], 64)) : p.icon || p.$slots.icon ? (pe(), je(z(Cs), { key: 1 }, {
  37926. default: we(() => [
  37927. p.icon ? (pe(), je(Ec(p.icon), { key: 0 })) : zn(p.$slots, "icon", { key: 1 })
  37928. ]),
  37929. _: 3
  37930. })) : _t("v-if", !0),
  37931. p.$slots.default ? (pe(), Qe("span", {
  37932. key: 2,
  37933. class: Ye({ [z(a).em("text", "expand")]: z(f) })
  37934. }, [
  37935. zn(p.$slots, "default")
  37936. ], 2)) : _t("v-if", !0)
  37937. ]),
  37938. _: 3
  37939. }, 16, ["class", "style", "onClick"]));
  37940. }
  37941. });
  37942. var CEe = /* @__PURE__ */ Qn(wEe, [["__file", "button.vue"]]);
  37943. const TEe = {
  37944. size: iA.size,
  37945. type: iA.type
  37946. }, PEe = te({
  37947. name: "ElButtonGroup"
  37948. }), $Ee = /* @__PURE__ */ te({
  37949. ...PEe,
  37950. props: TEe,
  37951. setup(t) {
  37952. const e = t;
  37953. pt(uq, tn({
  37954. size: Nn(e, "size"),
  37955. type: Nn(e, "type")
  37956. }));
  37957. const n = Jn("button");
  37958. return (r, i) => (pe(), Qe("div", {
  37959. class: Ye(`${z(n).b("group")}`)
  37960. }, [
  37961. zn(r.$slots, "default")
  37962. ], 2));
  37963. }
  37964. });
  37965. var cq = /* @__PURE__ */ Qn($Ee, [["__file", "button-group.vue"]]);
  37966. const C6 = Rf(CEe, {
  37967. ButtonGroup: cq
  37968. });
  37969. UD(cq);
  37970. const Ol = /* @__PURE__ */ new Map();
  37971. let T6;
  37972. qr && (document.addEventListener("mousedown", (t) => T6 = t), document.addEventListener("mouseup", (t) => {
  37973. for (const e of Ol.values())
  37974. for (const { documentHandler: n } of e)
  37975. n(t, T6);
  37976. }));
  37977. function P6(t, e) {
  37978. let n = [];
  37979. return Array.isArray(e.arg) ? n = e.arg : pm(e.arg) && n.push(e.arg), function(r, i) {
  37980. 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));
  37981. l || u || c || f || d || h || e.value(r, i);
  37982. };
  37983. }
  37984. const AEe = {
  37985. beforeMount(t, e) {
  37986. Ol.has(t) || Ol.set(t, []), Ol.get(t).push({
  37987. documentHandler: P6(t, e),
  37988. bindingFn: e.value
  37989. });
  37990. },
  37991. updated(t, e) {
  37992. Ol.has(t) || Ol.set(t, []);
  37993. const n = Ol.get(t), r = n.findIndex((a) => a.bindingFn === e.oldValue), i = {
  37994. documentHandler: P6(t, e),
  37995. bindingFn: e.value
  37996. };
  37997. r >= 0 ? n.splice(r, 1, i) : n.push(i);
  37998. },
  37999. unmounted(t) {
  38000. Ol.delete(t);
  38001. }
  38002. }, fq = rr({
  38003. modelValue: {
  38004. type: [String, Number, Boolean],
  38005. default: void 0
  38006. },
  38007. size: A0,
  38008. disabled: Boolean,
  38009. label: {
  38010. type: [String, Number, Boolean],
  38011. default: void 0
  38012. },
  38013. value: {
  38014. type: [String, Number, Boolean],
  38015. default: void 0
  38016. },
  38017. name: {
  38018. type: String,
  38019. default: void 0
  38020. }
  38021. }), EEe = rr({
  38022. ...fq,
  38023. border: Boolean
  38024. }), dq = {
  38025. [Hs]: (t) => Oa(t) || Qs(t) || G1(t),
  38026. [NY]: (t) => Oa(t) || Qs(t) || G1(t)
  38027. }, hq = Symbol("radioGroupKey"), pq = (t, e) => {
  38028. const n = U(), r = Ge(hq, void 0), i = L(() => !!r), a = L(() => J3(t.value) ? t.label : t.value), o = L({
  38029. get() {
  38030. return i.value ? r.modelValue : t.modelValue;
  38031. },
  38032. set(f) {
  38033. i.value ? r.changeEvent(f) : e && e(Hs, f), n.value.checked = t.modelValue === a.value;
  38034. }
  38035. }), s = Ex(L(() => r == null ? void 0 : r.size)), l = M0(L(() => r == null ? void 0 : r.disabled)), u = U(!1), c = L(() => l.value || i.value && o.value !== a.value ? -1 : 0);
  38036. return T0({
  38037. from: "label act as value",
  38038. replacement: "value",
  38039. version: "3.0.0",
  38040. scope: "el-radio",
  38041. ref: "https://element-plus.org/en-US/component/radio.html"
  38042. }, L(() => i.value && J3(t.value))), {
  38043. radioRef: n,
  38044. isGroup: i,
  38045. radioGroup: r,
  38046. focus: u,
  38047. size: s,
  38048. disabled: l,
  38049. tabIndex: c,
  38050. modelValue: o,
  38051. actualValue: a
  38052. };
  38053. }, MEe = ["value", "name", "disabled"], IEe = te({
  38054. name: "ElRadio"
  38055. }), DEe = /* @__PURE__ */ te({
  38056. ...IEe,
  38057. props: EEe,
  38058. emits: dq,
  38059. setup(t, { emit: e }) {
  38060. const n = t, r = Jn("radio"), { radioRef: i, radioGroup: a, focus: o, size: s, disabled: l, modelValue: u, actualValue: c } = pq(n, e);
  38061. function f() {
  38062. Tt(() => e("change", u.value));
  38063. }
  38064. return (d, h) => {
  38065. var p;
  38066. return pe(), Qe("label", {
  38067. class: Ye([
  38068. z(r).b(),
  38069. z(r).is("disabled", z(l)),
  38070. z(r).is("focus", z(o)),
  38071. z(r).is("bordered", d.border),
  38072. z(r).is("checked", z(u) === z(c)),
  38073. z(r).m(z(s))
  38074. ])
  38075. }, [
  38076. He("span", {
  38077. class: Ye([
  38078. z(r).e("input"),
  38079. z(r).is("disabled", z(l)),
  38080. z(r).is("checked", z(u) === z(c))
  38081. ])
  38082. }, [
  38083. Oi(He("input", {
  38084. ref_key: "radioRef",
  38085. ref: i,
  38086. "onUpdate:modelValue": h[0] || (h[0] = (v) => op(u) ? u.value = v : null),
  38087. class: Ye(z(r).e("original")),
  38088. value: z(c),
  38089. name: d.name || ((p = z(a)) == null ? void 0 : p.name),
  38090. disabled: z(l),
  38091. type: "radio",
  38092. onFocus: h[1] || (h[1] = (v) => o.value = !0),
  38093. onBlur: h[2] || (h[2] = (v) => o.value = !1),
  38094. onChange: f,
  38095. onClick: h[3] || (h[3] = uf(() => {
  38096. }, ["stop"]))
  38097. }, null, 42, MEe), [
  38098. [X9, z(u)]
  38099. ]),
  38100. He("span", {
  38101. class: Ye(z(r).e("inner"))
  38102. }, null, 2)
  38103. ], 2),
  38104. He("span", {
  38105. class: Ye(z(r).e("label")),
  38106. onKeydown: h[4] || (h[4] = uf(() => {
  38107. }, ["stop"]))
  38108. }, [
  38109. zn(d.$slots, "default", {}, () => [
  38110. Kt(Vi(d.label), 1)
  38111. ])
  38112. ], 34)
  38113. ], 2);
  38114. };
  38115. }
  38116. });
  38117. var REe = /* @__PURE__ */ Qn(DEe, [["__file", "radio.vue"]]);
  38118. const kEe = rr({
  38119. ...fq
  38120. }), LEe = ["value", "name", "disabled"], NEe = te({
  38121. name: "ElRadioButton"
  38122. }), BEe = /* @__PURE__ */ te({
  38123. ...NEe,
  38124. props: kEe,
  38125. setup(t) {
  38126. const e = t, n = Jn("radio"), { radioRef: r, focus: i, size: a, disabled: o, modelValue: s, radioGroup: l, actualValue: u } = pq(e), c = L(() => ({
  38127. backgroundColor: (l == null ? void 0 : l.fill) || "",
  38128. borderColor: (l == null ? void 0 : l.fill) || "",
  38129. boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
  38130. color: (l == null ? void 0 : l.textColor) || ""
  38131. }));
  38132. return (f, d) => {
  38133. var h;
  38134. return pe(), Qe("label", {
  38135. class: Ye([
  38136. z(n).b("button"),
  38137. z(n).is("active", z(s) === z(u)),
  38138. z(n).is("disabled", z(o)),
  38139. z(n).is("focus", z(i)),
  38140. z(n).bm("button", z(a))
  38141. ])
  38142. }, [
  38143. Oi(He("input", {
  38144. ref_key: "radioRef",
  38145. ref: r,
  38146. "onUpdate:modelValue": d[0] || (d[0] = (p) => op(s) ? s.value = p : null),
  38147. class: Ye(z(n).be("button", "original-radio")),
  38148. value: z(u),
  38149. type: "radio",
  38150. name: f.name || ((h = z(l)) == null ? void 0 : h.name),
  38151. disabled: z(o),
  38152. onFocus: d[1] || (d[1] = (p) => i.value = !0),
  38153. onBlur: d[2] || (d[2] = (p) => i.value = !1),
  38154. onClick: d[3] || (d[3] = uf(() => {
  38155. }, ["stop"]))
  38156. }, null, 42, LEe), [
  38157. [X9, z(s)]
  38158. ]),
  38159. He("span", {
  38160. class: Ye(z(n).be("button", "inner")),
  38161. style: Sr(z(s) === z(u) ? z(c) : {}),
  38162. onKeydown: d[4] || (d[4] = uf(() => {
  38163. }, ["stop"]))
  38164. }, [
  38165. zn(f.$slots, "default", {}, () => [
  38166. Kt(Vi(f.label), 1)
  38167. ])
  38168. ], 38)
  38169. ], 2);
  38170. };
  38171. }
  38172. });
  38173. var vq = /* @__PURE__ */ Qn(BEe, [["__file", "radio-button.vue"]]);
  38174. const zEe = rr({
  38175. id: {
  38176. type: String,
  38177. default: void 0
  38178. },
  38179. size: A0,
  38180. disabled: Boolean,
  38181. modelValue: {
  38182. type: [String, Number, Boolean],
  38183. default: void 0
  38184. },
  38185. fill: {
  38186. type: String,
  38187. default: ""
  38188. },
  38189. label: {
  38190. type: String,
  38191. default: void 0
  38192. },
  38193. textColor: {
  38194. type: String,
  38195. default: ""
  38196. },
  38197. name: {
  38198. type: String,
  38199. default: void 0
  38200. },
  38201. validateEvent: {
  38202. type: Boolean,
  38203. default: !0
  38204. },
  38205. ...E0(["ariaLabel"])
  38206. }), VEe = dq, FEe = ["id", "aria-label", "aria-labelledby"], WEe = te({
  38207. name: "ElRadioGroup"
  38208. }), QEe = /* @__PURE__ */ te({
  38209. ...WEe,
  38210. props: zEe,
  38211. emits: VEe,
  38212. setup(t, { emit: e }) {
  38213. const n = t, r = Jn("radio"), i = aR(), a = U(), { formItem: o } = Mx(), { inputId: s, isLabeledByFormItem: l } = sR(n, {
  38214. formItemContext: o
  38215. }), u = (f) => {
  38216. e(Hs, f), Tt(() => e("change", f));
  38217. };
  38218. it(() => {
  38219. const f = a.value.querySelectorAll("[type=radio]"), d = f[0];
  38220. !Array.from(f).some((h) => h.checked) && d && (d.tabIndex = 0);
  38221. });
  38222. const c = L(() => n.name || i.value);
  38223. return pt(hq, tn({
  38224. ...ES(n),
  38225. changeEvent: u,
  38226. name: c
  38227. })), se(() => n.modelValue, () => {
  38228. n.validateEvent && (o == null || o.validate("change").catch((f) => Zi(f)));
  38229. }), T0({
  38230. from: "label",
  38231. replacement: "aria-label",
  38232. version: "2.8.0",
  38233. scope: "el-radio-group",
  38234. ref: "https://element-plus.org/en-US/component/radio.html"
  38235. }, L(() => !!n.label)), (f, d) => (pe(), Qe("div", {
  38236. id: z(s),
  38237. ref_key: "radioGroupRef",
  38238. ref: a,
  38239. class: Ye(z(r).b("group")),
  38240. role: "radiogroup",
  38241. "aria-label": z(l) ? void 0 : f.label || f.ariaLabel || "radio-group",
  38242. "aria-labelledby": z(l) ? z(o).labelId : void 0
  38243. }, [
  38244. zn(f.$slots, "default")
  38245. ], 10, FEe));
  38246. }
  38247. });
  38248. var gq = /* @__PURE__ */ Qn(QEe, [["__file", "radio-group.vue"]]);
  38249. Rf(REe, {
  38250. RadioButton: vq,
  38251. RadioGroup: gq
  38252. });
  38253. const mq = UD(gq), wg = UD(vq), HEe = rr({
  38254. color: {
  38255. type: jt(Object),
  38256. required: !0
  38257. },
  38258. vertical: {
  38259. type: Boolean,
  38260. default: !1
  38261. }
  38262. });
  38263. let VC = !1;
  38264. function mm(t, e) {
  38265. if (!qr)
  38266. return;
  38267. const n = function(a) {
  38268. var o;
  38269. (o = e.drag) == null || o.call(e, a);
  38270. }, r = function(a) {
  38271. var o;
  38272. document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, VC = !1, (o = e.end) == null || o.call(e, a);
  38273. }, i = function(a) {
  38274. var o;
  38275. VC || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), VC = !0, (o = e.start) == null || o.call(e, a));
  38276. };
  38277. t.addEventListener("mousedown", i), t.addEventListener("touchstart", i);
  38278. }
  38279. const GEe = (t) => {
  38280. const e = vn(), n = ae(), r = ae();
  38281. function i(o) {
  38282. o.target !== n.value && a(o);
  38283. }
  38284. function a(o) {
  38285. if (!r.value || !n.value)
  38286. return;
  38287. const l = e.vnode.el.getBoundingClientRect(), { clientX: u, clientY: c } = ZD(o);
  38288. if (t.vertical) {
  38289. let f = c - l.top;
  38290. 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));
  38291. } else {
  38292. let f = u - l.left;
  38293. 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));
  38294. }
  38295. }
  38296. return {
  38297. thumb: n,
  38298. bar: r,
  38299. handleDrag: a,
  38300. handleClick: i
  38301. };
  38302. }, jEe = (t, {
  38303. bar: e,
  38304. thumb: n,
  38305. handleDrag: r
  38306. }) => {
  38307. const i = vn(), a = Jn("color-alpha-slider"), o = U(0), s = U(0), l = U();
  38308. function u() {
  38309. if (!n.value || t.vertical)
  38310. return 0;
  38311. const y = i.vnode.el, b = t.color.get("alpha");
  38312. return y ? Math.round(b * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0;
  38313. }
  38314. function c() {
  38315. if (!n.value)
  38316. return 0;
  38317. const y = i.vnode.el;
  38318. if (!t.vertical)
  38319. return 0;
  38320. const b = t.color.get("alpha");
  38321. return y ? Math.round(b * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0;
  38322. }
  38323. function f() {
  38324. if (t.color && t.color.value) {
  38325. const { r: y, g: b, b: _ } = t.color.toRgb();
  38326. return `linear-gradient(to right, rgba(${y}, ${b}, ${_}, 0) 0%, rgba(${y}, ${b}, ${_}, 1) 100%)`;
  38327. }
  38328. return "";
  38329. }
  38330. function d() {
  38331. o.value = u(), s.value = c(), l.value = f();
  38332. }
  38333. it(() => {
  38334. if (!e.value || !n.value)
  38335. return;
  38336. const y = {
  38337. drag: (b) => {
  38338. r(b);
  38339. },
  38340. end: (b) => {
  38341. r(b);
  38342. }
  38343. };
  38344. mm(e.value, y), mm(n.value, y), d();
  38345. }), se(() => t.color.get("alpha"), () => d()), se(() => t.color.value, () => d());
  38346. const h = L(() => [a.b(), a.is("vertical", t.vertical)]), p = L(() => a.e("bar")), v = L(() => a.e("thumb")), g = L(() => ({ background: l.value })), m = L(() => ({
  38347. left: tA(o.value),
  38348. top: tA(s.value)
  38349. }));
  38350. return { rootKls: h, barKls: p, barStyle: g, thumbKls: v, thumbStyle: m, update: d };
  38351. }, ZEe = "ElColorAlphaSlider", UEe = te({
  38352. name: ZEe
  38353. }), XEe = /* @__PURE__ */ te({
  38354. ...UEe,
  38355. props: HEe,
  38356. setup(t, { expose: e }) {
  38357. const n = t, { bar: r, thumb: i, handleDrag: a, handleClick: o } = GEe(n), { rootKls: s, barKls: l, barStyle: u, thumbKls: c, thumbStyle: f, update: d } = jEe(n, {
  38358. bar: r,
  38359. thumb: i,
  38360. handleDrag: a
  38361. });
  38362. return e({
  38363. update: d,
  38364. bar: r,
  38365. thumb: i
  38366. }), (h, p) => (pe(), Qe("div", {
  38367. class: Ye(z(s))
  38368. }, [
  38369. He("div", {
  38370. ref_key: "bar",
  38371. ref: r,
  38372. class: Ye(z(l)),
  38373. style: Sr(z(u)),
  38374. onClick: p[0] || (p[0] = (...v) => z(o) && z(o)(...v))
  38375. }, null, 6),
  38376. He("div", {
  38377. ref_key: "thumb",
  38378. ref: i,
  38379. class: Ye(z(c)),
  38380. style: Sr(z(f))
  38381. }, null, 6)
  38382. ], 2));
  38383. }
  38384. });
  38385. var YEe = /* @__PURE__ */ Qn(XEe, [["__file", "alpha-slider.vue"]]);
  38386. const qEe = te({
  38387. name: "ElColorHueSlider",
  38388. props: {
  38389. color: {
  38390. type: Object,
  38391. required: !0
  38392. },
  38393. vertical: Boolean
  38394. },
  38395. setup(t) {
  38396. const e = Jn("color-hue-slider"), n = vn(), r = U(), i = U(), a = U(0), o = U(0), s = L(() => t.color.get("hue"));
  38397. se(() => s.value, () => {
  38398. d();
  38399. });
  38400. function l(h) {
  38401. h.target !== r.value && u(h);
  38402. }
  38403. function u(h) {
  38404. if (!i.value || !r.value)
  38405. return;
  38406. const v = n.vnode.el.getBoundingClientRect(), { clientX: g, clientY: m } = ZD(h);
  38407. let y;
  38408. if (t.vertical) {
  38409. let b = m - v.top;
  38410. b = Math.min(b, v.height - r.value.offsetHeight / 2), b = Math.max(r.value.offsetHeight / 2, b), y = Math.round((b - r.value.offsetHeight / 2) / (v.height - r.value.offsetHeight) * 360);
  38411. } else {
  38412. let b = g - v.left;
  38413. b = Math.min(b, v.width - r.value.offsetWidth / 2), b = Math.max(r.value.offsetWidth / 2, b), y = Math.round((b - r.value.offsetWidth / 2) / (v.width - r.value.offsetWidth) * 360);
  38414. }
  38415. t.color.set("hue", y);
  38416. }
  38417. function c() {
  38418. if (!r.value)
  38419. return 0;
  38420. const h = n.vnode.el;
  38421. if (t.vertical)
  38422. return 0;
  38423. const p = t.color.get("hue");
  38424. return h ? Math.round(p * (h.offsetWidth - r.value.offsetWidth / 2) / 360) : 0;
  38425. }
  38426. function f() {
  38427. if (!r.value)
  38428. return 0;
  38429. const h = n.vnode.el;
  38430. if (!t.vertical)
  38431. return 0;
  38432. const p = t.color.get("hue");
  38433. return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0;
  38434. }
  38435. function d() {
  38436. a.value = c(), o.value = f();
  38437. }
  38438. return it(() => {
  38439. if (!i.value || !r.value)
  38440. return;
  38441. const h = {
  38442. drag: (p) => {
  38443. u(p);
  38444. },
  38445. end: (p) => {
  38446. u(p);
  38447. }
  38448. };
  38449. mm(i.value, h), mm(r.value, h), d();
  38450. }), {
  38451. bar: i,
  38452. thumb: r,
  38453. thumbLeft: a,
  38454. thumbTop: o,
  38455. hueValue: s,
  38456. handleClick: l,
  38457. update: d,
  38458. ns: e
  38459. };
  38460. }
  38461. });
  38462. function KEe(t, e, n, r, i, a) {
  38463. return pe(), Qe("div", {
  38464. class: Ye([t.ns.b(), t.ns.is("vertical", t.vertical)])
  38465. }, [
  38466. He("div", {
  38467. ref: "bar",
  38468. class: Ye(t.ns.e("bar")),
  38469. onClick: e[0] || (e[0] = (...o) => t.handleClick && t.handleClick(...o))
  38470. }, null, 2),
  38471. He("div", {
  38472. ref: "thumb",
  38473. class: Ye(t.ns.e("thumb")),
  38474. style: Sr({
  38475. left: t.thumbLeft + "px",
  38476. top: t.thumbTop + "px"
  38477. })
  38478. }, null, 6)
  38479. ], 2);
  38480. }
  38481. var JEe = /* @__PURE__ */ Qn(qEe, [["render", KEe], ["__file", "hue-slider.vue"]]);
  38482. const eMe = rr({
  38483. modelValue: String,
  38484. id: String,
  38485. showAlpha: Boolean,
  38486. colorFormat: String,
  38487. disabled: Boolean,
  38488. size: A0,
  38489. popperClass: {
  38490. type: String,
  38491. default: ""
  38492. },
  38493. label: {
  38494. type: String,
  38495. default: void 0
  38496. },
  38497. tabindex: {
  38498. type: [String, Number],
  38499. default: 0
  38500. },
  38501. teleported: hR.teleported,
  38502. predefine: {
  38503. type: jt(Array)
  38504. },
  38505. validateEvent: {
  38506. type: Boolean,
  38507. default: !0
  38508. },
  38509. ...E0(["ariaLabel"])
  38510. }), tMe = {
  38511. [Hs]: (t) => Oa(t) || Gl(t),
  38512. [NY]: (t) => Oa(t) || Gl(t),
  38513. activeChange: (t) => Oa(t) || Gl(t),
  38514. focus: (t) => t instanceof FocusEvent,
  38515. blur: (t) => t instanceof FocusEvent
  38516. }, yq = Symbol("colorPickerContextKey"), $6 = function(t, e, n) {
  38517. return [
  38518. t,
  38519. e * n / ((t = (2 - e) * n) < 1 ? t : 2 - t) || 0,
  38520. t / 2
  38521. ];
  38522. }, nMe = function(t) {
  38523. return typeof t == "string" && t.includes(".") && Number.parseFloat(t) === 1;
  38524. }, rMe = function(t) {
  38525. return typeof t == "string" && t.includes("%");
  38526. }, Kd = function(t, e) {
  38527. nMe(t) && (t = "100%");
  38528. const n = rMe(t);
  38529. 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);
  38530. }, A6 = {
  38531. 10: "A",
  38532. 11: "B",
  38533. 12: "C",
  38534. 13: "D",
  38535. 14: "E",
  38536. 15: "F"
  38537. }, k_ = (t) => {
  38538. t = Math.min(Math.round(t), 255);
  38539. const e = Math.floor(t / 16), n = t % 16;
  38540. return `${A6[e] || e}${A6[n] || n}`;
  38541. }, E6 = function({ r: t, g: e, b: n }) {
  38542. return Number.isNaN(+t) || Number.isNaN(+e) || Number.isNaN(+n) ? "" : `#${k_(t)}${k_(e)}${k_(n)}`;
  38543. }, FC = {
  38544. A: 10,
  38545. B: 11,
  38546. C: 12,
  38547. D: 13,
  38548. E: 14,
  38549. F: 15
  38550. }, Bu = function(t) {
  38551. return t.length === 2 ? (FC[t[0].toUpperCase()] || +t[0]) * 16 + (FC[t[1].toUpperCase()] || +t[1]) : FC[t[1].toUpperCase()] || +t[1];
  38552. }, iMe = function(t, e, n) {
  38553. e = e / 100, n = n / 100;
  38554. let r = e;
  38555. const i = Math.max(n, 0.01);
  38556. n *= 2, e *= n <= 1 ? n : 2 - n, r *= i <= 1 ? i : 2 - i;
  38557. const a = (n + e) / 2, o = n === 0 ? 2 * r / (i + r) : 2 * e / (n + e);
  38558. return {
  38559. h: t,
  38560. s: o * 100,
  38561. v: a * 100
  38562. };
  38563. }, M6 = (t, e, n) => {
  38564. t = Kd(t, 255), e = Kd(e, 255), n = Kd(n, 255);
  38565. const r = Math.max(t, e, n), i = Math.min(t, e, n);
  38566. let a;
  38567. const o = r, s = r - i, l = r === 0 ? 0 : s / r;
  38568. if (r === i)
  38569. a = 0;
  38570. else {
  38571. switch (r) {
  38572. case t: {
  38573. a = (e - n) / s + (e < n ? 6 : 0);
  38574. break;
  38575. }
  38576. case e: {
  38577. a = (n - t) / s + 2;
  38578. break;
  38579. }
  38580. case n: {
  38581. a = (t - e) / s + 4;
  38582. break;
  38583. }
  38584. }
  38585. a /= 6;
  38586. }
  38587. return { h: a * 360, s: l * 100, v: o * 100 };
  38588. }, tv = function(t, e, n) {
  38589. t = Kd(t, 360) * 6, e = Kd(e, 100), n = Kd(n, 100);
  38590. 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];
  38591. return {
  38592. r: Math.round(u * 255),
  38593. g: Math.round(c * 255),
  38594. b: Math.round(f * 255)
  38595. };
  38596. };
  38597. class Cg {
  38598. constructor(e = {}) {
  38599. this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = "";
  38600. for (const n in e)
  38601. H1(e, n) && (this[n] = e[n]);
  38602. e.value ? this.fromString(e.value) : this.doOnChange();
  38603. }
  38604. set(e, n) {
  38605. if (arguments.length === 1 && typeof e == "object") {
  38606. for (const r in e)
  38607. H1(e, r) && this.set(r, e[r]);
  38608. return;
  38609. }
  38610. this[`_${e}`] = n, this.doOnChange();
  38611. }
  38612. get(e) {
  38613. return e === "alpha" ? Math.floor(this[`_${e}`]) : this[`_${e}`];
  38614. }
  38615. toRgb() {
  38616. return tv(this._hue, this._saturation, this._value);
  38617. }
  38618. fromString(e) {
  38619. if (!e) {
  38620. this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange();
  38621. return;
  38622. }
  38623. const n = (r, i, a) => {
  38624. 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();
  38625. };
  38626. if (e.includes("hsl")) {
  38627. 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));
  38628. if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
  38629. const { h: i, s: a, v: o } = iMe(r[0], r[1], r[2]);
  38630. n(i, a, o);
  38631. }
  38632. } else if (e.includes("hsv")) {
  38633. 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));
  38634. 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]);
  38635. } else if (e.includes("rgb")) {
  38636. 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));
  38637. if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
  38638. const { h: i, s: a, v: o } = M6(r[0], r[1], r[2]);
  38639. n(i, a, o);
  38640. }
  38641. } else if (e.includes("#")) {
  38642. const r = e.replace("#", "").trim();
  38643. if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))
  38644. return;
  38645. let i, a, o;
  38646. r.length === 3 ? (i = Bu(r[0] + r[0]), a = Bu(r[1] + r[1]), o = Bu(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (i = Bu(r.slice(0, 2)), a = Bu(r.slice(2, 4)), o = Bu(r.slice(4, 6))), r.length === 8 ? this._alpha = Bu(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100);
  38647. const { h: s, s: l, v: u } = M6(i, a, o);
  38648. n(s, l, u);
  38649. }
  38650. }
  38651. compare(e) {
  38652. 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;
  38653. }
  38654. doOnChange() {
  38655. const { _hue: e, _saturation: n, _value: r, _alpha: i, format: a } = this;
  38656. if (this.enableAlpha)
  38657. switch (a) {
  38658. case "hsl": {
  38659. const o = $6(e, n / 100, r / 100);
  38660. this.value = `hsla(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%, ${this.get("alpha") / 100})`;
  38661. break;
  38662. }
  38663. case "hsv": {
  38664. this.value = `hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha") / 100})`;
  38665. break;
  38666. }
  38667. case "hex": {
  38668. this.value = `${E6(tv(e, n, r))}${k_(i * 255 / 100)}`;
  38669. break;
  38670. }
  38671. default: {
  38672. const { r: o, g: s, b: l } = tv(e, n, r);
  38673. this.value = `rgba(${o}, ${s}, ${l}, ${this.get("alpha") / 100})`;
  38674. }
  38675. }
  38676. else
  38677. switch (a) {
  38678. case "hsl": {
  38679. const o = $6(e, n / 100, r / 100);
  38680. this.value = `hsl(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%)`;
  38681. break;
  38682. }
  38683. case "hsv": {
  38684. this.value = `hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;
  38685. break;
  38686. }
  38687. case "rgb": {
  38688. const { r: o, g: s, b: l } = tv(e, n, r);
  38689. this.value = `rgb(${o}, ${s}, ${l})`;
  38690. break;
  38691. }
  38692. default:
  38693. this.value = E6(tv(e, n, r));
  38694. }
  38695. }
  38696. }
  38697. const aMe = te({
  38698. props: {
  38699. colors: {
  38700. type: Array,
  38701. required: !0
  38702. },
  38703. color: {
  38704. type: Object,
  38705. required: !0
  38706. },
  38707. enableAlpha: {
  38708. type: Boolean,
  38709. required: !0
  38710. }
  38711. },
  38712. setup(t) {
  38713. const e = Jn("color-predefine"), { currentColor: n } = Ge(yq), r = U(a(t.colors, t.color));
  38714. se(() => n.value, (o) => {
  38715. const s = new Cg();
  38716. s.fromString(o), r.value.forEach((l) => {
  38717. l.selected = s.compare(l);
  38718. });
  38719. }), ht(() => {
  38720. r.value = a(t.colors, t.color);
  38721. });
  38722. function i(o) {
  38723. t.color.fromString(t.colors[o]);
  38724. }
  38725. function a(o, s) {
  38726. return o.map((l) => {
  38727. const u = new Cg();
  38728. return u.enableAlpha = t.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u;
  38729. });
  38730. }
  38731. return {
  38732. rgbaColors: r,
  38733. handleSelect: i,
  38734. ns: e
  38735. };
  38736. }
  38737. }), oMe = ["onClick"];
  38738. function sMe(t, e, n, r, i, a) {
  38739. return pe(), Qe("div", {
  38740. class: Ye(t.ns.b())
  38741. }, [
  38742. He("div", {
  38743. class: Ye(t.ns.e("colors"))
  38744. }, [
  38745. (pe(!0), Qe(wt, null, cg(t.rgbaColors, (o, s) => (pe(), Qe("div", {
  38746. key: t.colors[s],
  38747. class: Ye([
  38748. t.ns.e("color-selector"),
  38749. t.ns.is("alpha", o._alpha < 100),
  38750. { selected: o.selected }
  38751. ]),
  38752. onClick: (l) => t.handleSelect(s)
  38753. }, [
  38754. He("div", {
  38755. style: Sr({ backgroundColor: o.value })
  38756. }, null, 4)
  38757. ], 10, oMe))), 128))
  38758. ], 2)
  38759. ], 2);
  38760. }
  38761. var lMe = /* @__PURE__ */ Qn(aMe, [["render", sMe], ["__file", "predefine.vue"]]);
  38762. const uMe = te({
  38763. name: "ElSlPanel",
  38764. props: {
  38765. color: {
  38766. type: Object,
  38767. required: !0
  38768. }
  38769. },
  38770. setup(t) {
  38771. const e = Jn("color-svpanel"), n = vn(), r = U(0), i = U(0), a = U("hsl(0, 100%, 50%)"), o = L(() => {
  38772. const u = t.color.get("hue"), c = t.color.get("value");
  38773. return { hue: u, value: c };
  38774. });
  38775. function s() {
  38776. const u = t.color.get("saturation"), c = t.color.get("value"), f = n.vnode.el, { clientWidth: d, clientHeight: h } = f;
  38777. i.value = u * d / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${t.color.get("hue")}, 100%, 50%)`;
  38778. }
  38779. function l(u) {
  38780. const f = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: h } = ZD(u);
  38781. let p = d - f.left, v = h - f.top;
  38782. 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({
  38783. saturation: p / f.width * 100,
  38784. value: 100 - v / f.height * 100
  38785. });
  38786. }
  38787. return se(() => o.value, () => {
  38788. s();
  38789. }), it(() => {
  38790. mm(n.vnode.el, {
  38791. drag: (u) => {
  38792. l(u);
  38793. },
  38794. end: (u) => {
  38795. l(u);
  38796. }
  38797. }), s();
  38798. }), {
  38799. cursorTop: r,
  38800. cursorLeft: i,
  38801. background: a,
  38802. colorValue: o,
  38803. handleDrag: l,
  38804. update: s,
  38805. ns: e
  38806. };
  38807. }
  38808. }), cMe = /* @__PURE__ */ He("div", null, null, -1), fMe = [
  38809. cMe
  38810. ];
  38811. function dMe(t, e, n, r, i, a) {
  38812. return pe(), Qe("div", {
  38813. class: Ye(t.ns.b()),
  38814. style: Sr({
  38815. backgroundColor: t.background
  38816. })
  38817. }, [
  38818. He("div", {
  38819. class: Ye(t.ns.e("white"))
  38820. }, null, 2),
  38821. He("div", {
  38822. class: Ye(t.ns.e("black"))
  38823. }, null, 2),
  38824. He("div", {
  38825. class: Ye(t.ns.e("cursor")),
  38826. style: Sr({
  38827. top: t.cursorTop + "px",
  38828. left: t.cursorLeft + "px"
  38829. })
  38830. }, fMe, 6)
  38831. ], 6);
  38832. }
  38833. var hMe = /* @__PURE__ */ Qn(uMe, [["render", dMe], ["__file", "sv-panel.vue"]]);
  38834. const pMe = ["onKeydown"], vMe = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"], gMe = te({
  38835. name: "ElColorPicker"
  38836. }), mMe = /* @__PURE__ */ te({
  38837. ...gMe,
  38838. props: eMe,
  38839. emits: tMe,
  38840. setup(t, { expose: e, emit: n }) {
  38841. const r = t, { t: i } = $$e(), a = Jn("color"), { formItem: o } = Mx(), s = Ex(), l = M0(), { inputId: u, isLabeledByFormItem: c } = sR(r, {
  38842. formItemContext: o
  38843. }), f = U(), d = U(), h = U(), p = U(), v = U(), g = U(), {
  38844. isFocused: m,
  38845. handleFocus: y,
  38846. handleBlur: b
  38847. } = eq(v, {
  38848. beforeBlur(H) {
  38849. var G;
  38850. return (G = p.value) == null ? void 0 : G.isFocusInsideContent(H);
  38851. },
  38852. afterBlur() {
  38853. R(!1), W();
  38854. }
  38855. }), _ = (H) => {
  38856. if (l.value)
  38857. return X();
  38858. y(H);
  38859. };
  38860. let O = !0;
  38861. const S = tn(new Cg({
  38862. enableAlpha: r.showAlpha,
  38863. format: r.colorFormat || "",
  38864. value: r.modelValue
  38865. })), x = U(!1), C = U(!1), T = U(""), w = L(() => !r.modelValue && !C.value ? "transparent" : E(S, r.showAlpha)), P = L(() => !r.modelValue && !C.value ? "" : S.value), $ = L(() => c.value ? void 0 : r.label || r.ariaLabel || i("el.colorpicker.defaultLabel"));
  38866. T0({
  38867. from: "label",
  38868. replacement: "aria-label",
  38869. version: "2.8.0",
  38870. scope: "el-color-picker",
  38871. ref: "https://element-plus.org/en-US/component/color-picker.html"
  38872. }, L(() => !!r.label));
  38873. const A = L(() => c.value ? o == null ? void 0 : o.labelId : void 0), D = L(() => [
  38874. a.b("picker"),
  38875. a.is("disabled", l.value),
  38876. a.bm("picker", s.value),
  38877. a.is("focused", m.value)
  38878. ]);
  38879. function E(H, G) {
  38880. if (!(H instanceof Cg))
  38881. throw new TypeError("color should be instance of _color Class");
  38882. const { r: re, g: fe, b: de } = H.toRgb();
  38883. return G ? `rgba(${re}, ${fe}, ${de}, ${H.get("alpha") / 100})` : `rgb(${re}, ${fe}, ${de})`;
  38884. }
  38885. function R(H) {
  38886. x.value = H;
  38887. }
  38888. const N = XI(R, 100, { leading: !0 });
  38889. function V() {
  38890. l.value || R(!0);
  38891. }
  38892. function B() {
  38893. N(!1), W();
  38894. }
  38895. function W() {
  38896. Tt(() => {
  38897. r.modelValue ? S.fromString(r.modelValue) : (S.value = "", Tt(() => {
  38898. C.value = !1;
  38899. }));
  38900. });
  38901. }
  38902. function F() {
  38903. l.value || N(!x.value);
  38904. }
  38905. function Q() {
  38906. S.fromString(T.value);
  38907. }
  38908. function Z() {
  38909. const H = S.value;
  38910. n(Hs, H), n("change", H), r.validateEvent && (o == null || o.validate("change").catch((G) => Zi(G))), N(!1), Tt(() => {
  38911. const G = new Cg({
  38912. enableAlpha: r.showAlpha,
  38913. format: r.colorFormat || "",
  38914. value: r.modelValue
  38915. });
  38916. S.compare(G) || W();
  38917. });
  38918. }
  38919. function ne() {
  38920. N(!1), n(Hs, null), n("change", null), r.modelValue !== null && r.validateEvent && (o == null || o.validate("change").catch((H) => Zi(H))), W();
  38921. }
  38922. function ee(H) {
  38923. if (x.value && (B(), m.value)) {
  38924. const G = new FocusEvent("focus", H);
  38925. b(G);
  38926. }
  38927. }
  38928. function oe(H) {
  38929. H.preventDefault(), H.stopPropagation(), R(!1), W();
  38930. }
  38931. function K(H) {
  38932. switch (H.code) {
  38933. case Xc.enter:
  38934. case Xc.space:
  38935. H.preventDefault(), H.stopPropagation(), V(), g.value.focus();
  38936. break;
  38937. case Xc.esc:
  38938. oe(H);
  38939. break;
  38940. }
  38941. }
  38942. function ie() {
  38943. v.value.focus();
  38944. }
  38945. function X() {
  38946. v.value.blur();
  38947. }
  38948. return it(() => {
  38949. r.modelValue && (T.value = P.value);
  38950. }), se(() => r.modelValue, (H) => {
  38951. H ? H && H !== S.value && (O = !1, S.fromString(H)) : C.value = !1;
  38952. }), se(() => P.value, (H) => {
  38953. T.value = H, O && n("activeChange", H), O = !0;
  38954. }), se(() => S.value, () => {
  38955. !r.modelValue && !C.value && (C.value = !0);
  38956. }), se(() => x.value, () => {
  38957. Tt(() => {
  38958. var H, G, re;
  38959. (H = f.value) == null || H.update(), (G = d.value) == null || G.update(), (re = h.value) == null || re.update();
  38960. });
  38961. }), pt(yq, {
  38962. currentColor: P
  38963. }), e({
  38964. color: S,
  38965. show: V,
  38966. hide: B,
  38967. focus: ie,
  38968. blur: X
  38969. }), (H, G) => (pe(), je(z(mEe), {
  38970. ref_key: "popper",
  38971. ref: p,
  38972. visible: x.value,
  38973. "show-arrow": !1,
  38974. "fallback-placements": ["bottom", "top", "right", "left"],
  38975. offset: 0,
  38976. "gpu-acceleration": !1,
  38977. "popper-class": [z(a).be("picker", "panel"), z(a).b("dropdown"), H.popperClass],
  38978. "stop-popper-mouse-event": !1,
  38979. effect: "light",
  38980. trigger: "click",
  38981. teleported: H.teleported,
  38982. transition: `${z(a).namespace.value}-zoom-in-top`,
  38983. persistent: "",
  38984. onHide: G[2] || (G[2] = (re) => R(!1))
  38985. }, {
  38986. content: we(() => [
  38987. Oi((pe(), Qe("div", {
  38988. onKeydown: q4(oe, ["esc"])
  38989. }, [
  38990. He("div", {
  38991. class: Ye(z(a).be("dropdown", "main-wrapper"))
  38992. }, [
  38993. M(JEe, {
  38994. ref_key: "hue",
  38995. ref: f,
  38996. class: "hue-slider",
  38997. color: z(S),
  38998. vertical: ""
  38999. }, null, 8, ["color"]),
  39000. M(hMe, {
  39001. ref_key: "sv",
  39002. ref: d,
  39003. color: z(S)
  39004. }, null, 8, ["color"])
  39005. ], 2),
  39006. H.showAlpha ? (pe(), je(YEe, {
  39007. key: 0,
  39008. ref_key: "alpha",
  39009. ref: h,
  39010. color: z(S)
  39011. }, null, 8, ["color"])) : _t("v-if", !0),
  39012. H.predefine ? (pe(), je(lMe, {
  39013. key: 1,
  39014. ref: "predefine",
  39015. "enable-alpha": H.showAlpha,
  39016. color: z(S),
  39017. colors: H.predefine
  39018. }, null, 8, ["enable-alpha", "color", "colors"])) : _t("v-if", !0),
  39019. He("div", {
  39020. class: Ye(z(a).be("dropdown", "btns"))
  39021. }, [
  39022. He("span", {
  39023. class: Ye(z(a).be("dropdown", "value"))
  39024. }, [
  39025. M(z(lR), {
  39026. ref_key: "inputRef",
  39027. ref: g,
  39028. modelValue: T.value,
  39029. "onUpdate:modelValue": G[0] || (G[0] = (re) => T.value = re),
  39030. "validate-event": !1,
  39031. size: "small",
  39032. onKeyup: q4(Q, ["enter"]),
  39033. onBlur: Q
  39034. }, null, 8, ["modelValue", "onKeyup"])
  39035. ], 2),
  39036. M(z(C6), {
  39037. class: Ye(z(a).be("dropdown", "link-btn")),
  39038. text: "",
  39039. size: "small",
  39040. onClick: ne
  39041. }, {
  39042. default: we(() => [
  39043. Kt(Vi(z(i)("el.colorpicker.clear")), 1)
  39044. ]),
  39045. _: 1
  39046. }, 8, ["class"]),
  39047. M(z(C6), {
  39048. plain: "",
  39049. size: "small",
  39050. class: Ye(z(a).be("dropdown", "btn")),
  39051. onClick: Z
  39052. }, {
  39053. default: we(() => [
  39054. Kt(Vi(z(i)("el.colorpicker.confirm")), 1)
  39055. ]),
  39056. _: 1
  39057. }, 8, ["class"])
  39058. ], 2)
  39059. ], 40, pMe)), [
  39060. [z(AEe), ee]
  39061. ])
  39062. ]),
  39063. default: we(() => [
  39064. He("div", _n({
  39065. id: z(u),
  39066. ref_key: "triggerRef",
  39067. ref: v
  39068. }, H.$attrs, {
  39069. class: z(D),
  39070. role: "button",
  39071. "aria-label": z($),
  39072. "aria-labelledby": z(A),
  39073. "aria-description": z(i)("el.colorpicker.description", { color: H.modelValue || "" }),
  39074. "aria-disabled": z(l),
  39075. tabindex: z(l) ? -1 : H.tabindex,
  39076. onKeydown: K,
  39077. onFocus: _,
  39078. onBlur: G[1] || (G[1] = (...re) => z(b) && z(b)(...re))
  39079. }), [
  39080. z(l) ? (pe(), Qe("div", {
  39081. key: 0,
  39082. class: Ye(z(a).be("picker", "mask"))
  39083. }, null, 2)) : _t("v-if", !0),
  39084. He("div", {
  39085. class: Ye(z(a).be("picker", "trigger")),
  39086. onClick: F
  39087. }, [
  39088. He("span", {
  39089. class: Ye([z(a).be("picker", "color"), z(a).is("alpha", H.showAlpha)])
  39090. }, [
  39091. He("span", {
  39092. class: Ye(z(a).be("picker", "color-inner")),
  39093. style: Sr({
  39094. backgroundColor: z(w)
  39095. })
  39096. }, [
  39097. Oi(M(z(Cs), {
  39098. class: Ye([z(a).be("picker", "icon"), z(a).is("icon-arrow-down")])
  39099. }, {
  39100. default: we(() => [
  39101. M(z(i$e))
  39102. ]),
  39103. _: 1
  39104. }, 8, ["class"]), [
  39105. [zs, H.modelValue || C.value]
  39106. ]),
  39107. Oi(M(z(Cs), {
  39108. class: Ye([z(a).be("picker", "empty"), z(a).is("icon-close")])
  39109. }, {
  39110. default: we(() => [
  39111. M(z(u$e))
  39112. ]),
  39113. _: 1
  39114. }, 8, ["class"]), [
  39115. [zs, !H.modelValue && !C.value]
  39116. ])
  39117. ], 6)
  39118. ], 2)
  39119. ], 2)
  39120. ], 16, vMe)
  39121. ]),
  39122. _: 1
  39123. }, 8, ["visible", "popper-class", "teleported", "transition"]));
  39124. }
  39125. });
  39126. var yMe = /* @__PURE__ */ Qn(mMe, [["__file", "color-picker.vue"]]);
  39127. const Jd = Rf(yMe), bq = (t) => (MS("data-v-70598cf2"), t = t(), IS(), t), bMe = {
  39128. key: 0,
  39129. class: "color-box"
  39130. }, _Me = { class: "img-preview" }, OMe = /* @__PURE__ */ bq(() => /* @__PURE__ */ He("div", { class: "img-empty" }, "未选择", -1)), SMe = /* @__PURE__ */ bq(() => /* @__PURE__ */ He("div", { class: "img-tip" }, "选择素材", -1)), xMe = /* @__PURE__ */ te({
  39131. __name: "BackgroundSelect",
  39132. props: {
  39133. value: { default: () => ({
  39134. type: "none",
  39135. color: "",
  39136. image: "",
  39137. fillType: ""
  39138. }) },
  39139. filterOptions: {}
  39140. },
  39141. emits: ["update:value"],
  39142. setup(t, { emit: e }) {
  39143. const n = t, r = e, i = U(n.value), a = [
  39144. { label: "无", value: "none" },
  39145. { label: "颜色", value: "color" },
  39146. { label: "图片", value: "image" }
  39147. ], o = L(() => n.filterOptions ? a.filter((l) => {
  39148. var u;
  39149. return !((u = n.filterOptions) != null && u.includes(l.value));
  39150. }) : a);
  39151. se(
  39152. () => i.value,
  39153. () => {
  39154. r("update:value", i.value);
  39155. },
  39156. {
  39157. deep: !0
  39158. }
  39159. );
  39160. const s = (l) => {
  39161. l === "color" && !i.value.color && (i.value.color = "#0B074BFF");
  39162. };
  39163. return (l, u) => (pe(), Qe(wt, null, [
  39164. M(z(di), {
  39165. value: i.value.type,
  39166. "onUpdate:value": u[0] || (u[0] = (c) => i.value.type = c),
  39167. style: { width: "100%" },
  39168. options: o.value,
  39169. onChange: s
  39170. }, null, 8, ["value", "options"]),
  39171. i.value.type === "color" ? (pe(), Qe("div", bMe, [
  39172. M(z(Jd), {
  39173. modelValue: i.value.color,
  39174. "onUpdate:modelValue": u[1] || (u[1] = (c) => i.value.color = c),
  39175. "color-format": "hex",
  39176. "show-alpha": "",
  39177. size: "small"
  39178. }, null, 8, ["modelValue"]),
  39179. M(z(lR), {
  39180. modelValue: i.value.color,
  39181. "onUpdate:modelValue": u[2] || (u[2] = (c) => i.value.color = c),
  39182. size: "small"
  39183. }, null, 8, ["modelValue"])
  39184. ])) : i.value.type === "image" ? (pe(), Qe(wt, { key: 1 }, [
  39185. He("div", _Me, [
  39186. OMe,
  39187. M(z(Al), {
  39188. src: i.value.image
  39189. }, null, 8, ["src"]),
  39190. SMe
  39191. ]),
  39192. M(z(mq), {
  39193. modelValue: i.value.fillType,
  39194. "onUpdate:modelValue": u[3] || (u[3] = (c) => i.value.fillType = c)
  39195. }, {
  39196. default: we(() => [
  39197. M(z(wg), { value: "cover" }, {
  39198. default: we(() => [
  39199. Kt("填充")
  39200. ]),
  39201. _: 1
  39202. }),
  39203. M(z(wg), { value: "contain" }, {
  39204. default: we(() => [
  39205. Kt("适应")
  39206. ]),
  39207. _: 1
  39208. }),
  39209. M(z(wg), { value: "stretch" }, {
  39210. default: we(() => [
  39211. Kt("拉伸")
  39212. ]),
  39213. _: 1
  39214. })
  39215. ]),
  39216. _: 1
  39217. }, 8, ["modelValue"])
  39218. ], 64)) : _t("", !0)
  39219. ], 64));
  39220. }
  39221. }), wMe = /* @__PURE__ */ $r(xMe, [["__scopeId", "data-v-70598cf2"]]), CMe = /* @__PURE__ */ te({
  39222. __name: "ColorSelect",
  39223. props: {
  39224. value: {},
  39225. gradient: { type: Boolean, default: !0 }
  39226. },
  39227. emits: ["update:value"],
  39228. setup(t, { emit: e }) {
  39229. var s, l;
  39230. const n = e, r = t, i = U(((s = r.value) == null ? void 0 : s.length) <= 9 || !r.value ? "pure" : "gradient"), a = U(r.value), o = U(((l = r.value) == null ? void 0 : l.length) >= 9 ? r.value.slice(22).replace(")", "").split(",") : ["#4ba9ff", "#fff"]);
  39231. return se(
  39232. () => [i.value, a.value, o.value],
  39233. () => {
  39234. 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);
  39235. },
  39236. {
  39237. deep: !0
  39238. }
  39239. ), se(
  39240. () => r.gradient,
  39241. (u) => {
  39242. u || (i.value = "pure", a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value);
  39243. }
  39244. ), (u, c) => (pe(), Qe(wt, null, [
  39245. u.gradient ? (pe(), je(z(mq), {
  39246. key: 0,
  39247. modelValue: i.value,
  39248. "onUpdate:modelValue": c[0] || (c[0] = (f) => i.value = f),
  39249. size: "small",
  39250. style: { width: "100%" }
  39251. }, {
  39252. default: we(() => [
  39253. M(z(wg), { value: "pure" }, {
  39254. default: we(() => [
  39255. Kt("单色")
  39256. ]),
  39257. _: 1
  39258. }),
  39259. M(z(wg), { value: "gradient" }, {
  39260. default: we(() => [
  39261. Kt("渐变色")
  39262. ]),
  39263. _: 1
  39264. })
  39265. ]),
  39266. _: 1
  39267. }, 8, ["modelValue"])) : _t("", !0),
  39268. i.value === "pure" ? (pe(), Qe("div", {
  39269. key: 1,
  39270. class: "color-box",
  39271. style: Sr({ marginTop: u.gradient ? "12px" : "0" })
  39272. }, [
  39273. M(z(Jd), {
  39274. modelValue: a.value,
  39275. "onUpdate:modelValue": c[1] || (c[1] = (f) => a.value = f),
  39276. "color-format": "hex",
  39277. "show-alpha": "",
  39278. size: "small"
  39279. }, null, 8, ["modelValue"]),
  39280. M(z(lR), {
  39281. modelValue: a.value,
  39282. "onUpdate:modelValue": c[2] || (c[2] = (f) => a.value = f),
  39283. size: "small"
  39284. }, null, 8, ["modelValue"])
  39285. ], 4)) : i.value === "gradient" ? (pe(), Qe("div", {
  39286. key: 2,
  39287. class: "gradient-box",
  39288. style: Sr({ background: a.value })
  39289. }, [
  39290. M(z(Jd), {
  39291. modelValue: o.value[0],
  39292. "onUpdate:modelValue": c[3] || (c[3] = (f) => o.value[0] = f),
  39293. "color-format": "hex",
  39294. "show-alpha": "",
  39295. size: "small"
  39296. }, null, 8, ["modelValue"]),
  39297. M(z(Jd), {
  39298. modelValue: o.value[1],
  39299. "onUpdate:modelValue": c[4] || (c[4] = (f) => o.value[1] = f),
  39300. "color-format": "hex",
  39301. "show-alpha": "",
  39302. size: "small"
  39303. }, null, 8, ["modelValue"])
  39304. ], 4)) : _t("", !0)
  39305. ], 64));
  39306. }
  39307. }), TMe = /* @__PURE__ */ $r(CMe, [["__scopeId", "data-v-d5768739"]]), X1 = [
  39308. {
  39309. name: "清新",
  39310. color: ["#00a8e1", "#99cc00", "#e30039", "#fcd300", "#800080"]
  39311. },
  39312. {
  39313. name: "复古",
  39314. color: ["#FFA69E", "#FAE3D9", "#B8F2E6", "#56E39F", "#3A837D"]
  39315. },
  39316. {
  39317. name: "商务",
  39318. color: ["#194f97", "#555555", "#bd6b08", "#00686b", "#c82d31"]
  39319. },
  39320. {
  39321. name: "经典",
  39322. color: ["#002c53", "#ffa510", "#0c84c6", "#ffffff", "#f74d4d"]
  39323. },
  39324. {
  39325. name: "怀旧",
  39326. color: ["#3b6291", "#943c39", "#779043", "#624c7c", "#388498"]
  39327. }
  39328. ], PMe = {
  39329. // 调色盘-预设颜色
  39330. color: X1[0].color,
  39331. // 标题
  39332. title: {
  39333. show: !0,
  39334. left: "center",
  39335. top: 8,
  39336. textStyle: {
  39337. color: "#FFFFFFFF",
  39338. fontSize: 16,
  39339. fontWeight: "normal"
  39340. }
  39341. },
  39342. // 图例
  39343. legend: {
  39344. show: !0,
  39345. textStyle: {
  39346. color: "#FFFFFFFF"
  39347. },
  39348. top: 32,
  39349. bottom: "auto",
  39350. left: "center",
  39351. right: "auto"
  39352. },
  39353. // 布局
  39354. grid: {
  39355. bottom: 34,
  39356. right: 20,
  39357. left: 20,
  39358. top: 60
  39359. },
  39360. // x轴
  39361. xAxis: {
  39362. type: "category",
  39363. name: "",
  39364. nameLocation: "middle",
  39365. nameTruncate: {
  39366. ellipsis: "...",
  39367. maxWidth: 80
  39368. },
  39369. nameTextStyle: {
  39370. color: "#FFFFFFFF",
  39371. fontSize: 12,
  39372. fontWeight: "normal",
  39373. fontStyle: "normal"
  39374. },
  39375. axisLabel: {
  39376. show: !0,
  39377. color: "#9fadbf",
  39378. fontSize: 12,
  39379. fontWeight: "normal",
  39380. fontStyle: "normal"
  39381. },
  39382. axisLine: {
  39383. show: !0,
  39384. lineStyle: {
  39385. width: 1
  39386. }
  39387. },
  39388. axisTick: {
  39389. show: !0,
  39390. lineStyle: {
  39391. width: 1,
  39392. color: "#ccc"
  39393. }
  39394. }
  39395. },
  39396. // y轴
  39397. yAxis: {
  39398. splitLine: {
  39399. show: !0,
  39400. lineStyle: {
  39401. type: "dashed",
  39402. color: "#36485f"
  39403. }
  39404. },
  39405. type: "value",
  39406. name: "",
  39407. nameLocation: "middle",
  39408. nameTruncate: {
  39409. ellipsis: "...",
  39410. maxWidth: 80
  39411. },
  39412. nameTextStyle: {
  39413. color: "#FFFFFFFF",
  39414. fontSize: 12,
  39415. fontWeight: "normal",
  39416. fontStyle: "normal"
  39417. },
  39418. axisLabel: {
  39419. show: !0,
  39420. color: "#9fadbf",
  39421. fontSize: 12,
  39422. fontWeight: "normal",
  39423. fontStyle: "normal",
  39424. rotate: 0
  39425. },
  39426. axisLine: {
  39427. show: !1,
  39428. lineStyle: {
  39429. width: 1,
  39430. color: "#ccc"
  39431. }
  39432. },
  39433. axisTick: {
  39434. show: !1,
  39435. lineStyle: {
  39436. width: 1,
  39437. color: "#ccc"
  39438. }
  39439. }
  39440. },
  39441. // 提示
  39442. tooltip: {
  39443. show: !0,
  39444. trigger: "axis",
  39445. formatter: "{b} {c}",
  39446. // valueFormatter: "(value, dataIndex) => value",
  39447. axisPointer: {
  39448. type: "line"
  39449. },
  39450. textStyle: {
  39451. color: "#000000FF",
  39452. fontSize: 12,
  39453. fontWeight: "normal",
  39454. fontStyle: "normal"
  39455. },
  39456. padding: 10,
  39457. borderWidth: 1,
  39458. borderColor: "#ccc",
  39459. borderRadius: 4,
  39460. backgroundColor: "#FFFFFFFF",
  39461. extraCssText: ""
  39462. }
  39463. }, $Me = { class: "color-list" }, AMe = { class: "del-btn" }, EMe = /* @__PURE__ */ te({
  39464. __name: "ColorScheme",
  39465. props: {
  39466. value: {
  39467. type: Array,
  39468. default: () => []
  39469. }
  39470. },
  39471. emits: ["update:value"],
  39472. setup(t, { emit: e }) {
  39473. const n = t, r = X1.map((d) => d.color.join(",")), i = e, a = U(r.includes(n.value.join(",")) ? n.value.join(",") : "custom"), o = U(n.value), s = U();
  39474. function l(d) {
  39475. d === "custom" || (o.value = d.split(","), i("update:value", d.split(",")));
  39476. }
  39477. const u = () => {
  39478. var d;
  39479. (d = s.value) == null || d.show();
  39480. };
  39481. function c(d) {
  39482. o.value.push(d), a.value = "custom", i("update:value", o.value);
  39483. }
  39484. const f = (d) => {
  39485. o.value.splice(d, 1), a.value = "custom", i("update:value", o.value);
  39486. };
  39487. return (d, h) => (pe(), Qe("div", null, [
  39488. M(z(di), {
  39489. value: a.value,
  39490. "onUpdate:value": h[0] || (h[0] = (p) => a.value = p),
  39491. size: "small",
  39492. style: { width: "100%" },
  39493. onChange: l
  39494. }, {
  39495. default: we(() => [
  39496. (pe(!0), Qe(wt, null, cg(z(X1), (p) => (pe(), je(z(D1), {
  39497. key: p.name,
  39498. value: p.color.join(",")
  39499. }, {
  39500. default: we(() => [
  39501. (pe(!0), Qe(wt, null, cg(p.color.slice(0, 5), (v) => (pe(), Qe("span", {
  39502. class: "color-block",
  39503. key: v,
  39504. style: Sr({ background: v })
  39505. }, null, 4))), 128)),
  39506. Kt(" " + Vi(p.name), 1)
  39507. ]),
  39508. _: 2
  39509. }, 1032, ["value"]))), 128)),
  39510. M(z(D1), { value: "custom" }, {
  39511. default: we(() => [
  39512. Kt("自定义组合")
  39513. ]),
  39514. _: 1
  39515. })
  39516. ]),
  39517. _: 1
  39518. }, 8, ["value"]),
  39519. He("div", $Me, [
  39520. (pe(!0), Qe(wt, null, cg(o.value, (p, v) => (pe(), Qe("span", {
  39521. class: "color-block",
  39522. key: v,
  39523. style: Sr({ background: p })
  39524. }, [
  39525. He("span", AMe, [
  39526. M(z(ka), {
  39527. onClick: (g) => f(v)
  39528. }, null, 8, ["onClick"])
  39529. ])
  39530. ], 4))), 128)),
  39531. He("span", {
  39532. class: "color-block cus-btn",
  39533. onClick: u
  39534. }, [
  39535. M(z(_x))
  39536. ]),
  39537. M(z(Jd), {
  39538. ref_key: "colorPickerRef",
  39539. ref: s,
  39540. style: { width: "0", height: "0", opacity: "0" },
  39541. onChange: c
  39542. }, null, 512)
  39543. ])
  39544. ]));
  39545. }
  39546. }), MMe = /* @__PURE__ */ $r(EMe, [["__scopeId", "data-v-b29b1b78"]]), IMe = { class: "position" }, DMe = /* @__PURE__ */ te({
  39547. __name: "Position",
  39548. props: {
  39549. value: {},
  39550. type: { default: "line" }
  39551. },
  39552. emits: ["update:value"],
  39553. setup(t) {
  39554. return (e, n) => (pe(), Qe("div", IMe, [
  39555. e.type === "line" ? (pe(), je(z(gf), {
  39556. key: 0,
  39557. value: e.value,
  39558. onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r.target.value))
  39559. }, {
  39560. default: we(() => [
  39561. M(z(Do), { value: "left" }, {
  39562. default: we(() => [
  39563. M(z(ID))
  39564. ]),
  39565. _: 1
  39566. }),
  39567. M(z(Do), { value: "center" }, {
  39568. default: we(() => [
  39569. M(z(MD))
  39570. ]),
  39571. _: 1
  39572. }),
  39573. M(z(Do), { value: "right" }, {
  39574. default: we(() => [
  39575. M(z(DD))
  39576. ]),
  39577. _: 1
  39578. })
  39579. ]),
  39580. _: 1
  39581. }, 8, ["value"])) : e.type === "round" ? (pe(), je(z(gf), {
  39582. key: 1,
  39583. value: e.value,
  39584. onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r.target.value))
  39585. }, {
  39586. default: we(() => [
  39587. M(z(Do), { value: "top" }, {
  39588. default: we(() => [
  39589. M(z(BD))
  39590. ]),
  39591. _: 1
  39592. }),
  39593. M(z(Do), { value: "bottom" }, {
  39594. default: we(() => [
  39595. M(z(kD))
  39596. ]),
  39597. _: 1
  39598. }),
  39599. M(z(Do), { value: "left" }, {
  39600. default: we(() => [
  39601. M(z(LD))
  39602. ]),
  39603. _: 1
  39604. }),
  39605. M(z(Do), { value: "right" }, {
  39606. default: we(() => [
  39607. M(z(ND))
  39608. ]),
  39609. _: 1
  39610. })
  39611. ]),
  39612. _: 1
  39613. }, 8, ["value"])) : _t("", !0)
  39614. ]));
  39615. }
  39616. }), RMe = /* @__PURE__ */ $r(DMe, [["__scopeId", "data-v-a4b8591a"]]), kMe = { class: "font-style" }, LMe = { class: "cus-btn" }, NMe = /* @__PURE__ */ te({
  39617. __name: "FontStyle",
  39618. props: {
  39619. value: {}
  39620. },
  39621. emits: ["update:value"],
  39622. setup(t, { emit: e }) {
  39623. var v, g, m, y;
  39624. const n = t, r = e, i = U((v = n.value) == null ? void 0 : v.bold), a = U((g = n.value) == null ? void 0 : g.italic), o = U((m = n.value) == null ? void 0 : m.size), s = U((y = n.value) == null ? void 0 : y.color), l = U(), u = () => {
  39625. r("update:value", {
  39626. size: o.value,
  39627. bold: i.value,
  39628. italic: a.value,
  39629. color: s.value
  39630. });
  39631. }, c = () => {
  39632. i.value = !i.value, u();
  39633. }, f = () => {
  39634. a.value = !a.value, u();
  39635. };
  39636. function d(b) {
  39637. s.value = b, u();
  39638. }
  39639. function h(b) {
  39640. o.value = b, u();
  39641. }
  39642. const p = () => {
  39643. var b;
  39644. (b = l.value) == null || b.show();
  39645. };
  39646. return (b, _) => (pe(), Qe("div", kMe, [
  39647. M(z(Xr), {
  39648. size: "small",
  39649. onClick: p
  39650. }, {
  39651. default: we(() => [
  39652. He("span", LMe, [
  39653. M(z(zD)),
  39654. He("div", {
  39655. class: "color-block",
  39656. style: Sr({ background: s.value })
  39657. }, null, 4),
  39658. M(z(Jd), {
  39659. ref_key: "colorPickerRef",
  39660. ref: l,
  39661. style: { width: "0", height: "0", opacity: "0" },
  39662. value: s.value,
  39663. "onUpdate:value": _[0] || (_[0] = (O) => s.value = O),
  39664. onChange: d
  39665. }, null, 8, ["value"])
  39666. ])
  39667. ]),
  39668. _: 1
  39669. }),
  39670. M(z(Xr), {
  39671. size: "small",
  39672. onClick: c
  39673. }, {
  39674. default: we(() => [
  39675. He("span", {
  39676. class: Ye(["cus-btn", { "active-btn": i.value }])
  39677. }, [
  39678. M(z(RD))
  39679. ], 2)
  39680. ]),
  39681. _: 1
  39682. }),
  39683. M(z(Xr), {
  39684. size: "small",
  39685. onClick: f
  39686. }, {
  39687. default: we(() => [
  39688. He("span", {
  39689. class: Ye(["cus-btn", { "active-btn": a.value }])
  39690. }, [
  39691. M(z(VD))
  39692. ], 2)
  39693. ]),
  39694. _: 1
  39695. }),
  39696. M(z(S0), {
  39697. size: "small",
  39698. value: o.value,
  39699. min: 12,
  39700. step: 1,
  39701. precision: 0,
  39702. style: { width: "80px" },
  39703. onChange: h
  39704. }, {
  39705. addonAfter: we(() => [
  39706. Kt("px")
  39707. ]),
  39708. _: 1
  39709. }, 8, ["value"])
  39710. ]));
  39711. }
  39712. }), BMe = /* @__PURE__ */ $r(NMe, [["__scopeId", "data-v-12e62bfe"]]), zMe = { class: "cus-slider" }, VMe = /* @__PURE__ */ te({
  39713. __name: "CusSlider",
  39714. props: {
  39715. value: {}
  39716. },
  39717. emits: ["update:value"],
  39718. setup(t) {
  39719. return (e, n) => (pe(), Qe("div", zMe, [
  39720. M(z(nPe), {
  39721. value: e.value,
  39722. onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r)),
  39723. "tip-formatter": (r) => `${r}%`
  39724. }, null, 8, ["value", "tip-formatter"]),
  39725. M(z(S0), {
  39726. value: e.value,
  39727. onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r)),
  39728. "addon-after": "%"
  39729. }, null, 8, ["value"])
  39730. ]));
  39731. }
  39732. }), FMe = /* @__PURE__ */ $r(VMe, [["__scopeId", "data-v-2fe8fa98"]]), WMe = te({
  39733. name: "FmBorderRadius",
  39734. components: {
  39735. RadioGroup: gf,
  39736. RadioButton: Do,
  39737. InputNumber: S0,
  39738. Select: di,
  39739. RadiusUpleftOutlined: QD,
  39740. RadiusUprightOutlined: HD,
  39741. RadiusBottomleftOutlined: FD,
  39742. RadiusBottomrightOutlined: WD
  39743. },
  39744. props: {
  39745. value: {
  39746. type: Object,
  39747. default: () => ({})
  39748. }
  39749. },
  39750. emits: ["update:value"],
  39751. setup(t, { emit: e }) {
  39752. var r, i, a, o;
  39753. const n = tn({
  39754. type: t.value.type || "all",
  39755. value: t.value.type === "all" ? t.value.value : 0,
  39756. unit: t.value.unit || "px",
  39757. topLeft: typeof t.value.value == "object" ? (r = t.value.value) == null ? void 0 : r.topLeft : 0,
  39758. topRight: typeof t.value.value == "object" ? (i = t.value.value) == null ? void 0 : i.topRight : 0,
  39759. bottomLeft: typeof t.value.value == "object" ? (a = t.value.value) == null ? void 0 : a.bottomLeft : 0,
  39760. bottomRight: typeof t.value.value == "object" ? (o = t.value.value) == null ? void 0 : o.bottomRight : 0
  39761. });
  39762. return se(
  39763. () => n,
  39764. (s) => {
  39765. e("update:value", {
  39766. type: s.type,
  39767. value: s.type === "all" ? s.value : {
  39768. topLeft: s.topLeft,
  39769. topRight: s.topRight,
  39770. bottomLeft: s.bottomLeft,
  39771. bottomRight: s.bottomRight
  39772. },
  39773. unit: s.unit
  39774. });
  39775. },
  39776. {
  39777. deep: !0
  39778. }
  39779. ), {
  39780. radius: n,
  39781. unitOptions: [
  39782. { label: "px", value: "px" },
  39783. { label: "%", value: "%" }
  39784. ]
  39785. };
  39786. }
  39787. }), QMe = {
  39788. key: 0,
  39789. class: "all"
  39790. }, HMe = {
  39791. key: 1,
  39792. class: "custom"
  39793. };
  39794. function GMe(t, e, n, r, i, a) {
  39795. const o = fi("RadioButton"), s = fi("RadioGroup"), l = fi("InputNumber"), u = fi("Select"), c = fi("RadiusUpleftOutlined"), f = fi("RadiusUprightOutlined"), d = fi("RadiusBottomleftOutlined"), h = fi("RadiusBottomrightOutlined");
  39796. return pe(), Qe("div", null, [
  39797. M(s, {
  39798. value: t.radius.type,
  39799. "onUpdate:value": e[0] || (e[0] = (p) => t.radius.type = p)
  39800. }, {
  39801. default: we(() => [
  39802. M(o, { value: "all" }, {
  39803. default: we(() => [
  39804. Kt("整体")
  39805. ]),
  39806. _: 1
  39807. }),
  39808. M(o, { value: "custom" }, {
  39809. default: we(() => [
  39810. Kt("单个")
  39811. ]),
  39812. _: 1
  39813. })
  39814. ]),
  39815. _: 1
  39816. }, 8, ["value"]),
  39817. t.radius.type === "all" ? (pe(), Qe("div", QMe, [
  39818. M(l, {
  39819. value: t.radius.value,
  39820. "onUpdate:value": e[1] || (e[1] = (p) => t.radius.value = p)
  39821. }, null, 8, ["value"]),
  39822. M(u, {
  39823. value: t.radius.unit,
  39824. "onUpdate:value": e[2] || (e[2] = (p) => t.radius.unit = p),
  39825. options: t.unitOptions
  39826. }, null, 8, ["value", "options"])
  39827. ])) : (pe(), Qe("div", HMe, [
  39828. M(l, {
  39829. value: t.radius.topLeft,
  39830. "onUpdate:value": e[3] || (e[3] = (p) => t.radius.topLeft = p)
  39831. }, {
  39832. addonBefore: we(() => [
  39833. M(c)
  39834. ]),
  39835. _: 1
  39836. }, 8, ["value"]),
  39837. M(l, {
  39838. value: t.radius.topRight,
  39839. "onUpdate:value": e[4] || (e[4] = (p) => t.radius.topRight = p)
  39840. }, {
  39841. addonBefore: we(() => [
  39842. M(f)
  39843. ]),
  39844. _: 1
  39845. }, 8, ["value"]),
  39846. M(l, {
  39847. value: t.radius.bottomLeft,
  39848. "onUpdate:value": e[5] || (e[5] = (p) => t.radius.bottomLeft = p)
  39849. }, {
  39850. addonBefore: we(() => [
  39851. M(d)
  39852. ]),
  39853. _: 1
  39854. }, 8, ["value"]),
  39855. M(l, {
  39856. value: t.radius.bottomRight,
  39857. "onUpdate:value": e[6] || (e[6] = (p) => t.radius.bottomRight = p)
  39858. }, {
  39859. addonBefore: we(() => [
  39860. M(h)
  39861. ]),
  39862. _: 1
  39863. }, 8, ["value"]),
  39864. M(u, {
  39865. value: t.radius.unit,
  39866. "onUpdate:value": e[7] || (e[7] = (p) => t.radius.unit = p),
  39867. options: t.unitOptions
  39868. }, null, 8, ["value", "options"])
  39869. ]))
  39870. ]);
  39871. }
  39872. const jMe = /* @__PURE__ */ $r(WMe, [["render", GMe], ["__scopeId", "data-v-da2b5cf6"]]), ZMe = /* @__PURE__ */ te({
  39873. __name: "CusFormItem",
  39874. props: {
  39875. item: {},
  39876. modelValue: {}
  39877. },
  39878. emits: ["update:modelValue"],
  39879. setup(t, { emit: e }) {
  39880. const n = t, r = e, i = U(n.modelValue);
  39881. return se(
  39882. () => i.value,
  39883. () => {
  39884. r("update:modelValue", i.value);
  39885. },
  39886. { deep: !0 }
  39887. ), se(
  39888. () => n.modelValue,
  39889. (a) => {
  39890. KS(a, i.value) || (i.value = a);
  39891. }
  39892. ), (a, o) => (pe(), je(z($X), {
  39893. label: a.item.type !== "divider" ? a.item.label : "",
  39894. name: a.item.prop,
  39895. rules: a.item.rules
  39896. }, {
  39897. default: we(() => {
  39898. var s, l, u, c, f, d, h, p, v, g, m;
  39899. return [
  39900. a.item.type === "divider" ? (pe(), je(z(qwe), {
  39901. key: 0,
  39902. style: { margin: "0" }
  39903. }, {
  39904. default: we(() => [
  39905. Kt(Vi(a.item.label), 1)
  39906. ]),
  39907. _: 1
  39908. })) : a.item.type === "input" ? (pe(), je(z(Hn), _n({
  39909. key: 1,
  39910. value: i.value,
  39911. "onUpdate:value": o[0] || (o[0] = (y) => i.value = y)
  39912. }, (s = a.item) == null ? void 0 : s.fieldProps), null, 16, ["value"])) : a.item.type === "select" ? (pe(), je(z(di), _n({
  39913. key: 2,
  39914. value: i.value,
  39915. "onUpdate:value": o[1] || (o[1] = (y) => i.value = y)
  39916. }, (l = a.item) == null ? void 0 : l.fieldProps), null, 16, ["value"])) : a.item.type === "inputNumber" ? (pe(), je(z(S0), _n({
  39917. key: 3,
  39918. value: i.value,
  39919. "onUpdate:value": o[2] || (o[2] = (y) => i.value = y)
  39920. }, (u = a.item) == null ? void 0 : u.fieldProps, { style: { width: "100%" } }), null, 16, ["value"])) : a.item.type === "image" ? (pe(), je(z(Al), _n({
  39921. key: 4,
  39922. value: i.value,
  39923. "onUpdate:value": o[3] || (o[3] = (y) => i.value = y)
  39924. }, (c = a.item) == null ? void 0 : c.fieldProps), null, 16, ["value"])) : a.item.type === "checkboxGroup" ? (pe(), je(z(F1), _n({
  39925. key: 5,
  39926. value: i.value,
  39927. "onUpdate:value": o[4] || (o[4] = (y) => i.value = y)
  39928. }, (f = a.item) == null ? void 0 : f.fieldProps), null, 16, ["value"])) : a.item.type === "backgroundSelect" ? (pe(), je(wMe, _n({
  39929. key: 6,
  39930. value: i.value,
  39931. "onUpdate:value": o[5] || (o[5] = (y) => i.value = y)
  39932. }, (d = a.item) == null ? void 0 : d.fieldProps), null, 16, ["value"])) : a.item.type === "colorSelect" ? (pe(), je(TMe, _n({
  39933. key: 7,
  39934. value: i.value,
  39935. "onUpdate:value": o[6] || (o[6] = (y) => i.value = y)
  39936. }, (h = a.item) == null ? void 0 : h.fieldProps), null, 16, ["value"])) : a.item.type === "colorScheme" ? (pe(), je(MMe, _n({
  39937. key: 8,
  39938. value: i.value,
  39939. "onUpdate:value": o[7] || (o[7] = (y) => i.value = y)
  39940. }, (p = a.item) == null ? void 0 : p.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroup" ? (pe(), je(z(gf), _n({
  39941. key: 9,
  39942. value: i.value,
  39943. "onUpdate:value": o[8] || (o[8] = (y) => i.value = y),
  39944. size: "small"
  39945. }, (v = a.item) == null ? void 0 : v.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroupButton" ? (pe(), je(z(gf), {
  39946. key: 10,
  39947. value: i.value,
  39948. "onUpdate:value": o[9] || (o[9] = (y) => i.value = y),
  39949. size: "small"
  39950. }, {
  39951. default: we(() => [
  39952. (pe(!0), Qe(wt, null, cg(a.item.fieldProps.options, (y) => (pe(), je(z(Do), {
  39953. key: y.value,
  39954. value: y.value
  39955. }, {
  39956. default: we(() => [
  39957. Kt(Vi(y.label), 1)
  39958. ]),
  39959. _: 2
  39960. }, 1032, ["value"]))), 128))
  39961. ]),
  39962. _: 1
  39963. }, 8, ["value"])) : a.item.type === "position" ? (pe(), je(RMe, _n({
  39964. key: 11,
  39965. value: i.value,
  39966. "onUpdate:value": o[10] || (o[10] = (y) => i.value = y)
  39967. }, (g = a.item) == null ? void 0 : g.fieldProps), null, 16, ["value"])) : a.item.type === "fontStyle" ? (pe(), je(BMe, _n({
  39968. key: 12,
  39969. value: i.value,
  39970. "onUpdate:value": o[11] || (o[11] = (y) => i.value = y)
  39971. }, (m = a.item) == null ? void 0 : m.fieldProps), null, 16, ["value"])) : a.item.type === "slider" ? (pe(), je(z(lm), { key: 13 }, {
  39972. default: we(() => {
  39973. var y;
  39974. return [
  39975. M(FMe, _n({
  39976. value: i.value,
  39977. "onUpdate:value": o[12] || (o[12] = (b) => i.value = b)
  39978. }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
  39979. ];
  39980. }),
  39981. _: 1
  39982. })) : a.item.type === "boderRadiusSelect" ? (pe(), je(z(lm), { key: 14 }, {
  39983. default: we(() => {
  39984. var y;
  39985. return [
  39986. M(jMe, _n({
  39987. value: i.value,
  39988. "onUpdate:value": o[13] || (o[13] = (b) => i.value = b)
  39989. }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
  39990. ];
  39991. }),
  39992. _: 1
  39993. })) : _t("", !0),
  39994. a.item.tip ? (pe(), je(z(px), {
  39995. key: 15,
  39996. title: a.item.tip
  39997. }, {
  39998. default: we(() => [
  39999. M(z(hx), { style: { color: "#666" } })
  40000. ]),
  40001. _: 1
  40002. }, 8, ["title"])) : _t("", !0)
  40003. ];
  40004. }),
  40005. _: 1
  40006. }, 8, ["label", "name", "rules"]));
  40007. }
  40008. }), UMe = /* @__PURE__ */ $r(ZMe, [["__scopeId", "data-v-04c55003"]]), qc = te({
  40009. name: "DCusForm",
  40010. props: {
  40011. columns: {
  40012. type: Array,
  40013. default: () => []
  40014. },
  40015. formModel: {
  40016. type: Object,
  40017. default: () => ({})
  40018. }
  40019. },
  40020. emits: ["change"],
  40021. setup(t, { emit: e }) {
  40022. const n = U({}), r = U(), i = U({}), a = L(() => t.columns.map((f) => ({
  40023. ...f,
  40024. rules: (f == null ? void 0 : f.rules) || []
  40025. }))), o = (f) => {
  40026. f == null || f.forEach((d) => {
  40027. var h;
  40028. if (d.type === "group")
  40029. o(d.children);
  40030. else if (d.type === "dependency") {
  40031. const p = (h = d.children) == null ? void 0 : h.call(
  40032. d,
  40033. um(n.value, d.name || []),
  40034. n
  40035. );
  40036. o(p);
  40037. } else {
  40038. if (d.type === "divider") return;
  40039. const p = kt(t.formModel, d.prop);
  40040. 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;
  40041. }
  40042. });
  40043. }, s = (f, d) => {
  40044. n.value[d.prop] = f, d.format ? d.format(i, f) : i.value[d.prop] = f, e("change", i.value);
  40045. }, l = (f) => {
  40046. var d;
  40047. switch (f.type) {
  40048. case "dependency": {
  40049. const h = (d = f.children) == null ? void 0 : d.call(
  40050. f,
  40051. um(n.value, f.name || []),
  40052. n
  40053. );
  40054. return o(h), c(h);
  40055. }
  40056. case "group":
  40057. return u(f);
  40058. default:
  40059. return /* @__PURE__ */ React.createElement(
  40060. UMe,
  40061. {
  40062. key: f.prop,
  40063. item: f,
  40064. modelValue: n.value[f.prop],
  40065. "onUpdate:modelValue": (h) => {
  40066. s(h, f);
  40067. }
  40068. }
  40069. );
  40070. }
  40071. }, u = (f) => {
  40072. var d;
  40073. return /* @__PURE__ */ React.createElement(vg, { style: { borderRadius: 0 } }, /* @__PURE__ */ React.createElement(V1, { style: { borderRadius: 0 }, key: f.prop, header: f.label }, (d = f.children) == null ? void 0 : d.map((h) => l(h))));
  40074. }, c = (f) => f.map((d) => {
  40075. switch (d.type) {
  40076. case "group":
  40077. return u(d);
  40078. default:
  40079. return l(d);
  40080. }
  40081. });
  40082. return se(
  40083. () => a.value,
  40084. (f) => {
  40085. f && o(f);
  40086. },
  40087. { immediate: !0 }
  40088. ), () => /* @__PURE__ */ React.createElement(
  40089. dr,
  40090. {
  40091. model: n,
  40092. colon: !1,
  40093. "label-col": { span: 8 },
  40094. ref: r,
  40095. layout: "horizontal",
  40096. size: "small"
  40097. },
  40098. c(a.value)
  40099. );
  40100. }
  40101. });
  40102. qc.install = (t) => (t.component(qc.name, qc), t);
  40103. const _q = /* @__PURE__ */ te({
  40104. __name: "Config",
  40105. props: tI,
  40106. emits: ["change"],
  40107. setup(t, { emit: e }) {
  40108. const n = t, r = e, i = L(() => [
  40109. {
  40110. label: "内容",
  40111. prop: "text",
  40112. type: "input",
  40113. defaultValue: n.text
  40114. },
  40115. {
  40116. label: "字体",
  40117. prop: "fontSize",
  40118. type: "inputNumber",
  40119. defaultValue: n.fontSize
  40120. },
  40121. {
  40122. label: "颜色",
  40123. prop: "color",
  40124. type: "colorSelect",
  40125. defaultValue: n.color
  40126. },
  40127. {
  40128. label: "对齐",
  40129. prop: "textAlign",
  40130. type: "radioGroup",
  40131. defaultValue: n.textAlign,
  40132. fieldProps: {
  40133. options: [
  40134. { label: "左对齐", value: "left" },
  40135. { label: "居中", value: "center" },
  40136. { label: "右对齐", value: "right" }
  40137. ]
  40138. }
  40139. }
  40140. ]), a = (o) => {
  40141. r("change", o);
  40142. };
  40143. return (o, s) => (pe(), je(z(qc), _n({ columns: i.value }, o.$attrs, { onChange: a }), null, 16, ["columns"]));
  40144. }
  40145. });
  40146. Zd.Config = _q;
  40147. Zd.install = (t) => (t.component(Zd.name, Zd), t);
  40148. const XMe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40149. __proto__: null,
  40150. Config: _q,
  40151. default: Zd,
  40152. defaultPropsValue: Ule,
  40153. titleProps: tI
  40154. }, Symbol.toStringTag, { value: "Module" }));
  40155. /*! *****************************************************************************
  40156. Copyright (c) Microsoft Corporation.
  40157. Permission to use, copy, modify, and/or distribute this software for any
  40158. purpose with or without fee is hereby granted.
  40159. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  40160. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  40161. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  40162. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  40163. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  40164. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  40165. PERFORMANCE OF THIS SOFTWARE.
  40166. ***************************************************************************** */
  40167. var aA = function(t, e) {
  40168. return aA = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
  40169. n.__proto__ = r;
  40170. } || function(n, r) {
  40171. for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
  40172. }, aA(t, e);
  40173. };
  40174. function q(t, e) {
  40175. if (typeof e != "function" && e !== null)
  40176. throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
  40177. aA(t, e);
  40178. function n() {
  40179. this.constructor = t;
  40180. }
  40181. t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
  40182. }
  40183. var YMe = /* @__PURE__ */ function() {
  40184. function t() {
  40185. this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
  40186. }
  40187. return t;
  40188. }(), qMe = /* @__PURE__ */ function() {
  40189. function t() {
  40190. this.browser = new YMe(), 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";
  40191. }
  40192. return t;
  40193. }(), fc = new qMe();
  40194. typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (fc.wxa = !0, fc.touchEventsSupported = !0) : typeof document > "u" && typeof self < "u" ? fc.worker = !0 : typeof navigator > "u" || navigator.userAgent.indexOf("Node.js") === 0 ? (fc.node = !0, fc.svgSupported = !0) : KMe(navigator.userAgent, fc);
  40195. function KMe(t, e) {
  40196. 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);
  40197. 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";
  40198. var s = document.documentElement.style;
  40199. 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;
  40200. }
  40201. const vt = fc;
  40202. var pR = 12, Oq = "sans-serif", iu = pR + "px " + Oq, JMe = 20, eIe = 100, tIe = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
  40203. function nIe(t) {
  40204. var e = {};
  40205. if (typeof JSON > "u")
  40206. return e;
  40207. for (var n = 0; n < t.length; n++) {
  40208. var r = String.fromCharCode(n + 32), i = (t.charCodeAt(n) - JMe) / eIe;
  40209. e[r] = i;
  40210. }
  40211. return e;
  40212. }
  40213. var rIe = nIe(tIe), oo = {
  40214. createCanvas: function() {
  40215. return typeof document < "u" && document.createElement("canvas");
  40216. },
  40217. measureText: /* @__PURE__ */ function() {
  40218. var t, e;
  40219. return function(n, r) {
  40220. if (!t) {
  40221. var i = oo.createCanvas();
  40222. t = i && i.getContext("2d");
  40223. }
  40224. if (t)
  40225. return e !== r && (e = t.font = r || iu), t.measureText(n);
  40226. n = n || "", r = r || iu;
  40227. var a = /((?:\d+)?\.?\d*)px/.exec(r), o = a && +a[1] || pR, s = 0;
  40228. if (r.indexOf("mono") >= 0)
  40229. s = o * n.length;
  40230. else
  40231. for (var l = 0; l < n.length; l++) {
  40232. var u = rIe[n[l]];
  40233. s += u == null ? o : u * o;
  40234. }
  40235. return { width: s };
  40236. };
  40237. }(),
  40238. loadImage: function(t, e, n) {
  40239. var r = new Image();
  40240. return r.onload = e, r.onerror = n, r.src = t, r;
  40241. }
  40242. };
  40243. function Sq(t) {
  40244. for (var e in oo)
  40245. t[e] && (oo[e] = t[e]);
  40246. }
  40247. var xq = Ma([
  40248. "Function",
  40249. "RegExp",
  40250. "Date",
  40251. "Error",
  40252. "CanvasGradient",
  40253. "CanvasPattern",
  40254. "Image",
  40255. "Canvas"
  40256. ], function(t, e) {
  40257. return t["[object " + e + "]"] = !0, t;
  40258. }, {}), wq = Ma([
  40259. "Int8",
  40260. "Uint8",
  40261. "Uint8Clamped",
  40262. "Int16",
  40263. "Uint16",
  40264. "Int32",
  40265. "Uint32",
  40266. "Float32",
  40267. "Float64"
  40268. ], function(t, e) {
  40269. return t["[object " + e + "Array]"] = !0, t;
  40270. }, {}), vp = Object.prototype.toString, Dx = Array.prototype, iIe = Dx.forEach, aIe = Dx.filter, vR = Dx.slice, oIe = Dx.map, I6 = (function() {
  40271. }).constructor, Vy = I6 ? I6.prototype : null, gR = "__proto__", sIe = 2311;
  40272. function mR() {
  40273. return sIe++;
  40274. }
  40275. function xa() {
  40276. for (var t = [], e = 0; e < arguments.length; e++)
  40277. t[e] = arguments[e];
  40278. typeof console < "u" && console.error.apply(console, t);
  40279. }
  40280. function Le(t) {
  40281. if (t == null || typeof t != "object")
  40282. return t;
  40283. var e = t, n = vp.call(t);
  40284. if (n === "[object Array]") {
  40285. if (!eh(t)) {
  40286. e = [];
  40287. for (var r = 0, i = t.length; r < i; r++)
  40288. e[r] = Le(t[r]);
  40289. }
  40290. } else if (wq[n]) {
  40291. if (!eh(t)) {
  40292. var a = t.constructor;
  40293. if (a.from)
  40294. e = a.from(t);
  40295. else {
  40296. e = new a(t.length);
  40297. for (var r = 0, i = t.length; r < i; r++)
  40298. e[r] = t[r];
  40299. }
  40300. }
  40301. } else if (!xq[n] && !eh(t) && !au(t)) {
  40302. e = {};
  40303. for (var o in t)
  40304. t.hasOwnProperty(o) && o !== gR && (e[o] = Le(t[o]));
  40305. }
  40306. return e;
  40307. }
  40308. function qe(t, e, n) {
  40309. if (!Ie(e) || !Ie(t))
  40310. return n ? Le(e) : t;
  40311. for (var r in e)
  40312. if (e.hasOwnProperty(r) && r !== gR) {
  40313. var i = t[r], a = e[r];
  40314. Ie(a) && Ie(i) && !ue(a) && !ue(i) && !au(a) && !au(i) && !oA(a) && !oA(i) && !eh(a) && !eh(i) ? qe(i, a, n) : (n || !(r in t)) && (t[r] = Le(e[r]));
  40315. }
  40316. return t;
  40317. }
  40318. function Rx(t, e) {
  40319. for (var n = t[0], r = 1, i = t.length; r < i; r++)
  40320. n = qe(n, t[r], e);
  40321. return n;
  40322. }
  40323. function le(t, e) {
  40324. if (Object.assign)
  40325. Object.assign(t, e);
  40326. else
  40327. for (var n in e)
  40328. e.hasOwnProperty(n) && n !== gR && (t[n] = e[n]);
  40329. return t;
  40330. }
  40331. function Re(t, e, n) {
  40332. for (var r = st(e), i = 0; i < r.length; i++) {
  40333. var a = r[i];
  40334. (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
  40335. }
  40336. return t;
  40337. }
  40338. var lIe = oo.createCanvas;
  40339. function et(t, e) {
  40340. if (t) {
  40341. if (t.indexOf)
  40342. return t.indexOf(e);
  40343. for (var n = 0, r = t.length; n < r; n++)
  40344. if (t[n] === e)
  40345. return n;
  40346. }
  40347. return -1;
  40348. }
  40349. function yR(t, e) {
  40350. var n = t.prototype;
  40351. function r() {
  40352. }
  40353. r.prototype = e.prototype, t.prototype = new r();
  40354. for (var i in n)
  40355. n.hasOwnProperty(i) && (t.prototype[i] = n[i]);
  40356. t.prototype.constructor = t, t.superClass = e;
  40357. }
  40358. function xn(t, e, n) {
  40359. if (t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
  40360. for (var r = Object.getOwnPropertyNames(e), i = 0; i < r.length; i++) {
  40361. var a = r[i];
  40362. a !== "constructor" && (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
  40363. }
  40364. else
  40365. Re(t, e, n);
  40366. }
  40367. function wr(t) {
  40368. return !t || typeof t == "string" ? !1 : typeof t.length == "number";
  40369. }
  40370. function k(t, e, n) {
  40371. if (t && e)
  40372. if (t.forEach && t.forEach === iIe)
  40373. t.forEach(e, n);
  40374. else if (t.length === +t.length)
  40375. for (var r = 0, i = t.length; r < i; r++)
  40376. e.call(n, t[r], r, t);
  40377. else
  40378. for (var a in t)
  40379. t.hasOwnProperty(a) && e.call(n, t[a], a, t);
  40380. }
  40381. function ce(t, e, n) {
  40382. if (!t)
  40383. return [];
  40384. if (!e)
  40385. return kx(t);
  40386. if (t.map && t.map === oIe)
  40387. return t.map(e, n);
  40388. for (var r = [], i = 0, a = t.length; i < a; i++)
  40389. r.push(e.call(n, t[i], i, t));
  40390. return r;
  40391. }
  40392. function Ma(t, e, n, r) {
  40393. if (t && e) {
  40394. for (var i = 0, a = t.length; i < a; i++)
  40395. n = e.call(r, n, t[i], i, t);
  40396. return n;
  40397. }
  40398. }
  40399. function Nt(t, e, n) {
  40400. if (!t)
  40401. return [];
  40402. if (!e)
  40403. return kx(t);
  40404. if (t.filter && t.filter === aIe)
  40405. return t.filter(e, n);
  40406. for (var r = [], i = 0, a = t.length; i < a; i++)
  40407. e.call(n, t[i], i, t) && r.push(t[i]);
  40408. return r;
  40409. }
  40410. function Cq(t, e, n) {
  40411. if (t && e) {
  40412. for (var r = 0, i = t.length; r < i; r++)
  40413. if (e.call(n, t[r], r, t))
  40414. return t[r];
  40415. }
  40416. }
  40417. function st(t) {
  40418. if (!t)
  40419. return [];
  40420. if (Object.keys)
  40421. return Object.keys(t);
  40422. var e = [];
  40423. for (var n in t)
  40424. t.hasOwnProperty(n) && e.push(n);
  40425. return e;
  40426. }
  40427. function uIe(t, e) {
  40428. for (var n = [], r = 2; r < arguments.length; r++)
  40429. n[r - 2] = arguments[r];
  40430. return function() {
  40431. return t.apply(e, n.concat(vR.call(arguments)));
  40432. };
  40433. }
  40434. var xe = Vy && Me(Vy.bind) ? Vy.call.bind(Vy.bind) : uIe;
  40435. function Ue(t) {
  40436. for (var e = [], n = 1; n < arguments.length; n++)
  40437. e[n - 1] = arguments[n];
  40438. return function() {
  40439. return t.apply(this, e.concat(vR.call(arguments)));
  40440. };
  40441. }
  40442. function ue(t) {
  40443. return Array.isArray ? Array.isArray(t) : vp.call(t) === "[object Array]";
  40444. }
  40445. function Me(t) {
  40446. return typeof t == "function";
  40447. }
  40448. function Oe(t) {
  40449. return typeof t == "string";
  40450. }
  40451. function ym(t) {
  40452. return vp.call(t) === "[object String]";
  40453. }
  40454. function St(t) {
  40455. return typeof t == "number";
  40456. }
  40457. function Ie(t) {
  40458. var e = typeof t;
  40459. return e === "function" || !!t && e === "object";
  40460. }
  40461. function oA(t) {
  40462. return !!xq[vp.call(t)];
  40463. }
  40464. function Br(t) {
  40465. return !!wq[vp.call(t)];
  40466. }
  40467. function au(t) {
  40468. return typeof t == "object" && typeof t.nodeType == "number" && typeof t.ownerDocument == "object";
  40469. }
  40470. function I0(t) {
  40471. return t.colorStops != null;
  40472. }
  40473. function Tq(t) {
  40474. return t.image != null;
  40475. }
  40476. function bR(t) {
  40477. return vp.call(t) === "[object RegExp]";
  40478. }
  40479. function ou(t) {
  40480. return t !== t;
  40481. }
  40482. function Tn() {
  40483. for (var t = [], e = 0; e < arguments.length; e++)
  40484. t[e] = arguments[e];
  40485. for (var n = 0, r = t.length; n < r; n++)
  40486. if (t[n] != null)
  40487. return t[n];
  40488. }
  40489. function We(t, e) {
  40490. return t ?? e;
  40491. }
  40492. function Ui(t, e, n) {
  40493. return t ?? e ?? n;
  40494. }
  40495. function kx(t) {
  40496. for (var e = [], n = 1; n < arguments.length; n++)
  40497. e[n - 1] = arguments[n];
  40498. return vR.apply(t, e);
  40499. }
  40500. function Lx(t) {
  40501. if (typeof t == "number")
  40502. return [t, t, t, t];
  40503. var e = t.length;
  40504. return e === 2 ? [t[0], t[1], t[0], t[1]] : e === 3 ? [t[0], t[1], t[2], t[1]] : t;
  40505. }
  40506. function ke(t, e) {
  40507. if (!t)
  40508. throw new Error(e);
  40509. }
  40510. function ba(t) {
  40511. return t == null ? null : typeof t.trim == "function" ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
  40512. }
  40513. var Pq = "__ec_primitive__";
  40514. function bm(t) {
  40515. t[Pq] = !0;
  40516. }
  40517. function eh(t) {
  40518. return t[Pq];
  40519. }
  40520. var cIe = function() {
  40521. function t() {
  40522. this.data = {};
  40523. }
  40524. return t.prototype.delete = function(e) {
  40525. var n = this.has(e);
  40526. return n && delete this.data[e], n;
  40527. }, t.prototype.has = function(e) {
  40528. return this.data.hasOwnProperty(e);
  40529. }, t.prototype.get = function(e) {
  40530. return this.data[e];
  40531. }, t.prototype.set = function(e, n) {
  40532. return this.data[e] = n, this;
  40533. }, t.prototype.keys = function() {
  40534. return st(this.data);
  40535. }, t.prototype.forEach = function(e) {
  40536. var n = this.data;
  40537. for (var r in n)
  40538. n.hasOwnProperty(r) && e(n[r], r);
  40539. }, t;
  40540. }(), $q = typeof Map == "function";
  40541. function fIe() {
  40542. return $q ? /* @__PURE__ */ new Map() : new cIe();
  40543. }
  40544. var Aq = function() {
  40545. function t(e) {
  40546. var n = ue(e);
  40547. this.data = fIe();
  40548. var r = this;
  40549. e instanceof t ? e.each(i) : e && k(e, i);
  40550. function i(a, o) {
  40551. n ? r.set(a, o) : r.set(o, a);
  40552. }
  40553. }
  40554. return t.prototype.hasKey = function(e) {
  40555. return this.data.has(e);
  40556. }, t.prototype.get = function(e) {
  40557. return this.data.get(e);
  40558. }, t.prototype.set = function(e, n) {
  40559. return this.data.set(e, n), n;
  40560. }, t.prototype.each = function(e, n) {
  40561. this.data.forEach(function(r, i) {
  40562. e.call(n, r, i);
  40563. });
  40564. }, t.prototype.keys = function() {
  40565. var e = this.data.keys();
  40566. return $q ? Array.from(e) : e;
  40567. }, t.prototype.removeKey = function(e) {
  40568. this.data.delete(e);
  40569. }, t;
  40570. }();
  40571. function Pe(t) {
  40572. return new Aq(t);
  40573. }
  40574. function _m(t, e) {
  40575. for (var n = new t.constructor(t.length + e.length), r = 0; r < t.length; r++)
  40576. n[r] = t[r];
  40577. for (var i = t.length, r = 0; r < e.length; r++)
  40578. n[r + i] = e[r];
  40579. return n;
  40580. }
  40581. function D0(t, e) {
  40582. var n;
  40583. if (Object.create)
  40584. n = Object.create(t);
  40585. else {
  40586. var r = function() {
  40587. };
  40588. r.prototype = t, n = new r();
  40589. }
  40590. return e && le(n, e), n;
  40591. }
  40592. function _R(t) {
  40593. var e = t.style;
  40594. e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
  40595. }
  40596. function Ce(t, e) {
  40597. return t.hasOwnProperty(e);
  40598. }
  40599. function On() {
  40600. }
  40601. var Tg = 180 / Math.PI;
  40602. const dIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40603. __proto__: null,
  40604. HashMap: Aq,
  40605. RADIAN_TO_DEGREE: Tg,
  40606. assert: ke,
  40607. bind: xe,
  40608. clone: Le,
  40609. concatArray: _m,
  40610. createCanvas: lIe,
  40611. createHashMap: Pe,
  40612. createObject: D0,
  40613. curry: Ue,
  40614. defaults: Re,
  40615. disableUserSelect: _R,
  40616. each: k,
  40617. eqNaN: ou,
  40618. extend: le,
  40619. filter: Nt,
  40620. find: Cq,
  40621. guid: mR,
  40622. hasOwn: Ce,
  40623. indexOf: et,
  40624. inherits: yR,
  40625. isArray: ue,
  40626. isArrayLike: wr,
  40627. isBuiltInObject: oA,
  40628. isDom: au,
  40629. isFunction: Me,
  40630. isGradientObject: I0,
  40631. isImagePatternObject: Tq,
  40632. isNumber: St,
  40633. isObject: Ie,
  40634. isPrimitive: eh,
  40635. isRegExp: bR,
  40636. isString: Oe,
  40637. isStringSafe: ym,
  40638. isTypedArray: Br,
  40639. keys: st,
  40640. logError: xa,
  40641. map: ce,
  40642. merge: qe,
  40643. mergeAll: Rx,
  40644. mixin: xn,
  40645. noop: On,
  40646. normalizeCssArray: Lx,
  40647. reduce: Ma,
  40648. retrieve: Tn,
  40649. retrieve2: We,
  40650. retrieve3: Ui,
  40651. setAsPrimitive: bm,
  40652. slice: kx,
  40653. trim: ba
  40654. }, Symbol.toStringTag, { value: "Module" }));
  40655. function wu(t, e) {
  40656. return t == null && (t = 0), e == null && (e = 0), [t, e];
  40657. }
  40658. function Ir(t, e) {
  40659. return t[0] = e[0], t[1] = e[1], t;
  40660. }
  40661. function Uo(t) {
  40662. return [t[0], t[1]];
  40663. }
  40664. function Eq(t, e, n) {
  40665. return t[0] = e, t[1] = n, t;
  40666. }
  40667. function sA(t, e, n) {
  40668. return t[0] = e[0] + n[0], t[1] = e[1] + n[1], t;
  40669. }
  40670. function Y1(t, e, n, r) {
  40671. return t[0] = e[0] + n[0] * r, t[1] = e[1] + n[1] * r, t;
  40672. }
  40673. function kl(t, e, n) {
  40674. return t[0] = e[0] - n[0], t[1] = e[1] - n[1], t;
  40675. }
  40676. function Om(t) {
  40677. return Math.sqrt(OR(t));
  40678. }
  40679. var hIe = Om;
  40680. function OR(t) {
  40681. return t[0] * t[0] + t[1] * t[1];
  40682. }
  40683. var pIe = OR;
  40684. function vIe(t, e, n) {
  40685. return t[0] = e[0] * n[0], t[1] = e[1] * n[1], t;
  40686. }
  40687. function gIe(t, e, n) {
  40688. return t[0] = e[0] / n[0], t[1] = e[1] / n[1], t;
  40689. }
  40690. function mIe(t, e) {
  40691. return t[0] * e[0] + t[1] * e[1];
  40692. }
  40693. function Pg(t, e, n) {
  40694. return t[0] = e[0] * n, t[1] = e[1] * n, t;
  40695. }
  40696. function kf(t, e) {
  40697. var n = Om(e);
  40698. return n === 0 ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / n, t[1] = e[1] / n), t;
  40699. }
  40700. function q1(t, e) {
  40701. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
  40702. }
  40703. var Ps = q1;
  40704. function Mq(t, e) {
  40705. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
  40706. }
  40707. var Ul = Mq;
  40708. function yIe(t, e) {
  40709. return t[0] = -e[0], t[1] = -e[1], t;
  40710. }
  40711. function $g(t, e, n, r) {
  40712. return t[0] = e[0] + r * (n[0] - e[0]), t[1] = e[1] + r * (n[1] - e[1]), t;
  40713. }
  40714. function ar(t, e, n) {
  40715. var r = e[0], i = e[1];
  40716. return t[0] = n[0] * r + n[2] * i + n[4], t[1] = n[1] * r + n[3] * i + n[5], t;
  40717. }
  40718. function $s(t, e, n) {
  40719. return t[0] = Math.min(e[0], n[0]), t[1] = Math.min(e[1], n[1]), t;
  40720. }
  40721. function As(t, e, n) {
  40722. return t[0] = Math.max(e[0], n[0]), t[1] = Math.max(e[1], n[1]), t;
  40723. }
  40724. const bIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40725. __proto__: null,
  40726. add: sA,
  40727. applyTransform: ar,
  40728. clone: Uo,
  40729. copy: Ir,
  40730. create: wu,
  40731. dist: Ps,
  40732. distSquare: Ul,
  40733. distance: q1,
  40734. distanceSquare: Mq,
  40735. div: gIe,
  40736. dot: mIe,
  40737. len: Om,
  40738. lenSquare: OR,
  40739. length: hIe,
  40740. lengthSquare: pIe,
  40741. lerp: $g,
  40742. max: As,
  40743. min: $s,
  40744. mul: vIe,
  40745. negate: yIe,
  40746. normalize: kf,
  40747. scale: Pg,
  40748. scaleAndAdd: Y1,
  40749. set: Eq,
  40750. sub: kl
  40751. }, Symbol.toStringTag, { value: "Module" }));
  40752. var td = /* @__PURE__ */ function() {
  40753. function t(e, n) {
  40754. this.target = e, this.topTarget = n && n.topTarget;
  40755. }
  40756. return t;
  40757. }(), _Ie = function() {
  40758. function t(e) {
  40759. this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
  40760. }
  40761. return t.prototype._dragStart = function(e) {
  40762. for (var n = e.target; n && !n.draggable; )
  40763. n = n.parent || n.__hostTarget;
  40764. n && (this._draggingTarget = n, n.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new td(n, e), "dragstart", e.event));
  40765. }, t.prototype._drag = function(e) {
  40766. var n = this._draggingTarget;
  40767. if (n) {
  40768. var r = e.offsetX, i = e.offsetY, a = r - this._x, o = i - this._y;
  40769. this._x = r, this._y = i, n.drift(a, o, e), this.handler.dispatchToElement(new td(n, e), "drag", e.event);
  40770. var s = this.handler.findHover(r, i, n).target, l = this._dropTarget;
  40771. this._dropTarget = s, n !== s && (l && s !== l && this.handler.dispatchToElement(new td(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new td(s, e), "dragenter", e.event));
  40772. }
  40773. }, t.prototype._dragEnd = function(e) {
  40774. var n = this._draggingTarget;
  40775. n && (n.dragging = !1), this.handler.dispatchToElement(new td(n, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new td(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
  40776. }, t;
  40777. }(), La = function() {
  40778. function t(e) {
  40779. e && (this._$eventProcessor = e);
  40780. }
  40781. return t.prototype.on = function(e, n, r, i) {
  40782. this._$handlers || (this._$handlers = {});
  40783. var a = this._$handlers;
  40784. if (typeof n == "function" && (i = r, r = n, n = null), !r || !e)
  40785. return this;
  40786. var o = this._$eventProcessor;
  40787. n != null && o && o.normalizeQuery && (n = o.normalizeQuery(n)), a[e] || (a[e] = []);
  40788. for (var s = 0; s < a[e].length; s++)
  40789. if (a[e][s].h === r)
  40790. return this;
  40791. var l = {
  40792. h: r,
  40793. query: n,
  40794. ctx: i || this,
  40795. callAtLast: r.zrEventfulCallAtLast
  40796. }, u = a[e].length - 1, c = a[e][u];
  40797. return c && c.callAtLast ? a[e].splice(u, 0, l) : a[e].push(l), this;
  40798. }, t.prototype.isSilent = function(e) {
  40799. var n = this._$handlers;
  40800. return !n || !n[e] || !n[e].length;
  40801. }, t.prototype.off = function(e, n) {
  40802. var r = this._$handlers;
  40803. if (!r)
  40804. return this;
  40805. if (!e)
  40806. return this._$handlers = {}, this;
  40807. if (n) {
  40808. if (r[e]) {
  40809. for (var i = [], a = 0, o = r[e].length; a < o; a++)
  40810. r[e][a].h !== n && i.push(r[e][a]);
  40811. r[e] = i;
  40812. }
  40813. r[e] && r[e].length === 0 && delete r[e];
  40814. } else
  40815. delete r[e];
  40816. return this;
  40817. }, t.prototype.trigger = function(e) {
  40818. for (var n = [], r = 1; r < arguments.length; r++)
  40819. n[r - 1] = arguments[r];
  40820. if (!this._$handlers)
  40821. return this;
  40822. var i = this._$handlers[e], a = this._$eventProcessor;
  40823. if (i)
  40824. for (var o = n.length, s = i.length, l = 0; l < s; l++) {
  40825. var u = i[l];
  40826. if (!(a && a.filter && u.query != null && !a.filter(e, u.query)))
  40827. switch (o) {
  40828. case 0:
  40829. u.h.call(u.ctx);
  40830. break;
  40831. case 1:
  40832. u.h.call(u.ctx, n[0]);
  40833. break;
  40834. case 2:
  40835. u.h.call(u.ctx, n[0], n[1]);
  40836. break;
  40837. default:
  40838. u.h.apply(u.ctx, n);
  40839. break;
  40840. }
  40841. }
  40842. return a && a.afterTrigger && a.afterTrigger(e), this;
  40843. }, t.prototype.triggerWithContext = function(e) {
  40844. for (var n = [], r = 1; r < arguments.length; r++)
  40845. n[r - 1] = arguments[r];
  40846. if (!this._$handlers)
  40847. return this;
  40848. var i = this._$handlers[e], a = this._$eventProcessor;
  40849. if (i)
  40850. for (var o = n.length, s = n[o - 1], l = i.length, u = 0; u < l; u++) {
  40851. var c = i[u];
  40852. if (!(a && a.filter && c.query != null && !a.filter(e, c.query)))
  40853. switch (o) {
  40854. case 0:
  40855. c.h.call(s);
  40856. break;
  40857. case 1:
  40858. c.h.call(s, n[0]);
  40859. break;
  40860. case 2:
  40861. c.h.call(s, n[0], n[1]);
  40862. break;
  40863. default:
  40864. c.h.apply(s, n.slice(1, o - 1));
  40865. break;
  40866. }
  40867. }
  40868. return a && a.afterTrigger && a.afterTrigger(e), this;
  40869. }, t;
  40870. }(), OIe = Math.log(2);
  40871. function lA(t, e, n, r, i, a) {
  40872. var o = r + "-" + i, s = t.length;
  40873. if (a.hasOwnProperty(o))
  40874. return a[o];
  40875. if (e === 1) {
  40876. var l = Math.round(Math.log((1 << s) - 1 & ~i) / OIe);
  40877. return t[n][l];
  40878. }
  40879. for (var u = r | 1 << n, c = n + 1; r & 1 << c; )
  40880. c++;
  40881. for (var f = 0, d = 0, h = 0; d < s; d++) {
  40882. var p = 1 << d;
  40883. p & i || (f += (h % 2 ? -1 : 1) * t[n][d] * lA(t, e - 1, c, u, i | p, a), h++);
  40884. }
  40885. return a[o] = f, f;
  40886. }
  40887. function D6(t, e) {
  40888. var n = [
  40889. [t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]],
  40890. [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]],
  40891. [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]],
  40892. [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]],
  40893. [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]],
  40894. [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]],
  40895. [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]],
  40896. [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]
  40897. ], r = {}, i = lA(n, 8, 0, 0, 0, r);
  40898. if (i !== 0) {
  40899. for (var a = [], o = 0; o < 8; o++)
  40900. for (var s = 0; s < 8; s++)
  40901. a[s] == null && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * lA(n, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, r) / i * e[o];
  40902. return function(l, u, c) {
  40903. var f = u * a[6] + c * a[7] + 1;
  40904. l[0] = (u * a[0] + c * a[1] + a[2]) / f, l[1] = (u * a[3] + c * a[4] + a[5]) / f;
  40905. };
  40906. }
  40907. }
  40908. var R6 = "___zrEVENTSAVED", WC = [];
  40909. function SIe(t, e, n, r, i) {
  40910. return uA(WC, e, r, i, !0) && uA(t, n, WC[0], WC[1]);
  40911. }
  40912. function uA(t, e, n, r, i) {
  40913. if (e.getBoundingClientRect && vt.domSupported && !Iq(e)) {
  40914. var a = e[R6] || (e[R6] = {}), o = xIe(e, a), s = wIe(o, a, i);
  40915. if (s)
  40916. return s(t, n, r), !0;
  40917. }
  40918. return !1;
  40919. }
  40920. function xIe(t, e) {
  40921. var n = e.markers;
  40922. if (n)
  40923. return n;
  40924. n = e.markers = [];
  40925. for (var r = ["left", "right"], i = ["top", "bottom"], a = 0; a < 4; a++) {
  40926. var o = document.createElement("div"), s = o.style, l = a % 2, u = (a >> 1) % 2;
  40927. s.cssText = [
  40928. "position: absolute",
  40929. "visibility: hidden",
  40930. "padding: 0",
  40931. "margin: 0",
  40932. "border-width: 0",
  40933. "user-select: none",
  40934. "width:0",
  40935. "height:0",
  40936. r[l] + ":0",
  40937. i[u] + ":0",
  40938. r[1 - l] + ":auto",
  40939. i[1 - u] + ":auto",
  40940. ""
  40941. ].join("!important;"), t.appendChild(o), n.push(o);
  40942. }
  40943. return n;
  40944. }
  40945. function wIe(t, e, n) {
  40946. for (var r = n ? "invTrans" : "trans", i = e[r], a = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
  40947. var c = t[u].getBoundingClientRect(), f = 2 * u, d = c.left, h = c.top;
  40948. o.push(d, h), l = l && a && d === a[f] && h === a[f + 1], s.push(t[u].offsetLeft, t[u].offsetTop);
  40949. }
  40950. return l && i ? i : (e.srcCoords = o, e[r] = n ? D6(s, o) : D6(o, s));
  40951. }
  40952. function Iq(t) {
  40953. return t.nodeName.toUpperCase() === "CANVAS";
  40954. }
  40955. var CIe = /([&<>"'])/g, TIe = {
  40956. "&": "&amp;",
  40957. "<": "&lt;",
  40958. ">": "&gt;",
  40959. '"': "&quot;",
  40960. "'": "&#39;"
  40961. };
  40962. function jr(t) {
  40963. return t == null ? "" : (t + "").replace(CIe, function(e, n) {
  40964. return TIe[n];
  40965. });
  40966. }
  40967. var PIe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, QC = [], $Ie = vt.browser.firefox && +vt.browser.version.split(".")[0] < 39;
  40968. function cA(t, e, n, r) {
  40969. return n = n || {}, r ? k6(t, e, n) : $Ie && 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) : k6(t, e, n), n;
  40970. }
  40971. function k6(t, e, n) {
  40972. if (vt.domSupported && t.getBoundingClientRect) {
  40973. var r = e.clientX, i = e.clientY;
  40974. if (Iq(t)) {
  40975. var a = t.getBoundingClientRect();
  40976. n.zrX = r - a.left, n.zrY = i - a.top;
  40977. return;
  40978. } else if (uA(QC, t, r, i)) {
  40979. n.zrX = QC[0], n.zrY = QC[1];
  40980. return;
  40981. }
  40982. }
  40983. n.zrX = n.zrY = 0;
  40984. }
  40985. function SR(t) {
  40986. return t || window.event;
  40987. }
  40988. function ua(t, e, n) {
  40989. if (e = SR(e), e.zrX != null)
  40990. return e;
  40991. var r = e.type, i = r && r.indexOf("touch") >= 0;
  40992. if (i) {
  40993. var o = r !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
  40994. o && cA(t, o, e, n);
  40995. } else {
  40996. cA(t, e, e, n);
  40997. var a = AIe(e);
  40998. e.zrDelta = a ? a / 120 : -(e.detail || 0) / 3;
  40999. }
  41000. var s = e.button;
  41001. return e.which == null && s !== void 0 && PIe.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
  41002. }
  41003. function AIe(t) {
  41004. var e = t.wheelDelta;
  41005. if (e)
  41006. return e;
  41007. var n = t.deltaX, r = t.deltaY;
  41008. if (n == null || r == null)
  41009. return e;
  41010. var i = Math.abs(r !== 0 ? r : n), a = r > 0 ? -1 : r < 0 ? 1 : n > 0 ? -1 : 1;
  41011. return 3 * i * a;
  41012. }
  41013. function fA(t, e, n, r) {
  41014. t.addEventListener(e, n, r);
  41015. }
  41016. function EIe(t, e, n, r) {
  41017. t.removeEventListener(e, n, r);
  41018. }
  41019. var js = function(t) {
  41020. t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0;
  41021. };
  41022. function L6(t) {
  41023. return t.which === 2 || t.which === 3;
  41024. }
  41025. var MIe = function() {
  41026. function t() {
  41027. this._track = [];
  41028. }
  41029. return t.prototype.recognize = function(e, n, r) {
  41030. return this._doTrack(e, n, r), this._recognize(e);
  41031. }, t.prototype.clear = function() {
  41032. return this._track.length = 0, this;
  41033. }, t.prototype._doTrack = function(e, n, r) {
  41034. var i = e.touches;
  41035. if (i) {
  41036. for (var a = {
  41037. points: [],
  41038. touches: [],
  41039. target: n,
  41040. event: e
  41041. }, o = 0, s = i.length; o < s; o++) {
  41042. var l = i[o], u = cA(r, l, {});
  41043. a.points.push([u.zrX, u.zrY]), a.touches.push(l);
  41044. }
  41045. this._track.push(a);
  41046. }
  41047. }, t.prototype._recognize = function(e) {
  41048. for (var n in HC)
  41049. if (HC.hasOwnProperty(n)) {
  41050. var r = HC[n](this._track, e);
  41051. if (r)
  41052. return r;
  41053. }
  41054. }, t;
  41055. }();
  41056. function N6(t) {
  41057. var e = t[1][0] - t[0][0], n = t[1][1] - t[0][1];
  41058. return Math.sqrt(e * e + n * n);
  41059. }
  41060. function IIe(t) {
  41061. return [
  41062. (t[0][0] + t[1][0]) / 2,
  41063. (t[0][1] + t[1][1]) / 2
  41064. ];
  41065. }
  41066. var HC = {
  41067. pinch: function(t, e) {
  41068. var n = t.length;
  41069. if (n) {
  41070. var r = (t[n - 1] || {}).points, i = (t[n - 2] || {}).points || r;
  41071. if (i && i.length > 1 && r && r.length > 1) {
  41072. var a = N6(r) / N6(i);
  41073. !isFinite(a) && (a = 1), e.pinchScale = a;
  41074. var o = IIe(r);
  41075. return e.pinchX = o[0], e.pinchY = o[1], {
  41076. type: "pinch",
  41077. target: t[0].target,
  41078. event: e
  41079. };
  41080. }
  41081. }
  41082. }
  41083. };
  41084. function wi() {
  41085. return [1, 0, 0, 1, 0, 0];
  41086. }
  41087. function R0(t) {
  41088. return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t;
  41089. }
  41090. function Nx(t, e) {
  41091. 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;
  41092. }
  41093. function Xo(t, e, n) {
  41094. 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];
  41095. return t[0] = r, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t;
  41096. }
  41097. function so(t, e, n) {
  41098. 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;
  41099. }
  41100. function Cu(t, e, n, r) {
  41101. r === void 0 && (r = [0, 0]);
  41102. 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);
  41103. 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;
  41104. }
  41105. function Bx(t, e, n) {
  41106. var r = n[0], i = n[1];
  41107. 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;
  41108. }
  41109. function Lf(t, e) {
  41110. var n = e[0], r = e[2], i = e[4], a = e[1], o = e[3], s = e[5], l = n * o - a * r;
  41111. 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;
  41112. }
  41113. function Dq(t) {
  41114. var e = wi();
  41115. return Nx(e, t), e;
  41116. }
  41117. const DIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  41118. __proto__: null,
  41119. clone: Dq,
  41120. copy: Nx,
  41121. create: wi,
  41122. identity: R0,
  41123. invert: Lf,
  41124. mul: Xo,
  41125. rotate: Cu,
  41126. scale: Bx,
  41127. translate: so
  41128. }, Symbol.toStringTag, { value: "Module" }));
  41129. var Ke = function() {
  41130. function t(e, n) {
  41131. this.x = e || 0, this.y = n || 0;
  41132. }
  41133. return t.prototype.copy = function(e) {
  41134. return this.x = e.x, this.y = e.y, this;
  41135. }, t.prototype.clone = function() {
  41136. return new t(this.x, this.y);
  41137. }, t.prototype.set = function(e, n) {
  41138. return this.x = e, this.y = n, this;
  41139. }, t.prototype.equal = function(e) {
  41140. return e.x === this.x && e.y === this.y;
  41141. }, t.prototype.add = function(e) {
  41142. return this.x += e.x, this.y += e.y, this;
  41143. }, t.prototype.scale = function(e) {
  41144. this.x *= e, this.y *= e;
  41145. }, t.prototype.scaleAndAdd = function(e, n) {
  41146. this.x += e.x * n, this.y += e.y * n;
  41147. }, t.prototype.sub = function(e) {
  41148. return this.x -= e.x, this.y -= e.y, this;
  41149. }, t.prototype.dot = function(e) {
  41150. return this.x * e.x + this.y * e.y;
  41151. }, t.prototype.len = function() {
  41152. return Math.sqrt(this.x * this.x + this.y * this.y);
  41153. }, t.prototype.lenSquare = function() {
  41154. return this.x * this.x + this.y * this.y;
  41155. }, t.prototype.normalize = function() {
  41156. var e = this.len();
  41157. return this.x /= e, this.y /= e, this;
  41158. }, t.prototype.distance = function(e) {
  41159. var n = this.x - e.x, r = this.y - e.y;
  41160. return Math.sqrt(n * n + r * r);
  41161. }, t.prototype.distanceSquare = function(e) {
  41162. var n = this.x - e.x, r = this.y - e.y;
  41163. return n * n + r * r;
  41164. }, t.prototype.negate = function() {
  41165. return this.x = -this.x, this.y = -this.y, this;
  41166. }, t.prototype.transform = function(e) {
  41167. if (e) {
  41168. var n = this.x, r = this.y;
  41169. return this.x = e[0] * n + e[2] * r + e[4], this.y = e[1] * n + e[3] * r + e[5], this;
  41170. }
  41171. }, t.prototype.toArray = function(e) {
  41172. return e[0] = this.x, e[1] = this.y, e;
  41173. }, t.prototype.fromArray = function(e) {
  41174. this.x = e[0], this.y = e[1];
  41175. }, t.set = function(e, n, r) {
  41176. e.x = n, e.y = r;
  41177. }, t.copy = function(e, n) {
  41178. e.x = n.x, e.y = n.y;
  41179. }, t.len = function(e) {
  41180. return Math.sqrt(e.x * e.x + e.y * e.y);
  41181. }, t.lenSquare = function(e) {
  41182. return e.x * e.x + e.y * e.y;
  41183. }, t.dot = function(e, n) {
  41184. return e.x * n.x + e.y * n.y;
  41185. }, t.add = function(e, n, r) {
  41186. e.x = n.x + r.x, e.y = n.y + r.y;
  41187. }, t.sub = function(e, n, r) {
  41188. e.x = n.x - r.x, e.y = n.y - r.y;
  41189. }, t.scale = function(e, n, r) {
  41190. e.x = n.x * r, e.y = n.y * r;
  41191. }, t.scaleAndAdd = function(e, n, r, i) {
  41192. e.x = n.x + r.x * i, e.y = n.y + r.y * i;
  41193. }, t.lerp = function(e, n, r, i) {
  41194. var a = 1 - i;
  41195. e.x = a * n.x + i * r.x, e.y = a * n.y + i * r.y;
  41196. }, t;
  41197. }(), Fy = Math.min, Wy = Math.max, zu = new Ke(), Vu = new Ke(), Fu = new Ke(), Wu = new Ke(), nv = new Ke(), rv = new Ke(), RIe = function() {
  41198. function t(e, n, r, i) {
  41199. 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;
  41200. }
  41201. return t.prototype.union = function(e) {
  41202. var n = Fy(e.x, this.x), r = Fy(e.y, this.y);
  41203. isFinite(this.x) && isFinite(this.width) ? this.width = Wy(e.x + e.width, this.x + this.width) - n : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = Wy(e.y + e.height, this.y + this.height) - r : this.height = e.height, this.x = n, this.y = r;
  41204. }, t.prototype.applyTransform = function(e) {
  41205. t.applyTransform(this, this, e);
  41206. }, t.prototype.calculateTransform = function(e) {
  41207. var n = this, r = e.width / n.width, i = e.height / n.height, a = wi();
  41208. return so(a, a, [-n.x, -n.y]), Bx(a, a, [r, i]), so(a, a, [e.x, e.y]), a;
  41209. }, t.prototype.intersect = function(e, n) {
  41210. if (!e)
  41211. return !1;
  41212. e instanceof t || (e = t.create(e));
  41213. 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);
  41214. if (n) {
  41215. 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), b = Math.min(v, g), _ = Math.min(m, y);
  41216. a < l || u < i ? b > p && (p = b, v < g ? Ke.set(rv, -v, 0) : Ke.set(rv, g, 0)) : b < h && (h = b, v < g ? Ke.set(nv, v, 0) : Ke.set(nv, -g, 0)), s < c || f < o ? _ > p && (p = _, m < y ? Ke.set(rv, 0, -m) : Ke.set(rv, 0, y)) : b < h && (h = b, m < y ? Ke.set(nv, 0, m) : Ke.set(nv, 0, -y));
  41217. }
  41218. return n && Ke.copy(n, d ? nv : rv), d;
  41219. }, t.prototype.contain = function(e, n) {
  41220. var r = this;
  41221. return e >= r.x && e <= r.x + r.width && n >= r.y && n <= r.y + r.height;
  41222. }, t.prototype.clone = function() {
  41223. return new t(this.x, this.y, this.width, this.height);
  41224. }, t.prototype.copy = function(e) {
  41225. t.copy(this, e);
  41226. }, t.prototype.plain = function() {
  41227. return {
  41228. x: this.x,
  41229. y: this.y,
  41230. width: this.width,
  41231. height: this.height
  41232. };
  41233. }, t.prototype.isFinite = function() {
  41234. return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
  41235. }, t.prototype.isZero = function() {
  41236. return this.width === 0 || this.height === 0;
  41237. }, t.create = function(e) {
  41238. return new t(e.x, e.y, e.width, e.height);
  41239. }, t.copy = function(e, n) {
  41240. e.x = n.x, e.y = n.y, e.width = n.width, e.height = n.height;
  41241. }, t.applyTransform = function(e, n, r) {
  41242. if (!r) {
  41243. e !== n && t.copy(e, n);
  41244. return;
  41245. }
  41246. if (r[1] < 1e-5 && r[1] > -1e-5 && r[2] < 1e-5 && r[2] > -1e-5) {
  41247. var i = r[0], a = r[3], o = r[4], s = r[5];
  41248. 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);
  41249. return;
  41250. }
  41251. zu.x = Fu.x = n.x, zu.y = Wu.y = n.y, Vu.x = Wu.x = n.x + n.width, Vu.y = Fu.y = n.y + n.height, zu.transform(r), Wu.transform(r), Vu.transform(r), Fu.transform(r), e.x = Fy(zu.x, Vu.x, Fu.x, Wu.x), e.y = Fy(zu.y, Vu.y, Fu.y, Wu.y);
  41252. var l = Wy(zu.x, Vu.x, Fu.x, Wu.x), u = Wy(zu.y, Vu.y, Fu.y, Wu.y);
  41253. e.width = l - e.x, e.height = u - e.y;
  41254. }, t;
  41255. }();
  41256. const Je = RIe;
  41257. var Rq = "silent";
  41258. function kIe(t, e, n) {
  41259. return {
  41260. type: t,
  41261. event: n,
  41262. target: e.target,
  41263. topTarget: e.topTarget,
  41264. cancelBubble: !1,
  41265. offsetX: n.zrX,
  41266. offsetY: n.zrY,
  41267. gestureEvent: n.gestureEvent,
  41268. pinchX: n.pinchX,
  41269. pinchY: n.pinchY,
  41270. pinchScale: n.pinchScale,
  41271. wheelDelta: n.zrDelta,
  41272. zrByTouch: n.zrByTouch,
  41273. which: n.which,
  41274. stop: LIe
  41275. };
  41276. }
  41277. function LIe() {
  41278. js(this.event);
  41279. }
  41280. var NIe = function(t) {
  41281. q(e, t);
  41282. function e() {
  41283. var n = t !== null && t.apply(this, arguments) || this;
  41284. return n.handler = null, n;
  41285. }
  41286. return e.prototype.dispose = function() {
  41287. }, e.prototype.setCursor = function() {
  41288. }, e;
  41289. }(La), iv = /* @__PURE__ */ function() {
  41290. function t(e, n) {
  41291. this.x = e, this.y = n;
  41292. }
  41293. return t;
  41294. }(), BIe = [
  41295. "click",
  41296. "dblclick",
  41297. "mousewheel",
  41298. "mouseout",
  41299. "mouseup",
  41300. "mousedown",
  41301. "mousemove",
  41302. "contextmenu"
  41303. ], GC = new Je(0, 0, 0, 0), kq = function(t) {
  41304. q(e, t);
  41305. function e(n, r, i, a, o) {
  41306. var s = t.call(this) || this;
  41307. return s._hovered = new iv(0, 0), s.storage = n, s.painter = r, s.painterRoot = a, s._pointerSize = o, i = i || new NIe(), s.proxy = null, s.setHandlerProxy(i), s._draggingMgr = new _Ie(s), s;
  41308. }
  41309. return e.prototype.setHandlerProxy = function(n) {
  41310. this.proxy && this.proxy.dispose(), n && (k(BIe, function(r) {
  41311. n.on && n.on(r, this[r], this);
  41312. }, this), n.handler = this), this.proxy = n;
  41313. }, e.prototype.mousemove = function(n) {
  41314. var r = n.zrX, i = n.zrY, a = Lq(this, r, i), o = this._hovered, s = o.target;
  41315. s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
  41316. var l = this._hovered = a ? new iv(r, i) : this.findHover(r, i), u = l.target, c = this.proxy;
  41317. 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);
  41318. }, e.prototype.mouseout = function(n) {
  41319. var r = n.zrEventControl;
  41320. r !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", n), r !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: n });
  41321. }, e.prototype.resize = function() {
  41322. this._hovered = new iv(0, 0);
  41323. }, e.prototype.dispatch = function(n, r) {
  41324. var i = this[n];
  41325. i && i.call(this, r);
  41326. }, e.prototype.dispose = function() {
  41327. this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
  41328. }, e.prototype.setCursorStyle = function(n) {
  41329. var r = this.proxy;
  41330. r.setCursor && r.setCursor(n);
  41331. }, e.prototype.dispatchToElement = function(n, r, i) {
  41332. n = n || {};
  41333. var a = n.target;
  41334. if (!(a && a.silent)) {
  41335. for (var o = "on" + r, s = kIe(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); )
  41336. ;
  41337. s.cancelBubble || (this.trigger(r, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
  41338. typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(r, s);
  41339. }));
  41340. }
  41341. }, e.prototype.findHover = function(n, r, i) {
  41342. var a = this.storage.getDisplayList(), o = new iv(n, r);
  41343. if (B6(a, o, n, r, i), this._pointerSize && !o.target) {
  41344. for (var s = [], l = this._pointerSize, u = l / 2, c = new Je(n - u, r - u, l, l), f = a.length - 1; f >= 0; f--) {
  41345. var d = a[f];
  41346. d !== i && !d.ignore && !d.ignoreCoarsePointer && (!d.parent || !d.parent.ignoreCoarsePointer) && (GC.copy(d.getBoundingRect()), d.transform && GC.applyTransform(d.transform), GC.intersect(c) && s.push(d));
  41347. }
  41348. if (s.length)
  41349. for (var h = 4, p = Math.PI / 12, v = Math.PI * 2, g = 0; g < u; g += h)
  41350. for (var m = 0; m < v; m += p) {
  41351. var y = n + g * Math.cos(m), b = r + g * Math.sin(m);
  41352. if (B6(s, o, y, b, i), o.target)
  41353. return o;
  41354. }
  41355. }
  41356. return o;
  41357. }, e.prototype.processGesture = function(n, r) {
  41358. this._gestureMgr || (this._gestureMgr = new MIe());
  41359. var i = this._gestureMgr;
  41360. r === "start" && i.clear();
  41361. var a = i.recognize(n, this.findHover(n.zrX, n.zrY, null).target, this.proxy.dom);
  41362. if (r === "end" && i.clear(), a) {
  41363. var o = a.type;
  41364. n.gestureEvent = o;
  41365. var s = new iv();
  41366. s.target = a.target, this.dispatchToElement(s, o, a.event);
  41367. }
  41368. }, e;
  41369. }(La);
  41370. k(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  41371. kq.prototype[t] = function(e) {
  41372. var n = e.zrX, r = e.zrY, i = Lq(this, n, r), a, o;
  41373. if ((t !== "mouseup" || !i) && (a = this.findHover(n, r), o = a.target), t === "mousedown")
  41374. this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
  41375. else if (t === "mouseup")
  41376. this._upEl = o;
  41377. else if (t === "click") {
  41378. if (this._downEl !== this._upEl || !this._downPoint || Ps(this._downPoint, [e.zrX, e.zrY]) > 4)
  41379. return;
  41380. this._downPoint = null;
  41381. }
  41382. this.dispatchToElement(a, t, e);
  41383. };
  41384. });
  41385. function zIe(t, e, n) {
  41386. if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
  41387. for (var r = t, i = void 0, a = !1; r; ) {
  41388. if (r.ignoreClip && (a = !0), !a) {
  41389. var o = r.getClipPath();
  41390. if (o && !o.contain(e, n))
  41391. return !1;
  41392. }
  41393. r.silent && (i = !0);
  41394. var s = r.__hostTarget;
  41395. r = s || r.parent;
  41396. }
  41397. return i ? Rq : !0;
  41398. }
  41399. return !1;
  41400. }
  41401. function B6(t, e, n, r, i) {
  41402. for (var a = t.length - 1; a >= 0; a--) {
  41403. var o = t[a], s = void 0;
  41404. if (o !== i && !o.ignore && (s = zIe(o, n, r)) && (!e.topTarget && (e.topTarget = o), s !== Rq)) {
  41405. e.target = o;
  41406. break;
  41407. }
  41408. }
  41409. }
  41410. function Lq(t, e, n) {
  41411. var r = t.painter;
  41412. return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
  41413. }
  41414. var Nq = 32, av = 7;
  41415. function VIe(t) {
  41416. for (var e = 0; t >= Nq; )
  41417. e |= t & 1, t >>= 1;
  41418. return t + e;
  41419. }
  41420. function z6(t, e, n, r) {
  41421. var i = e + 1;
  41422. if (i === n)
  41423. return 1;
  41424. if (r(t[i++], t[e]) < 0) {
  41425. for (; i < n && r(t[i], t[i - 1]) < 0; )
  41426. i++;
  41427. FIe(t, e, i);
  41428. } else
  41429. for (; i < n && r(t[i], t[i - 1]) >= 0; )
  41430. i++;
  41431. return i - e;
  41432. }
  41433. function FIe(t, e, n) {
  41434. for (n--; e < n; ) {
  41435. var r = t[e];
  41436. t[e++] = t[n], t[n--] = r;
  41437. }
  41438. }
  41439. function V6(t, e, n, r, i) {
  41440. for (r === e && r++; r < n; r++) {
  41441. for (var a = t[r], o = e, s = r, l; o < s; )
  41442. l = o + s >>> 1, i(a, t[l]) < 0 ? s = l : o = l + 1;
  41443. var u = r - o;
  41444. switch (u) {
  41445. case 3:
  41446. t[o + 3] = t[o + 2];
  41447. case 2:
  41448. t[o + 2] = t[o + 1];
  41449. case 1:
  41450. t[o + 1] = t[o];
  41451. break;
  41452. default:
  41453. for (; u > 0; )
  41454. t[o + u] = t[o + u - 1], u--;
  41455. }
  41456. t[o] = a;
  41457. }
  41458. }
  41459. function jC(t, e, n, r, i, a) {
  41460. var o = 0, s = 0, l = 1;
  41461. if (a(t, e[n + i]) > 0) {
  41462. for (s = r - i; l < s && a(t, e[n + i + l]) > 0; )
  41463. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41464. l > s && (l = s), o += i, l += i;
  41465. } else {
  41466. for (s = i + 1; l < s && a(t, e[n + i - l]) <= 0; )
  41467. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41468. l > s && (l = s);
  41469. var u = o;
  41470. o = i - l, l = i - u;
  41471. }
  41472. for (o++; o < l; ) {
  41473. var c = o + (l - o >>> 1);
  41474. a(t, e[n + c]) > 0 ? o = c + 1 : l = c;
  41475. }
  41476. return l;
  41477. }
  41478. function ZC(t, e, n, r, i, a) {
  41479. var o = 0, s = 0, l = 1;
  41480. if (a(t, e[n + i]) < 0) {
  41481. for (s = i + 1; l < s && a(t, e[n + i - l]) < 0; )
  41482. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41483. l > s && (l = s);
  41484. var u = o;
  41485. o = i - l, l = i - u;
  41486. } else {
  41487. for (s = r - i; l < s && a(t, e[n + i + l]) >= 0; )
  41488. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41489. l > s && (l = s), o += i, l += i;
  41490. }
  41491. for (o++; o < l; ) {
  41492. var c = o + (l - o >>> 1);
  41493. a(t, e[n + c]) < 0 ? l = c : o = c + 1;
  41494. }
  41495. return l;
  41496. }
  41497. function WIe(t, e) {
  41498. var n = av, r, i, a = 0, o = [];
  41499. r = [], i = [];
  41500. function s(h, p) {
  41501. r[a] = h, i[a] = p, a += 1;
  41502. }
  41503. function l() {
  41504. for (; a > 1; ) {
  41505. var h = a - 2;
  41506. if (h >= 1 && i[h - 1] <= i[h] + i[h + 1] || h >= 2 && i[h - 2] <= i[h] + i[h - 1])
  41507. i[h - 1] < i[h + 1] && h--;
  41508. else if (i[h] > i[h + 1])
  41509. break;
  41510. c(h);
  41511. }
  41512. }
  41513. function u() {
  41514. for (; a > 1; ) {
  41515. var h = a - 2;
  41516. h > 0 && i[h - 1] < i[h + 1] && h--, c(h);
  41517. }
  41518. }
  41519. function c(h) {
  41520. var p = r[h], v = i[h], g = r[h + 1], m = i[h + 1];
  41521. i[h] = v + m, h === a - 3 && (r[h + 1] = r[h + 2], i[h + 1] = i[h + 2]), a--;
  41522. var y = ZC(t[g], t, p, v, 0, e);
  41523. p += y, v -= y, v !== 0 && (m = jC(t[p + v - 1], t, g, m, m - 1, e), m !== 0 && (v <= m ? f(p, v, g, m) : d(p, v, g, m)));
  41524. }
  41525. function f(h, p, v, g) {
  41526. var m = 0;
  41527. for (m = 0; m < p; m++)
  41528. o[m] = t[h + m];
  41529. var y = 0, b = v, _ = h;
  41530. if (t[_++] = t[b++], --g === 0) {
  41531. for (m = 0; m < p; m++)
  41532. t[_ + m] = o[y + m];
  41533. return;
  41534. }
  41535. if (p === 1) {
  41536. for (m = 0; m < g; m++)
  41537. t[_ + m] = t[b + m];
  41538. t[_ + g] = o[y];
  41539. return;
  41540. }
  41541. for (var O = n, S, x, C; ; ) {
  41542. S = 0, x = 0, C = !1;
  41543. do
  41544. if (e(t[b], o[y]) < 0) {
  41545. if (t[_++] = t[b++], x++, S = 0, --g === 0) {
  41546. C = !0;
  41547. break;
  41548. }
  41549. } else if (t[_++] = o[y++], S++, x = 0, --p === 1) {
  41550. C = !0;
  41551. break;
  41552. }
  41553. while ((S | x) < O);
  41554. if (C)
  41555. break;
  41556. do {
  41557. if (S = ZC(t[b], o, y, p, 0, e), S !== 0) {
  41558. for (m = 0; m < S; m++)
  41559. t[_ + m] = o[y + m];
  41560. if (_ += S, y += S, p -= S, p <= 1) {
  41561. C = !0;
  41562. break;
  41563. }
  41564. }
  41565. if (t[_++] = t[b++], --g === 0) {
  41566. C = !0;
  41567. break;
  41568. }
  41569. if (x = jC(o[y], t, b, g, 0, e), x !== 0) {
  41570. for (m = 0; m < x; m++)
  41571. t[_ + m] = t[b + m];
  41572. if (_ += x, b += x, g -= x, g === 0) {
  41573. C = !0;
  41574. break;
  41575. }
  41576. }
  41577. if (t[_++] = o[y++], --p === 1) {
  41578. C = !0;
  41579. break;
  41580. }
  41581. O--;
  41582. } while (S >= av || x >= av);
  41583. if (C)
  41584. break;
  41585. O < 0 && (O = 0), O += 2;
  41586. }
  41587. if (n = O, n < 1 && (n = 1), p === 1) {
  41588. for (m = 0; m < g; m++)
  41589. t[_ + m] = t[b + m];
  41590. t[_ + g] = o[y];
  41591. } else {
  41592. if (p === 0)
  41593. throw new Error();
  41594. for (m = 0; m < p; m++)
  41595. t[_ + m] = o[y + m];
  41596. }
  41597. }
  41598. function d(h, p, v, g) {
  41599. var m = 0;
  41600. for (m = 0; m < g; m++)
  41601. o[m] = t[v + m];
  41602. var y = h + p - 1, b = g - 1, _ = v + g - 1, O = 0, S = 0;
  41603. if (t[_--] = t[y--], --p === 0) {
  41604. for (O = _ - (g - 1), m = 0; m < g; m++)
  41605. t[O + m] = o[m];
  41606. return;
  41607. }
  41608. if (g === 1) {
  41609. for (_ -= p, y -= p, S = _ + 1, O = y + 1, m = p - 1; m >= 0; m--)
  41610. t[S + m] = t[O + m];
  41611. t[_] = o[b];
  41612. return;
  41613. }
  41614. for (var x = n; ; ) {
  41615. var C = 0, T = 0, w = !1;
  41616. do
  41617. if (e(o[b], t[y]) < 0) {
  41618. if (t[_--] = t[y--], C++, T = 0, --p === 0) {
  41619. w = !0;
  41620. break;
  41621. }
  41622. } else if (t[_--] = o[b--], T++, C = 0, --g === 1) {
  41623. w = !0;
  41624. break;
  41625. }
  41626. while ((C | T) < x);
  41627. if (w)
  41628. break;
  41629. do {
  41630. if (C = p - ZC(o[b], t, h, p, p - 1, e), C !== 0) {
  41631. for (_ -= C, y -= C, p -= C, S = _ + 1, O = y + 1, m = C - 1; m >= 0; m--)
  41632. t[S + m] = t[O + m];
  41633. if (p === 0) {
  41634. w = !0;
  41635. break;
  41636. }
  41637. }
  41638. if (t[_--] = o[b--], --g === 1) {
  41639. w = !0;
  41640. break;
  41641. }
  41642. if (T = g - jC(t[y], o, 0, g, g - 1, e), T !== 0) {
  41643. for (_ -= T, b -= T, g -= T, S = _ + 1, O = b + 1, m = 0; m < T; m++)
  41644. t[S + m] = o[O + m];
  41645. if (g <= 1) {
  41646. w = !0;
  41647. break;
  41648. }
  41649. }
  41650. if (t[_--] = t[y--], --p === 0) {
  41651. w = !0;
  41652. break;
  41653. }
  41654. x--;
  41655. } while (C >= av || T >= av);
  41656. if (w)
  41657. break;
  41658. x < 0 && (x = 0), x += 2;
  41659. }
  41660. if (n = x, n < 1 && (n = 1), g === 1) {
  41661. for (_ -= p, y -= p, S = _ + 1, O = y + 1, m = p - 1; m >= 0; m--)
  41662. t[S + m] = t[O + m];
  41663. t[_] = o[b];
  41664. } else {
  41665. if (g === 0)
  41666. throw new Error();
  41667. for (O = _ - (g - 1), m = 0; m < g; m++)
  41668. t[O + m] = o[m];
  41669. }
  41670. }
  41671. return {
  41672. mergeRuns: l,
  41673. forceMergeRuns: u,
  41674. pushRun: s
  41675. };
  41676. }
  41677. function L_(t, e, n, r) {
  41678. n || (n = 0), r || (r = t.length);
  41679. var i = r - n;
  41680. if (!(i < 2)) {
  41681. var a = 0;
  41682. if (i < Nq) {
  41683. a = z6(t, n, r, e), V6(t, n, r, n + a, e);
  41684. return;
  41685. }
  41686. var o = WIe(t, e), s = VIe(i);
  41687. do {
  41688. if (a = z6(t, n, r, e), a < s) {
  41689. var l = i;
  41690. l > s && (l = s), V6(t, n, n + l, n + a, e), a = l;
  41691. }
  41692. o.pushRun(n, a), o.mergeRuns(), i -= a, n += a;
  41693. } while (i !== 0);
  41694. o.forceMergeRuns();
  41695. }
  41696. }
  41697. var Ni = 1, Gv = 2, Ad = 4, F6 = !1;
  41698. function UC() {
  41699. F6 || (F6 = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
  41700. }
  41701. function W6(t, e) {
  41702. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel;
  41703. }
  41704. var QIe = function() {
  41705. function t() {
  41706. this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = W6;
  41707. }
  41708. return t.prototype.traverse = function(e, n) {
  41709. for (var r = 0; r < this._roots.length; r++)
  41710. this._roots[r].traverse(e, n);
  41711. }, t.prototype.getDisplayList = function(e, n) {
  41712. n = n || !1;
  41713. var r = this._displayList;
  41714. return (e || !r.length) && this.updateDisplayList(n), r;
  41715. }, t.prototype.updateDisplayList = function(e) {
  41716. this._displayListLen = 0;
  41717. for (var n = this._roots, r = this._displayList, i = 0, a = n.length; i < a; i++)
  41718. this._updateAndAddDisplayable(n[i], null, e);
  41719. r.length = this._displayListLen, L_(r, W6);
  41720. }, t.prototype._updateAndAddDisplayable = function(e, n, r) {
  41721. if (!(e.ignore && !r)) {
  41722. e.beforeUpdate(), e.update(), e.afterUpdate();
  41723. var i = e.getClipPath();
  41724. if (e.ignoreClip)
  41725. n = null;
  41726. else if (i) {
  41727. n ? n = n.slice() : n = [];
  41728. for (var a = i, o = e; a; )
  41729. a.parent = o, a.updateTransform(), n.push(a), o = a, a = a.getClipPath();
  41730. }
  41731. if (e.childrenRef) {
  41732. for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
  41733. var u = s[l];
  41734. e.__dirty && (u.__dirty |= Ni), this._updateAndAddDisplayable(u, n, r);
  41735. }
  41736. e.__dirty = 0;
  41737. } else {
  41738. var c = e;
  41739. n && n.length ? c.__clipPaths = n : c.__clipPaths && c.__clipPaths.length > 0 && (c.__clipPaths = []), isNaN(c.z) && (UC(), c.z = 0), isNaN(c.z2) && (UC(), c.z2 = 0), isNaN(c.zlevel) && (UC(), c.zlevel = 0), this._displayList[this._displayListLen++] = c;
  41740. }
  41741. var f = e.getDecalElement && e.getDecalElement();
  41742. f && this._updateAndAddDisplayable(f, n, r);
  41743. var d = e.getTextGuideLine();
  41744. d && this._updateAndAddDisplayable(d, n, r);
  41745. var h = e.getTextContent();
  41746. h && this._updateAndAddDisplayable(h, n, r);
  41747. }
  41748. }, t.prototype.addRoot = function(e) {
  41749. e.__zr && e.__zr.storage === this || this._roots.push(e);
  41750. }, t.prototype.delRoot = function(e) {
  41751. if (e instanceof Array) {
  41752. for (var n = 0, r = e.length; n < r; n++)
  41753. this.delRoot(e[n]);
  41754. return;
  41755. }
  41756. var i = et(this._roots, e);
  41757. i >= 0 && this._roots.splice(i, 1);
  41758. }, t.prototype.delAllRoots = function() {
  41759. this._roots = [], this._displayList = [], this._displayListLen = 0;
  41760. }, t.prototype.getRoots = function() {
  41761. return this._roots;
  41762. }, t.prototype.dispose = function() {
  41763. this._displayList = null, this._roots = null;
  41764. }, t;
  41765. }(), K1;
  41766. K1 = vt.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(t) {
  41767. return setTimeout(t, 16);
  41768. };
  41769. var Ag = {
  41770. linear: function(t) {
  41771. return t;
  41772. },
  41773. quadraticIn: function(t) {
  41774. return t * t;
  41775. },
  41776. quadraticOut: function(t) {
  41777. return t * (2 - t);
  41778. },
  41779. quadraticInOut: function(t) {
  41780. return (t *= 2) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1);
  41781. },
  41782. cubicIn: function(t) {
  41783. return t * t * t;
  41784. },
  41785. cubicOut: function(t) {
  41786. return --t * t * t + 1;
  41787. },
  41788. cubicInOut: function(t) {
  41789. return (t *= 2) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2);
  41790. },
  41791. quarticIn: function(t) {
  41792. return t * t * t * t;
  41793. },
  41794. quarticOut: function(t) {
  41795. return 1 - --t * t * t * t;
  41796. },
  41797. quarticInOut: function(t) {
  41798. return (t *= 2) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2);
  41799. },
  41800. quinticIn: function(t) {
  41801. return t * t * t * t * t;
  41802. },
  41803. quinticOut: function(t) {
  41804. return --t * t * t * t * t + 1;
  41805. },
  41806. quinticInOut: function(t) {
  41807. return (t *= 2) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2);
  41808. },
  41809. sinusoidalIn: function(t) {
  41810. return 1 - Math.cos(t * Math.PI / 2);
  41811. },
  41812. sinusoidalOut: function(t) {
  41813. return Math.sin(t * Math.PI / 2);
  41814. },
  41815. sinusoidalInOut: function(t) {
  41816. return 0.5 * (1 - Math.cos(Math.PI * t));
  41817. },
  41818. exponentialIn: function(t) {
  41819. return t === 0 ? 0 : Math.pow(1024, t - 1);
  41820. },
  41821. exponentialOut: function(t) {
  41822. return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
  41823. },
  41824. exponentialInOut: function(t) {
  41825. 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);
  41826. },
  41827. circularIn: function(t) {
  41828. return 1 - Math.sqrt(1 - t * t);
  41829. },
  41830. circularOut: function(t) {
  41831. return Math.sqrt(1 - --t * t);
  41832. },
  41833. circularInOut: function(t) {
  41834. return (t *= 2) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
  41835. },
  41836. elasticIn: function(t) {
  41837. var e, n = 0.1, r = 0.4;
  41838. 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)));
  41839. },
  41840. elasticOut: function(t) {
  41841. var e, n = 0.1, r = 0.4;
  41842. 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);
  41843. },
  41844. elasticInOut: function(t) {
  41845. var e, n = 0.1, r = 0.4;
  41846. 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);
  41847. },
  41848. backIn: function(t) {
  41849. var e = 1.70158;
  41850. return t * t * ((e + 1) * t - e);
  41851. },
  41852. backOut: function(t) {
  41853. var e = 1.70158;
  41854. return --t * t * ((e + 1) * t + e) + 1;
  41855. },
  41856. backInOut: function(t) {
  41857. var e = 2.5949095;
  41858. return (t *= 2) < 1 ? 0.5 * (t * t * ((e + 1) * t - e)) : 0.5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
  41859. },
  41860. bounceIn: function(t) {
  41861. return 1 - Ag.bounceOut(1 - t);
  41862. },
  41863. bounceOut: function(t) {
  41864. 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;
  41865. },
  41866. bounceInOut: function(t) {
  41867. return t < 0.5 ? Ag.bounceIn(t * 2) * 0.5 : Ag.bounceOut(t * 2 - 1) * 0.5 + 0.5;
  41868. }
  41869. }, Qy = Math.pow, Xl = Math.sqrt, J1 = 1e-8, Bq = 1e-4, Q6 = Xl(3), Hy = 1 / 3, Lo = wu(), va = wu(), th = wu();
  41870. function Ll(t) {
  41871. return t > -J1 && t < J1;
  41872. }
  41873. function zq(t) {
  41874. return t > J1 || t < -J1;
  41875. }
  41876. function Gn(t, e, n, r, i) {
  41877. var a = 1 - i;
  41878. return a * a * (a * t + 3 * i * e) + i * i * (i * r + 3 * a * n);
  41879. }
  41880. function H6(t, e, n, r, i) {
  41881. var a = 1 - i;
  41882. return 3 * (((e - t) * a + 2 * (n - e) * i) * a + (r - n) * i * i);
  41883. }
  41884. function eO(t, e, n, r, i, a) {
  41885. 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;
  41886. if (Ll(c) && Ll(f))
  41887. if (Ll(s))
  41888. a[0] = 0;
  41889. else {
  41890. var p = -l / s;
  41891. p >= 0 && p <= 1 && (a[h++] = p);
  41892. }
  41893. else {
  41894. var v = f * f - 4 * c * d;
  41895. if (Ll(v)) {
  41896. var g = f / c, p = -s / o + g, m = -g / 2;
  41897. p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m);
  41898. } else if (v > 0) {
  41899. var y = Xl(v), b = c * s + 1.5 * o * (-f + y), _ = c * s + 1.5 * o * (-f - y);
  41900. b < 0 ? b = -Qy(-b, Hy) : b = Qy(b, Hy), _ < 0 ? _ = -Qy(-_, Hy) : _ = Qy(_, Hy);
  41901. var p = (-s - (b + _)) / (3 * o);
  41902. p >= 0 && p <= 1 && (a[h++] = p);
  41903. } else {
  41904. var O = (2 * c * s - 3 * o * f) / (2 * Xl(c * c * c)), S = Math.acos(O) / 3, x = Xl(c), C = Math.cos(S), p = (-s - 2 * x * C) / (3 * o), m = (-s + x * (C + Q6 * Math.sin(S))) / (3 * o), T = (-s + x * (C - Q6 * Math.sin(S))) / (3 * o);
  41905. p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m), T >= 0 && T <= 1 && (a[h++] = T);
  41906. }
  41907. }
  41908. return h;
  41909. }
  41910. function Vq(t, e, n, r, i) {
  41911. var a = 6 * n - 12 * e + 6 * t, o = 9 * e + 3 * r - 3 * t - 9 * n, s = 3 * e - 3 * t, l = 0;
  41912. if (Ll(o)) {
  41913. if (zq(a)) {
  41914. var u = -s / a;
  41915. u >= 0 && u <= 1 && (i[l++] = u);
  41916. }
  41917. } else {
  41918. var c = a * a - 4 * o * s;
  41919. if (Ll(c))
  41920. i[0] = -a / (2 * o);
  41921. else if (c > 0) {
  41922. var f = Xl(c), u = (-a + f) / (2 * o), d = (-a - f) / (2 * o);
  41923. u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
  41924. }
  41925. }
  41926. return l;
  41927. }
  41928. function su(t, e, n, r, i, a) {
  41929. 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;
  41930. a[0] = t, a[1] = o, a[2] = u, a[3] = f, a[4] = f, a[5] = c, a[6] = l, a[7] = r;
  41931. }
  41932. function Fq(t, e, n, r, i, a, o, s, l, u, c) {
  41933. var f, d = 5e-3, h = 1 / 0, p, v, g, m;
  41934. Lo[0] = l, Lo[1] = u;
  41935. for (var y = 0; y < 1; y += 0.05)
  41936. va[0] = Gn(t, n, i, o, y), va[1] = Gn(e, r, a, s, y), g = Ul(Lo, va), g < h && (f = y, h = g);
  41937. h = 1 / 0;
  41938. for (var b = 0; b < 32 && !(d < Bq); b++)
  41939. p = f - d, v = f + d, va[0] = Gn(t, n, i, o, p), va[1] = Gn(e, r, a, s, p), g = Ul(va, Lo), p >= 0 && g < h ? (f = p, h = g) : (th[0] = Gn(t, n, i, o, v), th[1] = Gn(e, r, a, s, v), m = Ul(th, Lo), v <= 1 && m < h ? (f = v, h = m) : d *= 0.5);
  41940. return c && (c[0] = Gn(t, n, i, o, f), c[1] = Gn(e, r, a, s, f)), Xl(h);
  41941. }
  41942. function HIe(t, e, n, r, i, a, o, s, l) {
  41943. for (var u = t, c = e, f = 0, d = 1 / l, h = 1; h <= l; h++) {
  41944. var p = h * d, v = Gn(t, n, i, o, p), g = Gn(e, r, a, s, p), m = v - u, y = g - c;
  41945. f += Math.sqrt(m * m + y * y), u = v, c = g;
  41946. }
  41947. return f;
  41948. }
  41949. function ir(t, e, n, r) {
  41950. var i = 1 - r;
  41951. return i * (i * t + 2 * r * e) + r * r * n;
  41952. }
  41953. function dA(t, e, n, r) {
  41954. return 2 * ((1 - r) * (e - t) + r * (n - e));
  41955. }
  41956. function GIe(t, e, n, r, i) {
  41957. var a = t - 2 * e + n, o = 2 * (e - t), s = t - r, l = 0;
  41958. if (Ll(a)) {
  41959. if (zq(o)) {
  41960. var u = -s / o;
  41961. u >= 0 && u <= 1 && (i[l++] = u);
  41962. }
  41963. } else {
  41964. var c = o * o - 4 * a * s;
  41965. if (Ll(c)) {
  41966. var u = -o / (2 * a);
  41967. u >= 0 && u <= 1 && (i[l++] = u);
  41968. } else if (c > 0) {
  41969. var f = Xl(c), u = (-o + f) / (2 * a), d = (-o - f) / (2 * a);
  41970. u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
  41971. }
  41972. }
  41973. return l;
  41974. }
  41975. function Wq(t, e, n) {
  41976. var r = t + n - 2 * e;
  41977. return r === 0 ? 0.5 : (t - e) / r;
  41978. }
  41979. function Sm(t, e, n, r, i) {
  41980. var a = (e - t) * r + t, o = (n - e) * r + e, s = (o - a) * r + a;
  41981. i[0] = t, i[1] = a, i[2] = s, i[3] = s, i[4] = o, i[5] = n;
  41982. }
  41983. function Qq(t, e, n, r, i, a, o, s, l) {
  41984. var u, c = 5e-3, f = 1 / 0;
  41985. Lo[0] = o, Lo[1] = s;
  41986. for (var d = 0; d < 1; d += 0.05) {
  41987. va[0] = ir(t, n, i, d), va[1] = ir(e, r, a, d);
  41988. var h = Ul(Lo, va);
  41989. h < f && (u = d, f = h);
  41990. }
  41991. f = 1 / 0;
  41992. for (var p = 0; p < 32 && !(c < Bq); p++) {
  41993. var v = u - c, g = u + c;
  41994. va[0] = ir(t, n, i, v), va[1] = ir(e, r, a, v);
  41995. var h = Ul(va, Lo);
  41996. if (v >= 0 && h < f)
  41997. u = v, f = h;
  41998. else {
  41999. th[0] = ir(t, n, i, g), th[1] = ir(e, r, a, g);
  42000. var m = Ul(th, Lo);
  42001. g <= 1 && m < f ? (u = g, f = m) : c *= 0.5;
  42002. }
  42003. }
  42004. return l && (l[0] = ir(t, n, i, u), l[1] = ir(e, r, a, u)), Xl(f);
  42005. }
  42006. function jIe(t, e, n, r, i, a, o) {
  42007. for (var s = t, l = e, u = 0, c = 1 / o, f = 1; f <= o; f++) {
  42008. var d = f * c, h = ir(t, n, i, d), p = ir(e, r, a, d), v = h - s, g = p - l;
  42009. u += Math.sqrt(v * v + g * g), s = h, l = p;
  42010. }
  42011. return u;
  42012. }
  42013. var ZIe = /cubic-bezier\(([0-9,\.e ]+)\)/;
  42014. function xR(t) {
  42015. var e = t && ZIe.exec(t);
  42016. if (e) {
  42017. var n = e[1].split(","), r = +ba(n[0]), i = +ba(n[1]), a = +ba(n[2]), o = +ba(n[3]);
  42018. if (isNaN(r + i + a + o))
  42019. return;
  42020. var s = [];
  42021. return function(l) {
  42022. return l <= 0 ? 0 : l >= 1 ? 1 : eO(0, r, a, 1, l, s) && Gn(0, i, o, 1, s[0]);
  42023. };
  42024. }
  42025. }
  42026. var UIe = function() {
  42027. function t(e) {
  42028. 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 || On, this.ondestroy = e.ondestroy || On, this.onrestart = e.onrestart || On, e.easing && this.setEasing(e.easing);
  42029. }
  42030. return t.prototype.step = function(e, n) {
  42031. if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) {
  42032. this._pausedTime += n;
  42033. return;
  42034. }
  42035. var r = this._life, i = e - this._startTime - this._pausedTime, a = i / r;
  42036. a < 0 && (a = 0), a = Math.min(a, 1);
  42037. var o = this.easingFunc, s = o ? o(a) : a;
  42038. if (this.onframe(s), a === 1)
  42039. if (this.loop) {
  42040. var l = i % r;
  42041. this._startTime = e - l, this._pausedTime = 0, this.onrestart();
  42042. } else
  42043. return !0;
  42044. return !1;
  42045. }, t.prototype.pause = function() {
  42046. this._paused = !0;
  42047. }, t.prototype.resume = function() {
  42048. this._paused = !1;
  42049. }, t.prototype.setEasing = function(e) {
  42050. this.easing = e, this.easingFunc = Me(e) ? e : Ag[e] || xR(e);
  42051. }, t;
  42052. }(), Hq = /* @__PURE__ */ function() {
  42053. function t(e) {
  42054. this.value = e;
  42055. }
  42056. return t;
  42057. }(), XIe = function() {
  42058. function t() {
  42059. this._len = 0;
  42060. }
  42061. return t.prototype.insert = function(e) {
  42062. var n = new Hq(e);
  42063. return this.insertEntry(n), n;
  42064. }, t.prototype.insertEntry = function(e) {
  42065. this.head ? (this.tail.next = e, e.prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++;
  42066. }, t.prototype.remove = function(e) {
  42067. var n = e.prev, r = e.next;
  42068. n ? n.next = r : this.head = r, r ? r.prev = n : this.tail = n, e.next = e.prev = null, this._len--;
  42069. }, t.prototype.len = function() {
  42070. return this._len;
  42071. }, t.prototype.clear = function() {
  42072. this.head = this.tail = null, this._len = 0;
  42073. }, t;
  42074. }(), k0 = function() {
  42075. function t(e) {
  42076. this._list = new XIe(), this._maxSize = 10, this._map = {}, this._maxSize = e;
  42077. }
  42078. return t.prototype.put = function(e, n) {
  42079. var r = this._list, i = this._map, a = null;
  42080. if (i[e] == null) {
  42081. var o = r.len(), s = this._lastRemovedEntry;
  42082. if (o >= this._maxSize && o > 0) {
  42083. var l = r.head;
  42084. r.remove(l), delete i[l.key], a = l.value, this._lastRemovedEntry = l;
  42085. }
  42086. s ? s.value = n : s = new Hq(n), s.key = e, r.insertEntry(s), i[e] = s;
  42087. }
  42088. return a;
  42089. }, t.prototype.get = function(e) {
  42090. var n = this._map[e], r = this._list;
  42091. if (n != null)
  42092. return n !== r.tail && (r.remove(n), r.insertEntry(n)), n.value;
  42093. }, t.prototype.clear = function() {
  42094. this._list.clear(), this._map = {};
  42095. }, t.prototype.len = function() {
  42096. return this._list.len();
  42097. }, t;
  42098. }(), G6 = {
  42099. transparent: [0, 0, 0, 0],
  42100. aliceblue: [240, 248, 255, 1],
  42101. antiquewhite: [250, 235, 215, 1],
  42102. aqua: [0, 255, 255, 1],
  42103. aquamarine: [127, 255, 212, 1],
  42104. azure: [240, 255, 255, 1],
  42105. beige: [245, 245, 220, 1],
  42106. bisque: [255, 228, 196, 1],
  42107. black: [0, 0, 0, 1],
  42108. blanchedalmond: [255, 235, 205, 1],
  42109. blue: [0, 0, 255, 1],
  42110. blueviolet: [138, 43, 226, 1],
  42111. brown: [165, 42, 42, 1],
  42112. burlywood: [222, 184, 135, 1],
  42113. cadetblue: [95, 158, 160, 1],
  42114. chartreuse: [127, 255, 0, 1],
  42115. chocolate: [210, 105, 30, 1],
  42116. coral: [255, 127, 80, 1],
  42117. cornflowerblue: [100, 149, 237, 1],
  42118. cornsilk: [255, 248, 220, 1],
  42119. crimson: [220, 20, 60, 1],
  42120. cyan: [0, 255, 255, 1],
  42121. darkblue: [0, 0, 139, 1],
  42122. darkcyan: [0, 139, 139, 1],
  42123. darkgoldenrod: [184, 134, 11, 1],
  42124. darkgray: [169, 169, 169, 1],
  42125. darkgreen: [0, 100, 0, 1],
  42126. darkgrey: [169, 169, 169, 1],
  42127. darkkhaki: [189, 183, 107, 1],
  42128. darkmagenta: [139, 0, 139, 1],
  42129. darkolivegreen: [85, 107, 47, 1],
  42130. darkorange: [255, 140, 0, 1],
  42131. darkorchid: [153, 50, 204, 1],
  42132. darkred: [139, 0, 0, 1],
  42133. darksalmon: [233, 150, 122, 1],
  42134. darkseagreen: [143, 188, 143, 1],
  42135. darkslateblue: [72, 61, 139, 1],
  42136. darkslategray: [47, 79, 79, 1],
  42137. darkslategrey: [47, 79, 79, 1],
  42138. darkturquoise: [0, 206, 209, 1],
  42139. darkviolet: [148, 0, 211, 1],
  42140. deeppink: [255, 20, 147, 1],
  42141. deepskyblue: [0, 191, 255, 1],
  42142. dimgray: [105, 105, 105, 1],
  42143. dimgrey: [105, 105, 105, 1],
  42144. dodgerblue: [30, 144, 255, 1],
  42145. firebrick: [178, 34, 34, 1],
  42146. floralwhite: [255, 250, 240, 1],
  42147. forestgreen: [34, 139, 34, 1],
  42148. fuchsia: [255, 0, 255, 1],
  42149. gainsboro: [220, 220, 220, 1],
  42150. ghostwhite: [248, 248, 255, 1],
  42151. gold: [255, 215, 0, 1],
  42152. goldenrod: [218, 165, 32, 1],
  42153. gray: [128, 128, 128, 1],
  42154. green: [0, 128, 0, 1],
  42155. greenyellow: [173, 255, 47, 1],
  42156. grey: [128, 128, 128, 1],
  42157. honeydew: [240, 255, 240, 1],
  42158. hotpink: [255, 105, 180, 1],
  42159. indianred: [205, 92, 92, 1],
  42160. indigo: [75, 0, 130, 1],
  42161. ivory: [255, 255, 240, 1],
  42162. khaki: [240, 230, 140, 1],
  42163. lavender: [230, 230, 250, 1],
  42164. lavenderblush: [255, 240, 245, 1],
  42165. lawngreen: [124, 252, 0, 1],
  42166. lemonchiffon: [255, 250, 205, 1],
  42167. lightblue: [173, 216, 230, 1],
  42168. lightcoral: [240, 128, 128, 1],
  42169. lightcyan: [224, 255, 255, 1],
  42170. lightgoldenrodyellow: [250, 250, 210, 1],
  42171. lightgray: [211, 211, 211, 1],
  42172. lightgreen: [144, 238, 144, 1],
  42173. lightgrey: [211, 211, 211, 1],
  42174. lightpink: [255, 182, 193, 1],
  42175. lightsalmon: [255, 160, 122, 1],
  42176. lightseagreen: [32, 178, 170, 1],
  42177. lightskyblue: [135, 206, 250, 1],
  42178. lightslategray: [119, 136, 153, 1],
  42179. lightslategrey: [119, 136, 153, 1],
  42180. lightsteelblue: [176, 196, 222, 1],
  42181. lightyellow: [255, 255, 224, 1],
  42182. lime: [0, 255, 0, 1],
  42183. limegreen: [50, 205, 50, 1],
  42184. linen: [250, 240, 230, 1],
  42185. magenta: [255, 0, 255, 1],
  42186. maroon: [128, 0, 0, 1],
  42187. mediumaquamarine: [102, 205, 170, 1],
  42188. mediumblue: [0, 0, 205, 1],
  42189. mediumorchid: [186, 85, 211, 1],
  42190. mediumpurple: [147, 112, 219, 1],
  42191. mediumseagreen: [60, 179, 113, 1],
  42192. mediumslateblue: [123, 104, 238, 1],
  42193. mediumspringgreen: [0, 250, 154, 1],
  42194. mediumturquoise: [72, 209, 204, 1],
  42195. mediumvioletred: [199, 21, 133, 1],
  42196. midnightblue: [25, 25, 112, 1],
  42197. mintcream: [245, 255, 250, 1],
  42198. mistyrose: [255, 228, 225, 1],
  42199. moccasin: [255, 228, 181, 1],
  42200. navajowhite: [255, 222, 173, 1],
  42201. navy: [0, 0, 128, 1],
  42202. oldlace: [253, 245, 230, 1],
  42203. olive: [128, 128, 0, 1],
  42204. olivedrab: [107, 142, 35, 1],
  42205. orange: [255, 165, 0, 1],
  42206. orangered: [255, 69, 0, 1],
  42207. orchid: [218, 112, 214, 1],
  42208. palegoldenrod: [238, 232, 170, 1],
  42209. palegreen: [152, 251, 152, 1],
  42210. paleturquoise: [175, 238, 238, 1],
  42211. palevioletred: [219, 112, 147, 1],
  42212. papayawhip: [255, 239, 213, 1],
  42213. peachpuff: [255, 218, 185, 1],
  42214. peru: [205, 133, 63, 1],
  42215. pink: [255, 192, 203, 1],
  42216. plum: [221, 160, 221, 1],
  42217. powderblue: [176, 224, 230, 1],
  42218. purple: [128, 0, 128, 1],
  42219. red: [255, 0, 0, 1],
  42220. rosybrown: [188, 143, 143, 1],
  42221. royalblue: [65, 105, 225, 1],
  42222. saddlebrown: [139, 69, 19, 1],
  42223. salmon: [250, 128, 114, 1],
  42224. sandybrown: [244, 164, 96, 1],
  42225. seagreen: [46, 139, 87, 1],
  42226. seashell: [255, 245, 238, 1],
  42227. sienna: [160, 82, 45, 1],
  42228. silver: [192, 192, 192, 1],
  42229. skyblue: [135, 206, 235, 1],
  42230. slateblue: [106, 90, 205, 1],
  42231. slategray: [112, 128, 144, 1],
  42232. slategrey: [112, 128, 144, 1],
  42233. snow: [255, 250, 250, 1],
  42234. springgreen: [0, 255, 127, 1],
  42235. steelblue: [70, 130, 180, 1],
  42236. tan: [210, 180, 140, 1],
  42237. teal: [0, 128, 128, 1],
  42238. thistle: [216, 191, 216, 1],
  42239. tomato: [255, 99, 71, 1],
  42240. turquoise: [64, 224, 208, 1],
  42241. violet: [238, 130, 238, 1],
  42242. wheat: [245, 222, 179, 1],
  42243. white: [255, 255, 255, 1],
  42244. whitesmoke: [245, 245, 245, 1],
  42245. yellow: [255, 255, 0, 1],
  42246. yellowgreen: [154, 205, 50, 1]
  42247. };
  42248. function to(t) {
  42249. return t = Math.round(t), t < 0 ? 0 : t > 255 ? 255 : t;
  42250. }
  42251. function YIe(t) {
  42252. return t = Math.round(t), t < 0 ? 0 : t > 360 ? 360 : t;
  42253. }
  42254. function xm(t) {
  42255. return t < 0 ? 0 : t > 1 ? 1 : t;
  42256. }
  42257. function XC(t) {
  42258. var e = t;
  42259. return e.length && e.charAt(e.length - 1) === "%" ? to(parseFloat(e) / 100 * 255) : to(parseInt(e, 10));
  42260. }
  42261. function Kc(t) {
  42262. var e = t;
  42263. return e.length && e.charAt(e.length - 1) === "%" ? xm(parseFloat(e) / 100) : xm(parseFloat(e));
  42264. }
  42265. function YC(t, e, n) {
  42266. 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;
  42267. }
  42268. function Nl(t, e, n) {
  42269. return t + (e - t) * n;
  42270. }
  42271. function sa(t, e, n, r, i) {
  42272. return t[0] = e, t[1] = n, t[2] = r, t[3] = i, t;
  42273. }
  42274. function hA(t, e) {
  42275. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t;
  42276. }
  42277. var Gq = new k0(20), Gy = null;
  42278. function nd(t, e) {
  42279. Gy && hA(Gy, e), Gy = Gq.put(t, Gy || e.slice());
  42280. }
  42281. function Kr(t, e) {
  42282. if (t) {
  42283. e = e || [];
  42284. var n = Gq.get(t);
  42285. if (n)
  42286. return hA(e, n);
  42287. t = t + "";
  42288. var r = t.replace(/ /g, "").toLowerCase();
  42289. if (r in G6)
  42290. return hA(e, G6[r]), nd(t, e), e;
  42291. var i = r.length;
  42292. if (r.charAt(0) === "#") {
  42293. if (i === 4 || i === 5) {
  42294. var a = parseInt(r.slice(1, 4), 16);
  42295. if (!(a >= 0 && a <= 4095)) {
  42296. sa(e, 0, 0, 0, 1);
  42297. return;
  42298. }
  42299. return sa(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), nd(t, e), e;
  42300. } else if (i === 7 || i === 9) {
  42301. var a = parseInt(r.slice(1, 7), 16);
  42302. if (!(a >= 0 && a <= 16777215)) {
  42303. sa(e, 0, 0, 0, 1);
  42304. return;
  42305. }
  42306. return sa(e, (a & 16711680) >> 16, (a & 65280) >> 8, a & 255, i === 9 ? parseInt(r.slice(7), 16) / 255 : 1), nd(t, e), e;
  42307. }
  42308. return;
  42309. }
  42310. var o = r.indexOf("("), s = r.indexOf(")");
  42311. if (o !== -1 && s + 1 === i) {
  42312. var l = r.substr(0, o), u = r.substr(o + 1, s - (o + 1)).split(","), c = 1;
  42313. switch (l) {
  42314. case "rgba":
  42315. if (u.length !== 4)
  42316. return u.length === 3 ? sa(e, +u[0], +u[1], +u[2], 1) : sa(e, 0, 0, 0, 1);
  42317. c = Kc(u.pop());
  42318. case "rgb":
  42319. if (u.length >= 3)
  42320. return sa(e, XC(u[0]), XC(u[1]), XC(u[2]), u.length === 3 ? c : Kc(u[3])), nd(t, e), e;
  42321. sa(e, 0, 0, 0, 1);
  42322. return;
  42323. case "hsla":
  42324. if (u.length !== 4) {
  42325. sa(e, 0, 0, 0, 1);
  42326. return;
  42327. }
  42328. return u[3] = Kc(u[3]), pA(u, e), nd(t, e), e;
  42329. case "hsl":
  42330. if (u.length !== 3) {
  42331. sa(e, 0, 0, 0, 1);
  42332. return;
  42333. }
  42334. return pA(u, e), nd(t, e), e;
  42335. default:
  42336. return;
  42337. }
  42338. }
  42339. sa(e, 0, 0, 0, 1);
  42340. }
  42341. }
  42342. function pA(t, e) {
  42343. var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360, r = Kc(t[1]), i = Kc(t[2]), a = i <= 0.5 ? i * (r + 1) : i + r - i * r, o = i * 2 - a;
  42344. return e = e || [], sa(e, to(YC(o, a, n + 1 / 3) * 255), to(YC(o, a, n) * 255), to(YC(o, a, n - 1 / 3) * 255), 1), t.length === 4 && (e[3] = t[3]), e;
  42345. }
  42346. function qIe(t) {
  42347. if (t) {
  42348. 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;
  42349. if (o === 0)
  42350. l = 0, u = 0;
  42351. else {
  42352. s < 0.5 ? u = o / (a + i) : u = o / (2 - a - i);
  42353. var c = ((a - e) / 6 + o / 2) / o, f = ((a - n) / 6 + o / 2) / o, d = ((a - r) / 6 + o / 2) / o;
  42354. 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);
  42355. }
  42356. var h = [l * 360, u, s];
  42357. return t[3] != null && h.push(t[3]), h;
  42358. }
  42359. }
  42360. function tO(t, e) {
  42361. var n = Kr(t);
  42362. if (n) {
  42363. for (var r = 0; r < 3; r++)
  42364. 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);
  42365. return no(n, n.length === 4 ? "rgba" : "rgb");
  42366. }
  42367. }
  42368. function KIe(t) {
  42369. var e = Kr(t);
  42370. if (e)
  42371. return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1);
  42372. }
  42373. function Eg(t, e, n) {
  42374. if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
  42375. n = n || [];
  42376. var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = e[i], s = e[a], l = r - i;
  42377. return n[0] = to(Nl(o[0], s[0], l)), n[1] = to(Nl(o[1], s[1], l)), n[2] = to(Nl(o[2], s[2], l)), n[3] = xm(Nl(o[3], s[3], l)), n;
  42378. }
  42379. }
  42380. var JIe = Eg;
  42381. function wR(t, e, n) {
  42382. if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
  42383. var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = Kr(e[i]), s = Kr(e[a]), l = r - i, u = no([
  42384. to(Nl(o[0], s[0], l)),
  42385. to(Nl(o[1], s[1], l)),
  42386. to(Nl(o[2], s[2], l)),
  42387. xm(Nl(o[3], s[3], l))
  42388. ], "rgba");
  42389. return n ? {
  42390. color: u,
  42391. leftIndex: i,
  42392. rightIndex: a,
  42393. value: r
  42394. } : u;
  42395. }
  42396. }
  42397. var eDe = wR;
  42398. function nh(t, e, n, r) {
  42399. var i = Kr(t);
  42400. if (t)
  42401. return i = qIe(i), e != null && (i[0] = YIe(e)), n != null && (i[1] = Kc(n)), r != null && (i[2] = Kc(r)), no(pA(i), "rgba");
  42402. }
  42403. function wm(t, e) {
  42404. var n = Kr(t);
  42405. if (n && e != null)
  42406. return n[3] = xm(e), no(n, "rgba");
  42407. }
  42408. function no(t, e) {
  42409. if (!(!t || !t.length)) {
  42410. var n = t[0] + "," + t[1] + "," + t[2];
  42411. return (e === "rgba" || e === "hsva" || e === "hsla") && (n += "," + t[3]), e + "(" + n + ")";
  42412. }
  42413. }
  42414. function Cm(t, e) {
  42415. var n = Kr(t);
  42416. return n ? (0.299 * n[0] + 0.587 * n[1] + 0.114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0;
  42417. }
  42418. function tDe() {
  42419. return no([
  42420. Math.round(Math.random() * 255),
  42421. Math.round(Math.random() * 255),
  42422. Math.round(Math.random() * 255)
  42423. ], "rgb");
  42424. }
  42425. var j6 = new k0(100);
  42426. function nO(t) {
  42427. if (Oe(t)) {
  42428. var e = j6.get(t);
  42429. return e || (e = tO(t, -0.1), j6.put(t, e)), e;
  42430. } else if (I0(t)) {
  42431. var n = le({}, t);
  42432. return n.colorStops = ce(t.colorStops, function(r) {
  42433. return {
  42434. offset: r.offset,
  42435. color: tO(r.color, -0.1)
  42436. };
  42437. }), n;
  42438. }
  42439. return t;
  42440. }
  42441. const nDe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42442. __proto__: null,
  42443. fastLerp: Eg,
  42444. fastMapToColor: JIe,
  42445. lerp: wR,
  42446. lift: tO,
  42447. liftColor: nO,
  42448. lum: Cm,
  42449. mapToColor: eDe,
  42450. modifyAlpha: wm,
  42451. modifyHSL: nh,
  42452. parse: Kr,
  42453. random: tDe,
  42454. stringify: no,
  42455. toHex: KIe
  42456. }, Symbol.toStringTag, { value: "Module" }));
  42457. var rO = Math.round;
  42458. function Tm(t) {
  42459. var e;
  42460. if (!t || t === "transparent")
  42461. t = "none";
  42462. else if (typeof t == "string" && t.indexOf("rgba") > -1) {
  42463. var n = Kr(t);
  42464. n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")", e = n[3]);
  42465. }
  42466. return {
  42467. color: t,
  42468. opacity: e ?? 1
  42469. };
  42470. }
  42471. var Z6 = 1e-4;
  42472. function Bl(t) {
  42473. return t < Z6 && t > -Z6;
  42474. }
  42475. function jy(t) {
  42476. return rO(t * 1e3) / 1e3;
  42477. }
  42478. function vA(t) {
  42479. return rO(t * 1e4) / 1e4;
  42480. }
  42481. function rDe(t) {
  42482. return "matrix(" + jy(t[0]) + "," + jy(t[1]) + "," + jy(t[2]) + "," + jy(t[3]) + "," + vA(t[4]) + "," + vA(t[5]) + ")";
  42483. }
  42484. var iDe = {
  42485. left: "start",
  42486. right: "end",
  42487. center: "middle",
  42488. middle: "middle"
  42489. };
  42490. function aDe(t, e, n) {
  42491. return n === "top" ? t += e / 2 : n === "bottom" && (t -= e / 2), t;
  42492. }
  42493. function oDe(t) {
  42494. return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY);
  42495. }
  42496. function sDe(t) {
  42497. var e = t.style, n = t.getGlobalScale();
  42498. return [
  42499. e.shadowColor,
  42500. (e.shadowBlur || 0).toFixed(2),
  42501. (e.shadowOffsetX || 0).toFixed(2),
  42502. (e.shadowOffsetY || 0).toFixed(2),
  42503. n[0],
  42504. n[1]
  42505. ].join(",");
  42506. }
  42507. function jq(t) {
  42508. return t && !!t.image;
  42509. }
  42510. function lDe(t) {
  42511. return t && !!t.svgElement;
  42512. }
  42513. function CR(t) {
  42514. return jq(t) || lDe(t);
  42515. }
  42516. function Zq(t) {
  42517. return t.type === "linear";
  42518. }
  42519. function Uq(t) {
  42520. return t.type === "radial";
  42521. }
  42522. function Xq(t) {
  42523. return t && (t.type === "linear" || t.type === "radial");
  42524. }
  42525. function zx(t) {
  42526. return "url(#" + t + ")";
  42527. }
  42528. function Yq(t) {
  42529. var e = t.getGlobalScale(), n = Math.max(e[0], e[1]);
  42530. return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1);
  42531. }
  42532. function qq(t) {
  42533. var e = t.x || 0, n = t.y || 0, r = (t.rotation || 0) * Tg, i = We(t.scaleX, 1), a = We(t.scaleY, 1), o = t.skewX || 0, s = t.skewY || 0, l = [];
  42534. 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(" + rO(o * Tg) + "deg, " + rO(s * Tg) + "deg)"), l.join(" ");
  42535. }
  42536. var uDe = function() {
  42537. return vt.hasGlobalWindow && Me(window.btoa) ? function(t) {
  42538. return window.btoa(unescape(encodeURIComponent(t)));
  42539. } : typeof Buffer < "u" ? function(t) {
  42540. return Buffer.from(t).toString("base64");
  42541. } : function(t) {
  42542. return process.env.NODE_ENV !== "production" && xa("Base64 isn't natively supported in the current environment."), null;
  42543. };
  42544. }(), gA = Array.prototype.slice;
  42545. function Os(t, e, n) {
  42546. return (e - t) * n + t;
  42547. }
  42548. function qC(t, e, n, r) {
  42549. for (var i = e.length, a = 0; a < i; a++)
  42550. t[a] = Os(e[a], n[a], r);
  42551. return t;
  42552. }
  42553. function cDe(t, e, n, r) {
  42554. for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
  42555. t[o] || (t[o] = []);
  42556. for (var s = 0; s < a; s++)
  42557. t[o][s] = Os(e[o][s], n[o][s], r);
  42558. }
  42559. return t;
  42560. }
  42561. function Zy(t, e, n, r) {
  42562. for (var i = e.length, a = 0; a < i; a++)
  42563. t[a] = e[a] + n[a] * r;
  42564. return t;
  42565. }
  42566. function U6(t, e, n, r) {
  42567. for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
  42568. t[o] || (t[o] = []);
  42569. for (var s = 0; s < a; s++)
  42570. t[o][s] = e[o][s] + n[o][s] * r;
  42571. }
  42572. return t;
  42573. }
  42574. function fDe(t, e) {
  42575. 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++)
  42576. i.push({
  42577. offset: o.offset,
  42578. color: o.color.slice()
  42579. });
  42580. }
  42581. function dDe(t, e, n) {
  42582. var r = t, i = e;
  42583. if (!(!r.push || !i.push)) {
  42584. var a = r.length, o = i.length;
  42585. if (a !== o) {
  42586. var s = a > o;
  42587. if (s)
  42588. r.length = o;
  42589. else
  42590. for (var l = a; l < o; l++)
  42591. r.push(n === 1 ? i[l] : gA.call(i[l]));
  42592. }
  42593. for (var u = r[0] && r[0].length, l = 0; l < r.length; l++)
  42594. if (n === 1)
  42595. isNaN(r[l]) && (r[l] = i[l]);
  42596. else
  42597. for (var c = 0; c < u; c++)
  42598. isNaN(r[l][c]) && (r[l][c] = i[l][c]);
  42599. }
  42600. }
  42601. function Mg(t) {
  42602. if (wr(t)) {
  42603. var e = t.length;
  42604. if (wr(t[0])) {
  42605. for (var n = [], r = 0; r < e; r++)
  42606. n.push(gA.call(t[r]));
  42607. return n;
  42608. }
  42609. return gA.call(t);
  42610. }
  42611. return t;
  42612. }
  42613. function N_(t) {
  42614. 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(",") + ")";
  42615. }
  42616. function hDe(t) {
  42617. return wr(t && t[0]) ? 2 : 1;
  42618. }
  42619. var Uy = 0, B_ = 1, Kq = 2, jv = 3, mA = 4, yA = 5, X6 = 6;
  42620. function Y6(t) {
  42621. return t === mA || t === yA;
  42622. }
  42623. function Xy(t) {
  42624. return t === B_ || t === Kq;
  42625. }
  42626. var ov = [0, 0, 0, 0], pDe = function() {
  42627. function t(e) {
  42628. this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e;
  42629. }
  42630. return t.prototype.isFinished = function() {
  42631. return this._finished;
  42632. }, t.prototype.setFinished = function() {
  42633. this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished();
  42634. }, t.prototype.needsAnimate = function() {
  42635. return this.keyframes.length >= 1;
  42636. }, t.prototype.getAdditiveTrack = function() {
  42637. return this._additiveTrack;
  42638. }, t.prototype.addKeyframe = function(e, n, r) {
  42639. this._needsSort = !0;
  42640. var i = this.keyframes, a = i.length, o = !1, s = X6, l = n;
  42641. if (wr(n)) {
  42642. var u = hDe(n);
  42643. s = u, (u === 1 && !St(n[0]) || u === 2 && !St(n[0][0])) && (o = !0);
  42644. } else if (St(n) && !ou(n))
  42645. s = Uy;
  42646. else if (Oe(n))
  42647. if (!isNaN(+n))
  42648. s = Uy;
  42649. else {
  42650. var c = Kr(n);
  42651. c && (l = c, s = jv);
  42652. }
  42653. else if (I0(n)) {
  42654. var f = le({}, l);
  42655. f.colorStops = ce(n.colorStops, function(h) {
  42656. return {
  42657. offset: h.offset,
  42658. color: Kr(h.color)
  42659. };
  42660. }), Zq(n) ? s = mA : Uq(n) && (s = yA), l = f;
  42661. }
  42662. a === 0 ? this.valType = s : (s !== this.valType || s === X6) && (o = !0), this.discrete = this.discrete || o;
  42663. var d = {
  42664. time: e,
  42665. value: l,
  42666. rawValue: n,
  42667. percent: 0
  42668. };
  42669. return r && (d.easing = r, d.easingFunc = Me(r) ? r : Ag[r] || xR(r)), i.push(d), d;
  42670. }, t.prototype.prepare = function(e, n) {
  42671. var r = this.keyframes;
  42672. this._needsSort && r.sort(function(v, g) {
  42673. return v.time - g.time;
  42674. });
  42675. for (var i = this.valType, a = r.length, o = r[a - 1], s = this.discrete, l = Xy(i), u = Y6(i), c = 0; c < a; c++) {
  42676. var f = r[c], d = f.value, h = o.value;
  42677. f.percent = f.time / e, s || (l && c !== a - 1 ? dDe(d, h, i) : u && fDe(d.colorStops, h.colorStops));
  42678. }
  42679. if (!s && i !== yA && n && this.needsAnimate() && n.needsAnimate() && i === n.valType && !n._finished) {
  42680. this._additiveTrack = n;
  42681. for (var p = r[0].value, c = 0; c < a; c++)
  42682. i === Uy ? r[c].additiveValue = r[c].value - p : i === jv ? r[c].additiveValue = Zy([], r[c].value, p, -1) : Xy(i) && (r[c].additiveValue = i === B_ ? Zy([], r[c].value, p, -1) : U6([], r[c].value, p, -1));
  42683. }
  42684. }, t.prototype.step = function(e, n) {
  42685. if (!this._finished) {
  42686. this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
  42687. var r = this._additiveTrack != null, i = r ? "additiveValue" : "value", a = this.valType, o = this.keyframes, s = o.length, l = this.propName, u = a === jv, c, f = this._lastFr, d = Math.min, h, p;
  42688. if (s === 1)
  42689. h = p = o[0];
  42690. else {
  42691. if (n < 0)
  42692. c = 0;
  42693. else if (n < this._lastFrP) {
  42694. var v = d(f + 1, s - 1);
  42695. for (c = v; c >= 0 && !(o[c].percent <= n); c--)
  42696. ;
  42697. c = d(c, s - 2);
  42698. } else {
  42699. for (c = f; c < s && !(o[c].percent > n); c++)
  42700. ;
  42701. c = d(c - 1, s - 2);
  42702. }
  42703. p = o[c + 1], h = o[c];
  42704. }
  42705. if (h && p) {
  42706. this._lastFr = c, this._lastFrP = n;
  42707. var g = p.percent - h.percent, m = g === 0 ? 1 : d((n - h.percent) / g, 1);
  42708. p.easingFunc && (m = p.easingFunc(m));
  42709. var y = r ? this._additiveValue : u ? ov : e[l];
  42710. if ((Xy(a) || u) && !y && (y = this._additiveValue = []), this.discrete)
  42711. e[l] = m < 1 ? h.rawValue : p.rawValue;
  42712. else if (Xy(a))
  42713. a === B_ ? qC(y, h[i], p[i], m) : cDe(y, h[i], p[i], m);
  42714. else if (Y6(a)) {
  42715. var b = h[i], _ = p[i], O = a === mA;
  42716. e[l] = {
  42717. type: O ? "linear" : "radial",
  42718. x: Os(b.x, _.x, m),
  42719. y: Os(b.y, _.y, m),
  42720. colorStops: ce(b.colorStops, function(x, C) {
  42721. var T = _.colorStops[C];
  42722. return {
  42723. offset: Os(x.offset, T.offset, m),
  42724. color: N_(qC([], x.color, T.color, m))
  42725. };
  42726. }),
  42727. global: _.global
  42728. }, O ? (e[l].x2 = Os(b.x2, _.x2, m), e[l].y2 = Os(b.y2, _.y2, m)) : e[l].r = Os(b.r, _.r, m);
  42729. } else if (u)
  42730. qC(y, h[i], p[i], m), r || (e[l] = N_(y));
  42731. else {
  42732. var S = Os(h[i], p[i], m);
  42733. r ? this._additiveValue = S : e[l] = S;
  42734. }
  42735. r && this._addToTarget(e);
  42736. }
  42737. }
  42738. }, t.prototype._addToTarget = function(e) {
  42739. var n = this.valType, r = this.propName, i = this._additiveValue;
  42740. n === Uy ? e[r] = e[r] + i : n === jv ? (Kr(e[r], ov), Zy(ov, ov, i, 1), e[r] = N_(ov)) : n === B_ ? Zy(e[r], e[r], i, 1) : n === Kq && U6(e[r], e[r], i, 1);
  42741. }, t;
  42742. }(), TR = function() {
  42743. function t(e, n, r, i) {
  42744. if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = n, n && i) {
  42745. xa("Can' use additive animation on looped animation.");
  42746. return;
  42747. }
  42748. this._additiveAnimators = i, this._allowDiscrete = r;
  42749. }
  42750. return t.prototype.getMaxTime = function() {
  42751. return this._maxTime;
  42752. }, t.prototype.getDelay = function() {
  42753. return this._delay;
  42754. }, t.prototype.getLoop = function() {
  42755. return this._loop;
  42756. }, t.prototype.getTarget = function() {
  42757. return this._target;
  42758. }, t.prototype.changeTarget = function(e) {
  42759. this._target = e;
  42760. }, t.prototype.when = function(e, n, r) {
  42761. return this.whenWithKeys(e, n, st(n), r);
  42762. }, t.prototype.whenWithKeys = function(e, n, r, i) {
  42763. for (var a = this._tracks, o = 0; o < r.length; o++) {
  42764. var s = r[o], l = a[s];
  42765. if (!l) {
  42766. l = a[s] = new pDe(s);
  42767. var u = void 0, c = this._getAdditiveTrack(s);
  42768. if (c) {
  42769. var f = c.keyframes, d = f[f.length - 1];
  42770. u = d && d.value, c.valType === jv && u && (u = N_(u));
  42771. } else
  42772. u = this._target[s];
  42773. if (u == null)
  42774. continue;
  42775. e > 0 && l.addKeyframe(0, Mg(u), i), this._trackKeys.push(s);
  42776. }
  42777. l.addKeyframe(e, Mg(n[s]), i);
  42778. }
  42779. return this._maxTime = Math.max(this._maxTime, e), this;
  42780. }, t.prototype.pause = function() {
  42781. this._clip.pause(), this._paused = !0;
  42782. }, t.prototype.resume = function() {
  42783. this._clip.resume(), this._paused = !1;
  42784. }, t.prototype.isPaused = function() {
  42785. return !!this._paused;
  42786. }, t.prototype.duration = function(e) {
  42787. return this._maxTime = e, this._force = !0, this;
  42788. }, t.prototype._doneCallback = function() {
  42789. this._setTracksFinished(), this._clip = null;
  42790. var e = this._doneCbs;
  42791. if (e)
  42792. for (var n = e.length, r = 0; r < n; r++)
  42793. e[r].call(this);
  42794. }, t.prototype._abortedCallback = function() {
  42795. this._setTracksFinished();
  42796. var e = this.animation, n = this._abortedCbs;
  42797. if (e && e.removeClip(this._clip), this._clip = null, n)
  42798. for (var r = 0; r < n.length; r++)
  42799. n[r].call(this);
  42800. }, t.prototype._setTracksFinished = function() {
  42801. for (var e = this._tracks, n = this._trackKeys, r = 0; r < n.length; r++)
  42802. e[n[r]].setFinished();
  42803. }, t.prototype._getAdditiveTrack = function(e) {
  42804. var n, r = this._additiveAnimators;
  42805. if (r)
  42806. for (var i = 0; i < r.length; i++) {
  42807. var a = r[i].getTrack(e);
  42808. a && (n = a);
  42809. }
  42810. return n;
  42811. }, t.prototype.start = function(e) {
  42812. if (!(this._started > 0)) {
  42813. this._started = 1;
  42814. for (var n = this, r = [], i = this._maxTime || 0, a = 0; a < this._trackKeys.length; a++) {
  42815. var o = this._trackKeys[a], s = this._tracks[o], l = this._getAdditiveTrack(o), u = s.keyframes, c = u.length;
  42816. if (s.prepare(i, l), s.needsAnimate())
  42817. if (!this._allowDiscrete && s.discrete) {
  42818. var f = u[c - 1];
  42819. f && (n._target[s.propName] = f.rawValue), s.setFinished();
  42820. } else
  42821. r.push(s);
  42822. }
  42823. if (r.length || this._force) {
  42824. var d = new UIe({
  42825. life: i,
  42826. loop: this._loop,
  42827. delay: this._delay || 0,
  42828. onframe: function(h) {
  42829. n._started = 2;
  42830. var p = n._additiveAnimators;
  42831. if (p) {
  42832. for (var v = !1, g = 0; g < p.length; g++)
  42833. if (p[g]._clip) {
  42834. v = !0;
  42835. break;
  42836. }
  42837. v || (n._additiveAnimators = null);
  42838. }
  42839. for (var g = 0; g < r.length; g++)
  42840. r[g].step(n._target, h);
  42841. var m = n._onframeCbs;
  42842. if (m)
  42843. for (var g = 0; g < m.length; g++)
  42844. m[g](n._target, h);
  42845. },
  42846. ondestroy: function() {
  42847. n._doneCallback();
  42848. }
  42849. });
  42850. this._clip = d, this.animation && this.animation.addClip(d), e && d.setEasing(e);
  42851. } else
  42852. this._doneCallback();
  42853. return this;
  42854. }
  42855. }, t.prototype.stop = function(e) {
  42856. if (this._clip) {
  42857. var n = this._clip;
  42858. e && n.onframe(1), this._abortedCallback();
  42859. }
  42860. }, t.prototype.delay = function(e) {
  42861. return this._delay = e, this;
  42862. }, t.prototype.during = function(e) {
  42863. return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this;
  42864. }, t.prototype.done = function(e) {
  42865. return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this;
  42866. }, t.prototype.aborted = function(e) {
  42867. return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this;
  42868. }, t.prototype.getClip = function() {
  42869. return this._clip;
  42870. }, t.prototype.getTrack = function(e) {
  42871. return this._tracks[e];
  42872. }, t.prototype.getTracks = function() {
  42873. var e = this;
  42874. return ce(this._trackKeys, function(n) {
  42875. return e._tracks[n];
  42876. });
  42877. }, t.prototype.stopTracks = function(e, n) {
  42878. if (!e.length || !this._clip)
  42879. return !0;
  42880. for (var r = this._tracks, i = this._trackKeys, a = 0; a < e.length; a++) {
  42881. var o = r[e[a]];
  42882. o && !o.isFinished() && (n ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished());
  42883. }
  42884. for (var s = !0, a = 0; a < i.length; a++)
  42885. if (!r[i[a]].isFinished()) {
  42886. s = !1;
  42887. break;
  42888. }
  42889. return s && this._abortedCallback(), s;
  42890. }, t.prototype.saveTo = function(e, n, r) {
  42891. if (e) {
  42892. n = n || this._trackKeys;
  42893. for (var i = 0; i < n.length; i++) {
  42894. var a = n[i], o = this._tracks[a];
  42895. if (!(!o || o.isFinished())) {
  42896. var s = o.keyframes, l = s[r ? 0 : s.length - 1];
  42897. l && (e[a] = Mg(l.rawValue));
  42898. }
  42899. }
  42900. }
  42901. }, t.prototype.__changeFinalValue = function(e, n) {
  42902. n = n || st(e);
  42903. for (var r = 0; r < n.length; r++) {
  42904. var i = n[r], a = this._tracks[i];
  42905. if (a) {
  42906. var o = a.keyframes;
  42907. if (o.length > 1) {
  42908. var s = o.pop();
  42909. a.addKeyframe(s.time, e[i]), a.prepare(this._maxTime, a.getAdditiveTrack());
  42910. }
  42911. }
  42912. }
  42913. }, t;
  42914. }();
  42915. function Vd() {
  42916. return (/* @__PURE__ */ new Date()).getTime();
  42917. }
  42918. var vDe = function(t) {
  42919. q(e, t);
  42920. function e(n) {
  42921. var r = t.call(this) || this;
  42922. return r._running = !1, r._time = 0, r._pausedTime = 0, r._pauseStart = 0, r._paused = !1, n = n || {}, r.stage = n.stage || {}, r;
  42923. }
  42924. return e.prototype.addClip = function(n) {
  42925. 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;
  42926. }, e.prototype.addAnimator = function(n) {
  42927. n.animation = this;
  42928. var r = n.getClip();
  42929. r && this.addClip(r);
  42930. }, e.prototype.removeClip = function(n) {
  42931. if (n.animation) {
  42932. var r = n.prev, i = n.next;
  42933. r ? r.next = i : this._head = i, i ? i.prev = r : this._tail = r, n.next = n.prev = n.animation = null;
  42934. }
  42935. }, e.prototype.removeAnimator = function(n) {
  42936. var r = n.getClip();
  42937. r && this.removeClip(r), n.animation = null;
  42938. }, e.prototype.update = function(n) {
  42939. for (var r = Vd() - this._pausedTime, i = r - this._time, a = this._head; a; ) {
  42940. var o = a.next, s = a.step(r, i);
  42941. s && (a.ondestroy(), this.removeClip(a)), a = o;
  42942. }
  42943. this._time = r, n || (this.trigger("frame", i), this.stage.update && this.stage.update());
  42944. }, e.prototype._startLoop = function() {
  42945. var n = this;
  42946. this._running = !0;
  42947. function r() {
  42948. n._running && (K1(r), !n._paused && n.update());
  42949. }
  42950. K1(r);
  42951. }, e.prototype.start = function() {
  42952. this._running || (this._time = Vd(), this._pausedTime = 0, this._startLoop());
  42953. }, e.prototype.stop = function() {
  42954. this._running = !1;
  42955. }, e.prototype.pause = function() {
  42956. this._paused || (this._pauseStart = Vd(), this._paused = !0);
  42957. }, e.prototype.resume = function() {
  42958. this._paused && (this._pausedTime += Vd() - this._pauseStart, this._paused = !1);
  42959. }, e.prototype.clear = function() {
  42960. for (var n = this._head; n; ) {
  42961. var r = n.next;
  42962. n.prev = n.next = n.animation = null, n = r;
  42963. }
  42964. this._head = this._tail = null;
  42965. }, e.prototype.isFinished = function() {
  42966. return this._head == null;
  42967. }, e.prototype.animate = function(n, r) {
  42968. r = r || {}, this.start();
  42969. var i = new TR(n, r.loop);
  42970. return this.addAnimator(i), i;
  42971. }, e;
  42972. }(La), gDe = 300, KC = vt.domSupported, JC = function() {
  42973. var t = [
  42974. "click",
  42975. "dblclick",
  42976. "mousewheel",
  42977. "wheel",
  42978. "mouseout",
  42979. "mouseup",
  42980. "mousedown",
  42981. "mousemove",
  42982. "contextmenu"
  42983. ], e = [
  42984. "touchstart",
  42985. "touchend",
  42986. "touchmove"
  42987. ], n = {
  42988. pointerdown: 1,
  42989. pointerup: 1,
  42990. pointermove: 1,
  42991. pointerout: 1
  42992. }, r = ce(t, function(i) {
  42993. var a = i.replace("mouse", "pointer");
  42994. return n.hasOwnProperty(a) ? a : i;
  42995. });
  42996. return {
  42997. mouse: t,
  42998. touch: e,
  42999. pointer: r
  43000. };
  43001. }(), q6 = {
  43002. mouse: ["mousemove", "mouseup"],
  43003. pointer: ["pointermove", "pointerup"]
  43004. }, K6 = !1;
  43005. function bA(t) {
  43006. var e = t.pointerType;
  43007. return e === "pen" || e === "touch";
  43008. }
  43009. function mDe(t) {
  43010. t.touching = !0, t.touchTimer != null && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout(function() {
  43011. t.touching = !1, t.touchTimer = null;
  43012. }, 700);
  43013. }
  43014. function eT(t) {
  43015. t && (t.zrByTouch = !0);
  43016. }
  43017. function yDe(t, e) {
  43018. return ua(t.dom, new bDe(t, e), !0);
  43019. }
  43020. function Jq(t, e) {
  43021. for (var n = e, r = !1; n && n.nodeType !== 9 && !(r = n.domBelongToZr || n !== e && n === t.painterRoot); )
  43022. n = n.parentNode;
  43023. return r;
  43024. }
  43025. var bDe = /* @__PURE__ */ function() {
  43026. function t(e, n) {
  43027. this.stopPropagation = On, this.stopImmediatePropagation = On, this.preventDefault = On, this.type = n.type, this.target = this.currentTarget = e.dom, this.pointerType = n.pointerType, this.clientX = n.clientX, this.clientY = n.clientY;
  43028. }
  43029. return t;
  43030. }(), Za = {
  43031. mousedown: function(t) {
  43032. t = ua(this.dom, t), this.__mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t);
  43033. },
  43034. mousemove: function(t) {
  43035. t = ua(this.dom, t);
  43036. var e = this.__mayPointerCapture;
  43037. e && (t.zrX !== e[0] || t.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", t);
  43038. },
  43039. mouseup: function(t) {
  43040. t = ua(this.dom, t), this.__togglePointerCapture(!1), this.trigger("mouseup", t);
  43041. },
  43042. mouseout: function(t) {
  43043. t = ua(this.dom, t);
  43044. var e = t.toElement || t.relatedTarget;
  43045. Jq(this, e) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"), this.trigger("mouseout", t));
  43046. },
  43047. wheel: function(t) {
  43048. K6 = !0, t = ua(this.dom, t), this.trigger("mousewheel", t);
  43049. },
  43050. mousewheel: function(t) {
  43051. K6 || (t = ua(this.dom, t), this.trigger("mousewheel", t));
  43052. },
  43053. touchstart: function(t) {
  43054. t = ua(this.dom, t), eT(t), this.__lastTouchMoment = /* @__PURE__ */ new Date(), this.handler.processGesture(t, "start"), Za.mousemove.call(this, t), Za.mousedown.call(this, t);
  43055. },
  43056. touchmove: function(t) {
  43057. t = ua(this.dom, t), eT(t), this.handler.processGesture(t, "change"), Za.mousemove.call(this, t);
  43058. },
  43059. touchend: function(t) {
  43060. t = ua(this.dom, t), eT(t), this.handler.processGesture(t, "end"), Za.mouseup.call(this, t), +/* @__PURE__ */ new Date() - +this.__lastTouchMoment < gDe && Za.click.call(this, t);
  43061. },
  43062. pointerdown: function(t) {
  43063. Za.mousedown.call(this, t);
  43064. },
  43065. pointermove: function(t) {
  43066. bA(t) || Za.mousemove.call(this, t);
  43067. },
  43068. pointerup: function(t) {
  43069. Za.mouseup.call(this, t);
  43070. },
  43071. pointerout: function(t) {
  43072. bA(t) || Za.mouseout.call(this, t);
  43073. }
  43074. };
  43075. k(["click", "dblclick", "contextmenu"], function(t) {
  43076. Za[t] = function(e) {
  43077. e = ua(this.dom, e), this.trigger(t, e);
  43078. };
  43079. });
  43080. var _A = {
  43081. pointermove: function(t) {
  43082. bA(t) || _A.mousemove.call(this, t);
  43083. },
  43084. pointerup: function(t) {
  43085. _A.mouseup.call(this, t);
  43086. },
  43087. mousemove: function(t) {
  43088. this.trigger("mousemove", t);
  43089. },
  43090. mouseup: function(t) {
  43091. var e = this.__pointerCapturing;
  43092. this.__togglePointerCapture(!1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t));
  43093. }
  43094. };
  43095. function _De(t, e) {
  43096. var n = e.domHandlers;
  43097. vt.pointerEventsSupported ? k(JC.pointer, function(r) {
  43098. z_(e, r, function(i) {
  43099. n[r].call(t, i);
  43100. });
  43101. }) : (vt.touchEventsSupported && k(JC.touch, function(r) {
  43102. z_(e, r, function(i) {
  43103. n[r].call(t, i), mDe(e);
  43104. });
  43105. }), k(JC.mouse, function(r) {
  43106. z_(e, r, function(i) {
  43107. i = SR(i), e.touching || n[r].call(t, i);
  43108. });
  43109. }));
  43110. }
  43111. function ODe(t, e) {
  43112. vt.pointerEventsSupported ? k(q6.pointer, n) : vt.touchEventsSupported || k(q6.mouse, n);
  43113. function n(r) {
  43114. function i(a) {
  43115. a = SR(a), Jq(t, a.target) || (a = yDe(t, a), e.domHandlers[r].call(t, a));
  43116. }
  43117. z_(e, r, i, { capture: !0 });
  43118. }
  43119. }
  43120. function z_(t, e, n, r) {
  43121. t.mounted[e] = n, t.listenerOpts[e] = r, fA(t.domTarget, e, n, r);
  43122. }
  43123. function tT(t) {
  43124. var e = t.mounted;
  43125. for (var n in e)
  43126. e.hasOwnProperty(n) && EIe(t.domTarget, n, e[n], t.listenerOpts[n]);
  43127. t.mounted = {};
  43128. }
  43129. var J6 = /* @__PURE__ */ function() {
  43130. function t(e, n) {
  43131. this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = n;
  43132. }
  43133. return t;
  43134. }(), SDe = function(t) {
  43135. q(e, t);
  43136. function e(n, r) {
  43137. var i = t.call(this) || this;
  43138. return i.__pointerCapturing = !1, i.dom = n, i.painterRoot = r, i._localHandlerScope = new J6(n, Za), KC && (i._globalHandlerScope = new J6(document, _A)), _De(i, i._localHandlerScope), i;
  43139. }
  43140. return e.prototype.dispose = function() {
  43141. tT(this._localHandlerScope), KC && tT(this._globalHandlerScope);
  43142. }, e.prototype.setCursor = function(n) {
  43143. this.dom.style && (this.dom.style.cursor = n || "default");
  43144. }, e.prototype.__togglePointerCapture = function(n) {
  43145. if (this.__mayPointerCapture = null, KC && +this.__pointerCapturing ^ +n) {
  43146. this.__pointerCapturing = n;
  43147. var r = this._globalHandlerScope;
  43148. n ? ODe(this, r) : tT(r);
  43149. }
  43150. }, e;
  43151. }(La), eK = 1;
  43152. vt.hasGlobalWindow && (eK = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
  43153. var iO = eK, OA = 0.4, SA = "#333", xA = "#ccc", xDe = "#eee", eB = R0, tB = 5e-5;
  43154. function Qu(t) {
  43155. return t > tB || t < -tB;
  43156. }
  43157. var Hu = [], rd = [], nT = wi(), rT = Math.abs, wDe = function() {
  43158. function t() {
  43159. }
  43160. return t.prototype.getLocalTransform = function(e) {
  43161. return t.getLocalTransform(this, e);
  43162. }, t.prototype.setPosition = function(e) {
  43163. this.x = e[0], this.y = e[1];
  43164. }, t.prototype.setScale = function(e) {
  43165. this.scaleX = e[0], this.scaleY = e[1];
  43166. }, t.prototype.setSkew = function(e) {
  43167. this.skewX = e[0], this.skewY = e[1];
  43168. }, t.prototype.setOrigin = function(e) {
  43169. this.originX = e[0], this.originY = e[1];
  43170. }, t.prototype.needLocalTransform = function() {
  43171. return Qu(this.rotation) || Qu(this.x) || Qu(this.y) || Qu(this.scaleX - 1) || Qu(this.scaleY - 1) || Qu(this.skewX) || Qu(this.skewY);
  43172. }, t.prototype.updateTransform = function() {
  43173. var e = this.parent && this.parent.transform, n = this.needLocalTransform(), r = this.transform;
  43174. if (!(n || e)) {
  43175. r && (eB(r), this.invTransform = null);
  43176. return;
  43177. }
  43178. r = r || wi(), n ? this.getLocalTransform(r) : eB(r), e && (n ? Xo(r, e, r) : Nx(r, e)), this.transform = r, this._resolveGlobalScaleRatio(r);
  43179. }, t.prototype._resolveGlobalScaleRatio = function(e) {
  43180. var n = this.globalScaleRatio;
  43181. if (n != null && n !== 1) {
  43182. this.getGlobalScale(Hu);
  43183. var r = Hu[0] < 0 ? -1 : 1, i = Hu[1] < 0 ? -1 : 1, a = ((Hu[0] - r) * n + r) / Hu[0] || 0, o = ((Hu[1] - i) * n + i) / Hu[1] || 0;
  43184. e[0] *= a, e[1] *= a, e[2] *= o, e[3] *= o;
  43185. }
  43186. this.invTransform = this.invTransform || wi(), Lf(this.invTransform, e);
  43187. }, t.prototype.getComputedTransform = function() {
  43188. for (var e = this, n = []; e; )
  43189. n.push(e), e = e.parent;
  43190. for (; e = n.pop(); )
  43191. e.updateTransform();
  43192. return this.transform;
  43193. }, t.prototype.setLocalTransform = function(e) {
  43194. if (e) {
  43195. 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]);
  43196. 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;
  43197. }
  43198. }, t.prototype.decomposeTransform = function() {
  43199. if (this.transform) {
  43200. var e = this.parent, n = this.transform;
  43201. e && e.transform && (e.invTransform = e.invTransform || wi(), Xo(rd, e.invTransform, n), n = rd);
  43202. var r = this.originX, i = this.originY;
  43203. (r || i) && (nT[4] = r, nT[5] = i, Xo(rd, n, nT), rd[4] -= r, rd[5] -= i, n = rd), this.setLocalTransform(n);
  43204. }
  43205. }, t.prototype.getGlobalScale = function(e) {
  43206. var n = this.transform;
  43207. 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);
  43208. }, t.prototype.transformCoordToLocal = function(e, n) {
  43209. var r = [e, n], i = this.invTransform;
  43210. return i && ar(r, r, i), r;
  43211. }, t.prototype.transformCoordToGlobal = function(e, n) {
  43212. var r = [e, n], i = this.transform;
  43213. return i && ar(r, r, i), r;
  43214. }, t.prototype.getLineScale = function() {
  43215. var e = this.transform;
  43216. return e && rT(e[0] - 1) > 1e-10 && rT(e[3] - 1) > 1e-10 ? Math.sqrt(rT(e[0] * e[3] - e[2] * e[1])) : 1;
  43217. }, t.prototype.copyTransform = function(e) {
  43218. tK(this, e);
  43219. }, t.getLocalTransform = function(e, n) {
  43220. n = n || [];
  43221. 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;
  43222. if (r || i || s || l) {
  43223. var p = r + s, v = i + l;
  43224. n[4] = -p * a - d * v * o, n[5] = -v * o - h * p * a;
  43225. } else
  43226. n[4] = n[5] = 0;
  43227. return n[0] = a, n[3] = o, n[1] = h * a, n[2] = d * o, u && Cu(n, n, u), n[4] += r + c, n[5] += i + f, n;
  43228. }, t.initDefaultProps = function() {
  43229. var e = t.prototype;
  43230. 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;
  43231. }(), t;
  43232. }(), is = [
  43233. "x",
  43234. "y",
  43235. "originX",
  43236. "originY",
  43237. "anchorX",
  43238. "anchorY",
  43239. "rotation",
  43240. "scaleX",
  43241. "scaleY",
  43242. "skewX",
  43243. "skewY"
  43244. ];
  43245. function tK(t, e) {
  43246. for (var n = 0; n < is.length; n++) {
  43247. var r = is[n];
  43248. t[r] = e[r];
  43249. }
  43250. }
  43251. const Es = wDe;
  43252. var nB = {};
  43253. function Xi(t, e) {
  43254. e = e || iu;
  43255. var n = nB[e];
  43256. n || (n = nB[e] = new k0(500));
  43257. var r = n.get(t);
  43258. return r == null && (r = oo.measureText(t, e).width, n.put(t, r)), r;
  43259. }
  43260. function rB(t, e, n, r) {
  43261. var i = Xi(t, e), a = Vx(e), o = Zv(0, i, n), s = Ed(0, a, r), l = new Je(o, s, i, a);
  43262. return l;
  43263. }
  43264. function L0(t, e, n, r) {
  43265. var i = ((t || "") + "").split(`
  43266. `), a = i.length;
  43267. if (a === 1)
  43268. return rB(i[0], e, n, r);
  43269. for (var o = new Je(0, 0, 0, 0), s = 0; s < i.length; s++) {
  43270. var l = rB(i[s], e, n, r);
  43271. s === 0 ? o.copy(l) : o.union(l);
  43272. }
  43273. return o;
  43274. }
  43275. function Zv(t, e, n) {
  43276. return n === "right" ? t -= e : n === "center" && (t -= e / 2), t;
  43277. }
  43278. function Ed(t, e, n) {
  43279. return n === "middle" ? t -= e / 2 : n === "bottom" && (t -= e), t;
  43280. }
  43281. function Vx(t) {
  43282. return Xi("国", t);
  43283. }
  43284. function lo(t, e) {
  43285. return typeof t == "string" ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t;
  43286. }
  43287. function aO(t, e, n) {
  43288. 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";
  43289. if (r instanceof Array)
  43290. l += lo(r[0], n.width), u += lo(r[1], n.height), c = null, f = null;
  43291. else
  43292. switch (r) {
  43293. case "left":
  43294. l -= i, u += s, c = "right", f = "middle";
  43295. break;
  43296. case "right":
  43297. l += i + o, u += s, f = "middle";
  43298. break;
  43299. case "top":
  43300. l += o / 2, u -= i, c = "center", f = "bottom";
  43301. break;
  43302. case "bottom":
  43303. l += o / 2, u += a + i, c = "center";
  43304. break;
  43305. case "inside":
  43306. l += o / 2, u += s, c = "center", f = "middle";
  43307. break;
  43308. case "insideLeft":
  43309. l += i, u += s, f = "middle";
  43310. break;
  43311. case "insideRight":
  43312. l += o - i, u += s, c = "right", f = "middle";
  43313. break;
  43314. case "insideTop":
  43315. l += o / 2, u += i, c = "center";
  43316. break;
  43317. case "insideBottom":
  43318. l += o / 2, u += a - i, c = "center", f = "bottom";
  43319. break;
  43320. case "insideTopLeft":
  43321. l += i, u += i;
  43322. break;
  43323. case "insideTopRight":
  43324. l += o - i, u += i, c = "right";
  43325. break;
  43326. case "insideBottomLeft":
  43327. l += i, u += a - i, f = "bottom";
  43328. break;
  43329. case "insideBottomRight":
  43330. l += o - i, u += a - i, c = "right", f = "bottom";
  43331. break;
  43332. }
  43333. return t = t || {}, t.x = l, t.y = u, t.align = c, t.verticalAlign = f, t;
  43334. }
  43335. var iT = "__zr_normal__", aT = is.concat(["ignore"]), CDe = Ma(is, function(t, e) {
  43336. return t[e] = !0, t;
  43337. }, { ignore: !1 }), id = {}, TDe = new Je(0, 0, 0, 0), Fx = function() {
  43338. function t(e) {
  43339. this.id = mR(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
  43340. }
  43341. return t.prototype._init = function(e) {
  43342. this.attr(e);
  43343. }, t.prototype.drift = function(e, n, r) {
  43344. switch (this.draggable) {
  43345. case "horizontal":
  43346. n = 0;
  43347. break;
  43348. case "vertical":
  43349. e = 0;
  43350. break;
  43351. }
  43352. var i = this.transform;
  43353. i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += e, i[5] += n, this.decomposeTransform(), this.markRedraw();
  43354. }, t.prototype.beforeUpdate = function() {
  43355. }, t.prototype.afterUpdate = function() {
  43356. }, t.prototype.update = function() {
  43357. this.updateTransform(), this.__dirty && this.updateInnerText();
  43358. }, t.prototype.updateInnerText = function(e) {
  43359. var n = this._textContent;
  43360. if (n && (!n.ignore || e)) {
  43361. this.textConfig || (this.textConfig = {});
  43362. var r = this.textConfig, i = r.local, a = n.innerTransformable, o = void 0, s = void 0, l = !1;
  43363. a.parent = i ? this : null;
  43364. var u = !1;
  43365. if (a.copyTransform(n), r.position != null) {
  43366. var c = TDe;
  43367. r.layoutRect ? c.copy(r.layoutRect) : c.copy(this.getBoundingRect()), i || c.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(id, r, c) : aO(id, r, c), a.x = id.x, a.y = id.y, o = id.align, s = id.verticalAlign;
  43368. var f = r.origin;
  43369. if (f && r.rotation != null) {
  43370. var d = void 0, h = void 0;
  43371. f === "center" ? (d = c.width * 0.5, h = c.height * 0.5) : (d = lo(f[0], c.width), h = lo(f[1], c.height)), u = !0, a.originX = -a.x + d + (i ? 0 : c.x), a.originY = -a.y + h + (i ? 0 : c.y);
  43372. }
  43373. }
  43374. r.rotation != null && (a.rotation = r.rotation);
  43375. var p = r.offset;
  43376. p && (a.x += p[0], a.y += p[1], u || (a.originX = -p[0], a.originY = -p[1]));
  43377. 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, b = void 0;
  43378. v && this.canBeInsideText() ? (m = r.insideFill, y = r.insideStroke, (m == null || m === "auto") && (m = this.getInsideTextFill()), (y == null || y === "auto") && (y = this.getInsideTextStroke(m), b = !0)) : (m = r.outsideFill, y = r.outsideStroke, (m == null || m === "auto") && (m = this.getOutsideFill()), (y == null || y === "auto") && (y = this.getOutsideStroke(m), b = !0)), m = m || "#000", (m !== g.fill || y !== g.stroke || b !== g.autoStroke || o !== g.align || s !== g.verticalAlign) && (l = !0, g.fill = m, g.stroke = y, g.autoStroke = b, g.align = o, g.verticalAlign = s, n.setDefaultTextStyle(g)), n.__dirty |= Ni, l && n.dirtyStyle(!0);
  43379. }
  43380. }, t.prototype.canBeInsideText = function() {
  43381. return !0;
  43382. }, t.prototype.getInsideTextFill = function() {
  43383. return "#fff";
  43384. }, t.prototype.getInsideTextStroke = function(e) {
  43385. return "#000";
  43386. }, t.prototype.getOutsideFill = function() {
  43387. return this.__zr && this.__zr.isDarkMode() ? xA : SA;
  43388. }, t.prototype.getOutsideStroke = function(e) {
  43389. var n = this.__zr && this.__zr.getBackgroundColor(), r = typeof n == "string" && Kr(n);
  43390. r || (r = [255, 255, 255, 1]);
  43391. for (var i = r[3], a = this.__zr.isDarkMode(), o = 0; o < 3; o++)
  43392. r[o] = r[o] * i + (a ? 0 : 255) * (1 - i);
  43393. return r[3] = 1, no(r, "rgba");
  43394. }, t.prototype.traverse = function(e, n) {
  43395. }, t.prototype.attrKV = function(e, n) {
  43396. e === "textConfig" ? this.setTextConfig(n) : e === "textContent" ? this.setTextContent(n) : e === "clipPath" ? this.setClipPath(n) : e === "extra" ? (this.extra = this.extra || {}, le(this.extra, n)) : this[e] = n;
  43397. }, t.prototype.hide = function() {
  43398. this.ignore = !0, this.markRedraw();
  43399. }, t.prototype.show = function() {
  43400. this.ignore = !1, this.markRedraw();
  43401. }, t.prototype.attr = function(e, n) {
  43402. if (typeof e == "string")
  43403. this.attrKV(e, n);
  43404. else if (Ie(e))
  43405. for (var r = e, i = st(r), a = 0; a < i.length; a++) {
  43406. var o = i[a];
  43407. this.attrKV(o, e[o]);
  43408. }
  43409. return this.markRedraw(), this;
  43410. }, t.prototype.saveCurrentToNormalState = function(e) {
  43411. this._innerSaveToNormal(e);
  43412. for (var n = this._normalState, r = 0; r < this.animators.length; r++) {
  43413. var i = this.animators[r], a = i.__fromStateTransition;
  43414. if (!(i.getLoop() || a && a !== iT)) {
  43415. var o = i.targetName, s = o ? n[o] : n;
  43416. i.saveTo(s);
  43417. }
  43418. }
  43419. }, t.prototype._innerSaveToNormal = function(e) {
  43420. var n = this._normalState;
  43421. n || (n = this._normalState = {}), e.textConfig && !n.textConfig && (n.textConfig = this.textConfig), this._savePrimaryToNormal(e, n, aT);
  43422. }, t.prototype._savePrimaryToNormal = function(e, n, r) {
  43423. for (var i = 0; i < r.length; i++) {
  43424. var a = r[i];
  43425. e[a] != null && !(a in n) && (n[a] = this[a]);
  43426. }
  43427. }, t.prototype.hasState = function() {
  43428. return this.currentStates.length > 0;
  43429. }, t.prototype.getState = function(e) {
  43430. return this.states[e];
  43431. }, t.prototype.ensureState = function(e) {
  43432. var n = this.states;
  43433. return n[e] || (n[e] = {}), n[e];
  43434. }, t.prototype.clearStates = function(e) {
  43435. this.useState(iT, !1, e);
  43436. }, t.prototype.useState = function(e, n, r, i) {
  43437. var a = e === iT, o = this.hasState();
  43438. if (!(!o && a)) {
  43439. var s = this.currentStates, l = this.stateTransition;
  43440. if (!(et(s, e) >= 0 && (n || s.length === 1))) {
  43441. var u;
  43442. if (this.stateProxy && !a && (u = this.stateProxy(e)), u || (u = this.states && this.states[e]), !u && !a) {
  43443. xa("State " + e + " not exists.");
  43444. return;
  43445. }
  43446. a || this.saveCurrentToNormalState(u);
  43447. var c = !!(u && u.hoverLayer || i);
  43448. c && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, u, this._normalState, n, !r && !this.__inHover && l && l.duration > 0, l);
  43449. var f = this._textContent, d = this._textGuide;
  43450. 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 &= ~Ni), u;
  43451. }
  43452. }
  43453. }, t.prototype.useStates = function(e, n, r) {
  43454. if (!e.length)
  43455. this.clearStates();
  43456. else {
  43457. var i = [], a = this.currentStates, o = e.length, s = o === a.length;
  43458. if (s) {
  43459. for (var l = 0; l < o; l++)
  43460. if (e[l] !== a[l]) {
  43461. s = !1;
  43462. break;
  43463. }
  43464. }
  43465. if (s)
  43466. return;
  43467. for (var l = 0; l < o; l++) {
  43468. var u = e[l], c = void 0;
  43469. this.stateProxy && (c = this.stateProxy(u, e)), c || (c = this.states[u]), c && i.push(c);
  43470. }
  43471. var f = i[o - 1], d = !!(f && f.hoverLayer || r);
  43472. d && this._toggleHoverLayerFlag(!0);
  43473. var h = this._mergeStates(i), p = this.stateTransition;
  43474. this.saveCurrentToNormalState(h), this._applyStateObj(e.join(","), h, this._normalState, !1, !n && !this.__inHover && p && p.duration > 0, p);
  43475. var v = this._textContent, g = this._textGuide;
  43476. 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 &= ~Ni);
  43477. }
  43478. }, t.prototype.isSilent = function() {
  43479. for (var e = this.silent, n = this.parent; !e && n; ) {
  43480. if (n.silent) {
  43481. e = !0;
  43482. break;
  43483. }
  43484. n = n.parent;
  43485. }
  43486. return e;
  43487. }, t.prototype._updateAnimationTargets = function() {
  43488. for (var e = 0; e < this.animators.length; e++) {
  43489. var n = this.animators[e];
  43490. n.targetName && n.changeTarget(this[n.targetName]);
  43491. }
  43492. }, t.prototype.removeState = function(e) {
  43493. var n = et(this.currentStates, e);
  43494. if (n >= 0) {
  43495. var r = this.currentStates.slice();
  43496. r.splice(n, 1), this.useStates(r);
  43497. }
  43498. }, t.prototype.replaceState = function(e, n, r) {
  43499. var i = this.currentStates.slice(), a = et(i, e), o = et(i, n) >= 0;
  43500. a >= 0 ? o ? i.splice(a, 1) : i[a] = n : r && !o && i.push(n), this.useStates(i);
  43501. }, t.prototype.toggleState = function(e, n) {
  43502. n ? this.useState(e, !0) : this.removeState(e);
  43503. }, t.prototype._mergeStates = function(e) {
  43504. for (var n = {}, r, i = 0; i < e.length; i++) {
  43505. var a = e[i];
  43506. le(n, a), a.textConfig && (r = r || {}, le(r, a.textConfig));
  43507. }
  43508. return r && (n.textConfig = r), n;
  43509. }, t.prototype._applyStateObj = function(e, n, r, i, a, o) {
  43510. var s = !(n && i);
  43511. n && n.textConfig ? (this.textConfig = le({}, i ? this.textConfig : r.textConfig), le(this.textConfig, n.textConfig)) : s && r.textConfig && (this.textConfig = r.textConfig);
  43512. for (var l = {}, u = !1, c = 0; c < aT.length; c++) {
  43513. var f = aT[c], d = a && CDe[f];
  43514. 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]);
  43515. }
  43516. if (!a)
  43517. for (var c = 0; c < this.animators.length; c++) {
  43518. var h = this.animators[c], p = h.targetName;
  43519. h.getLoop() || h.__changeFinalValue(p ? (n || r)[p] : n || r);
  43520. }
  43521. u && this._transitionState(e, l, o);
  43522. }, t.prototype._attachComponent = function(e) {
  43523. if (e.__zr && !e.__hostTarget) {
  43524. if (process.env.NODE_ENV !== "production")
  43525. throw new Error("Text element has been added to zrender.");
  43526. return;
  43527. }
  43528. if (e === this) {
  43529. if (process.env.NODE_ENV !== "production")
  43530. throw new Error("Recursive component attachment.");
  43531. return;
  43532. }
  43533. var n = this.__zr;
  43534. n && e.addSelfToZr(n), e.__zr = n, e.__hostTarget = this;
  43535. }, t.prototype._detachComponent = function(e) {
  43536. e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
  43537. }, t.prototype.getClipPath = function() {
  43538. return this._clipPath;
  43539. }, t.prototype.setClipPath = function(e) {
  43540. this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
  43541. }, t.prototype.removeClipPath = function() {
  43542. var e = this._clipPath;
  43543. e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
  43544. }, t.prototype.getTextContent = function() {
  43545. return this._textContent;
  43546. }, t.prototype.setTextContent = function(e) {
  43547. var n = this._textContent;
  43548. if (n !== e) {
  43549. if (n && n !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget)
  43550. throw new Error("Text element has been added to zrender.");
  43551. e.innerTransformable = new Es(), this._attachComponent(e), this._textContent = e, this.markRedraw();
  43552. }
  43553. }, t.prototype.setTextConfig = function(e) {
  43554. this.textConfig || (this.textConfig = {}), le(this.textConfig, e), this.markRedraw();
  43555. }, t.prototype.removeTextConfig = function() {
  43556. this.textConfig = null, this.markRedraw();
  43557. }, t.prototype.removeTextContent = function() {
  43558. var e = this._textContent;
  43559. e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
  43560. }, t.prototype.getTextGuideLine = function() {
  43561. return this._textGuide;
  43562. }, t.prototype.setTextGuideLine = function(e) {
  43563. this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
  43564. }, t.prototype.removeTextGuideLine = function() {
  43565. var e = this._textGuide;
  43566. e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
  43567. }, t.prototype.markRedraw = function() {
  43568. this.__dirty |= Ni;
  43569. var e = this.__zr;
  43570. e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
  43571. }, t.prototype.dirty = function() {
  43572. this.markRedraw();
  43573. }, t.prototype._toggleHoverLayerFlag = function(e) {
  43574. this.__inHover = e;
  43575. var n = this._textContent, r = this._textGuide;
  43576. n && (n.__inHover = e), r && (r.__inHover = e);
  43577. }, t.prototype.addSelfToZr = function(e) {
  43578. if (this.__zr !== e) {
  43579. this.__zr = e;
  43580. var n = this.animators;
  43581. if (n)
  43582. for (var r = 0; r < n.length; r++)
  43583. e.animation.addAnimator(n[r]);
  43584. this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
  43585. }
  43586. }, t.prototype.removeSelfFromZr = function(e) {
  43587. if (this.__zr) {
  43588. this.__zr = null;
  43589. var n = this.animators;
  43590. if (n)
  43591. for (var r = 0; r < n.length; r++)
  43592. e.animation.removeAnimator(n[r]);
  43593. this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
  43594. }
  43595. }, t.prototype.animate = function(e, n, r) {
  43596. var i = e ? this[e] : this;
  43597. if (process.env.NODE_ENV !== "production" && !i) {
  43598. xa('Property "' + e + '" is not existed in element ' + this.id);
  43599. return;
  43600. }
  43601. var a = new TR(i, n, r);
  43602. return e && (a.targetName = e), this.addAnimator(a, e), a;
  43603. }, t.prototype.addAnimator = function(e, n) {
  43604. var r = this.__zr, i = this;
  43605. e.during(function() {
  43606. i.updateDuringAnimation(n);
  43607. }).done(function() {
  43608. var a = i.animators, o = et(a, e);
  43609. o >= 0 && a.splice(o, 1);
  43610. }), this.animators.push(e), r && r.animation.addAnimator(e), r && r.wakeUp();
  43611. }, t.prototype.updateDuringAnimation = function(e) {
  43612. this.markRedraw();
  43613. }, t.prototype.stopAnimation = function(e, n) {
  43614. for (var r = this.animators, i = r.length, a = [], o = 0; o < i; o++) {
  43615. var s = r[o];
  43616. !e || e === s.scope ? s.stop(n) : a.push(s);
  43617. }
  43618. return this.animators = a, this;
  43619. }, t.prototype.animateTo = function(e, n, r) {
  43620. oT(this, e, n, r);
  43621. }, t.prototype.animateFrom = function(e, n, r) {
  43622. oT(this, e, n, r, !0);
  43623. }, t.prototype._transitionState = function(e, n, r, i) {
  43624. for (var a = oT(this, n, r, i), o = 0; o < a.length; o++)
  43625. a[o].__fromStateTransition = e;
  43626. }, t.prototype.getBoundingRect = function() {
  43627. return null;
  43628. }, t.prototype.getPaintRect = function() {
  43629. return null;
  43630. }, t.initDefaultProps = function() {
  43631. var e = t.prototype;
  43632. e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = Ni;
  43633. var n = {};
  43634. function r(a, o, s) {
  43635. n[a + o + s] || (console.warn("DEPRECATED: '" + a + "' has been deprecated. use '" + o + "', '" + s + "' instead"), n[a + o + s] = !0);
  43636. }
  43637. function i(a, o, s, l) {
  43638. Object.defineProperty(e, a, {
  43639. get: function() {
  43640. if (process.env.NODE_ENV !== "production" && r(a, s, l), !this[o]) {
  43641. var c = this[o] = [];
  43642. u(this, c);
  43643. }
  43644. return this[o];
  43645. },
  43646. set: function(c) {
  43647. process.env.NODE_ENV !== "production" && r(a, s, l), this[s] = c[0], this[l] = c[1], this[o] = c, u(this, c);
  43648. }
  43649. });
  43650. function u(c, f) {
  43651. Object.defineProperty(f, 0, {
  43652. get: function() {
  43653. return c[s];
  43654. },
  43655. set: function(d) {
  43656. c[s] = d;
  43657. }
  43658. }), Object.defineProperty(f, 1, {
  43659. get: function() {
  43660. return c[l];
  43661. },
  43662. set: function(d) {
  43663. c[l] = d;
  43664. }
  43665. });
  43666. }
  43667. }
  43668. Object.defineProperty && (i("position", "_legacyPos", "x", "y"), i("scale", "_legacyScale", "scaleX", "scaleY"), i("origin", "_legacyOrigin", "originX", "originY"));
  43669. }(), t;
  43670. }();
  43671. xn(Fx, La);
  43672. xn(Fx, Es);
  43673. function oT(t, e, n, r, i) {
  43674. n = n || {};
  43675. var a = [];
  43676. nK(t, "", t, e, n, r, a, i);
  43677. var o = a.length, s = !1, l = n.done, u = n.aborted, c = function() {
  43678. s = !0, o--, o <= 0 && (s ? l && l() : u && u());
  43679. }, f = function() {
  43680. o--, o <= 0 && (s ? l && l() : u && u());
  43681. };
  43682. o || l && l(), a.length > 0 && n.during && a[0].during(function(p, v) {
  43683. n.during(v);
  43684. });
  43685. for (var d = 0; d < a.length; d++) {
  43686. var h = a[d];
  43687. c && h.done(c), f && h.aborted(f), n.force && h.duration(n.duration), h.start(n.easing);
  43688. }
  43689. return a;
  43690. }
  43691. function sT(t, e, n) {
  43692. for (var r = 0; r < n; r++)
  43693. t[r] = e[r];
  43694. }
  43695. function PDe(t) {
  43696. return wr(t[0]);
  43697. }
  43698. function $De(t, e, n) {
  43699. if (wr(e[n]))
  43700. if (wr(t[n]) || (t[n] = []), Br(e[n])) {
  43701. var r = e[n].length;
  43702. t[n].length !== r && (t[n] = new e[n].constructor(r), sT(t[n], e[n], r));
  43703. } else {
  43704. var i = e[n], a = t[n], o = i.length;
  43705. if (PDe(i))
  43706. for (var s = i[0].length, l = 0; l < o; l++)
  43707. a[l] ? sT(a[l], i[l], s) : a[l] = Array.prototype.slice.call(i[l]);
  43708. else
  43709. sT(a, i, o);
  43710. a.length = i.length;
  43711. }
  43712. else
  43713. t[n] = e[n];
  43714. }
  43715. function ADe(t, e) {
  43716. return t === e || wr(t) && wr(e) && EDe(t, e);
  43717. }
  43718. function EDe(t, e) {
  43719. var n = t.length;
  43720. if (n !== e.length)
  43721. return !1;
  43722. for (var r = 0; r < n; r++)
  43723. if (t[r] !== e[r])
  43724. return !1;
  43725. return !0;
  43726. }
  43727. function nK(t, e, n, r, i, a, o, s) {
  43728. for (var l = st(r), u = i.duration, c = i.delay, f = i.additive, d = i.setToFinal, h = !Ie(a), p = t.animators, v = [], g = 0; g < l.length; g++) {
  43729. var m = l[g], y = r[m];
  43730. if (y != null && n[m] != null && (h || a[m]))
  43731. if (Ie(y) && !wr(y) && !I0(y)) {
  43732. if (e) {
  43733. s || (n[m] = y, t.updateDuringAnimation(e));
  43734. continue;
  43735. }
  43736. nK(t, m, n[m], y, i, a && a[m], o, s);
  43737. } else
  43738. v.push(m);
  43739. else s || (n[m] = y, t.updateDuringAnimation(e), v.push(m));
  43740. }
  43741. var b = v.length;
  43742. if (!f && b)
  43743. for (var _ = 0; _ < p.length; _++) {
  43744. var O = p[_];
  43745. if (O.targetName === e) {
  43746. var S = O.stopTracks(v);
  43747. if (S) {
  43748. var x = et(p, O);
  43749. p.splice(x, 1);
  43750. }
  43751. }
  43752. }
  43753. if (i.force || (v = Nt(v, function(P) {
  43754. return !ADe(r[P], n[P]);
  43755. }), b = v.length), b > 0 || i.force && !o.length) {
  43756. var C = void 0, T = void 0, w = void 0;
  43757. if (s) {
  43758. T = {}, d && (C = {});
  43759. for (var _ = 0; _ < b; _++) {
  43760. var m = v[_];
  43761. T[m] = n[m], d ? C[m] = r[m] : n[m] = r[m];
  43762. }
  43763. } else if (d) {
  43764. w = {};
  43765. for (var _ = 0; _ < b; _++) {
  43766. var m = v[_];
  43767. w[m] = Mg(n[m]), $De(n, r, m);
  43768. }
  43769. }
  43770. var O = new TR(n, !1, !1, f ? Nt(p, function($) {
  43771. return $.targetName === e;
  43772. }) : null);
  43773. O.targetName = e, i.scope && (O.scope = i.scope), d && C && O.whenWithKeys(0, C, v), w && O.whenWithKeys(0, w, v), O.whenWithKeys(u ?? 500, s ? T : r, v).delay(c || 0), t.addAnimator(O, e), o.push(O);
  43774. }
  43775. }
  43776. var rK = function(t) {
  43777. q(e, t);
  43778. function e(n) {
  43779. var r = t.call(this) || this;
  43780. return r.isGroup = !0, r._children = [], r.attr(n), r;
  43781. }
  43782. return e.prototype.childrenRef = function() {
  43783. return this._children;
  43784. }, e.prototype.children = function() {
  43785. return this._children.slice();
  43786. }, e.prototype.childAt = function(n) {
  43787. return this._children[n];
  43788. }, e.prototype.childOfName = function(n) {
  43789. for (var r = this._children, i = 0; i < r.length; i++)
  43790. if (r[i].name === n)
  43791. return r[i];
  43792. }, e.prototype.childCount = function() {
  43793. return this._children.length;
  43794. }, e.prototype.add = function(n) {
  43795. if (n && (n !== this && n.parent !== this && (this._children.push(n), this._doAdd(n)), process.env.NODE_ENV !== "production" && n.__hostTarget))
  43796. throw "This elemenet has been used as an attachment";
  43797. return this;
  43798. }, e.prototype.addBefore = function(n, r) {
  43799. if (n && n !== this && n.parent !== this && r && r.parent === this) {
  43800. var i = this._children, a = i.indexOf(r);
  43801. a >= 0 && (i.splice(a, 0, n), this._doAdd(n));
  43802. }
  43803. return this;
  43804. }, e.prototype.replace = function(n, r) {
  43805. var i = et(this._children, n);
  43806. return i >= 0 && this.replaceAt(r, i), this;
  43807. }, e.prototype.replaceAt = function(n, r) {
  43808. var i = this._children, a = i[r];
  43809. if (n && n !== this && n.parent !== this && n !== a) {
  43810. i[r] = n, a.parent = null;
  43811. var o = this.__zr;
  43812. o && a.removeSelfFromZr(o), this._doAdd(n);
  43813. }
  43814. return this;
  43815. }, e.prototype._doAdd = function(n) {
  43816. n.parent && n.parent.remove(n), n.parent = this;
  43817. var r = this.__zr;
  43818. r && r !== n.__zr && n.addSelfToZr(r), r && r.refresh();
  43819. }, e.prototype.remove = function(n) {
  43820. var r = this.__zr, i = this._children, a = et(i, n);
  43821. return a < 0 ? this : (i.splice(a, 1), n.parent = null, r && n.removeSelfFromZr(r), r && r.refresh(), this);
  43822. }, e.prototype.removeAll = function() {
  43823. for (var n = this._children, r = this.__zr, i = 0; i < n.length; i++) {
  43824. var a = n[i];
  43825. r && a.removeSelfFromZr(r), a.parent = null;
  43826. }
  43827. return n.length = 0, this;
  43828. }, e.prototype.eachChild = function(n, r) {
  43829. for (var i = this._children, a = 0; a < i.length; a++) {
  43830. var o = i[a];
  43831. n.call(r, o, a);
  43832. }
  43833. return this;
  43834. }, e.prototype.traverse = function(n, r) {
  43835. for (var i = 0; i < this._children.length; i++) {
  43836. var a = this._children[i], o = n.call(r, a);
  43837. a.isGroup && !o && a.traverse(n, r);
  43838. }
  43839. return this;
  43840. }, e.prototype.addSelfToZr = function(n) {
  43841. t.prototype.addSelfToZr.call(this, n);
  43842. for (var r = 0; r < this._children.length; r++) {
  43843. var i = this._children[r];
  43844. i.addSelfToZr(n);
  43845. }
  43846. }, e.prototype.removeSelfFromZr = function(n) {
  43847. t.prototype.removeSelfFromZr.call(this, n);
  43848. for (var r = 0; r < this._children.length; r++) {
  43849. var i = this._children[r];
  43850. i.removeSelfFromZr(n);
  43851. }
  43852. }, e.prototype.getBoundingRect = function(n) {
  43853. for (var r = new Je(0, 0, 0, 0), i = n || this._children, a = [], o = null, s = 0; s < i.length; s++) {
  43854. var l = i[s];
  43855. if (!(l.ignore || l.invisible)) {
  43856. var u = l.getBoundingRect(), c = l.getLocalTransform(a);
  43857. c ? (Je.applyTransform(r, u, c), o = o || r.clone(), o.union(r)) : (o = o || u.clone(), o.union(u));
  43858. }
  43859. }
  43860. return o || r;
  43861. }, e;
  43862. }(Fx);
  43863. rK.prototype.type = "group";
  43864. const Ve = rK;
  43865. /*!
  43866. * ZRender, a high performance 2d drawing library.
  43867. *
  43868. * Copyright (c) 2013, Baidu Inc.
  43869. * All rights reserved.
  43870. *
  43871. * LICENSE
  43872. * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
  43873. */
  43874. var Uv = {}, Rc = {};
  43875. function MDe(t) {
  43876. delete Rc[t];
  43877. }
  43878. function IDe(t) {
  43879. if (!t)
  43880. return !1;
  43881. if (typeof t == "string")
  43882. return Cm(t, 1) < OA;
  43883. if (t.colorStops) {
  43884. for (var e = t.colorStops, n = 0, r = e.length, i = 0; i < r; i++)
  43885. n += Cm(e[i].color, 1);
  43886. return n /= r, n < OA;
  43887. }
  43888. return !1;
  43889. }
  43890. var DDe = function() {
  43891. function t(e, n, r) {
  43892. var i = this;
  43893. this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, r = r || {}, this.dom = n, this.id = e;
  43894. var a = new QIe(), o = r.renderer || "canvas";
  43895. if (Uv[o] || (o = st(Uv)[0]), process.env.NODE_ENV !== "production" && !Uv[o])
  43896. throw new Error("Renderer '" + o + "' is not imported. Please import it first.");
  43897. r.useDirtyRect = r.useDirtyRect == null ? !1 : r.useDirtyRect;
  43898. var s = new Uv[o](n, a, r, e), l = r.ssr || s.ssrOnly;
  43899. this.storage = a, this.painter = s;
  43900. var u = !vt.node && !vt.worker && !l ? new SDe(s.getViewportRoot(), s.root) : null, c = r.useCoarsePointer, f = c == null || c === "auto" ? vt.touchEventsSupported : !!c, d = 44, h;
  43901. f && (h = We(r.pointerSize, d)), this.handler = new kq(a, s, u, s.root, h), this.animation = new vDe({
  43902. stage: {
  43903. update: l ? null : function() {
  43904. return i._flush(!0);
  43905. }
  43906. }
  43907. }), l || this.animation.start();
  43908. }
  43909. return t.prototype.add = function(e) {
  43910. this._disposed || !e || (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh());
  43911. }, t.prototype.remove = function(e) {
  43912. this._disposed || !e || (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh());
  43913. }, t.prototype.configLayer = function(e, n) {
  43914. this._disposed || (this.painter.configLayer && this.painter.configLayer(e, n), this.refresh());
  43915. }, t.prototype.setBackgroundColor = function(e) {
  43916. this._disposed || (this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = IDe(e));
  43917. }, t.prototype.getBackgroundColor = function() {
  43918. return this._backgroundColor;
  43919. }, t.prototype.setDarkMode = function(e) {
  43920. this._darkMode = e;
  43921. }, t.prototype.isDarkMode = function() {
  43922. return this._darkMode;
  43923. }, t.prototype.refreshImmediately = function(e) {
  43924. this._disposed || (e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1);
  43925. }, t.prototype.refresh = function() {
  43926. this._disposed || (this._needsRefresh = !0, this.animation.start());
  43927. }, t.prototype.flush = function() {
  43928. this._disposed || this._flush(!1);
  43929. }, t.prototype._flush = function(e) {
  43930. var n, r = Vd();
  43931. this._needsRefresh && (n = !0, this.refreshImmediately(e)), this._needsRefreshHover && (n = !0, this.refreshHoverImmediately());
  43932. var i = Vd();
  43933. n ? (this._stillFrameAccum = 0, this.trigger("rendered", {
  43934. elapsedTime: i - r
  43935. })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop());
  43936. }, t.prototype.setSleepAfterStill = function(e) {
  43937. this._sleepAfterStill = e;
  43938. }, t.prototype.wakeUp = function() {
  43939. this._disposed || (this.animation.start(), this._stillFrameAccum = 0);
  43940. }, t.prototype.refreshHover = function() {
  43941. this._needsRefreshHover = !0;
  43942. }, t.prototype.refreshHoverImmediately = function() {
  43943. this._disposed || (this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover());
  43944. }, t.prototype.resize = function(e) {
  43945. this._disposed || (e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize());
  43946. }, t.prototype.clearAnimation = function() {
  43947. this._disposed || this.animation.clear();
  43948. }, t.prototype.getWidth = function() {
  43949. if (!this._disposed)
  43950. return this.painter.getWidth();
  43951. }, t.prototype.getHeight = function() {
  43952. if (!this._disposed)
  43953. return this.painter.getHeight();
  43954. }, t.prototype.setCursorStyle = function(e) {
  43955. this._disposed || this.handler.setCursorStyle(e);
  43956. }, t.prototype.findHover = function(e, n) {
  43957. if (!this._disposed)
  43958. return this.handler.findHover(e, n);
  43959. }, t.prototype.on = function(e, n, r) {
  43960. return this._disposed || this.handler.on(e, n, r), this;
  43961. }, t.prototype.off = function(e, n) {
  43962. this._disposed || this.handler.off(e, n);
  43963. }, t.prototype.trigger = function(e, n) {
  43964. this._disposed || this.handler.trigger(e, n);
  43965. }, t.prototype.clear = function() {
  43966. if (!this._disposed) {
  43967. for (var e = this.storage.getRoots(), n = 0; n < e.length; n++)
  43968. e[n] instanceof Ve && e[n].removeSelfFromZr(this);
  43969. this.storage.delAllRoots(), this.painter.clear();
  43970. }
  43971. }, t.prototype.dispose = function() {
  43972. 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, MDe(this.id));
  43973. }, t;
  43974. }();
  43975. function wA(t, e) {
  43976. var n = new DDe(mR(), t, e);
  43977. return Rc[n.id] = n, n;
  43978. }
  43979. function RDe(t) {
  43980. t.dispose();
  43981. }
  43982. function kDe() {
  43983. for (var t in Rc)
  43984. Rc.hasOwnProperty(t) && Rc[t].dispose();
  43985. Rc = {};
  43986. }
  43987. function LDe(t) {
  43988. return Rc[t];
  43989. }
  43990. function iK(t, e) {
  43991. Uv[t] = e;
  43992. }
  43993. var CA;
  43994. function aK(t) {
  43995. if (typeof CA == "function")
  43996. return CA(t);
  43997. }
  43998. function oK(t) {
  43999. CA = t;
  44000. }
  44001. var NDe = "5.6.0";
  44002. const BDe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  44003. __proto__: null,
  44004. dispose: RDe,
  44005. disposeAll: kDe,
  44006. getElementSSRData: aK,
  44007. getInstance: LDe,
  44008. init: wA,
  44009. registerPainter: iK,
  44010. registerSSRDataGetter: oK,
  44011. version: NDe
  44012. }, Symbol.toStringTag, { value: "Module" }));
  44013. var iB = 1e-4, sK = 20;
  44014. function zDe(t) {
  44015. return t.replace(/^\s+|\s+$/g, "");
  44016. }
  44017. function Lt(t, e, n, r) {
  44018. var i = e[0], a = e[1], o = n[0], s = n[1], l = a - i, u = s - o;
  44019. if (l === 0)
  44020. return u === 0 ? o : (o + s) / 2;
  44021. if (r)
  44022. if (l > 0) {
  44023. if (t <= i)
  44024. return o;
  44025. if (t >= a)
  44026. return s;
  44027. } else {
  44028. if (t >= i)
  44029. return o;
  44030. if (t <= a)
  44031. return s;
  44032. }
  44033. else {
  44034. if (t === i)
  44035. return o;
  44036. if (t === a)
  44037. return s;
  44038. }
  44039. return (t - i) / l * u + o;
  44040. }
  44041. function _e(t, e) {
  44042. switch (t) {
  44043. case "center":
  44044. case "middle":
  44045. t = "50%";
  44046. break;
  44047. case "left":
  44048. case "top":
  44049. t = "0%";
  44050. break;
  44051. case "right":
  44052. case "bottom":
  44053. t = "100%";
  44054. break;
  44055. }
  44056. return Oe(t) ? zDe(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : t == null ? NaN : +t;
  44057. }
  44058. function mn(t, e, n) {
  44059. return e == null && (e = 10), e = Math.min(Math.max(0, e), sK), t = (+t).toFixed(e), n ? t : +t;
  44060. }
  44061. function Wi(t) {
  44062. return t.sort(function(e, n) {
  44063. return e - n;
  44064. }), t;
  44065. }
  44066. function Ya(t) {
  44067. if (t = +t, isNaN(t))
  44068. return 0;
  44069. if (t > 1e-14) {
  44070. for (var e = 1, n = 0; n < 15; n++, e *= 10)
  44071. if (Math.round(t * e) / e === t)
  44072. return n;
  44073. }
  44074. return oO(t);
  44075. }
  44076. function oO(t) {
  44077. 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;
  44078. return Math.max(0, o - r);
  44079. }
  44080. function PR(t, e) {
  44081. 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);
  44082. return isFinite(o) ? o : 20;
  44083. }
  44084. function VDe(t, e, n) {
  44085. if (!t[e])
  44086. return 0;
  44087. var r = lK(t, n);
  44088. return r[e] || 0;
  44089. }
  44090. function lK(t, e) {
  44091. var n = Ma(t, function(h, p) {
  44092. return h + (isNaN(p) ? 0 : p);
  44093. }, 0);
  44094. if (n === 0)
  44095. return [];
  44096. for (var r = Math.pow(10, e), i = ce(t, function(h) {
  44097. return (isNaN(h) ? 0 : h) / n * r * 100;
  44098. }), a = r * 100, o = ce(i, function(h) {
  44099. return Math.floor(h);
  44100. }), s = Ma(o, function(h, p) {
  44101. return h + p;
  44102. }, 0), l = ce(i, function(h, p) {
  44103. return h - o[p];
  44104. }); s < a; ) {
  44105. for (var u = Number.NEGATIVE_INFINITY, c = null, f = 0, d = l.length; f < d; ++f)
  44106. l[f] > u && (u = l[f], c = f);
  44107. ++o[c], l[c] = 0, ++s;
  44108. }
  44109. return ce(o, function(h) {
  44110. return h / r;
  44111. });
  44112. }
  44113. function FDe(t, e) {
  44114. var n = Math.max(Ya(t), Ya(e)), r = t + e;
  44115. return n > sK ? r : mn(r, n);
  44116. }
  44117. var TA = 9007199254740991;
  44118. function $R(t) {
  44119. var e = Math.PI * 2;
  44120. return (t % e + e) % e;
  44121. }
  44122. function Fh(t) {
  44123. return t > -iB && t < iB;
  44124. }
  44125. var WDe = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
  44126. function Ki(t) {
  44127. if (t instanceof Date)
  44128. return t;
  44129. if (Oe(t)) {
  44130. var e = WDe.exec(t);
  44131. if (!e)
  44132. return /* @__PURE__ */ new Date(NaN);
  44133. if (e[8]) {
  44134. var n = +e[4] || 0;
  44135. 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));
  44136. } else
  44137. 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);
  44138. } else if (t == null)
  44139. return /* @__PURE__ */ new Date(NaN);
  44140. return new Date(Math.round(t));
  44141. }
  44142. function uK(t) {
  44143. return Math.pow(10, N0(t));
  44144. }
  44145. function N0(t) {
  44146. if (t === 0)
  44147. return 0;
  44148. var e = Math.floor(Math.log(t) / Math.LN10);
  44149. return t / Math.pow(10, e) >= 10 && e++, e;
  44150. }
  44151. function AR(t, e) {
  44152. var n = N0(t), r = Math.pow(10, n), i = t / r, a;
  44153. 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;
  44154. }
  44155. function V_(t, e) {
  44156. var n = (t.length - 1) * e + 1, r = Math.floor(n), i = +t[r - 1], a = n - r;
  44157. return a ? i + a * (t[r] - i) : i;
  44158. }
  44159. function PA(t) {
  44160. t.sort(function(l, u) {
  44161. return s(l, u, 0) ? -1 : 1;
  44162. });
  44163. for (var e = -1 / 0, n = 1, r = 0; r < t.length; ) {
  44164. for (var i = t[r].interval, a = t[r].close, o = 0; o < 2; o++)
  44165. i[o] <= e && (i[o] = e, a[o] = o ? 1 : 1 - n), e = i[o], n = a[o];
  44166. i[0] === i[1] && a[0] * a[1] !== 1 ? t.splice(r, 1) : r++;
  44167. }
  44168. return t;
  44169. function s(l, u, c) {
  44170. 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));
  44171. }
  44172. }
  44173. function as(t) {
  44174. var e = parseFloat(t);
  44175. return e == t && (e !== 0 || !Oe(t) || t.indexOf("x") <= 0) ? e : NaN;
  44176. }
  44177. function Wx(t) {
  44178. return !isNaN(as(t));
  44179. }
  44180. function cK() {
  44181. return Math.round(Math.random() * 9);
  44182. }
  44183. function fK(t, e) {
  44184. return e === 0 ? t : fK(e, t % e);
  44185. }
  44186. function aB(t, e) {
  44187. return t == null ? e : e == null ? t : t * e / fK(t, e);
  44188. }
  44189. var QDe = "[ECharts] ", oB = {}, HDe = typeof console < "u" && console.warn && console.log;
  44190. function Qx(t, e, n) {
  44191. if (HDe) {
  44192. if (n) {
  44193. if (oB[e])
  44194. return;
  44195. oB[e] = !0;
  44196. }
  44197. console[t](QDe + e);
  44198. }
  44199. }
  44200. function GDe(t, e) {
  44201. Qx("log", t, e);
  44202. }
  44203. function dn(t, e) {
  44204. Qx("warn", t, e);
  44205. }
  44206. function Cr(t, e) {
  44207. Qx("error", t, e);
  44208. }
  44209. function Ia(t) {
  44210. process.env.NODE_ENV !== "production" && Qx("warn", "DEPRECATED: " + t, !0);
  44211. }
  44212. function Cn(t, e, n) {
  44213. process.env.NODE_ENV !== "production" && Ia((n ? "[" + n + "]" : "") + (t + " is deprecated, use " + e + " instead."));
  44214. }
  44215. function ni() {
  44216. for (var t = [], e = 0; e < arguments.length; e++)
  44217. t[e] = arguments[e];
  44218. var n = "";
  44219. if (process.env.NODE_ENV !== "production") {
  44220. var r = function(i) {
  44221. return i === void 0 ? "undefined" : i === 1 / 0 ? "Infinity" : i === -1 / 0 ? "-Infinity" : ou(i) ? "NaN" : i instanceof Date ? "Date(" + i.toISOString() + ")" : Me(i) ? "function () { ... }" : bR(i) ? i + "" : null;
  44222. };
  44223. n = ce(t, function(i) {
  44224. if (Oe(i))
  44225. return i;
  44226. var a = r(i);
  44227. if (a != null)
  44228. return a;
  44229. if (typeof JSON < "u" && JSON.stringify)
  44230. try {
  44231. return JSON.stringify(i, function(o, s) {
  44232. var l = r(s);
  44233. return l ?? s;
  44234. });
  44235. } catch {
  44236. return "?";
  44237. }
  44238. else
  44239. return "?";
  44240. }).join(" ");
  44241. }
  44242. return n;
  44243. }
  44244. function Et(t) {
  44245. throw new Error(t);
  44246. }
  44247. function sB(t, e, n) {
  44248. return (e - t) * n + t;
  44249. }
  44250. var dK = "series\0", hK = "\0_ec_\0";
  44251. function Qt(t) {
  44252. return t instanceof Array ? t : t == null ? [] : [t];
  44253. }
  44254. function mf(t, e, n) {
  44255. if (t) {
  44256. t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
  44257. for (var r = 0, i = n.length; r < i; r++) {
  44258. var a = n[r];
  44259. !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]);
  44260. }
  44261. }
  44262. }
  44263. var lB = ["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"];
  44264. function gp(t) {
  44265. return Ie(t) && !ue(t) && !(t instanceof Date) ? t.value : t;
  44266. }
  44267. function jDe(t) {
  44268. return Ie(t) && !(t instanceof Array);
  44269. }
  44270. function pK(t, e, n) {
  44271. var r = n === "normalMerge", i = n === "replaceMerge", a = n === "replaceAll";
  44272. t = t || [], e = (e || []).slice();
  44273. var o = Pe();
  44274. k(e, function(l, u) {
  44275. if (!Ie(l)) {
  44276. e[u] = null;
  44277. return;
  44278. }
  44279. process.env.NODE_ENV !== "production" && (l.id != null && !cB(l.id) && uB(l.id), l.name != null && !cB(l.name) && uB(l.name));
  44280. });
  44281. var s = ZDe(t, o, n);
  44282. return (r || i) && UDe(s, t, o, e), r && XDe(s, e), r || i ? YDe(s, e, i) : a && qDe(s, e), KDe(s), s;
  44283. }
  44284. function ZDe(t, e, n) {
  44285. var r = [];
  44286. if (n === "replaceAll")
  44287. return r;
  44288. for (var i = 0; i < t.length; i++) {
  44289. var a = t[i];
  44290. a && a.id != null && e.set(a.id, i), r.push({
  44291. existing: n === "replaceMerge" || Wh(a) ? null : a,
  44292. newOption: null,
  44293. keyInfo: null,
  44294. brandNew: null
  44295. });
  44296. }
  44297. return r;
  44298. }
  44299. function UDe(t, e, n, r) {
  44300. k(r, function(i, a) {
  44301. if (!(!i || i.id == null)) {
  44302. var o = Ig(i.id), s = n.get(o);
  44303. if (s != null) {
  44304. var l = t[s];
  44305. ke(!l.newOption, 'Duplicated option on id "' + o + '".'), l.newOption = i, l.existing = e[s], r[a] = null;
  44306. }
  44307. }
  44308. });
  44309. }
  44310. function XDe(t, e) {
  44311. k(e, function(n, r) {
  44312. if (!(!n || n.name == null))
  44313. for (var i = 0; i < t.length; i++) {
  44314. var a = t[i].existing;
  44315. if (!t[i].newOption && a && (a.id == null || n.id == null) && !Wh(n) && !Wh(a) && vK("name", a, n)) {
  44316. t[i].newOption = n, e[r] = null;
  44317. return;
  44318. }
  44319. }
  44320. });
  44321. }
  44322. function YDe(t, e, n) {
  44323. k(e, function(r) {
  44324. if (r) {
  44325. for (
  44326. var i, a = 0;
  44327. // Be `!resultItem` only when `nextIdx >= result.length`.
  44328. (i = t[a]) && (i.newOption || Wh(i.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing.
  44329. i.existing && r.id != null && !vK("id", r, i.existing));
  44330. )
  44331. a++;
  44332. i ? (i.newOption = r, i.brandNew = n) : t.push({
  44333. newOption: r,
  44334. brandNew: n,
  44335. existing: null,
  44336. keyInfo: null
  44337. }), a++;
  44338. }
  44339. });
  44340. }
  44341. function qDe(t, e) {
  44342. k(e, function(n) {
  44343. t.push({
  44344. newOption: n,
  44345. brandNew: !0,
  44346. existing: null,
  44347. keyInfo: null
  44348. });
  44349. });
  44350. }
  44351. function KDe(t) {
  44352. var e = Pe();
  44353. k(t, function(n) {
  44354. var r = n.existing;
  44355. r && e.set(r.id, n);
  44356. }), k(t, function(n) {
  44357. var r = n.newOption;
  44358. ke(!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 = {});
  44359. }), k(t, function(n, r) {
  44360. var i = n.existing, a = n.newOption, o = n.keyInfo;
  44361. if (Ie(a)) {
  44362. if (o.name = a.name != null ? Ig(a.name) : i ? i.name : dK + r, i)
  44363. o.id = Ig(i.id);
  44364. else if (a.id != null)
  44365. o.id = Ig(a.id);
  44366. else {
  44367. var s = 0;
  44368. do
  44369. o.id = "\0" + o.name + "\0" + s++;
  44370. while (e.get(o.id));
  44371. }
  44372. e.set(o.id, n);
  44373. }
  44374. });
  44375. }
  44376. function vK(t, e, n) {
  44377. var r = Vn(e[t], null), i = Vn(n[t], null);
  44378. return r != null && i != null && r === i;
  44379. }
  44380. function Ig(t) {
  44381. if (process.env.NODE_ENV !== "production" && t == null)
  44382. throw new Error();
  44383. return Vn(t, "");
  44384. }
  44385. function Vn(t, e) {
  44386. return t == null ? e : Oe(t) ? t : St(t) || ym(t) ? t + "" : e;
  44387. }
  44388. function uB(t) {
  44389. process.env.NODE_ENV !== "production" && dn("`" + t + "` is invalid id or name. Must be a string or number.");
  44390. }
  44391. function cB(t) {
  44392. return ym(t) || Wx(t);
  44393. }
  44394. function ER(t) {
  44395. var e = t.name;
  44396. return !!(e && e.indexOf(dK));
  44397. }
  44398. function Wh(t) {
  44399. return t && t.id != null && Ig(t.id).indexOf(hK) === 0;
  44400. }
  44401. function JDe(t) {
  44402. return hK + t;
  44403. }
  44404. function eRe(t, e, n) {
  44405. k(t, function(r) {
  44406. var i = r.newOption;
  44407. Ie(i) && (r.keyInfo.mainType = e, r.keyInfo.subType = tRe(e, i, r.existing, n));
  44408. });
  44409. }
  44410. function tRe(t, e, n, r) {
  44411. var i = e.type ? e.type : n ? n.subType : r.determineSubType(t, e);
  44412. return i;
  44413. }
  44414. function nRe(t, e) {
  44415. var n = {}, r = {};
  44416. return i(t || [], n), i(e || [], r, n), [a(n), a(r)];
  44417. function i(o, s, l) {
  44418. for (var u = 0, c = o.length; u < c; u++) {
  44419. var f = Vn(o[u].seriesId, null);
  44420. if (f == null)
  44421. return;
  44422. for (var d = Qt(o[u].dataIndex), h = l && l[f], p = 0, v = d.length; p < v; p++) {
  44423. var g = d[p];
  44424. h && h[g] ? h[g] = null : (s[f] || (s[f] = {}))[g] = 1;
  44425. }
  44426. }
  44427. }
  44428. function a(o, s) {
  44429. var l = [];
  44430. for (var u in o)
  44431. if (o.hasOwnProperty(u) && o[u] != null)
  44432. if (s)
  44433. l.push(+u);
  44434. else {
  44435. var c = a(o[u], !0);
  44436. c.length && l.push({
  44437. seriesId: u,
  44438. dataIndex: c
  44439. });
  44440. }
  44441. return l;
  44442. }
  44443. }
  44444. function yf(t, e) {
  44445. if (e.dataIndexInside != null)
  44446. return e.dataIndexInside;
  44447. if (e.dataIndex != null)
  44448. return ue(e.dataIndex) ? ce(e.dataIndex, function(n) {
  44449. return t.indexOfRawIndex(n);
  44450. }) : t.indexOfRawIndex(e.dataIndex);
  44451. if (e.name != null)
  44452. return ue(e.name) ? ce(e.name, function(n) {
  44453. return t.indexOfName(n);
  44454. }) : t.indexOfName(e.name);
  44455. }
  44456. function bt() {
  44457. var t = "__ec_inner_" + rRe++;
  44458. return function(e) {
  44459. return e[t] || (e[t] = {});
  44460. };
  44461. }
  44462. var rRe = cK();
  44463. function Dg(t, e, n) {
  44464. var r = MR(e, n), i = r.mainTypeSpecified, a = r.queryOptionMap, o = r.others, s = o, l = n ? n.defaultMainType : null;
  44465. return !i && l && a.set(l, {}), a.each(function(u, c) {
  44466. var f = B0(t, c, u, {
  44467. useDefault: l === c,
  44468. enableAll: n && n.enableAll != null ? n.enableAll : !0,
  44469. enableNone: n && n.enableNone != null ? n.enableNone : !0
  44470. });
  44471. s[c + "Models"] = f.models, s[c + "Model"] = f.models[0];
  44472. }), s;
  44473. }
  44474. function MR(t, e) {
  44475. var n;
  44476. if (Oe(t)) {
  44477. var r = {};
  44478. r[t + "Index"] = 0, n = r;
  44479. } else
  44480. n = t;
  44481. var i = Pe(), a = {}, o = !1;
  44482. return k(n, function(s, l) {
  44483. if (l === "dataIndex" || l === "dataIndexInside") {
  44484. a[l] = s;
  44485. return;
  44486. }
  44487. var u = l.match(/^(\w+)(Index|Id|Name)$/) || [], c = u[1], f = (u[2] || "").toLowerCase();
  44488. if (!(!c || !f || e && e.includeMainTypes && et(e.includeMainTypes, c) < 0)) {
  44489. o = o || !!c;
  44490. var d = i.get(c) || i.set(c, {});
  44491. d[f] = s;
  44492. }
  44493. }), {
  44494. mainTypeSpecified: o,
  44495. queryOptionMap: i,
  44496. others: a
  44497. };
  44498. }
  44499. var Dn = {
  44500. useDefault: !0,
  44501. enableAll: !1,
  44502. enableNone: !1
  44503. }, iRe = {
  44504. useDefault: !1,
  44505. enableAll: !0,
  44506. enableNone: !0
  44507. };
  44508. function B0(t, e, n, r) {
  44509. r = r || Dn;
  44510. var i = n.index, a = n.id, o = n.name, s = {
  44511. models: null,
  44512. specified: i != null || a != null || o != null
  44513. };
  44514. if (!s.specified) {
  44515. var l = void 0;
  44516. return s.models = r.useDefault && (l = t.getComponent(e)) ? [l] : [], s;
  44517. }
  44518. return i === "none" || i === !1 ? (ke(r.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : (i === "all" && (ke(r.enableAll, '`"all"` is not a valid value on index option.'), i = a = o = null), s.models = t.queryComponents({
  44519. mainType: e,
  44520. index: i,
  44521. id: a,
  44522. name: o
  44523. }), s);
  44524. }
  44525. function gK(t, e, n) {
  44526. t.setAttribute ? t.setAttribute(e, n) : t[e] = n;
  44527. }
  44528. function aRe(t, e) {
  44529. return t.getAttribute ? t.getAttribute(e) : t[e];
  44530. }
  44531. function oRe(t) {
  44532. return t === "auto" ? vt.domSupported ? "html" : "richText" : t || "html";
  44533. }
  44534. function $A(t, e) {
  44535. var n = Pe(), r = [];
  44536. return k(t, function(i) {
  44537. var a = e(i);
  44538. (n.get(a) || (r.push(a), n.set(a, []))).push(i);
  44539. }), {
  44540. keys: r,
  44541. buckets: n
  44542. };
  44543. }
  44544. function mK(t, e, n, r, i) {
  44545. var a = e == null || e === "auto";
  44546. if (r == null)
  44547. return r;
  44548. if (St(r)) {
  44549. var o = sB(n || 0, r, i);
  44550. return mn(o, a ? Math.max(Ya(n || 0), Ya(r)) : e);
  44551. } else {
  44552. if (Oe(r))
  44553. return i < 1 ? n : r;
  44554. for (var s = [], l = n, u = r, c = Math.max(l ? l.length : 0, u.length), f = 0; f < c; ++f) {
  44555. var d = t.getDimensionInfo(f);
  44556. if (d && d.type === "ordinal")
  44557. s[f] = (i < 1 && l ? l : u)[f];
  44558. else {
  44559. var h = l && l[f] ? l[f] : 0, p = u[f], o = sB(h, p, i);
  44560. s[f] = mn(o, a ? Math.max(Ya(h), Ya(p)) : e);
  44561. }
  44562. }
  44563. return s;
  44564. }
  44565. }
  44566. var sRe = ".", Gu = "___EC__COMPONENT__CONTAINER___", yK = "___EC__EXTENDED_CLASS___";
  44567. function Fo(t) {
  44568. var e = {
  44569. main: "",
  44570. sub: ""
  44571. };
  44572. if (t) {
  44573. var n = t.split(sRe);
  44574. e.main = n[0] || "", e.sub = n[1] || "";
  44575. }
  44576. return e;
  44577. }
  44578. function lRe(t) {
  44579. ke(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
  44580. }
  44581. function uRe(t) {
  44582. return !!(t && t[yK]);
  44583. }
  44584. function IR(t, e) {
  44585. t.$constructor = t, t.extend = function(n) {
  44586. process.env.NODE_ENV !== "production" && k(e, function(a) {
  44587. n[a] || console.warn("Method `" + a + "` should be implemented" + (n.type ? " in " + n.type : "") + ".");
  44588. });
  44589. var r = this, i;
  44590. return cRe(r) ? i = /** @class */
  44591. function(a) {
  44592. q(o, a);
  44593. function o() {
  44594. return a.apply(this, arguments) || this;
  44595. }
  44596. return o;
  44597. }(r) : (i = function() {
  44598. (n.$constructor || r).apply(this, arguments);
  44599. }, yR(i, this)), le(i.prototype, n), i[yK] = !0, i.extend = this.extend, i.superCall = hRe, i.superApply = pRe, i.superClass = r, i;
  44600. };
  44601. }
  44602. function cRe(t) {
  44603. return Me(t) && /^class\s/.test(Function.prototype.toString.call(t));
  44604. }
  44605. function bK(t, e) {
  44606. t.extend = e.extend;
  44607. }
  44608. var fRe = Math.round(Math.random() * 10);
  44609. function dRe(t) {
  44610. var e = ["__\0is_clz", fRe++].join("_");
  44611. t.prototype[e] = !0, process.env.NODE_ENV !== "production" && ke(!t.isInstance, 'The method "is" can not be defined.'), t.isInstance = function(n) {
  44612. return !!(n && n[e]);
  44613. };
  44614. }
  44615. function hRe(t, e) {
  44616. for (var n = [], r = 2; r < arguments.length; r++)
  44617. n[r - 2] = arguments[r];
  44618. return this.superClass.prototype[e].apply(t, n);
  44619. }
  44620. function pRe(t, e, n) {
  44621. return this.superClass.prototype[e].apply(t, n);
  44622. }
  44623. function Hx(t) {
  44624. var e = {};
  44625. t.registerClass = function(r) {
  44626. var i = r.type || r.prototype.type;
  44627. if (i) {
  44628. lRe(i), r.prototype.type = i;
  44629. var a = Fo(i);
  44630. if (!a.sub)
  44631. process.env.NODE_ENV !== "production" && e[a.main] && console.warn(a.main + " exists."), e[a.main] = r;
  44632. else if (a.sub !== Gu) {
  44633. var o = n(a);
  44634. o[a.sub] = r;
  44635. }
  44636. }
  44637. return r;
  44638. }, t.getClass = function(r, i, a) {
  44639. var o = e[r];
  44640. if (o && o[Gu] && (o = i ? o[i] : null), a && !o)
  44641. throw new Error(i ? "Component " + r + "." + (i || "") + " is used but not imported." : r + ".type should be specified.");
  44642. return o;
  44643. }, t.getClassesByMainType = function(r) {
  44644. var i = Fo(r), a = [], o = e[i.main];
  44645. return o && o[Gu] ? k(o, function(s, l) {
  44646. l !== Gu && a.push(s);
  44647. }) : a.push(o), a;
  44648. }, t.hasClass = function(r) {
  44649. var i = Fo(r);
  44650. return !!e[i.main];
  44651. }, t.getAllClassMainTypes = function() {
  44652. var r = [];
  44653. return k(e, function(i, a) {
  44654. r.push(a);
  44655. }), r;
  44656. }, t.hasSubTypes = function(r) {
  44657. var i = Fo(r), a = e[i.main];
  44658. return a && a[Gu];
  44659. };
  44660. function n(r) {
  44661. var i = e[r.main];
  44662. return (!i || !i[Gu]) && (i = e[r.main] = {}, i[Gu] = !0), i;
  44663. }
  44664. }
  44665. function bf(t, e) {
  44666. for (var n = 0; n < t.length; n++)
  44667. t[n][1] || (t[n][1] = t[n][0]);
  44668. return e = e || !1, function(r, i, a) {
  44669. for (var o = {}, s = 0; s < t.length; s++) {
  44670. var l = t[s][1];
  44671. if (!(i && et(i, l) >= 0 || a && et(a, l) < 0)) {
  44672. var u = r.getShallow(l, e);
  44673. u != null && (o[t[s][0]] = u);
  44674. }
  44675. }
  44676. return o;
  44677. };
  44678. }
  44679. var vRe = [
  44680. ["fill", "color"],
  44681. ["shadowBlur"],
  44682. ["shadowOffsetX"],
  44683. ["shadowOffsetY"],
  44684. ["opacity"],
  44685. ["shadowColor"]
  44686. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  44687. // So do not transfer decal directly.
  44688. ], gRe = bf(vRe), mRe = (
  44689. /** @class */
  44690. function() {
  44691. function t() {
  44692. }
  44693. return t.prototype.getAreaStyle = function(e, n) {
  44694. return gRe(this, e, n);
  44695. }, t;
  44696. }()
  44697. ), AA = new k0(50);
  44698. function yRe(t) {
  44699. if (typeof t == "string") {
  44700. var e = AA.get(t);
  44701. return e && e.image;
  44702. } else
  44703. return t;
  44704. }
  44705. function DR(t, e, n, r, i) {
  44706. if (t)
  44707. if (typeof t == "string") {
  44708. if (e && e.__zrImageSrc === t || !n)
  44709. return e;
  44710. var a = AA.get(t), o = { hostEl: n, cb: r, cbPayload: i };
  44711. return a ? (e = a.image, !Gx(e) && a.pending.push(o)) : (e = oo.loadImage(t, fB, fB), e.__zrImageSrc = t, AA.put(t, e.__cachedImgObj = {
  44712. image: e,
  44713. pending: [o]
  44714. })), e;
  44715. } else
  44716. return t;
  44717. else return e;
  44718. }
  44719. function fB() {
  44720. var t = this.__cachedImgObj;
  44721. this.onload = this.onerror = this.__cachedImgObj = null;
  44722. for (var e = 0; e < t.pending.length; e++) {
  44723. var n = t.pending[e], r = n.cb;
  44724. r && r(this, n.cbPayload), n.hostEl.dirty();
  44725. }
  44726. t.pending.length = 0;
  44727. }
  44728. function Gx(t) {
  44729. return t && t.width && t.height;
  44730. }
  44731. var lT = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
  44732. function _K(t, e, n, r, i) {
  44733. if (!e)
  44734. return "";
  44735. var a = (t + "").split(`
  44736. `);
  44737. i = OK(e, n, r, i);
  44738. for (var o = 0, s = a.length; o < s; o++)
  44739. a[o] = SK(a[o], i);
  44740. return a.join(`
  44741. `);
  44742. }
  44743. function OK(t, e, n, r) {
  44744. r = r || {};
  44745. var i = le({}, r);
  44746. i.font = e, n = We(n, "..."), i.maxIterations = We(r.maxIterations, 2);
  44747. var a = i.minChar = We(r.minChar, 0);
  44748. i.cnCharWidth = Xi("国", e);
  44749. var o = i.ascCharWidth = Xi("a", e);
  44750. i.placeholder = We(r.placeholder, "");
  44751. for (var s = t = Math.max(0, t - 1), l = 0; l < a && s >= o; l++)
  44752. s -= o;
  44753. var u = Xi(n, e);
  44754. return u > s && (n = "", u = 0), s = t - u, i.ellipsis = n, i.ellipsisWidth = u, i.contentWidth = s, i.containerWidth = t, i;
  44755. }
  44756. function SK(t, e) {
  44757. var n = e.containerWidth, r = e.font, i = e.contentWidth;
  44758. if (!n)
  44759. return "";
  44760. var a = Xi(t, r);
  44761. if (a <= n)
  44762. return t;
  44763. for (var o = 0; ; o++) {
  44764. if (a <= i || o >= e.maxIterations) {
  44765. t += e.ellipsis;
  44766. break;
  44767. }
  44768. var s = o === 0 ? bRe(t, i, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * i / a) : 0;
  44769. t = t.substr(0, s), a = Xi(t, r);
  44770. }
  44771. return t === "" && (t = e.placeholder), t;
  44772. }
  44773. function bRe(t, e, n, r) {
  44774. for (var i = 0, a = 0, o = t.length; a < o && i < e; a++) {
  44775. var s = t.charCodeAt(a);
  44776. i += 0 <= s && s <= 127 ? n : r;
  44777. }
  44778. return a;
  44779. }
  44780. function _Re(t, e) {
  44781. t != null && (t += "");
  44782. var n = e.overflow, r = e.padding, i = e.font, a = n === "truncate", o = Vx(i), s = We(e.lineHeight, o), l = !!e.backgroundColor, u = e.lineOverflow === "truncate", c = e.width, f;
  44783. c != null && (n === "break" || n === "breakAll") ? f = t ? xK(t, e.font, c, n === "breakAll", 0).lines : [] : f = t ? t.split(`
  44784. `) : [];
  44785. var d = f.length * s, h = We(e.height, d);
  44786. if (d > h && u) {
  44787. var p = Math.floor(h / s);
  44788. f = f.slice(0, p);
  44789. }
  44790. if (t && a && c != null)
  44791. for (var v = OK(c, i, e.ellipsis, {
  44792. minChar: e.truncateMinChar,
  44793. placeholder: e.placeholder
  44794. }), g = 0; g < f.length; g++)
  44795. f[g] = SK(f[g], v);
  44796. for (var m = h, y = 0, g = 0; g < f.length; g++)
  44797. y = Math.max(Xi(f[g], i), y);
  44798. c == null && (c = y);
  44799. var b = y;
  44800. return r && (m += r[0] + r[2], b += r[1] + r[3], c += r[1] + r[3]), l && (b = c), {
  44801. lines: f,
  44802. height: h,
  44803. outerWidth: b,
  44804. outerHeight: m,
  44805. lineHeight: s,
  44806. calculatedLineHeight: o,
  44807. contentWidth: y,
  44808. contentHeight: d,
  44809. width: c
  44810. };
  44811. }
  44812. var ORe = /* @__PURE__ */ function() {
  44813. function t() {
  44814. }
  44815. return t;
  44816. }(), dB = /* @__PURE__ */ function() {
  44817. function t(e) {
  44818. this.tokens = [], e && (this.tokens = e);
  44819. }
  44820. return t;
  44821. }(), SRe = /* @__PURE__ */ function() {
  44822. function t() {
  44823. this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = [];
  44824. }
  44825. return t;
  44826. }();
  44827. function xRe(t, e) {
  44828. var n = new SRe();
  44829. if (t != null && (t += ""), !t)
  44830. return n;
  44831. 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 = lT.lastIndex = 0, l; (l = lT.exec(t)) != null; ) {
  44832. var u = l.index;
  44833. u > s && uT(n, t.substring(s, u), e, o), uT(n, l[2], e, o, l[1]), s = lT.lastIndex;
  44834. }
  44835. s < t.length && uT(n, t.substring(s, t.length), e, o);
  44836. var c = [], f = 0, d = 0, h = e.padding, p = a === "truncate", v = e.lineOverflow === "truncate";
  44837. function g(V, B, W) {
  44838. V.width = B, V.lineHeight = W, f += W, d = Math.max(d, B);
  44839. }
  44840. e: for (var m = 0; m < n.lines.length; m++) {
  44841. for (var y = n.lines[m], b = 0, _ = 0, O = 0; O < y.tokens.length; O++) {
  44842. var S = y.tokens[O], x = S.styleName && e.rich[S.styleName] || {}, C = S.textPadding = x.padding, T = C ? C[1] + C[3] : 0, w = S.font = x.font || e.font;
  44843. S.contentHeight = Vx(w);
  44844. var P = We(x.height, S.contentHeight);
  44845. if (S.innerHeight = P, C && (P += C[0] + C[2]), S.height = P, S.lineHeight = Ui(x.lineHeight, e.lineHeight, P), S.align = x && x.align || e.align, S.verticalAlign = x && x.verticalAlign || "middle", v && i != null && f + S.lineHeight > i) {
  44846. O > 0 ? (y.tokens = y.tokens.slice(0, O), g(y, _, b), n.lines = n.lines.slice(0, m + 1)) : n.lines = n.lines.slice(0, m);
  44847. break e;
  44848. }
  44849. var $ = x.width, A = $ == null || $ === "auto";
  44850. if (typeof $ == "string" && $.charAt($.length - 1) === "%")
  44851. S.percentWidth = $, c.push(S), S.contentWidth = Xi(S.text, w);
  44852. else {
  44853. if (A) {
  44854. var D = x.backgroundColor, E = D && D.image;
  44855. E && (E = yRe(E), Gx(E) && (S.width = Math.max(S.width, E.width * P / E.height)));
  44856. }
  44857. var R = p && r != null ? r - _ : null;
  44858. R != null && R < S.width ? !A || R < T ? (S.text = "", S.width = S.contentWidth = 0) : (S.text = _K(S.text, R - T, w, e.ellipsis, { minChar: e.truncateMinChar }), S.width = S.contentWidth = Xi(S.text, w)) : S.contentWidth = Xi(S.text, w);
  44859. }
  44860. S.width += T, _ += S.width, x && (b = Math.max(b, S.lineHeight));
  44861. }
  44862. g(y, _, b);
  44863. }
  44864. n.outerWidth = n.width = We(r, d), n.outerHeight = n.height = We(i, f), n.contentHeight = f, n.contentWidth = d, h && (n.outerWidth += h[1] + h[3], n.outerHeight += h[0] + h[2]);
  44865. for (var m = 0; m < c.length; m++) {
  44866. var S = c[m], N = S.percentWidth;
  44867. S.width = parseInt(N, 10) / 100 * n.width;
  44868. }
  44869. return n;
  44870. }
  44871. function uT(t, e, n, r, i) {
  44872. var a = e === "", o = i && n.rich[i] || {}, s = t.lines, l = o.font || n.font, u = !1, c, f;
  44873. if (r) {
  44874. var d = o.padding, h = d ? d[1] + d[3] : 0;
  44875. if (o.width != null && o.width !== "auto") {
  44876. var p = lo(o.width, r.width) + h;
  44877. s.length > 0 && p + r.accumWidth > r.width && (c = e.split(`
  44878. `), u = !0), r.accumWidth = p;
  44879. } else {
  44880. var v = xK(e, l, r.width, r.breakAll, r.accumWidth);
  44881. r.accumWidth = v.accumWidth + h, f = v.linesWidths, c = v.lines;
  44882. }
  44883. } else
  44884. c = e.split(`
  44885. `);
  44886. for (var g = 0; g < c.length; g++) {
  44887. var m = c[g], y = new ORe();
  44888. if (y.styleName = i, y.text = m, y.isLineHolder = !m && !a, typeof o.width == "number" ? y.width = o.width : y.width = f ? f[g] : Xi(m, l), !g && !u) {
  44889. var b = (s[s.length - 1] || (s[0] = new dB())).tokens, _ = b.length;
  44890. _ === 1 && b[0].isLineHolder ? b[0] = y : (m || !_ || a) && b.push(y);
  44891. } else
  44892. s.push(new dB([y]));
  44893. }
  44894. }
  44895. function wRe(t) {
  44896. var e = t.charCodeAt(0);
  44897. return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303;
  44898. }
  44899. var CRe = Ma(",&?/;] ".split(""), function(t, e) {
  44900. return t[e] = !0, t;
  44901. }, {});
  44902. function TRe(t) {
  44903. return wRe(t) ? !!CRe[t] : !0;
  44904. }
  44905. function xK(t, e, n, r, i) {
  44906. for (var a = [], o = [], s = "", l = "", u = 0, c = 0, f = 0; f < t.length; f++) {
  44907. var d = t.charAt(f);
  44908. if (d === `
  44909. `) {
  44910. l && (s += l, c += u), a.push(s), o.push(c), s = "", l = "", u = 0, c = 0;
  44911. continue;
  44912. }
  44913. var h = Xi(d, e), p = r ? !1 : !TRe(d);
  44914. if (a.length ? c + h > n : i + c + h > n) {
  44915. 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));
  44916. continue;
  44917. }
  44918. c += h, p ? (l += d, u += h) : (l && (s += l, l = "", u = 0), s += d);
  44919. }
  44920. return !a.length && !s && (s = t, l = "", u = 0), l && (s += l), s && (a.push(s), o.push(c)), a.length === 1 && (c += i), {
  44921. accumWidth: c,
  44922. lines: a,
  44923. linesWidths: o
  44924. };
  44925. }
  44926. var EA = "__zr_style_" + Math.round(Math.random() * 10), Jc = {
  44927. shadowBlur: 0,
  44928. shadowOffsetX: 0,
  44929. shadowOffsetY: 0,
  44930. shadowColor: "#000",
  44931. opacity: 1,
  44932. blend: "source-over"
  44933. }, jx = {
  44934. style: {
  44935. shadowBlur: !0,
  44936. shadowOffsetX: !0,
  44937. shadowOffsetY: !0,
  44938. shadowColor: !0,
  44939. opacity: !0
  44940. }
  44941. };
  44942. Jc[EA] = !0;
  44943. var hB = ["z", "z2", "invisible"], PRe = ["invisible"], $Re = function(t) {
  44944. q(e, t);
  44945. function e(n) {
  44946. return t.call(this, n) || this;
  44947. }
  44948. return e.prototype._init = function(n) {
  44949. for (var r = st(n), i = 0; i < r.length; i++) {
  44950. var a = r[i];
  44951. a === "style" ? this.useStyle(n[a]) : t.prototype.attrKV.call(this, a, n[a]);
  44952. }
  44953. this.style || this.useStyle({});
  44954. }, e.prototype.beforeBrush = function() {
  44955. }, e.prototype.afterBrush = function() {
  44956. }, e.prototype.innerBeforeBrush = function() {
  44957. }, e.prototype.innerAfterBrush = function() {
  44958. }, e.prototype.shouldBePainted = function(n, r, i, a) {
  44959. var o = this.transform;
  44960. if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && ARe(this, n, r) || o && !o[0] && !o[3])
  44961. return !1;
  44962. if (i && this.__clipPaths) {
  44963. for (var s = 0; s < this.__clipPaths.length; ++s)
  44964. if (this.__clipPaths[s].isZeroArea())
  44965. return !1;
  44966. }
  44967. if (a && this.parent)
  44968. for (var l = this.parent; l; ) {
  44969. if (l.ignore)
  44970. return !1;
  44971. l = l.parent;
  44972. }
  44973. return !0;
  44974. }, e.prototype.contain = function(n, r) {
  44975. return this.rectContain(n, r);
  44976. }, e.prototype.traverse = function(n, r) {
  44977. n.call(r, this);
  44978. }, e.prototype.rectContain = function(n, r) {
  44979. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  44980. return a.contain(i[0], i[1]);
  44981. }, e.prototype.getPaintRect = function() {
  44982. var n = this._paintRect;
  44983. if (!this._paintRect || this.__dirty) {
  44984. var r = this.transform, i = this.getBoundingRect(), a = this.style, o = a.shadowBlur || 0, s = a.shadowOffsetX || 0, l = a.shadowOffsetY || 0;
  44985. n = this._paintRect || (this._paintRect = new Je(0, 0, 0, 0)), r ? Je.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));
  44986. var u = this.dirtyRectTolerance;
  44987. 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));
  44988. }
  44989. return n;
  44990. }, e.prototype.setPrevPaintRect = function(n) {
  44991. n ? (this._prevPaintRect = this._prevPaintRect || new Je(0, 0, 0, 0), this._prevPaintRect.copy(n)) : this._prevPaintRect = null;
  44992. }, e.prototype.getPrevPaintRect = function() {
  44993. return this._prevPaintRect;
  44994. }, e.prototype.animateStyle = function(n) {
  44995. return this.animate("style", n);
  44996. }, e.prototype.updateDuringAnimation = function(n) {
  44997. n === "style" ? this.dirtyStyle() : this.markRedraw();
  44998. }, e.prototype.attrKV = function(n, r) {
  44999. n !== "style" ? t.prototype.attrKV.call(this, n, r) : this.style ? this.setStyle(r) : this.useStyle(r);
  45000. }, e.prototype.setStyle = function(n, r) {
  45001. return typeof n == "string" ? this.style[n] = r : le(this.style, n), this.dirtyStyle(), this;
  45002. }, e.prototype.dirtyStyle = function(n) {
  45003. n || this.markRedraw(), this.__dirty |= Gv, this._rect && (this._rect = null);
  45004. }, e.prototype.dirty = function() {
  45005. this.dirtyStyle();
  45006. }, e.prototype.styleChanged = function() {
  45007. return !!(this.__dirty & Gv);
  45008. }, e.prototype.styleUpdated = function() {
  45009. this.__dirty &= ~Gv;
  45010. }, e.prototype.createStyle = function(n) {
  45011. return D0(Jc, n);
  45012. }, e.prototype.useStyle = function(n) {
  45013. n[EA] || (n = this.createStyle(n)), this.__inHover ? this.__hoverStyle = n : this.style = n, this.dirtyStyle();
  45014. }, e.prototype.isStyleObject = function(n) {
  45015. return n[EA];
  45016. }, e.prototype._innerSaveToNormal = function(n) {
  45017. t.prototype._innerSaveToNormal.call(this, n);
  45018. var r = this._normalState;
  45019. n.style && !r.style && (r.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(n, r, hB);
  45020. }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
  45021. t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
  45022. var l = !(r && a), u;
  45023. 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)
  45024. if (o) {
  45025. var c = this.style;
  45026. if (this.style = this.createStyle(l ? {} : c), l)
  45027. for (var f = st(c), d = 0; d < f.length; d++) {
  45028. var h = f[d];
  45029. h in u && (u[h] = u[h], this.style[h] = c[h]);
  45030. }
  45031. for (var p = st(u), d = 0; d < p.length; d++) {
  45032. var h = p[d];
  45033. this.style[h] = this.style[h];
  45034. }
  45035. this._transitionState(n, {
  45036. style: u
  45037. }, s, this.getAnimationStyleProps());
  45038. } else
  45039. this.useStyle(u);
  45040. for (var v = this.__inHover ? PRe : hB, d = 0; d < v.length; d++) {
  45041. var h = v[d];
  45042. r && r[h] != null ? this[h] = r[h] : l && i[h] != null && (this[h] = i[h]);
  45043. }
  45044. }, e.prototype._mergeStates = function(n) {
  45045. for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
  45046. var o = n[a];
  45047. o.style && (i = i || {}, this._mergeStyle(i, o.style));
  45048. }
  45049. return i && (r.style = i), r;
  45050. }, e.prototype._mergeStyle = function(n, r) {
  45051. return le(n, r), n;
  45052. }, e.prototype.getAnimationStyleProps = function() {
  45053. return jx;
  45054. }, e.initDefaultProps = function() {
  45055. var n = e.prototype;
  45056. 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 = Ni | Gv;
  45057. }(), e;
  45058. }(Fx), cT = new Je(0, 0, 0, 0), fT = new Je(0, 0, 0, 0);
  45059. function ARe(t, e, n) {
  45060. return cT.copy(t.getBoundingRect()), t.transform && cT.applyTransform(t.transform), fT.width = e, fT.height = n, !cT.intersect(fT);
  45061. }
  45062. const Da = $Re;
  45063. var pi = Math.min, vi = Math.max, dT = Math.sin, hT = Math.cos, ju = Math.PI * 2, Yy = wu(), qy = wu(), Ky = wu();
  45064. function Zx(t, e, n) {
  45065. if (t.length !== 0) {
  45066. for (var r = t[0], i = r[0], a = r[0], o = r[1], s = r[1], l = 1; l < t.length; l++)
  45067. r = t[l], i = pi(i, r[0]), a = vi(a, r[0]), o = pi(o, r[1]), s = vi(s, r[1]);
  45068. e[0] = i, e[1] = o, n[0] = a, n[1] = s;
  45069. }
  45070. }
  45071. function pB(t, e, n, r, i, a) {
  45072. i[0] = pi(t, n), i[1] = pi(e, r), a[0] = vi(t, n), a[1] = vi(e, r);
  45073. }
  45074. var vB = [], gB = [];
  45075. function ERe(t, e, n, r, i, a, o, s, l, u) {
  45076. var c = Vq, f = Gn, d = c(t, n, i, o, vB);
  45077. l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
  45078. for (var h = 0; h < d; h++) {
  45079. var p = f(t, n, i, o, vB[h]);
  45080. l[0] = pi(p, l[0]), u[0] = vi(p, u[0]);
  45081. }
  45082. d = c(e, r, a, s, gB);
  45083. for (var h = 0; h < d; h++) {
  45084. var v = f(e, r, a, s, gB[h]);
  45085. l[1] = pi(v, l[1]), u[1] = vi(v, u[1]);
  45086. }
  45087. l[0] = pi(t, l[0]), u[0] = vi(t, u[0]), l[0] = pi(o, l[0]), u[0] = vi(o, u[0]), l[1] = pi(e, l[1]), u[1] = vi(e, u[1]), l[1] = pi(s, l[1]), u[1] = vi(s, u[1]);
  45088. }
  45089. function MRe(t, e, n, r, i, a, o, s) {
  45090. var l = Wq, u = ir, c = vi(pi(l(t, n, i), 1), 0), f = vi(pi(l(e, r, a), 1), 0), d = u(t, n, i, c), h = u(e, r, a, f);
  45091. o[0] = pi(t, i, d), o[1] = pi(e, a, h), s[0] = vi(t, i, d), s[1] = vi(e, a, h);
  45092. }
  45093. function IRe(t, e, n, r, i, a, o, s, l) {
  45094. var u = $s, c = As, f = Math.abs(i - a);
  45095. if (f % ju < 1e-4 && f > 1e-4) {
  45096. s[0] = t - n, s[1] = e - r, l[0] = t + n, l[1] = e + r;
  45097. return;
  45098. }
  45099. if (Yy[0] = hT(i) * n + t, Yy[1] = dT(i) * r + e, qy[0] = hT(a) * n + t, qy[1] = dT(a) * r + e, u(s, Yy, qy), c(l, Yy, qy), i = i % ju, i < 0 && (i = i + ju), a = a % ju, a < 0 && (a = a + ju), i > a && !o ? a += ju : i < a && o && (i += ju), o) {
  45100. var d = a;
  45101. a = i, i = d;
  45102. }
  45103. for (var h = 0; h < a; h += Math.PI / 2)
  45104. h > i && (Ky[0] = hT(h) * n + t, Ky[1] = dT(h) * r + e, u(s, Ky, s), c(l, Ky, l));
  45105. }
  45106. var Gt = {
  45107. M: 1,
  45108. L: 2,
  45109. C: 3,
  45110. Q: 4,
  45111. A: 5,
  45112. Z: 6,
  45113. R: 7
  45114. }, Zu = [], Uu = [], _o = [], dl = [], Oo = [], So = [], pT = Math.min, vT = Math.max, Xu = Math.cos, Yu = Math.sin, ms = Math.abs, MA = Math.PI, Sl = MA * 2, gT = typeof Float32Array < "u", sv = [];
  45115. function mT(t) {
  45116. var e = Math.round(t / MA * 1e8) / 1e8;
  45117. return e % 2 * MA;
  45118. }
  45119. function RR(t, e) {
  45120. var n = mT(t[0]);
  45121. n < 0 && (n += Sl);
  45122. var r = n - t[0], i = t[1];
  45123. i += r, !e && i - n >= Sl ? i = n + Sl : e && n - i >= Sl ? i = n - Sl : !e && n > i ? i = n + (Sl - mT(n - i)) : e && n < i && (i = n - (Sl - mT(i - n))), t[0] = n, t[1] = i;
  45124. }
  45125. var os = function() {
  45126. function t(e) {
  45127. 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 = []);
  45128. }
  45129. return t.prototype.increaseVersion = function() {
  45130. this._version++;
  45131. }, t.prototype.getVersion = function() {
  45132. return this._version;
  45133. }, t.prototype.setScale = function(e, n, r) {
  45134. r = r || 0, r > 0 && (this._ux = ms(r / iO / e) || 0, this._uy = ms(r / iO / n) || 0);
  45135. }, t.prototype.setDPR = function(e) {
  45136. this.dpr = e;
  45137. }, t.prototype.setContext = function(e) {
  45138. this._ctx = e;
  45139. }, t.prototype.getContext = function() {
  45140. return this._ctx;
  45141. }, t.prototype.beginPath = function() {
  45142. return this._ctx && this._ctx.beginPath(), this.reset(), this;
  45143. }, t.prototype.reset = function() {
  45144. this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++;
  45145. }, t.prototype.moveTo = function(e, n) {
  45146. return this._drawPendingPt(), this.addData(Gt.M, e, n), this._ctx && this._ctx.moveTo(e, n), this._x0 = e, this._y0 = n, this._xi = e, this._yi = n, this;
  45147. }, t.prototype.lineTo = function(e, n) {
  45148. var r = ms(e - this._xi), i = ms(n - this._yi), a = r > this._ux || i > this._uy;
  45149. if (this.addData(Gt.L, e, n), this._ctx && a && this._ctx.lineTo(e, n), a)
  45150. this._xi = e, this._yi = n, this._pendingPtDist = 0;
  45151. else {
  45152. var o = r * r + i * i;
  45153. o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = n, this._pendingPtDist = o);
  45154. }
  45155. return this;
  45156. }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
  45157. return this._drawPendingPt(), this.addData(Gt.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;
  45158. }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
  45159. return this._drawPendingPt(), this.addData(Gt.Q, e, n, r, i), this._ctx && this._ctx.quadraticCurveTo(e, n, r, i), this._xi = r, this._yi = i, this;
  45160. }, t.prototype.arc = function(e, n, r, i, a, o) {
  45161. this._drawPendingPt(), sv[0] = i, sv[1] = a, RR(sv, o), i = sv[0], a = sv[1];
  45162. var s = a - i;
  45163. return this.addData(Gt.A, e, n, r, r, i, s, 0, o ? 0 : 1), this._ctx && this._ctx.arc(e, n, r, i, a, o), this._xi = Xu(a) * r + e, this._yi = Yu(a) * r + n, this;
  45164. }, t.prototype.arcTo = function(e, n, r, i, a) {
  45165. return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, n, r, i, a), this;
  45166. }, t.prototype.rect = function(e, n, r, i) {
  45167. return this._drawPendingPt(), this._ctx && this._ctx.rect(e, n, r, i), this.addData(Gt.R, e, n, r, i), this;
  45168. }, t.prototype.closePath = function() {
  45169. this._drawPendingPt(), this.addData(Gt.Z);
  45170. var e = this._ctx, n = this._x0, r = this._y0;
  45171. return e && e.closePath(), this._xi = n, this._yi = r, this;
  45172. }, t.prototype.fill = function(e) {
  45173. e && e.fill(), this.toStatic();
  45174. }, t.prototype.stroke = function(e) {
  45175. e && e.stroke(), this.toStatic();
  45176. }, t.prototype.len = function() {
  45177. return this._len;
  45178. }, t.prototype.setData = function(e) {
  45179. var n = e.length;
  45180. !(this.data && this.data.length === n) && gT && (this.data = new Float32Array(n));
  45181. for (var r = 0; r < n; r++)
  45182. this.data[r] = e[r];
  45183. this._len = n;
  45184. }, t.prototype.appendPath = function(e) {
  45185. e instanceof Array || (e = [e]);
  45186. for (var n = e.length, r = 0, i = this._len, a = 0; a < n; a++)
  45187. r += e[a].len();
  45188. gT && this.data instanceof Float32Array && (this.data = new Float32Array(i + r));
  45189. for (var a = 0; a < n; a++)
  45190. for (var o = e[a].data, s = 0; s < o.length; s++)
  45191. this.data[i++] = o[s];
  45192. this._len = i;
  45193. }, t.prototype.addData = function(e, n, r, i, a, o, s, l, u) {
  45194. if (this._saveData) {
  45195. var c = this.data;
  45196. this._len + arguments.length > c.length && (this._expandData(), c = this.data);
  45197. for (var f = 0; f < arguments.length; f++)
  45198. c[this._len++] = arguments[f];
  45199. }
  45200. }, t.prototype._drawPendingPt = function() {
  45201. this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0);
  45202. }, t.prototype._expandData = function() {
  45203. if (!(this.data instanceof Array)) {
  45204. for (var e = [], n = 0; n < this._len; n++)
  45205. e[n] = this.data[n];
  45206. this.data = e;
  45207. }
  45208. }, t.prototype.toStatic = function() {
  45209. if (this._saveData) {
  45210. this._drawPendingPt();
  45211. var e = this.data;
  45212. e instanceof Array && (e.length = this._len, gT && this._len > 11 && (this.data = new Float32Array(e)));
  45213. }
  45214. }, t.prototype.getBoundingRect = function() {
  45215. _o[0] = _o[1] = Oo[0] = Oo[1] = Number.MAX_VALUE, dl[0] = dl[1] = So[0] = So[1] = -Number.MAX_VALUE;
  45216. var e = this.data, n = 0, r = 0, i = 0, a = 0, o;
  45217. for (o = 0; o < this._len; ) {
  45218. var s = e[o++], l = o === 1;
  45219. switch (l && (n = e[o], r = e[o + 1], i = n, a = r), s) {
  45220. case Gt.M:
  45221. n = i = e[o++], r = a = e[o++], Oo[0] = i, Oo[1] = a, So[0] = i, So[1] = a;
  45222. break;
  45223. case Gt.L:
  45224. pB(n, r, e[o], e[o + 1], Oo, So), n = e[o++], r = e[o++];
  45225. break;
  45226. case Gt.C:
  45227. ERe(n, r, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], Oo, So), n = e[o++], r = e[o++];
  45228. break;
  45229. case Gt.Q:
  45230. MRe(n, r, e[o++], e[o++], e[o], e[o + 1], Oo, So), n = e[o++], r = e[o++];
  45231. break;
  45232. case Gt.A:
  45233. var u = e[o++], c = e[o++], f = e[o++], d = e[o++], h = e[o++], p = e[o++] + h;
  45234. o += 1;
  45235. var v = !e[o++];
  45236. l && (i = Xu(h) * f + u, a = Yu(h) * d + c), IRe(u, c, f, d, h, p, v, Oo, So), n = Xu(p) * f + u, r = Yu(p) * d + c;
  45237. break;
  45238. case Gt.R:
  45239. i = n = e[o++], a = r = e[o++];
  45240. var g = e[o++], m = e[o++];
  45241. pB(i, a, i + g, a + m, Oo, So);
  45242. break;
  45243. case Gt.Z:
  45244. n = i, r = a;
  45245. break;
  45246. }
  45247. $s(_o, _o, Oo), As(dl, dl, So);
  45248. }
  45249. return o === 0 && (_o[0] = _o[1] = dl[0] = dl[1] = 0), new Je(_o[0], _o[1], dl[0] - _o[0], dl[1] - _o[1]);
  45250. }, t.prototype._calculateLength = function() {
  45251. var e = this.data, n = this._len, r = this._ux, i = this._uy, a = 0, o = 0, s = 0, l = 0;
  45252. this._pathSegLen || (this._pathSegLen = []);
  45253. for (var u = this._pathSegLen, c = 0, f = 0, d = 0; d < n; ) {
  45254. var h = e[d++], p = d === 1;
  45255. p && (a = e[d], o = e[d + 1], s = a, l = o);
  45256. var v = -1;
  45257. switch (h) {
  45258. case Gt.M:
  45259. a = s = e[d++], o = l = e[d++];
  45260. break;
  45261. case Gt.L: {
  45262. var g = e[d++], m = e[d++], y = g - a, b = m - o;
  45263. (ms(y) > r || ms(b) > i || d === n - 1) && (v = Math.sqrt(y * y + b * b), a = g, o = m);
  45264. break;
  45265. }
  45266. case Gt.C: {
  45267. var _ = e[d++], O = e[d++], g = e[d++], m = e[d++], S = e[d++], x = e[d++];
  45268. v = HIe(a, o, _, O, g, m, S, x, 10), a = S, o = x;
  45269. break;
  45270. }
  45271. case Gt.Q: {
  45272. var _ = e[d++], O = e[d++], g = e[d++], m = e[d++];
  45273. v = jIe(a, o, _, O, g, m, 10), a = g, o = m;
  45274. break;
  45275. }
  45276. case Gt.A:
  45277. var C = e[d++], T = e[d++], w = e[d++], P = e[d++], $ = e[d++], A = e[d++], D = A + $;
  45278. d += 1, p && (s = Xu($) * w + C, l = Yu($) * P + T), v = vT(w, P) * pT(Sl, Math.abs(A)), a = Xu(D) * w + C, o = Yu(D) * P + T;
  45279. break;
  45280. case Gt.R: {
  45281. s = a = e[d++], l = o = e[d++];
  45282. var E = e[d++], R = e[d++];
  45283. v = E * 2 + R * 2;
  45284. break;
  45285. }
  45286. case Gt.Z: {
  45287. var y = s - a, b = l - o;
  45288. v = Math.sqrt(y * y + b * b), a = s, o = l;
  45289. break;
  45290. }
  45291. }
  45292. v >= 0 && (u[f++] = v, c += v);
  45293. }
  45294. return this._pathLen = c, c;
  45295. }, t.prototype.rebuildPath = function(e, n) {
  45296. 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, b = 0, _, O;
  45297. if (!(h && (this._pathSegLen || this._calculateLength(), p = this._pathSegLen, v = this._pathLen, y = n * v, !y)))
  45298. e: for (var S = 0; S < o; ) {
  45299. var x = r[S++], C = S === 1;
  45300. switch (C && (u = r[S], c = r[S + 1], s = u, l = c), x !== Gt.L && b > 0 && (e.lineTo(_, O), b = 0), x) {
  45301. case Gt.M:
  45302. s = u = r[S++], l = c = r[S++], e.moveTo(u, c);
  45303. break;
  45304. case Gt.L: {
  45305. f = r[S++], d = r[S++];
  45306. var T = ms(f - u), w = ms(d - c);
  45307. if (T > i || w > a) {
  45308. if (h) {
  45309. var P = p[m++];
  45310. if (g + P > y) {
  45311. var $ = (y - g) / P;
  45312. e.lineTo(u * (1 - $) + f * $, c * (1 - $) + d * $);
  45313. break e;
  45314. }
  45315. g += P;
  45316. }
  45317. e.lineTo(f, d), u = f, c = d, b = 0;
  45318. } else {
  45319. var A = T * T + w * w;
  45320. A > b && (_ = f, O = d, b = A);
  45321. }
  45322. break;
  45323. }
  45324. case Gt.C: {
  45325. var D = r[S++], E = r[S++], R = r[S++], N = r[S++], V = r[S++], B = r[S++];
  45326. if (h) {
  45327. var P = p[m++];
  45328. if (g + P > y) {
  45329. var $ = (y - g) / P;
  45330. su(u, D, R, V, $, Zu), su(c, E, N, B, $, Uu), e.bezierCurveTo(Zu[1], Uu[1], Zu[2], Uu[2], Zu[3], Uu[3]);
  45331. break e;
  45332. }
  45333. g += P;
  45334. }
  45335. e.bezierCurveTo(D, E, R, N, V, B), u = V, c = B;
  45336. break;
  45337. }
  45338. case Gt.Q: {
  45339. var D = r[S++], E = r[S++], R = r[S++], N = r[S++];
  45340. if (h) {
  45341. var P = p[m++];
  45342. if (g + P > y) {
  45343. var $ = (y - g) / P;
  45344. Sm(u, D, R, $, Zu), Sm(c, E, N, $, Uu), e.quadraticCurveTo(Zu[1], Uu[1], Zu[2], Uu[2]);
  45345. break e;
  45346. }
  45347. g += P;
  45348. }
  45349. e.quadraticCurveTo(D, E, R, N), u = R, c = N;
  45350. break;
  45351. }
  45352. case Gt.A:
  45353. var W = r[S++], F = r[S++], Q = r[S++], Z = r[S++], ne = r[S++], ee = r[S++], oe = r[S++], K = !r[S++], ie = Q > Z ? Q : Z, X = ms(Q - Z) > 1e-3, H = ne + ee, G = !1;
  45354. if (h) {
  45355. var P = p[m++];
  45356. g + P > y && (H = ne + ee * (y - g) / P, G = !0), g += P;
  45357. }
  45358. if (X && e.ellipse ? e.ellipse(W, F, Q, Z, oe, ne, H, K) : e.arc(W, F, ie, ne, H, K), G)
  45359. break e;
  45360. C && (s = Xu(ne) * Q + W, l = Yu(ne) * Z + F), u = Xu(H) * Q + W, c = Yu(H) * Z + F;
  45361. break;
  45362. case Gt.R:
  45363. s = u = r[S], l = c = r[S + 1], f = r[S++], d = r[S++];
  45364. var re = r[S++], fe = r[S++];
  45365. if (h) {
  45366. var P = p[m++];
  45367. if (g + P > y) {
  45368. var de = y - g;
  45369. e.moveTo(f, d), e.lineTo(f + pT(de, re), d), de -= re, de > 0 && e.lineTo(f + re, d + pT(de, fe)), de -= fe, de > 0 && e.lineTo(f + vT(re - de, 0), d + fe), de -= re, de > 0 && e.lineTo(f, d + vT(fe - de, 0));
  45370. break e;
  45371. }
  45372. g += P;
  45373. }
  45374. e.rect(f, d, re, fe);
  45375. break;
  45376. case Gt.Z:
  45377. if (h) {
  45378. var P = p[m++];
  45379. if (g + P > y) {
  45380. var $ = (y - g) / P;
  45381. e.lineTo(u * (1 - $) + s * $, c * (1 - $) + l * $);
  45382. break e;
  45383. }
  45384. g += P;
  45385. }
  45386. e.closePath(), u = s, c = l;
  45387. }
  45388. }
  45389. }, t.prototype.clone = function() {
  45390. var e = new t(), n = this.data;
  45391. return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n), e._len = this._len, e;
  45392. }, t.CMD = Gt, t.initDefaultProps = function() {
  45393. var e = t.prototype;
  45394. e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0;
  45395. }(), t;
  45396. }();
  45397. function wl(t, e, n, r, i, a, o) {
  45398. if (i === 0)
  45399. return !1;
  45400. var s = i, l = 0, u = t;
  45401. 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)
  45402. return !1;
  45403. if (t !== n)
  45404. l = (e - r) / (t - n), u = (t * r - n * e) / (t - n);
  45405. else
  45406. return Math.abs(a - t) <= s / 2;
  45407. var c = l * a - o + u, f = c * c / (l * l + 1);
  45408. return f <= s / 2 * s / 2;
  45409. }
  45410. function DRe(t, e, n, r, i, a, o, s, l, u, c) {
  45411. if (l === 0)
  45412. return !1;
  45413. var f = l;
  45414. 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)
  45415. return !1;
  45416. var d = Fq(t, e, n, r, i, a, o, s, u, c, null);
  45417. return d <= f / 2;
  45418. }
  45419. function wK(t, e, n, r, i, a, o, s, l) {
  45420. if (o === 0)
  45421. return !1;
  45422. var u = o;
  45423. 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)
  45424. return !1;
  45425. var c = Qq(t, e, n, r, i, a, s, l, null);
  45426. return c <= u / 2;
  45427. }
  45428. var mB = Math.PI * 2;
  45429. function Qi(t) {
  45430. return t %= mB, t < 0 && (t += mB), t;
  45431. }
  45432. var lv = Math.PI * 2;
  45433. function RRe(t, e, n, r, i, a, o, s, l) {
  45434. if (o === 0)
  45435. return !1;
  45436. var u = o;
  45437. s -= t, l -= e;
  45438. var c = Math.sqrt(s * s + l * l);
  45439. if (c - u > n || c + u < n)
  45440. return !1;
  45441. if (Math.abs(r - i) % lv < 1e-4)
  45442. return !0;
  45443. if (a) {
  45444. var f = r;
  45445. r = Qi(i), i = Qi(f);
  45446. } else
  45447. r = Qi(r), i = Qi(i);
  45448. r > i && (i += lv);
  45449. var d = Math.atan2(l, s);
  45450. return d < 0 && (d += lv), d >= r && d <= i || d + lv >= r && d + lv <= i;
  45451. }
  45452. function Ss(t, e, n, r, i, a) {
  45453. if (a > e && a > r || a < e && a < r || r === e)
  45454. return 0;
  45455. var o = (a - e) / (r - e), s = r < e ? 1 : -1;
  45456. (o === 1 || o === 0) && (s = r < e ? 0.5 : -0.5);
  45457. var l = o * (n - t) + t;
  45458. return l === i ? 1 / 0 : l > i ? s : 0;
  45459. }
  45460. var hl = os.CMD, qu = Math.PI * 2, kRe = 1e-4;
  45461. function LRe(t, e) {
  45462. return Math.abs(t - e) < kRe;
  45463. }
  45464. var Qr = [-1, -1, -1], fa = [-1, -1];
  45465. function NRe() {
  45466. var t = fa[0];
  45467. fa[0] = fa[1], fa[1] = t;
  45468. }
  45469. function BRe(t, e, n, r, i, a, o, s, l, u) {
  45470. if (u > e && u > r && u > a && u > s || u < e && u < r && u < a && u < s)
  45471. return 0;
  45472. var c = eO(e, r, a, s, u, Qr);
  45473. if (c === 0)
  45474. return 0;
  45475. for (var f = 0, d = -1, h = void 0, p = void 0, v = 0; v < c; v++) {
  45476. var g = Qr[v], m = g === 0 || g === 1 ? 0.5 : 1, y = Gn(t, n, i, o, g);
  45477. y < l || (d < 0 && (d = Vq(e, r, a, s, fa), fa[1] < fa[0] && d > 1 && NRe(), h = Gn(e, r, a, s, fa[0]), d > 1 && (p = Gn(e, r, a, s, fa[1]))), d === 2 ? g < fa[0] ? f += h < e ? m : -m : g < fa[1] ? f += p < h ? m : -m : f += s < p ? m : -m : g < fa[0] ? f += h < e ? m : -m : f += s < h ? m : -m);
  45478. }
  45479. return f;
  45480. }
  45481. function zRe(t, e, n, r, i, a, o, s) {
  45482. if (s > e && s > r && s > a || s < e && s < r && s < a)
  45483. return 0;
  45484. var l = GIe(e, r, a, s, Qr);
  45485. if (l === 0)
  45486. return 0;
  45487. var u = Wq(e, r, a);
  45488. if (u >= 0 && u <= 1) {
  45489. for (var c = 0, f = ir(e, r, a, u), d = 0; d < l; d++) {
  45490. var h = Qr[d] === 0 || Qr[d] === 1 ? 0.5 : 1, p = ir(t, n, i, Qr[d]);
  45491. p < o || (Qr[d] < u ? c += f < e ? h : -h : c += a < f ? h : -h);
  45492. }
  45493. return c;
  45494. } else {
  45495. var h = Qr[0] === 0 || Qr[0] === 1 ? 0.5 : 1, p = ir(t, n, i, Qr[0]);
  45496. return p < o ? 0 : a < e ? h : -h;
  45497. }
  45498. }
  45499. function VRe(t, e, n, r, i, a, o, s) {
  45500. if (s -= e, s > n || s < -n)
  45501. return 0;
  45502. var l = Math.sqrt(n * n - s * s);
  45503. Qr[0] = -l, Qr[1] = l;
  45504. var u = Math.abs(r - i);
  45505. if (u < 1e-4)
  45506. return 0;
  45507. if (u >= qu - 1e-4) {
  45508. r = 0, i = qu;
  45509. var c = a ? 1 : -1;
  45510. return o >= Qr[0] + t && o <= Qr[1] + t ? c : 0;
  45511. }
  45512. if (r > i) {
  45513. var f = r;
  45514. r = i, i = f;
  45515. }
  45516. r < 0 && (r += qu, i += qu);
  45517. for (var d = 0, h = 0; h < 2; h++) {
  45518. var p = Qr[h];
  45519. if (p + t > o) {
  45520. var v = Math.atan2(s, p), c = a ? 1 : -1;
  45521. v < 0 && (v = qu + v), (v >= r && v <= i || v + qu >= r && v + qu <= i) && (v > Math.PI / 2 && v < Math.PI * 1.5 && (c = -c), d += c);
  45522. }
  45523. }
  45524. return d;
  45525. }
  45526. function CK(t, e, n, r, i) {
  45527. for (var a = t.data, o = t.len(), s = 0, l = 0, u = 0, c = 0, f = 0, d, h, p = 0; p < o; ) {
  45528. var v = a[p++], g = p === 1;
  45529. switch (v === hl.M && p > 1 && (n || (s += Ss(l, u, c, f, r, i))), g && (l = a[p], u = a[p + 1], c = l, f = u), v) {
  45530. case hl.M:
  45531. c = a[p++], f = a[p++], l = c, u = f;
  45532. break;
  45533. case hl.L:
  45534. if (n) {
  45535. if (wl(l, u, a[p], a[p + 1], e, r, i))
  45536. return !0;
  45537. } else
  45538. s += Ss(l, u, a[p], a[p + 1], r, i) || 0;
  45539. l = a[p++], u = a[p++];
  45540. break;
  45541. case hl.C:
  45542. if (n) {
  45543. if (DRe(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], e, r, i))
  45544. return !0;
  45545. } else
  45546. s += BRe(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
  45547. l = a[p++], u = a[p++];
  45548. break;
  45549. case hl.Q:
  45550. if (n) {
  45551. if (wK(l, u, a[p++], a[p++], a[p], a[p + 1], e, r, i))
  45552. return !0;
  45553. } else
  45554. s += zRe(l, u, a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
  45555. l = a[p++], u = a[p++];
  45556. break;
  45557. case hl.A:
  45558. var m = a[p++], y = a[p++], b = a[p++], _ = a[p++], O = a[p++], S = a[p++];
  45559. p += 1;
  45560. var x = !!(1 - a[p++]);
  45561. d = Math.cos(O) * b + m, h = Math.sin(O) * _ + y, g ? (c = d, f = h) : s += Ss(l, u, d, h, r, i);
  45562. var C = (r - m) * _ / b + m;
  45563. if (n) {
  45564. if (RRe(m, y, _, O, O + S, x, e, C, i))
  45565. return !0;
  45566. } else
  45567. s += VRe(m, y, _, O, O + S, x, C, i);
  45568. l = Math.cos(O + S) * b + m, u = Math.sin(O + S) * _ + y;
  45569. break;
  45570. case hl.R:
  45571. c = l = a[p++], f = u = a[p++];
  45572. var T = a[p++], w = a[p++];
  45573. if (d = c + T, h = f + w, n) {
  45574. if (wl(c, f, d, f, e, r, i) || wl(d, f, d, h, e, r, i) || wl(d, h, c, h, e, r, i) || wl(c, h, c, f, e, r, i))
  45575. return !0;
  45576. } else
  45577. s += Ss(d, f, d, h, r, i), s += Ss(c, h, c, f, r, i);
  45578. break;
  45579. case hl.Z:
  45580. if (n) {
  45581. if (wl(l, u, c, f, e, r, i))
  45582. return !0;
  45583. } else
  45584. s += Ss(l, u, c, f, r, i);
  45585. l = c, u = f;
  45586. break;
  45587. }
  45588. }
  45589. return !n && !LRe(u, f) && (s += Ss(l, u, c, f, r, i) || 0), s !== 0;
  45590. }
  45591. function FRe(t, e, n) {
  45592. return CK(t, 0, !1, e, n);
  45593. }
  45594. function WRe(t, e, n, r) {
  45595. return CK(t, e, !0, n, r);
  45596. }
  45597. var sO = Re({
  45598. fill: "#000",
  45599. stroke: null,
  45600. strokePercent: 1,
  45601. fillOpacity: 1,
  45602. strokeOpacity: 1,
  45603. lineDashOffset: 0,
  45604. lineWidth: 1,
  45605. lineCap: "butt",
  45606. miterLimit: 10,
  45607. strokeNoScale: !1,
  45608. strokeFirst: !1
  45609. }, Jc), QRe = {
  45610. style: Re({
  45611. fill: !0,
  45612. stroke: !0,
  45613. strokePercent: !0,
  45614. fillOpacity: !0,
  45615. strokeOpacity: !0,
  45616. lineDashOffset: !0,
  45617. lineWidth: !0,
  45618. miterLimit: !0
  45619. }, jx.style)
  45620. }, yT = is.concat([
  45621. "invisible",
  45622. "culling",
  45623. "z",
  45624. "z2",
  45625. "zlevel",
  45626. "parent"
  45627. ]), ot = function(t) {
  45628. q(e, t);
  45629. function e(n) {
  45630. return t.call(this, n) || this;
  45631. }
  45632. return e.prototype.update = function() {
  45633. var n = this;
  45634. t.prototype.update.call(this);
  45635. var r = this.style;
  45636. if (r.decal) {
  45637. var i = this._decalEl = this._decalEl || new e();
  45638. i.buildPath === e.prototype.buildPath && (i.buildPath = function(l) {
  45639. n.buildPath(l, n.shape);
  45640. }), i.silent = !0;
  45641. var a = i.style;
  45642. for (var o in r)
  45643. a[o] !== r[o] && (a[o] = r[o]);
  45644. a.fill = r.fill ? r.decal : null, a.decal = null, a.shadowColor = null, r.strokeFirst && (a.stroke = null);
  45645. for (var s = 0; s < yT.length; ++s)
  45646. i[yT[s]] = this[yT[s]];
  45647. i.__dirty |= Ni;
  45648. } else this._decalEl && (this._decalEl = null);
  45649. }, e.prototype.getDecalElement = function() {
  45650. return this._decalEl;
  45651. }, e.prototype._init = function(n) {
  45652. var r = st(n);
  45653. this.shape = this.getDefaultShape();
  45654. var i = this.getDefaultStyle();
  45655. i && this.useStyle(i);
  45656. for (var a = 0; a < r.length; a++) {
  45657. var o = r[a], s = n[o];
  45658. o === "style" ? this.style ? le(this.style, s) : this.useStyle(s) : o === "shape" ? le(this.shape, s) : t.prototype.attrKV.call(this, o, s);
  45659. }
  45660. this.style || this.useStyle({});
  45661. }, e.prototype.getDefaultStyle = function() {
  45662. return null;
  45663. }, e.prototype.getDefaultShape = function() {
  45664. return {};
  45665. }, e.prototype.canBeInsideText = function() {
  45666. return this.hasFill();
  45667. }, e.prototype.getInsideTextFill = function() {
  45668. var n = this.style.fill;
  45669. if (n !== "none") {
  45670. if (Oe(n)) {
  45671. var r = Cm(n, 0);
  45672. return r > 0.5 ? SA : r > 0.2 ? xDe : xA;
  45673. } else if (n)
  45674. return xA;
  45675. }
  45676. return SA;
  45677. }, e.prototype.getInsideTextStroke = function(n) {
  45678. var r = this.style.fill;
  45679. if (Oe(r)) {
  45680. var i = this.__zr, a = !!(i && i.isDarkMode()), o = Cm(n, 0) < OA;
  45681. if (a === o)
  45682. return r;
  45683. }
  45684. }, e.prototype.buildPath = function(n, r, i) {
  45685. }, e.prototype.pathUpdated = function() {
  45686. this.__dirty &= ~Ad;
  45687. }, e.prototype.getUpdatedPathProxy = function(n) {
  45688. return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, n), this.path;
  45689. }, e.prototype.createPathProxy = function() {
  45690. this.path = new os(!1);
  45691. }, e.prototype.hasStroke = function() {
  45692. var n = this.style, r = n.stroke;
  45693. return !(r == null || r === "none" || !(n.lineWidth > 0));
  45694. }, e.prototype.hasFill = function() {
  45695. var n = this.style, r = n.fill;
  45696. return r != null && r !== "none";
  45697. }, e.prototype.getBoundingRect = function() {
  45698. var n = this._rect, r = this.style, i = !n;
  45699. if (i) {
  45700. var a = !1;
  45701. this.path || (a = !0, this.createPathProxy());
  45702. var o = this.path;
  45703. (a || this.__dirty & Ad) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), n = o.getBoundingRect();
  45704. }
  45705. if (this._rect = n, this.hasStroke() && this.path && this.path.len() > 0) {
  45706. var s = this._rectStroke || (this._rectStroke = n.clone());
  45707. if (this.__dirty || i) {
  45708. s.copy(n);
  45709. var l = r.strokeNoScale ? this.getLineScale() : 1, u = r.lineWidth;
  45710. if (!this.hasFill()) {
  45711. var c = this.strokeContainThreshold;
  45712. u = Math.max(u, c ?? 4);
  45713. }
  45714. l > 1e-10 && (s.width += u / l, s.height += u / l, s.x -= u / l / 2, s.y -= u / l / 2);
  45715. }
  45716. return s;
  45717. }
  45718. return n;
  45719. }, e.prototype.contain = function(n, r) {
  45720. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect(), o = this.style;
  45721. if (n = i[0], r = i[1], a.contain(n, r)) {
  45722. var s = this.path;
  45723. if (this.hasStroke()) {
  45724. var l = o.lineWidth, u = o.strokeNoScale ? this.getLineScale() : 1;
  45725. if (u > 1e-10 && (this.hasFill() || (l = Math.max(l, this.strokeContainThreshold)), WRe(s, l / u, n, r)))
  45726. return !0;
  45727. }
  45728. if (this.hasFill())
  45729. return FRe(s, n, r);
  45730. }
  45731. return !1;
  45732. }, e.prototype.dirtyShape = function() {
  45733. this.__dirty |= Ad, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw();
  45734. }, e.prototype.dirty = function() {
  45735. this.dirtyStyle(), this.dirtyShape();
  45736. }, e.prototype.animateShape = function(n) {
  45737. return this.animate("shape", n);
  45738. }, e.prototype.updateDuringAnimation = function(n) {
  45739. n === "style" ? this.dirtyStyle() : n === "shape" ? this.dirtyShape() : this.markRedraw();
  45740. }, e.prototype.attrKV = function(n, r) {
  45741. n === "shape" ? this.setShape(r) : t.prototype.attrKV.call(this, n, r);
  45742. }, e.prototype.setShape = function(n, r) {
  45743. var i = this.shape;
  45744. return i || (i = this.shape = {}), typeof n == "string" ? i[n] = r : le(i, n), this.dirtyShape(), this;
  45745. }, e.prototype.shapeChanged = function() {
  45746. return !!(this.__dirty & Ad);
  45747. }, e.prototype.createStyle = function(n) {
  45748. return D0(sO, n);
  45749. }, e.prototype._innerSaveToNormal = function(n) {
  45750. t.prototype._innerSaveToNormal.call(this, n);
  45751. var r = this._normalState;
  45752. n.shape && !r.shape && (r.shape = le({}, this.shape));
  45753. }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
  45754. t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
  45755. var l = !(r && a), u;
  45756. if (r && r.shape ? o ? a ? u = r.shape : (u = le({}, i.shape), le(u, r.shape)) : (u = le({}, a ? this.shape : i.shape), le(u, r.shape)) : l && (u = i.shape), u)
  45757. if (o) {
  45758. this.shape = le({}, this.shape);
  45759. for (var c = {}, f = st(u), d = 0; d < f.length; d++) {
  45760. var h = f[d];
  45761. typeof u[h] == "object" ? this.shape[h] = u[h] : c[h] = u[h];
  45762. }
  45763. this._transitionState(n, {
  45764. shape: c
  45765. }, s);
  45766. } else
  45767. this.shape = u, this.dirtyShape();
  45768. }, e.prototype._mergeStates = function(n) {
  45769. for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
  45770. var o = n[a];
  45771. o.shape && (i = i || {}, this._mergeStyle(i, o.shape));
  45772. }
  45773. return i && (r.shape = i), r;
  45774. }, e.prototype.getAnimationStyleProps = function() {
  45775. return QRe;
  45776. }, e.prototype.isZeroArea = function() {
  45777. return !1;
  45778. }, e.extend = function(n) {
  45779. var r = function(a) {
  45780. q(o, a);
  45781. function o(s) {
  45782. var l = a.call(this, s) || this;
  45783. return n.init && n.init.call(l, s), l;
  45784. }
  45785. return o.prototype.getDefaultStyle = function() {
  45786. return Le(n.style);
  45787. }, o.prototype.getDefaultShape = function() {
  45788. return Le(n.shape);
  45789. }, o;
  45790. }(e);
  45791. for (var i in n)
  45792. typeof n[i] == "function" && (r.prototype[i] = n[i]);
  45793. return r;
  45794. }, e.initDefaultProps = function() {
  45795. var n = e.prototype;
  45796. n.type = "path", n.strokeContainThreshold = 5, n.segmentIgnoreThreshold = 0, n.subPixelOptimize = !1, n.autoBatch = !1, n.__dirty = Ni | Gv | Ad;
  45797. }(), e;
  45798. }(Da), HRe = Re({
  45799. strokeFirst: !0,
  45800. font: iu,
  45801. x: 0,
  45802. y: 0,
  45803. textAlign: "left",
  45804. textBaseline: "top",
  45805. miterLimit: 2
  45806. }, sO), Qh = function(t) {
  45807. q(e, t);
  45808. function e() {
  45809. return t !== null && t.apply(this, arguments) || this;
  45810. }
  45811. return e.prototype.hasStroke = function() {
  45812. var n = this.style, r = n.stroke;
  45813. return r != null && r !== "none" && n.lineWidth > 0;
  45814. }, e.prototype.hasFill = function() {
  45815. var n = this.style, r = n.fill;
  45816. return r != null && r !== "none";
  45817. }, e.prototype.createStyle = function(n) {
  45818. return D0(HRe, n);
  45819. }, e.prototype.setBoundingRect = function(n) {
  45820. this._rect = n;
  45821. }, e.prototype.getBoundingRect = function() {
  45822. var n = this.style;
  45823. if (!this._rect) {
  45824. var r = n.text;
  45825. r != null ? r += "" : r = "";
  45826. var i = L0(r, n.font, n.textAlign, n.textBaseline);
  45827. if (i.x += n.x || 0, i.y += n.y || 0, this.hasStroke()) {
  45828. var a = n.lineWidth;
  45829. i.x -= a / 2, i.y -= a / 2, i.width += a, i.height += a;
  45830. }
  45831. this._rect = i;
  45832. }
  45833. return this._rect;
  45834. }, e.initDefaultProps = function() {
  45835. var n = e.prototype;
  45836. n.dirtyRectTolerance = 10;
  45837. }(), e;
  45838. }(Da);
  45839. Qh.prototype.type = "tspan";
  45840. var GRe = Re({
  45841. x: 0,
  45842. y: 0
  45843. }, Jc), jRe = {
  45844. style: Re({
  45845. x: !0,
  45846. y: !0,
  45847. width: !0,
  45848. height: !0,
  45849. sx: !0,
  45850. sy: !0,
  45851. sWidth: !0,
  45852. sHeight: !0
  45853. }, jx.style)
  45854. };
  45855. function ZRe(t) {
  45856. return !!(t && typeof t != "string" && t.width && t.height);
  45857. }
  45858. var TK = function(t) {
  45859. q(e, t);
  45860. function e() {
  45861. return t !== null && t.apply(this, arguments) || this;
  45862. }
  45863. return e.prototype.createStyle = function(n) {
  45864. return D0(GRe, n);
  45865. }, e.prototype._getSize = function(n) {
  45866. var r = this.style, i = r[n];
  45867. if (i != null)
  45868. return i;
  45869. var a = ZRe(r.image) ? r.image : this.__image;
  45870. if (!a)
  45871. return 0;
  45872. var o = n === "width" ? "height" : "width", s = r[o];
  45873. return s == null ? a[n] : a[n] / a[o] * s;
  45874. }, e.prototype.getWidth = function() {
  45875. return this._getSize("width");
  45876. }, e.prototype.getHeight = function() {
  45877. return this._getSize("height");
  45878. }, e.prototype.getAnimationStyleProps = function() {
  45879. return jRe;
  45880. }, e.prototype.getBoundingRect = function() {
  45881. var n = this.style;
  45882. return this._rect || (this._rect = new Je(n.x || 0, n.y || 0, this.getWidth(), this.getHeight())), this._rect;
  45883. }, e;
  45884. }(Da);
  45885. TK.prototype.type = "image";
  45886. const lr = TK;
  45887. function URe(t, e) {
  45888. var n = e.x, r = e.y, i = e.width, a = e.height, o = e.r, s, l, u, c;
  45889. 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;
  45890. var f;
  45891. 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);
  45892. }
  45893. var Fd = Math.round;
  45894. function PK(t, e, n) {
  45895. if (e) {
  45896. var r = e.x1, i = e.x2, a = e.y1, o = e.y2;
  45897. t.x1 = r, t.x2 = i, t.y1 = a, t.y2 = o;
  45898. var s = n && n.lineWidth;
  45899. return s && (Fd(r * 2) === Fd(i * 2) && (t.x1 = t.x2 = kc(r, s, !0)), Fd(a * 2) === Fd(o * 2) && (t.y1 = t.y2 = kc(a, s, !0))), t;
  45900. }
  45901. }
  45902. function $K(t, e, n) {
  45903. if (e) {
  45904. var r = e.x, i = e.y, a = e.width, o = e.height;
  45905. t.x = r, t.y = i, t.width = a, t.height = o;
  45906. var s = n && n.lineWidth;
  45907. return s && (t.x = kc(r, s, !0), t.y = kc(i, s, !0), t.width = Math.max(kc(r + a, s, !1) - t.x, a === 0 ? 0 : 1), t.height = Math.max(kc(i + o, s, !1) - t.y, o === 0 ? 0 : 1)), t;
  45908. }
  45909. }
  45910. function kc(t, e, n) {
  45911. if (!e)
  45912. return t;
  45913. var r = Fd(t * 2);
  45914. return (r + Fd(e)) % 2 === 0 ? r / 2 : (r + (n ? 1 : -1)) / 2;
  45915. }
  45916. var XRe = /* @__PURE__ */ function() {
  45917. function t() {
  45918. this.x = 0, this.y = 0, this.width = 0, this.height = 0;
  45919. }
  45920. return t;
  45921. }(), YRe = {}, AK = function(t) {
  45922. q(e, t);
  45923. function e(n) {
  45924. return t.call(this, n) || this;
  45925. }
  45926. return e.prototype.getDefaultShape = function() {
  45927. return new XRe();
  45928. }, e.prototype.buildPath = function(n, r) {
  45929. var i, a, o, s;
  45930. if (this.subPixelOptimize) {
  45931. var l = $K(YRe, r, this.style);
  45932. i = l.x, a = l.y, o = l.width, s = l.height, l.r = r.r, r = l;
  45933. } else
  45934. i = r.x, a = r.y, o = r.width, s = r.height;
  45935. r.r ? URe(n, r) : n.rect(i, a, o, s);
  45936. }, e.prototype.isZeroArea = function() {
  45937. return !this.shape.width || !this.shape.height;
  45938. }, e;
  45939. }(ot);
  45940. AK.prototype.type = "rect";
  45941. const mt = AK;
  45942. var yB = {
  45943. fill: "#000"
  45944. }, bB = 2, qRe = {
  45945. style: Re({
  45946. fill: !0,
  45947. stroke: !0,
  45948. fillOpacity: !0,
  45949. strokeOpacity: !0,
  45950. lineWidth: !0,
  45951. fontSize: !0,
  45952. lineHeight: !0,
  45953. width: !0,
  45954. height: !0,
  45955. textShadowColor: !0,
  45956. textShadowBlur: !0,
  45957. textShadowOffsetX: !0,
  45958. textShadowOffsetY: !0,
  45959. backgroundColor: !0,
  45960. padding: !0,
  45961. borderColor: !0,
  45962. borderWidth: !0,
  45963. borderRadius: !0
  45964. }, jx.style)
  45965. }, EK = function(t) {
  45966. q(e, t);
  45967. function e(n) {
  45968. var r = t.call(this) || this;
  45969. return r.type = "text", r._children = [], r._defaultStyle = yB, r.attr(n), r;
  45970. }
  45971. return e.prototype.childrenRef = function() {
  45972. return this._children;
  45973. }, e.prototype.update = function() {
  45974. t.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
  45975. for (var n = 0; n < this._children.length; n++) {
  45976. var r = this._children[n];
  45977. r.zlevel = this.zlevel, r.z = this.z, r.z2 = this.z2, r.culling = this.culling, r.cursor = this.cursor, r.invisible = this.invisible;
  45978. }
  45979. }, e.prototype.updateTransform = function() {
  45980. var n = this.innerTransformable;
  45981. n ? (n.updateTransform(), n.transform && (this.transform = n.transform)) : t.prototype.updateTransform.call(this);
  45982. }, e.prototype.getLocalTransform = function(n) {
  45983. var r = this.innerTransformable;
  45984. return r ? r.getLocalTransform(n) : t.prototype.getLocalTransform.call(this, n);
  45985. }, e.prototype.getComputedTransform = function() {
  45986. return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), t.prototype.getComputedTransform.call(this);
  45987. }, e.prototype._updateSubTexts = function() {
  45988. this._childCursor = 0, eke(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated();
  45989. }, e.prototype.addSelfToZr = function(n) {
  45990. t.prototype.addSelfToZr.call(this, n);
  45991. for (var r = 0; r < this._children.length; r++)
  45992. this._children[r].__zr = n;
  45993. }, e.prototype.removeSelfFromZr = function(n) {
  45994. t.prototype.removeSelfFromZr.call(this, n);
  45995. for (var r = 0; r < this._children.length; r++)
  45996. this._children[r].__zr = null;
  45997. }, e.prototype.getBoundingRect = function() {
  45998. if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
  45999. for (var n = new Je(0, 0, 0, 0), r = this._children, i = [], a = null, o = 0; o < r.length; o++) {
  46000. var s = r[o], l = s.getBoundingRect(), u = s.getLocalTransform(i);
  46001. u ? (n.copy(l), n.applyTransform(u), a = a || n.clone(), a.union(n)) : (a = a || l.clone(), a.union(l));
  46002. }
  46003. this._rect = a || n;
  46004. }
  46005. return this._rect;
  46006. }, e.prototype.setDefaultTextStyle = function(n) {
  46007. this._defaultStyle = n || yB;
  46008. }, e.prototype.setTextContent = function(n) {
  46009. if (process.env.NODE_ENV !== "production")
  46010. throw new Error("Can't attach text on another text");
  46011. }, e.prototype._mergeStyle = function(n, r) {
  46012. if (!r)
  46013. return n;
  46014. var i = r.rich, a = n.rich || i && {};
  46015. return le(n, r), i && a ? (this._mergeRich(a, i), n.rich = a) : a && (n.rich = a), n;
  46016. }, e.prototype._mergeRich = function(n, r) {
  46017. for (var i = st(r), a = 0; a < i.length; a++) {
  46018. var o = i[a];
  46019. n[o] = n[o] || {}, le(n[o], r[o]);
  46020. }
  46021. }, e.prototype.getAnimationStyleProps = function() {
  46022. return qRe;
  46023. }, e.prototype._getOrCreateChild = function(n) {
  46024. var r = this._children[this._childCursor];
  46025. return (!r || !(r instanceof n)) && (r = new n()), this._children[this._childCursor++] = r, r.__zr = this.__zr, r.parent = this, r;
  46026. }, e.prototype._updatePlainTexts = function() {
  46027. var n = this.style, r = n.font || iu, i = n.padding, a = TB(n), o = _Re(a, n), s = bT(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", b = v, _ = Ed(g, o.contentHeight, y);
  46028. if (s || i) {
  46029. var O = Zv(v, c, m), S = Ed(g, u, y);
  46030. s && this._renderBackground(n, n, O, S, c, u);
  46031. }
  46032. _ += h / 2, i && (b = CB(v, m, i), y === "top" ? _ += i[0] : y === "bottom" && (_ -= i[2]));
  46033. for (var x = 0, C = !1, T = wB("fill" in n ? n.fill : (C = !0, p.fill)), w = xB("stroke" in n ? n.stroke : !l && (!p.autoStroke || C) ? (x = bB, p.stroke) : null), P = n.textShadowBlur > 0, $ = n.width != null && (n.overflow === "truncate" || n.overflow === "break" || n.overflow === "breakAll"), A = o.calculatedLineHeight, D = 0; D < d.length; D++) {
  46034. var E = this._getOrCreateChild(Qh), R = E.createStyle();
  46035. E.useStyle(R), R.text = d[D], R.x = b, R.y = _, m && (R.textAlign = m), R.textBaseline = "middle", R.opacity = n.opacity, R.strokeFirst = !0, P && (R.shadowBlur = n.textShadowBlur || 0, R.shadowColor = n.textShadowColor || "transparent", R.shadowOffsetX = n.textShadowOffsetX || 0, R.shadowOffsetY = n.textShadowOffsetY || 0), R.stroke = w, R.fill = T, w && (R.lineWidth = n.lineWidth || x, R.lineDash = n.lineDash, R.lineDashOffset = n.lineDashOffset || 0), R.font = r, OB(R, n), _ += h, $ && E.setBoundingRect(new Je(Zv(R.x, n.width, R.textAlign), Ed(R.y, A, R.textBaseline), f, A));
  46036. }
  46037. }, e.prototype._updateRichTexts = function() {
  46038. var n = this.style, r = TB(n), i = xRe(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 = Zv(u, o, d), v = Ed(c, s, h), g = p, m = v;
  46039. l && (g += l[3], m += l[0]);
  46040. var y = g + a;
  46041. bT(n) && this._renderBackground(n, n, p, v, o, s);
  46042. for (var b = !!n.backgroundColor, _ = 0; _ < i.lines.length; _++) {
  46043. for (var O = i.lines[_], S = O.tokens, x = S.length, C = O.lineHeight, T = O.width, w = 0, P = g, $ = y, A = x - 1, D = void 0; w < x && (D = S[w], !D.align || D.align === "left"); )
  46044. this._placeToken(D, n, C, m, P, "left", b), T -= D.width, P += D.width, w++;
  46045. for (; A >= 0 && (D = S[A], D.align === "right"); )
  46046. this._placeToken(D, n, C, m, $, "right", b), T -= D.width, $ -= D.width, A--;
  46047. for (P += (a - (P - g) - (y - $) - T) / 2; w <= A; )
  46048. D = S[w], this._placeToken(D, n, C, m, P + D.width / 2, "center", b), P += D.width, w++;
  46049. m += C;
  46050. }
  46051. }, e.prototype._placeToken = function(n, r, i, a, o, s, l) {
  46052. var u = r.rich[n.styleName] || {};
  46053. u.text = n.text;
  46054. var c = n.verticalAlign, f = a + i / 2;
  46055. c === "top" ? f = a + n.height / 2 : c === "bottom" && (f = a + i - n.height / 2);
  46056. var d = !n.isLineHolder && bT(u);
  46057. 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);
  46058. var h = !!u.backgroundColor, p = n.textPadding;
  46059. p && (o = CB(o, s, p), f -= n.height / 2 - p[0] - n.innerHeight / 2);
  46060. var v = this._getOrCreateChild(Qh), g = v.createStyle();
  46061. v.useStyle(g);
  46062. var m = this._defaultStyle, y = !1, b = 0, _ = wB("fill" in u ? u.fill : "fill" in r ? r.fill : (y = !0, m.fill)), O = xB("stroke" in u ? u.stroke : "stroke" in r ? r.stroke : !h && !l && (!m.autoStroke || y) ? (b = bB, m.stroke) : null), S = u.textShadowBlur > 0 || r.textShadowBlur > 0;
  46063. g.text = n.text, g.x = o, g.y = f, S && (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 || iu, g.opacity = Ui(u.opacity, r.opacity, 1), OB(g, u), O && (g.lineWidth = Ui(u.lineWidth, r.lineWidth, b), g.lineDash = We(u.lineDash, r.lineDash), g.lineDashOffset = r.lineDashOffset || 0, g.stroke = O), _ && (g.fill = _);
  46064. var x = n.contentWidth, C = n.contentHeight;
  46065. v.setBoundingRect(new Je(Zv(g.x, x, g.textAlign), Ed(g.y, C, g.textBaseline), x, C));
  46066. }, e.prototype._renderBackground = function(n, r, i, a, o, s) {
  46067. var l = n.backgroundColor, u = n.borderWidth, c = n.borderColor, f = l && l.image, d = l && !f, h = n.borderRadius, p = this, v, g;
  46068. if (d || n.lineHeight || u && c) {
  46069. v = this._getOrCreateChild(mt), v.useStyle(v.createStyle()), v.style.fill = null;
  46070. var m = v.shape;
  46071. m.x = i, m.y = a, m.width = o, m.height = s, m.r = h, v.dirtyShape();
  46072. }
  46073. if (d) {
  46074. var y = v.style;
  46075. y.fill = l || null, y.fillOpacity = We(n.fillOpacity, 1);
  46076. } else if (f) {
  46077. g = this._getOrCreateChild(lr), g.onload = function() {
  46078. p.dirtyStyle();
  46079. };
  46080. var b = g.style;
  46081. b.image = l.image, b.x = i, b.y = a, b.width = o, b.height = s;
  46082. }
  46083. if (u && c) {
  46084. var y = v.style;
  46085. y.lineWidth = u, y.stroke = c, y.strokeOpacity = We(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);
  46086. }
  46087. var _ = (v || g).style;
  46088. _.shadowBlur = n.shadowBlur || 0, _.shadowColor = n.shadowColor || "transparent", _.shadowOffsetX = n.shadowOffsetX || 0, _.shadowOffsetY = n.shadowOffsetY || 0, _.opacity = Ui(n.opacity, r.opacity, 1);
  46089. }, e.makeFont = function(n) {
  46090. var r = "";
  46091. return IK(n) && (r = [
  46092. n.fontStyle,
  46093. n.fontWeight,
  46094. MK(n.fontSize),
  46095. n.fontFamily || "sans-serif"
  46096. ].join(" ")), r && ba(r) || n.textFont || n.font;
  46097. }, e;
  46098. }(Da), KRe = { left: !0, right: 1, center: 1 }, JRe = { top: 1, bottom: 1, middle: 1 }, _B = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
  46099. function MK(t) {
  46100. return typeof t == "string" && (t.indexOf("px") !== -1 || t.indexOf("rem") !== -1 || t.indexOf("em") !== -1) ? t : isNaN(+t) ? pR + "px" : t + "px";
  46101. }
  46102. function OB(t, e) {
  46103. for (var n = 0; n < _B.length; n++) {
  46104. var r = _B[n], i = e[r];
  46105. i != null && (t[r] = i);
  46106. }
  46107. }
  46108. function IK(t) {
  46109. return t.fontSize != null || t.fontFamily || t.fontWeight;
  46110. }
  46111. function eke(t) {
  46112. return SB(t), k(t.rich, SB), t;
  46113. }
  46114. function SB(t) {
  46115. if (t) {
  46116. t.font = EK.makeFont(t);
  46117. var e = t.align;
  46118. e === "middle" && (e = "center"), t.align = e == null || KRe[e] ? e : "left";
  46119. var n = t.verticalAlign;
  46120. n === "center" && (n = "middle"), t.verticalAlign = n == null || JRe[n] ? n : "top";
  46121. var r = t.padding;
  46122. r && (t.padding = Lx(t.padding));
  46123. }
  46124. }
  46125. function xB(t, e) {
  46126. return t == null || e <= 0 || t === "transparent" || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
  46127. }
  46128. function wB(t) {
  46129. return t == null || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
  46130. }
  46131. function CB(t, e, n) {
  46132. return e === "right" ? t - n[1] : e === "center" ? t + n[3] / 2 - n[1] / 2 : t + n[3];
  46133. }
  46134. function TB(t) {
  46135. var e = t.text;
  46136. return e != null && (e += ""), e;
  46137. }
  46138. function bT(t) {
  46139. return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor);
  46140. }
  46141. const gt = EK;
  46142. var Fe = bt(), IA = function(t, e, n, r) {
  46143. if (r) {
  46144. var i = Fe(r);
  46145. i.dataIndex = n, i.dataType = e, i.seriesIndex = t, i.ssrType = "chart", r.type === "group" && r.traverse(function(a) {
  46146. var o = Fe(a);
  46147. o.seriesIndex = t, o.dataIndex = n, o.dataType = e, o.ssrType = "chart";
  46148. });
  46149. }
  46150. }, PB = 1, $B = {}, DK = bt(), kR = bt(), LR = 0, z0 = 1, Ux = 2, ri = ["emphasis", "blur", "select"], Pm = ["normal", "emphasis", "blur", "select"], mp = 10, tke = 9, ef = "highlight", F_ = "downplay", Rg = "select", W_ = "unselect", kg = "toggleSelect";
  46151. function ad(t) {
  46152. return t != null && t !== "none";
  46153. }
  46154. function Xx(t, e, n) {
  46155. t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e), t.hoverState = n;
  46156. }
  46157. function RK(t) {
  46158. Xx(t, "emphasis", Ux);
  46159. }
  46160. function kK(t) {
  46161. t.hoverState === Ux && Xx(t, "normal", LR);
  46162. }
  46163. function NR(t) {
  46164. Xx(t, "blur", z0);
  46165. }
  46166. function LK(t) {
  46167. t.hoverState === z0 && Xx(t, "normal", LR);
  46168. }
  46169. function nke(t) {
  46170. t.selected = !0;
  46171. }
  46172. function rke(t) {
  46173. t.selected = !1;
  46174. }
  46175. function AB(t, e, n) {
  46176. e(t, n);
  46177. }
  46178. function ll(t, e, n) {
  46179. AB(t, e, n), t.isGroup && t.traverse(function(r) {
  46180. AB(r, e, n);
  46181. });
  46182. }
  46183. function lO(t, e) {
  46184. switch (e) {
  46185. case "emphasis":
  46186. t.hoverState = Ux;
  46187. break;
  46188. case "normal":
  46189. t.hoverState = LR;
  46190. break;
  46191. case "blur":
  46192. t.hoverState = z0;
  46193. break;
  46194. case "select":
  46195. t.selected = !0;
  46196. }
  46197. }
  46198. function ike(t, e, n, r) {
  46199. for (var i = t.style, a = {}, o = 0; o < e.length; o++) {
  46200. var s = e[o], l = i[s];
  46201. a[s] = l ?? (r && r[s]);
  46202. }
  46203. for (var o = 0; o < t.animators.length; o++) {
  46204. var u = t.animators[o];
  46205. u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && u.targetName === "style" && u.saveTo(a, e);
  46206. }
  46207. return a;
  46208. }
  46209. function ake(t, e, n, r) {
  46210. var i = n && et(n, "select") >= 0, a = !1;
  46211. if (t instanceof ot) {
  46212. var o = DK(t), s = i && o.selectFill || o.normalFill, l = i && o.selectStroke || o.normalStroke;
  46213. if (ad(s) || ad(l)) {
  46214. r = r || {};
  46215. var u = r.style || {};
  46216. u.fill === "inherit" ? (a = !0, r = le({}, r), u = le({}, u), u.fill = s) : !ad(u.fill) && ad(s) ? (a = !0, r = le({}, r), u = le({}, u), u.fill = nO(s)) : !ad(u.stroke) && ad(l) && (a || (r = le({}, r), u = le({}, u)), u.stroke = nO(l)), r.style = u;
  46217. }
  46218. }
  46219. if (r && r.z2 == null) {
  46220. a || (r = le({}, r));
  46221. var c = t.z2EmphasisLift;
  46222. r.z2 = t.z2 + (c ?? mp);
  46223. }
  46224. return r;
  46225. }
  46226. function oke(t, e, n) {
  46227. if (n && n.z2 == null) {
  46228. n = le({}, n);
  46229. var r = t.z2SelectLift;
  46230. n.z2 = t.z2 + (r ?? tke);
  46231. }
  46232. return n;
  46233. }
  46234. function ske(t, e, n) {
  46235. var r = et(t.currentStates, e) >= 0, i = t.style.opacity, a = r ? null : ike(t, ["opacity"], e, {
  46236. opacity: 1
  46237. });
  46238. n = n || {};
  46239. var o = n.style || {};
  46240. return o.opacity == null && (n = le({}, n), o = le({
  46241. // Already being applied 'emphasis'. DON'T mul opacity multiple times.
  46242. opacity: r ? i : a.opacity * 0.1
  46243. }, o), n.style = o), n;
  46244. }
  46245. function _T(t, e) {
  46246. var n = this.states[t];
  46247. if (this.style) {
  46248. if (t === "emphasis")
  46249. return ake(this, t, e, n);
  46250. if (t === "blur")
  46251. return ske(this, t, n);
  46252. if (t === "select")
  46253. return oke(this, t, n);
  46254. }
  46255. return n;
  46256. }
  46257. function _f(t) {
  46258. t.stateProxy = _T;
  46259. var e = t.getTextContent(), n = t.getTextGuideLine();
  46260. e && (e.stateProxy = _T), n && (n.stateProxy = _T);
  46261. }
  46262. function EB(t, e) {
  46263. !VK(t, e) && !t.__highByOuter && ll(t, RK);
  46264. }
  46265. function MB(t, e) {
  46266. !VK(t, e) && !t.__highByOuter && ll(t, kK);
  46267. }
  46268. function Zs(t, e) {
  46269. t.__highByOuter |= 1 << (e || 0), ll(t, RK);
  46270. }
  46271. function Us(t, e) {
  46272. !(t.__highByOuter &= ~(1 << (e || 0))) && ll(t, kK);
  46273. }
  46274. function NK(t) {
  46275. ll(t, NR);
  46276. }
  46277. function BR(t) {
  46278. ll(t, LK);
  46279. }
  46280. function BK(t) {
  46281. ll(t, nke);
  46282. }
  46283. function zK(t) {
  46284. ll(t, rke);
  46285. }
  46286. function VK(t, e) {
  46287. return t.__highDownSilentOnTouch && e.zrByTouch;
  46288. }
  46289. function FK(t) {
  46290. var e = t.getModel(), n = [], r = [];
  46291. e.eachComponent(function(i, a) {
  46292. var o = kR(a), s = i === "series", l = s ? t.getViewOfSeriesModel(a) : t.getViewOfComponentModel(a);
  46293. !s && r.push(l), o.isBlured && (l.group.traverse(function(u) {
  46294. LK(u);
  46295. }), s && n.push(a)), o.isBlured = !1;
  46296. }), k(r, function(i) {
  46297. i && i.toggleBlurSeries && i.toggleBlurSeries(n, !1, e);
  46298. });
  46299. }
  46300. function DA(t, e, n, r) {
  46301. var i = r.getModel();
  46302. n = n || "coordinateSystem";
  46303. function a(u, c) {
  46304. for (var f = 0; f < c.length; f++) {
  46305. var d = u.getItemGraphicEl(c[f]);
  46306. d && BR(d);
  46307. }
  46308. }
  46309. if (t != null && !(!e || e === "none")) {
  46310. var o = i.getSeriesByIndex(t), s = o.coordinateSystem;
  46311. s && s.master && (s = s.master);
  46312. var l = [];
  46313. i.eachSeries(function(u) {
  46314. var c = o === u, f = u.coordinateSystem;
  46315. f && f.master && (f = f.master);
  46316. var d = f && s ? f === s : c;
  46317. if (!// Not blur other series if blurScope series
  46318. (n === "series" && !c || n === "coordinateSystem" && !d || e === "series" && c)) {
  46319. var h = r.getViewOfSeriesModel(u);
  46320. if (h.group.traverse(function(g) {
  46321. g.__highByOuter && c && e === "self" || NR(g);
  46322. }), wr(e))
  46323. a(u.getData(), e);
  46324. else if (Ie(e))
  46325. for (var p = st(e), v = 0; v < p.length; v++)
  46326. a(u.getData(p[v]), e[p[v]]);
  46327. l.push(u), kR(u).isBlured = !0;
  46328. }
  46329. }), i.eachComponent(function(u, c) {
  46330. if (u !== "series") {
  46331. var f = r.getViewOfComponentModel(c);
  46332. f && f.toggleBlurSeries && f.toggleBlurSeries(l, !0, i);
  46333. }
  46334. });
  46335. }
  46336. }
  46337. function RA(t, e, n) {
  46338. if (!(t == null || e == null)) {
  46339. var r = n.getModel().getComponent(t, e);
  46340. if (r) {
  46341. kR(r).isBlured = !0;
  46342. var i = n.getViewOfComponentModel(r);
  46343. !i || !i.focusBlurEnabled || i.group.traverse(function(a) {
  46344. NR(a);
  46345. });
  46346. }
  46347. }
  46348. }
  46349. function lke(t, e, n) {
  46350. var r = t.seriesIndex, i = t.getData(e.dataType);
  46351. if (!i) {
  46352. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + e.dataType);
  46353. return;
  46354. }
  46355. var a = yf(i, e);
  46356. a = (ue(a) ? a[0] : a) || 0;
  46357. var o = i.getItemGraphicEl(a);
  46358. if (!o)
  46359. for (var s = i.count(), l = 0; !o && l < s; )
  46360. o = i.getItemGraphicEl(l++);
  46361. if (o) {
  46362. var u = Fe(o);
  46363. DA(r, u.focus, u.blurScope, n);
  46364. } else {
  46365. var c = t.get(["emphasis", "focus"]), f = t.get(["emphasis", "blurScope"]);
  46366. c != null && DA(r, c, f, n);
  46367. }
  46368. }
  46369. function zR(t, e, n, r) {
  46370. var i = {
  46371. focusSelf: !1,
  46372. dispatchers: null
  46373. };
  46374. if (t == null || t === "series" || e == null || n == null)
  46375. return i;
  46376. var a = r.getModel().getComponent(t, e);
  46377. if (!a)
  46378. return i;
  46379. var o = r.getViewOfComponentModel(a);
  46380. if (!o || !o.findHighDownDispatchers)
  46381. return i;
  46382. for (var s = o.findHighDownDispatchers(n), l, u = 0; u < s.length; u++)
  46383. if (process.env.NODE_ENV !== "production" && !lu(s[u]) && Cr("param should be highDownDispatcher"), Fe(s[u]).focus === "self") {
  46384. l = !0;
  46385. break;
  46386. }
  46387. return {
  46388. focusSelf: l,
  46389. dispatchers: s
  46390. };
  46391. }
  46392. function uke(t, e, n) {
  46393. process.env.NODE_ENV !== "production" && !lu(t) && Cr("param should be highDownDispatcher");
  46394. var r = Fe(t), i = zR(r.componentMainType, r.componentIndex, r.componentHighDownName, n), a = i.dispatchers, o = i.focusSelf;
  46395. a ? (o && RA(r.componentMainType, r.componentIndex, n), k(a, function(s) {
  46396. return EB(s, e);
  46397. })) : (DA(r.seriesIndex, r.focus, r.blurScope, n), r.focus === "self" && RA(r.componentMainType, r.componentIndex, n), EB(t, e));
  46398. }
  46399. function cke(t, e, n) {
  46400. process.env.NODE_ENV !== "production" && !lu(t) && Cr("param should be highDownDispatcher"), FK(n);
  46401. var r = Fe(t), i = zR(r.componentMainType, r.componentIndex, r.componentHighDownName, n).dispatchers;
  46402. i ? k(i, function(a) {
  46403. return MB(a, e);
  46404. }) : MB(t, e);
  46405. }
  46406. function fke(t, e, n) {
  46407. if (LA(e)) {
  46408. var r = e.dataType, i = t.getData(r), a = yf(i, e);
  46409. ue(a) || (a = [a]), t[e.type === kg ? "toggleSelect" : e.type === Rg ? "select" : "unselect"](a, r);
  46410. }
  46411. }
  46412. function IB(t) {
  46413. var e = t.getAllData();
  46414. k(e, function(n) {
  46415. var r = n.data, i = n.type;
  46416. r.eachItemGraphicEl(function(a, o) {
  46417. t.isSelected(o, i) ? BK(a) : zK(a);
  46418. });
  46419. });
  46420. }
  46421. function dke(t) {
  46422. var e = [];
  46423. return t.eachSeries(function(n) {
  46424. var r = n.getAllData();
  46425. k(r, function(i) {
  46426. i.data;
  46427. var a = i.type, o = n.getSelectedDataIndices();
  46428. if (o.length > 0) {
  46429. var s = {
  46430. dataIndex: o,
  46431. seriesIndex: n.seriesIndex
  46432. };
  46433. a != null && (s.dataType = a), e.push(s);
  46434. }
  46435. });
  46436. }), e;
  46437. }
  46438. function Yl(t, e, n) {
  46439. Lc(t, !0), ll(t, _f), kA(t, e, n);
  46440. }
  46441. function hke(t) {
  46442. Lc(t, !1);
  46443. }
  46444. function bn(t, e, n, r) {
  46445. r ? hke(t) : Yl(t, e, n);
  46446. }
  46447. function kA(t, e, n) {
  46448. var r = Fe(t);
  46449. e != null ? (r.focus = e, r.blurScope = n) : r.focus && (r.focus = null);
  46450. }
  46451. var DB = ["emphasis", "blur", "select"], pke = {
  46452. itemStyle: "getItemStyle",
  46453. lineStyle: "getLineStyle",
  46454. areaStyle: "getAreaStyle"
  46455. };
  46456. function Tr(t, e, n, r) {
  46457. n = n || "itemStyle";
  46458. for (var i = 0; i < DB.length; i++) {
  46459. var a = DB[i], o = e.getModel([a, n]), s = t.ensureState(a);
  46460. s.style = r ? r(o) : o[pke[n]]();
  46461. }
  46462. }
  46463. function Lc(t, e) {
  46464. var n = e === !1, r = t;
  46465. t.highDownSilentOnTouch && (r.__highDownSilentOnTouch = t.highDownSilentOnTouch), (!n || r.__highDownDispatcher) && (r.__highByOuter = r.__highByOuter || 0, r.__highDownDispatcher = !n);
  46466. }
  46467. function lu(t) {
  46468. return !!(t && t.__highDownDispatcher);
  46469. }
  46470. function vke(t, e, n) {
  46471. var r = Fe(t);
  46472. r.componentMainType = e.mainType, r.componentIndex = e.componentIndex, r.componentHighDownName = n;
  46473. }
  46474. function gke(t) {
  46475. var e = $B[t];
  46476. return e == null && PB <= 32 && (e = $B[t] = PB++), e;
  46477. }
  46478. function LA(t) {
  46479. var e = t.type;
  46480. return e === Rg || e === W_ || e === kg;
  46481. }
  46482. function RB(t) {
  46483. var e = t.type;
  46484. return e === ef || e === F_;
  46485. }
  46486. function mke(t) {
  46487. var e = DK(t);
  46488. e.normalFill = t.style.fill, e.normalStroke = t.style.stroke;
  46489. var n = t.states.select || {};
  46490. e.selectFill = n.style && n.style.fill || null, e.selectStroke = n.style && n.style.stroke || null;
  46491. }
  46492. var od = os.CMD, yke = [[], [], []], kB = Math.sqrt, bke = Math.atan2;
  46493. function WK(t, e) {
  46494. if (e) {
  46495. var n = t.data, r = t.len(), i, a, o, s, l, u, c = od.M, f = od.C, d = od.L, h = od.R, p = od.A, v = od.Q;
  46496. for (o = 0, s = 0; o < r; ) {
  46497. switch (i = n[o++], s = o, a = 0, i) {
  46498. case c:
  46499. a = 1;
  46500. break;
  46501. case d:
  46502. a = 1;
  46503. break;
  46504. case f:
  46505. a = 3;
  46506. break;
  46507. case v:
  46508. a = 2;
  46509. break;
  46510. case p:
  46511. var g = e[4], m = e[5], y = kB(e[0] * e[0] + e[1] * e[1]), b = kB(e[2] * e[2] + e[3] * e[3]), _ = bke(-e[1] / b, e[0] / y);
  46512. n[o] *= y, n[o++] += g, n[o] *= b, n[o++] += m, n[o++] *= y, n[o++] *= b, n[o++] += _, n[o++] += _, o += 2, s = o;
  46513. break;
  46514. case h:
  46515. u[0] = n[o++], u[1] = n[o++], ar(u, u, e), n[s++] = u[0], n[s++] = u[1], u[0] += n[o++], u[1] += n[o++], ar(u, u, e), n[s++] = u[0], n[s++] = u[1];
  46516. }
  46517. for (l = 0; l < a; l++) {
  46518. var O = yke[l];
  46519. O[0] = n[o++], O[1] = n[o++], ar(O, O, e), n[s++] = O[0], n[s++] = O[1];
  46520. }
  46521. }
  46522. t.increaseVersion();
  46523. }
  46524. }
  46525. var OT = Math.sqrt, Jy = Math.sin, eb = Math.cos, uv = Math.PI;
  46526. function LB(t) {
  46527. return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
  46528. }
  46529. function NA(t, e) {
  46530. return (t[0] * e[0] + t[1] * e[1]) / (LB(t) * LB(e));
  46531. }
  46532. function NB(t, e) {
  46533. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(NA(t, e));
  46534. }
  46535. function BB(t, e, n, r, i, a, o, s, l, u, c) {
  46536. var f = l * (uv / 180), d = eb(f) * (t - n) / 2 + Jy(f) * (e - r) / 2, h = -1 * Jy(f) * (t - n) / 2 + eb(f) * (e - r) / 2, p = d * d / (o * o) + h * h / (s * s);
  46537. p > 1 && (o *= OT(p), s *= OT(p));
  46538. var v = (i === a ? -1 : 1) * OT((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 + eb(f) * g - Jy(f) * m, b = (e + r) / 2 + Jy(f) * g + eb(f) * m, _ = NB([1, 0], [(d - g) / o, (h - m) / s]), O = [(d - g) / o, (h - m) / s], S = [(-1 * d - g) / o, (-1 * h - m) / s], x = NB(O, S);
  46539. if (NA(O, S) <= -1 && (x = uv), NA(O, S) >= 1 && (x = 0), x < 0) {
  46540. var C = Math.round(x / uv * 1e6) / 1e6;
  46541. x = uv * 2 + C % 2 * uv;
  46542. }
  46543. c.addData(u, y, b, o, s, _, x, f, a);
  46544. }
  46545. var _ke = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, Oke = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  46546. function Ske(t) {
  46547. var e = new os();
  46548. if (!t)
  46549. return e;
  46550. var n = 0, r = 0, i = n, a = r, o, s = os.CMD, l = t.match(_ke);
  46551. if (!l)
  46552. return e;
  46553. for (var u = 0; u < l.length; u++) {
  46554. for (var c = l[u], f = c.charAt(0), d = void 0, h = c.match(Oke) || [], p = h.length, v = 0; v < p; v++)
  46555. h[v] = parseFloat(h[v]);
  46556. for (var g = 0; g < p; ) {
  46557. var m = void 0, y = void 0, b = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = n, T = r, w = void 0, P = void 0;
  46558. switch (f) {
  46559. case "l":
  46560. n += h[g++], r += h[g++], d = s.L, e.addData(d, n, r);
  46561. break;
  46562. case "L":
  46563. n = h[g++], r = h[g++], d = s.L, e.addData(d, n, r);
  46564. break;
  46565. case "m":
  46566. n += h[g++], r += h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "l";
  46567. break;
  46568. case "M":
  46569. n = h[g++], r = h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "L";
  46570. break;
  46571. case "h":
  46572. n += h[g++], d = s.L, e.addData(d, n, r);
  46573. break;
  46574. case "H":
  46575. n = h[g++], d = s.L, e.addData(d, n, r);
  46576. break;
  46577. case "v":
  46578. r += h[g++], d = s.L, e.addData(d, n, r);
  46579. break;
  46580. case "V":
  46581. r = h[g++], d = s.L, e.addData(d, n, r);
  46582. break;
  46583. case "C":
  46584. 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];
  46585. break;
  46586. case "c":
  46587. 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];
  46588. break;
  46589. case "S":
  46590. m = n, y = r, w = e.len(), P = e.data, o === s.C && (m += n - P[w - 4], y += r - P[w - 3]), d = s.C, C = h[g++], T = h[g++], n = h[g++], r = h[g++], e.addData(d, m, y, C, T, n, r);
  46591. break;
  46592. case "s":
  46593. m = n, y = r, w = e.len(), P = e.data, o === s.C && (m += n - P[w - 4], y += r - P[w - 3]), d = s.C, C = n + h[g++], T = r + h[g++], n += h[g++], r += h[g++], e.addData(d, m, y, C, T, n, r);
  46594. break;
  46595. case "Q":
  46596. C = h[g++], T = h[g++], n = h[g++], r = h[g++], d = s.Q, e.addData(d, C, T, n, r);
  46597. break;
  46598. case "q":
  46599. C = h[g++] + n, T = h[g++] + r, n += h[g++], r += h[g++], d = s.Q, e.addData(d, C, T, n, r);
  46600. break;
  46601. case "T":
  46602. m = n, y = r, w = e.len(), P = e.data, o === s.Q && (m += n - P[w - 4], y += r - P[w - 3]), n = h[g++], r = h[g++], d = s.Q, e.addData(d, m, y, n, r);
  46603. break;
  46604. case "t":
  46605. m = n, y = r, w = e.len(), P = e.data, o === s.Q && (m += n - P[w - 4], y += r - P[w - 3]), n += h[g++], r += h[g++], d = s.Q, e.addData(d, m, y, n, r);
  46606. break;
  46607. case "A":
  46608. b = h[g++], _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = n, T = r, n = h[g++], r = h[g++], d = s.A, BB(C, T, n, r, S, x, b, _, O, d, e);
  46609. break;
  46610. case "a":
  46611. b = h[g++], _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = n, T = r, n += h[g++], r += h[g++], d = s.A, BB(C, T, n, r, S, x, b, _, O, d, e);
  46612. break;
  46613. }
  46614. }
  46615. (f === "z" || f === "Z") && (d = s.Z, e.addData(d), n = i, r = a), o = d;
  46616. }
  46617. return e.toStatic(), e;
  46618. }
  46619. var QK = function(t) {
  46620. q(e, t);
  46621. function e() {
  46622. return t !== null && t.apply(this, arguments) || this;
  46623. }
  46624. return e.prototype.applyTransform = function(n) {
  46625. }, e;
  46626. }(ot);
  46627. function HK(t) {
  46628. return t.setData != null;
  46629. }
  46630. function GK(t, e) {
  46631. var n = Ske(t), r = le({}, e);
  46632. return r.buildPath = function(i) {
  46633. if (HK(i)) {
  46634. i.setData(n.data);
  46635. var a = i.getContext();
  46636. a && i.rebuildPath(a, 1);
  46637. } else {
  46638. var a = i;
  46639. n.rebuildPath(a, 1);
  46640. }
  46641. }, r.applyTransform = function(i) {
  46642. WK(n, i), this.dirtyShape();
  46643. }, r;
  46644. }
  46645. function jK(t, e) {
  46646. return new QK(GK(t, e));
  46647. }
  46648. function xke(t, e) {
  46649. var n = GK(t, e), r = function(i) {
  46650. q(a, i);
  46651. function a(o) {
  46652. var s = i.call(this, o) || this;
  46653. return s.applyTransform = n.applyTransform, s.buildPath = n.buildPath, s;
  46654. }
  46655. return a;
  46656. }(QK);
  46657. return r;
  46658. }
  46659. function wke(t, e) {
  46660. for (var n = [], r = t.length, i = 0; i < r; i++) {
  46661. var a = t[i];
  46662. n.push(a.getUpdatedPathProxy(!0));
  46663. }
  46664. var o = new ot(e);
  46665. return o.createPathProxy(), o.buildPath = function(s) {
  46666. if (HK(s)) {
  46667. s.appendPath(n);
  46668. var l = s.getContext();
  46669. l && s.rebuildPath(l, 1);
  46670. }
  46671. }, o;
  46672. }
  46673. function VR(t, e) {
  46674. e = e || {};
  46675. var n = new ot();
  46676. return t.shape && n.setShape(t.shape), n.setStyle(t.style), e.bakeTransform ? WK(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;
  46677. }
  46678. var Cke = /* @__PURE__ */ function() {
  46679. function t() {
  46680. this.cx = 0, this.cy = 0, this.r = 0;
  46681. }
  46682. return t;
  46683. }(), ZK = function(t) {
  46684. q(e, t);
  46685. function e(n) {
  46686. return t.call(this, n) || this;
  46687. }
  46688. return e.prototype.getDefaultShape = function() {
  46689. return new Cke();
  46690. }, e.prototype.buildPath = function(n, r) {
  46691. n.moveTo(r.cx + r.r, r.cy), n.arc(r.cx, r.cy, r.r, 0, Math.PI * 2);
  46692. }, e;
  46693. }(ot);
  46694. ZK.prototype.type = "circle";
  46695. const ul = ZK;
  46696. var Tke = /* @__PURE__ */ function() {
  46697. function t() {
  46698. this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0;
  46699. }
  46700. return t;
  46701. }(), UK = function(t) {
  46702. q(e, t);
  46703. function e(n) {
  46704. return t.call(this, n) || this;
  46705. }
  46706. return e.prototype.getDefaultShape = function() {
  46707. return new Tke();
  46708. }, e.prototype.buildPath = function(n, r) {
  46709. var i = 0.5522848, a = r.cx, o = r.cy, s = r.rx, l = r.ry, u = s * i, c = l * i;
  46710. 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();
  46711. }, e;
  46712. }(ot);
  46713. UK.prototype.type = "ellipse";
  46714. const Yx = UK;
  46715. var XK = Math.PI, ST = XK * 2, Ku = Math.sin, sd = Math.cos, Pke = Math.acos, Er = Math.atan2, zB = Math.abs, Lg = Math.sqrt, Xv = Math.max, xo = Math.min, ja = 1e-4;
  46716. function $ke(t, e, n, r, i, a, o, s) {
  46717. var l = n - t, u = r - e, c = o - i, f = s - a, d = f * l - c * u;
  46718. if (!(d * d < ja))
  46719. return d = (c * (e - a) - f * (t - i)) / d, [t + d * l, e + d * u];
  46720. }
  46721. function tb(t, e, n, r, i, a, o) {
  46722. var s = t - n, l = e - r, u = (o ? a : -a) / Lg(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, b = v - h, _ = y * y + b * b, O = i - a, S = d * v - p * h, x = (b < 0 ? -1 : 1) * Lg(Xv(0, O * O * _ - S * S)), C = (S * b - y * x) / _, T = (-S * y - b * x) / _, w = (S * b + y * x) / _, P = (-S * y + b * x) / _, $ = C - g, A = T - m, D = w - g, E = P - m;
  46723. return $ * $ + A * A > D * D + E * E && (C = w, T = P), {
  46724. cx: C,
  46725. cy: T,
  46726. x0: -c,
  46727. y0: -f,
  46728. x1: C * (i / O - 1),
  46729. y1: T * (i / O - 1)
  46730. };
  46731. }
  46732. function Ake(t) {
  46733. var e;
  46734. if (ue(t)) {
  46735. var n = t.length;
  46736. if (!n)
  46737. return t;
  46738. 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;
  46739. } else
  46740. e = [t, t, t, t];
  46741. return e;
  46742. }
  46743. function Eke(t, e) {
  46744. var n, r = Xv(e.r, 0), i = Xv(e.r0 || 0, 0), a = r > 0, o = i > 0;
  46745. if (!(!a && !o)) {
  46746. if (a || (r = i, i = 0), i > r) {
  46747. var s = r;
  46748. r = i, i = s;
  46749. }
  46750. var l = e.startAngle, u = e.endAngle;
  46751. if (!(isNaN(l) || isNaN(u))) {
  46752. var c = e.cx, f = e.cy, d = !!e.clockwise, h = zB(u - l), p = h > ST && h % ST;
  46753. if (p > ja && (h = p), !(r > ja))
  46754. t.moveTo(c, f);
  46755. else if (h > ST - ja)
  46756. t.moveTo(c + r * sd(l), f + r * Ku(l)), t.arc(c, f, r, l, u, !d), i > ja && (t.moveTo(c + i * sd(u), f + i * Ku(u)), t.arc(c, f, i, u, l, d));
  46757. else {
  46758. var v = void 0, g = void 0, m = void 0, y = void 0, b = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = void 0, T = void 0, w = void 0, P = void 0, $ = void 0, A = void 0, D = void 0, E = r * sd(l), R = r * Ku(l), N = i * sd(u), V = i * Ku(u), B = h > ja;
  46759. if (B) {
  46760. var W = e.cornerRadius;
  46761. W && (n = Ake(W), v = n[0], g = n[1], m = n[2], y = n[3]);
  46762. var F = zB(r - i) / 2;
  46763. if (b = xo(F, m), _ = xo(F, y), O = xo(F, v), S = xo(F, g), T = x = Xv(b, _), w = C = Xv(O, S), (x > ja || C > ja) && (P = r * sd(u), $ = r * Ku(u), A = i * sd(l), D = i * Ku(l), h < XK)) {
  46764. var Q = $ke(E, R, A, D, P, $, N, V);
  46765. if (Q) {
  46766. var Z = E - Q[0], ne = R - Q[1], ee = P - Q[0], oe = $ - Q[1], K = 1 / Ku(Pke((Z * ee + ne * oe) / (Lg(Z * Z + ne * ne) * Lg(ee * ee + oe * oe))) / 2), ie = Lg(Q[0] * Q[0] + Q[1] * Q[1]);
  46767. T = xo(x, (r - ie) / (K + 1)), w = xo(C, (i - ie) / (K - 1));
  46768. }
  46769. }
  46770. }
  46771. if (!B)
  46772. t.moveTo(c + E, f + R);
  46773. else if (T > ja) {
  46774. var X = xo(m, T), H = xo(y, T), G = tb(A, D, E, R, r, X, d), re = tb(P, $, N, V, r, H, d);
  46775. t.moveTo(c + G.cx + G.x0, f + G.cy + G.y0), T < x && X === H ? t.arc(c + G.cx, f + G.cy, T, Er(G.y0, G.x0), Er(re.y0, re.x0), !d) : (X > 0 && t.arc(c + G.cx, f + G.cy, X, Er(G.y0, G.x0), Er(G.y1, G.x1), !d), t.arc(c, f, r, Er(G.cy + G.y1, G.cx + G.x1), Er(re.cy + re.y1, re.cx + re.x1), !d), H > 0 && t.arc(c + re.cx, f + re.cy, H, Er(re.y1, re.x1), Er(re.y0, re.x0), !d));
  46776. } else
  46777. t.moveTo(c + E, f + R), t.arc(c, f, r, l, u, !d);
  46778. if (!(i > ja) || !B)
  46779. t.lineTo(c + N, f + V);
  46780. else if (w > ja) {
  46781. var X = xo(v, w), H = xo(g, w), G = tb(N, V, P, $, i, -H, d), re = tb(E, R, A, D, i, -X, d);
  46782. t.lineTo(c + G.cx + G.x0, f + G.cy + G.y0), w < C && X === H ? t.arc(c + G.cx, f + G.cy, w, Er(G.y0, G.x0), Er(re.y0, re.x0), !d) : (H > 0 && t.arc(c + G.cx, f + G.cy, H, Er(G.y0, G.x0), Er(G.y1, G.x1), !d), t.arc(c, f, i, Er(G.cy + G.y1, G.cx + G.x1), Er(re.cy + re.y1, re.cx + re.x1), d), X > 0 && t.arc(c + re.cx, f + re.cy, X, Er(re.y1, re.x1), Er(re.y0, re.x0), !d));
  46783. } else
  46784. t.lineTo(c + N, f + V), t.arc(c, f, i, u, l, d);
  46785. }
  46786. t.closePath();
  46787. }
  46788. }
  46789. }
  46790. var Mke = /* @__PURE__ */ function() {
  46791. function t() {
  46792. 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;
  46793. }
  46794. return t;
  46795. }(), YK = function(t) {
  46796. q(e, t);
  46797. function e(n) {
  46798. return t.call(this, n) || this;
  46799. }
  46800. return e.prototype.getDefaultShape = function() {
  46801. return new Mke();
  46802. }, e.prototype.buildPath = function(n, r) {
  46803. Eke(n, r);
  46804. }, e.prototype.isZeroArea = function() {
  46805. return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
  46806. }, e;
  46807. }(ot);
  46808. YK.prototype.type = "sector";
  46809. const ii = YK;
  46810. var Ike = /* @__PURE__ */ function() {
  46811. function t() {
  46812. this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0;
  46813. }
  46814. return t;
  46815. }(), qK = function(t) {
  46816. q(e, t);
  46817. function e(n) {
  46818. return t.call(this, n) || this;
  46819. }
  46820. return e.prototype.getDefaultShape = function() {
  46821. return new Ike();
  46822. }, e.prototype.buildPath = function(n, r) {
  46823. var i = r.cx, a = r.cy, o = Math.PI * 2;
  46824. 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);
  46825. }, e;
  46826. }(ot);
  46827. qK.prototype.type = "ring";
  46828. const V0 = qK;
  46829. function Dke(t, e, n, r) {
  46830. var i = [], a = [], o = [], s = [], l, u, c, f;
  46831. if (r) {
  46832. c = [1 / 0, 1 / 0], f = [-1 / 0, -1 / 0];
  46833. for (var d = 0, h = t.length; d < h; d++)
  46834. $s(c, c, t[d]), As(f, f, t[d]);
  46835. $s(c, c, r[0]), As(f, f, r[1]);
  46836. }
  46837. for (var d = 0, h = t.length; d < h; d++) {
  46838. var p = t[d];
  46839. if (n)
  46840. l = t[d ? d - 1 : h - 1], u = t[(d + 1) % h];
  46841. else if (d === 0 || d === h - 1) {
  46842. i.push(Uo(t[d]));
  46843. continue;
  46844. } else
  46845. l = t[d - 1], u = t[d + 1];
  46846. kl(a, u, l), Pg(a, a, e);
  46847. var v = q1(p, l), g = q1(p, u), m = v + g;
  46848. m !== 0 && (v /= m, g /= m), Pg(o, a, -v), Pg(s, a, g);
  46849. var y = sA([], p, o), b = sA([], p, s);
  46850. r && (As(y, y, c), $s(y, y, f), As(b, b, c), $s(b, b, f)), i.push(y), i.push(b);
  46851. }
  46852. return n && i.push(i.shift()), i;
  46853. }
  46854. function KK(t, e, n) {
  46855. var r = e.smooth, i = e.points;
  46856. if (i && i.length >= 2) {
  46857. if (r) {
  46858. var a = Dke(i, r, n, e.smoothConstraint);
  46859. t.moveTo(i[0][0], i[0][1]);
  46860. for (var o = i.length, s = 0; s < (n ? o : o - 1); s++) {
  46861. var l = a[s * 2], u = a[s * 2 + 1], c = i[(s + 1) % o];
  46862. t.bezierCurveTo(l[0], l[1], u[0], u[1], c[0], c[1]);
  46863. }
  46864. } else {
  46865. t.moveTo(i[0][0], i[0][1]);
  46866. for (var s = 1, f = i.length; s < f; s++)
  46867. t.lineTo(i[s][0], i[s][1]);
  46868. }
  46869. n && t.closePath();
  46870. }
  46871. }
  46872. var Rke = /* @__PURE__ */ function() {
  46873. function t() {
  46874. this.points = null, this.smooth = 0, this.smoothConstraint = null;
  46875. }
  46876. return t;
  46877. }(), JK = function(t) {
  46878. q(e, t);
  46879. function e(n) {
  46880. return t.call(this, n) || this;
  46881. }
  46882. return e.prototype.getDefaultShape = function() {
  46883. return new Rke();
  46884. }, e.prototype.buildPath = function(n, r) {
  46885. KK(n, r, !0);
  46886. }, e;
  46887. }(ot);
  46888. JK.prototype.type = "polygon";
  46889. const ai = JK;
  46890. var kke = /* @__PURE__ */ function() {
  46891. function t() {
  46892. this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null;
  46893. }
  46894. return t;
  46895. }(), eJ = function(t) {
  46896. q(e, t);
  46897. function e(n) {
  46898. return t.call(this, n) || this;
  46899. }
  46900. return e.prototype.getDefaultStyle = function() {
  46901. return {
  46902. stroke: "#000",
  46903. fill: null
  46904. };
  46905. }, e.prototype.getDefaultShape = function() {
  46906. return new kke();
  46907. }, e.prototype.buildPath = function(n, r) {
  46908. KK(n, r, !1);
  46909. }, e;
  46910. }(ot);
  46911. eJ.prototype.type = "polyline";
  46912. const oi = eJ;
  46913. var Lke = {}, Nke = /* @__PURE__ */ function() {
  46914. function t() {
  46915. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  46916. }
  46917. return t;
  46918. }(), tJ = function(t) {
  46919. q(e, t);
  46920. function e(n) {
  46921. return t.call(this, n) || this;
  46922. }
  46923. return e.prototype.getDefaultStyle = function() {
  46924. return {
  46925. stroke: "#000",
  46926. fill: null
  46927. };
  46928. }, e.prototype.getDefaultShape = function() {
  46929. return new Nke();
  46930. }, e.prototype.buildPath = function(n, r) {
  46931. var i, a, o, s;
  46932. if (this.subPixelOptimize) {
  46933. var l = PK(Lke, r, this.style);
  46934. i = l.x1, a = l.y1, o = l.x2, s = l.y2;
  46935. } else
  46936. i = r.x1, a = r.y1, o = r.x2, s = r.y2;
  46937. var u = r.percent;
  46938. u !== 0 && (n.moveTo(i, a), u < 1 && (o = i * (1 - u) + o * u, s = a * (1 - u) + s * u), n.lineTo(o, s));
  46939. }, e.prototype.pointAt = function(n) {
  46940. var r = this.shape;
  46941. return [
  46942. r.x1 * (1 - n) + r.x2 * n,
  46943. r.y1 * (1 - n) + r.y2 * n
  46944. ];
  46945. }, e;
  46946. }(ot);
  46947. tJ.prototype.type = "line";
  46948. const Un = tJ;
  46949. var si = [], Bke = /* @__PURE__ */ function() {
  46950. function t() {
  46951. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1;
  46952. }
  46953. return t;
  46954. }();
  46955. function VB(t, e, n) {
  46956. var r = t.cpx2, i = t.cpy2;
  46957. return r != null || i != null ? [
  46958. (n ? H6 : Gn)(t.x1, t.cpx1, t.cpx2, t.x2, e),
  46959. (n ? H6 : Gn)(t.y1, t.cpy1, t.cpy2, t.y2, e)
  46960. ] : [
  46961. (n ? dA : ir)(t.x1, t.cpx1, t.x2, e),
  46962. (n ? dA : ir)(t.y1, t.cpy1, t.y2, e)
  46963. ];
  46964. }
  46965. var nJ = function(t) {
  46966. q(e, t);
  46967. function e(n) {
  46968. return t.call(this, n) || this;
  46969. }
  46970. return e.prototype.getDefaultStyle = function() {
  46971. return {
  46972. stroke: "#000",
  46973. fill: null
  46974. };
  46975. }, e.prototype.getDefaultShape = function() {
  46976. return new Bke();
  46977. }, e.prototype.buildPath = function(n, r) {
  46978. 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;
  46979. d !== 0 && (n.moveTo(i, a), c == null || f == null ? (d < 1 && (Sm(i, l, o, d, si), l = si[1], o = si[2], Sm(a, u, s, d, si), u = si[1], s = si[2]), n.quadraticCurveTo(l, u, o, s)) : (d < 1 && (su(i, l, c, o, d, si), l = si[1], c = si[2], o = si[3], su(a, u, f, s, d, si), u = si[1], f = si[2], s = si[3]), n.bezierCurveTo(l, u, c, f, o, s)));
  46980. }, e.prototype.pointAt = function(n) {
  46981. return VB(this.shape, n, !1);
  46982. }, e.prototype.tangentAt = function(n) {
  46983. var r = VB(this.shape, n, !0);
  46984. return kf(r, r);
  46985. }, e;
  46986. }(ot);
  46987. nJ.prototype.type = "bezier-curve";
  46988. const F0 = nJ;
  46989. var zke = /* @__PURE__ */ function() {
  46990. function t() {
  46991. this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  46992. }
  46993. return t;
  46994. }(), rJ = function(t) {
  46995. q(e, t);
  46996. function e(n) {
  46997. return t.call(this, n) || this;
  46998. }
  46999. return e.prototype.getDefaultStyle = function() {
  47000. return {
  47001. stroke: "#000",
  47002. fill: null
  47003. };
  47004. }, e.prototype.getDefaultShape = function() {
  47005. return new zke();
  47006. }, e.prototype.buildPath = function(n, r) {
  47007. 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);
  47008. n.moveTo(c * o + i, f * o + a), n.arc(i, a, o, s, l, !u);
  47009. }, e;
  47010. }(ot);
  47011. rJ.prototype.type = "arc";
  47012. const qx = rJ;
  47013. var Vke = function(t) {
  47014. q(e, t);
  47015. function e() {
  47016. var n = t !== null && t.apply(this, arguments) || this;
  47017. return n.type = "compound", n;
  47018. }
  47019. return e.prototype._updatePathDirty = function() {
  47020. for (var n = this.shape.paths, r = this.shapeChanged(), i = 0; i < n.length; i++)
  47021. r = r || n[i].shapeChanged();
  47022. r && this.dirtyShape();
  47023. }, e.prototype.beforeBrush = function() {
  47024. this._updatePathDirty();
  47025. for (var n = this.shape.paths || [], r = this.getGlobalScale(), i = 0; i < n.length; i++)
  47026. n[i].path || n[i].createPathProxy(), n[i].path.setScale(r[0], r[1], n[i].segmentIgnoreThreshold);
  47027. }, e.prototype.buildPath = function(n, r) {
  47028. for (var i = r.paths || [], a = 0; a < i.length; a++)
  47029. i[a].buildPath(n, i[a].shape, !0);
  47030. }, e.prototype.afterBrush = function() {
  47031. for (var n = this.shape.paths || [], r = 0; r < n.length; r++)
  47032. n[r].pathUpdated();
  47033. }, e.prototype.getBoundingRect = function() {
  47034. return this._updatePathDirty.call(this), ot.prototype.getBoundingRect.call(this);
  47035. }, e;
  47036. }(ot);
  47037. const Kx = Vke;
  47038. var iJ = function() {
  47039. function t(e) {
  47040. this.colorStops = e || [];
  47041. }
  47042. return t.prototype.addColorStop = function(e, n) {
  47043. this.colorStops.push({
  47044. offset: e,
  47045. color: n
  47046. });
  47047. }, t;
  47048. }(), Fke = function(t) {
  47049. q(e, t);
  47050. function e(n, r, i, a, o, s) {
  47051. var l = t.call(this, o) || this;
  47052. 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;
  47053. }
  47054. return e;
  47055. }(iJ);
  47056. const yp = Fke;
  47057. var Wke = function(t) {
  47058. q(e, t);
  47059. function e(n, r, i, a, o) {
  47060. var s = t.call(this, a) || this;
  47061. return s.x = n ?? 0.5, s.y = r ?? 0.5, s.r = i ?? 0.5, s.type = "radial", s.global = o || !1, s;
  47062. }
  47063. return e;
  47064. }(iJ);
  47065. const FR = Wke;
  47066. var Ju = [0, 0], ec = [0, 0], nb = new Ke(), rb = new Ke(), Qke = function() {
  47067. function t(e, n) {
  47068. this._corners = [], this._axes = [], this._origin = [0, 0];
  47069. for (var r = 0; r < 4; r++)
  47070. this._corners[r] = new Ke();
  47071. for (var r = 0; r < 2; r++)
  47072. this._axes[r] = new Ke();
  47073. e && this.fromBoundingRect(e, n);
  47074. }
  47075. return t.prototype.fromBoundingRect = function(e, n) {
  47076. var r = this._corners, i = this._axes, a = e.x, o = e.y, s = a + e.width, l = o + e.height;
  47077. if (r[0].set(a, o), r[1].set(s, o), r[2].set(s, l), r[3].set(a, l), n)
  47078. for (var u = 0; u < 4; u++)
  47079. r[u].transform(n);
  47080. Ke.sub(i[0], r[1], r[0]), Ke.sub(i[1], r[3], r[0]), i[0].normalize(), i[1].normalize();
  47081. for (var u = 0; u < 2; u++)
  47082. this._origin[u] = i[u].dot(r[0]);
  47083. }, t.prototype.intersect = function(e, n) {
  47084. var r = !0, i = !n;
  47085. return nb.set(1 / 0, 1 / 0), rb.set(0, 0), !this._intersectCheckOneSide(this, e, nb, rb, i, 1) && (r = !1, i) || !this._intersectCheckOneSide(e, this, nb, rb, i, -1) && (r = !1, i) || i || Ke.copy(n, r ? nb : rb), r;
  47086. }, t.prototype._intersectCheckOneSide = function(e, n, r, i, a, o) {
  47087. for (var s = !0, l = 0; l < 2; l++) {
  47088. var u = this._axes[l];
  47089. if (this._getProjMinMaxOnAxis(l, e._corners, Ju), this._getProjMinMaxOnAxis(l, n._corners, ec), Ju[1] < ec[0] || Ju[0] > ec[1]) {
  47090. if (s = !1, a)
  47091. return s;
  47092. var c = Math.abs(ec[0] - Ju[1]), f = Math.abs(Ju[0] - ec[1]);
  47093. Math.min(c, f) > i.len() && (c < f ? Ke.scale(i, u, -c * o) : Ke.scale(i, u, f * o));
  47094. } else if (r) {
  47095. var c = Math.abs(ec[0] - Ju[1]), f = Math.abs(Ju[0] - ec[1]);
  47096. Math.min(c, f) < r.len() && (c < f ? Ke.scale(r, u, c * o) : Ke.scale(r, u, -f * o));
  47097. }
  47098. }
  47099. return s;
  47100. }, t.prototype._getProjMinMaxOnAxis = function(e, n, r) {
  47101. 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++) {
  47102. var c = n[u].dot(i) + a[e];
  47103. s = Math.min(c, s), l = Math.max(c, l);
  47104. }
  47105. r[0] = s, r[1] = l;
  47106. }, t;
  47107. }();
  47108. const uO = Qke;
  47109. var Hke = [], Gke = function(t) {
  47110. q(e, t);
  47111. function e() {
  47112. var n = t !== null && t.apply(this, arguments) || this;
  47113. return n.notClear = !0, n.incremental = !0, n._displayables = [], n._temporaryDisplayables = [], n._cursor = 0, n;
  47114. }
  47115. return e.prototype.traverse = function(n, r) {
  47116. n.call(r, this);
  47117. }, e.prototype.useStyle = function() {
  47118. this.style = {};
  47119. }, e.prototype.getCursor = function() {
  47120. return this._cursor;
  47121. }, e.prototype.innerAfterBrush = function() {
  47122. this._cursor = this._displayables.length;
  47123. }, e.prototype.clearDisplaybles = function() {
  47124. this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1;
  47125. }, e.prototype.clearTemporalDisplayables = function() {
  47126. this._temporaryDisplayables = [];
  47127. }, e.prototype.addDisplayable = function(n, r) {
  47128. r ? this._temporaryDisplayables.push(n) : this._displayables.push(n), this.markRedraw();
  47129. }, e.prototype.addDisplayables = function(n, r) {
  47130. r = r || !1;
  47131. for (var i = 0; i < n.length; i++)
  47132. this.addDisplayable(n[i], r);
  47133. }, e.prototype.getDisplayables = function() {
  47134. return this._displayables;
  47135. }, e.prototype.getTemporalDisplayables = function() {
  47136. return this._temporaryDisplayables;
  47137. }, e.prototype.eachPendingDisplayable = function(n) {
  47138. for (var r = this._cursor; r < this._displayables.length; r++)
  47139. n && n(this._displayables[r]);
  47140. for (var r = 0; r < this._temporaryDisplayables.length; r++)
  47141. n && n(this._temporaryDisplayables[r]);
  47142. }, e.prototype.update = function() {
  47143. this.updateTransform();
  47144. for (var n = this._cursor; n < this._displayables.length; n++) {
  47145. var r = this._displayables[n];
  47146. r.parent = this, r.update(), r.parent = null;
  47147. }
  47148. for (var n = 0; n < this._temporaryDisplayables.length; n++) {
  47149. var r = this._temporaryDisplayables[n];
  47150. r.parent = this, r.update(), r.parent = null;
  47151. }
  47152. }, e.prototype.getBoundingRect = function() {
  47153. if (!this._rect) {
  47154. for (var n = new Je(1 / 0, 1 / 0, -1 / 0, -1 / 0), r = 0; r < this._displayables.length; r++) {
  47155. var i = this._displayables[r], a = i.getBoundingRect().clone();
  47156. i.needLocalTransform() && a.applyTransform(i.getLocalTransform(Hke)), n.union(a);
  47157. }
  47158. this._rect = n;
  47159. }
  47160. return this._rect;
  47161. }, e.prototype.contain = function(n, r) {
  47162. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  47163. if (a.contain(i[0], i[1]))
  47164. for (var o = 0; o < this._displayables.length; o++) {
  47165. var s = this._displayables[o];
  47166. if (s.contain(n, r))
  47167. return !0;
  47168. }
  47169. return !1;
  47170. }, e;
  47171. }(Da);
  47172. const aJ = Gke;
  47173. var oJ = bt();
  47174. function bp(t, e, n, r, i) {
  47175. var a;
  47176. if (e && e.ecModel) {
  47177. var o = e.ecModel.getUpdatePayload();
  47178. a = o && o.animation;
  47179. }
  47180. var s = e && e.isAnimationEnabled(), l = t === "update";
  47181. if (s) {
  47182. var u = void 0, c = void 0, f = void 0;
  47183. r ? (u = We(r.duration, 200), c = We(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)), Me(f) && (f = f(n, i)), Me(u) && (u = u(n));
  47184. var d = {
  47185. duration: u || 0,
  47186. delay: f,
  47187. easing: c
  47188. };
  47189. return d;
  47190. } else
  47191. return null;
  47192. }
  47193. function WR(t, e, n, r, i, a, o) {
  47194. var s = !1, l;
  47195. Me(i) ? (o = a, a = i, i = null) : Ie(i) && (a = i.cb, o = i.during, s = i.isFrom, l = i.removeOpt, i = i.dataIndex);
  47196. var u = t === "leave";
  47197. u || e.stopAnimation("leave");
  47198. var c = bp(t, r, i, u ? l || {} : null, r && r.getAnimationDelayParams ? r.getAnimationDelayParams(e, i) : null);
  47199. if (c && c.duration > 0) {
  47200. var f = c.duration, d = c.delay, h = c.easing, p = {
  47201. duration: f,
  47202. delay: d || 0,
  47203. easing: h,
  47204. done: a,
  47205. force: !!a || !!o,
  47206. // Set to final state in update/init animation.
  47207. // So the post processing based on the path shape can be done correctly.
  47208. setToFinal: !u,
  47209. scope: t,
  47210. during: o
  47211. };
  47212. s ? e.animateFrom(n, p) : e.animateTo(n, p);
  47213. } else
  47214. e.stopAnimation(), !s && e.attr(n), o && o(1), a && a();
  47215. }
  47216. function Ct(t, e, n, r, i, a) {
  47217. WR("update", t, e, n, r, i, a);
  47218. }
  47219. function Yt(t, e, n, r, i, a) {
  47220. WR("enter", t, e, n, r, i, a);
  47221. }
  47222. function rh(t) {
  47223. if (!t.__zr)
  47224. return !0;
  47225. for (var e = 0; e < t.animators.length; e++) {
  47226. var n = t.animators[e];
  47227. if (n.scope === "leave")
  47228. return !0;
  47229. }
  47230. return !1;
  47231. }
  47232. function uu(t, e, n, r, i, a) {
  47233. rh(t) || WR("leave", t, e, n, r, i, a);
  47234. }
  47235. function FB(t, e, n, r) {
  47236. t.removeTextContent(), t.removeTextGuideLine(), uu(t, {
  47237. style: {
  47238. opacity: 0
  47239. }
  47240. }, e, n, r);
  47241. }
  47242. function $m(t, e, n) {
  47243. function r() {
  47244. t.parent && t.parent.remove(t);
  47245. }
  47246. t.isGroup ? t.traverse(function(i) {
  47247. i.isGroup || FB(i, e, n, r);
  47248. }) : FB(t, e, n, r);
  47249. }
  47250. function uo(t) {
  47251. oJ(t).oldStyle = t.style;
  47252. }
  47253. function jke(t) {
  47254. return oJ(t).oldStyle;
  47255. }
  47256. var cO = Math.max, fO = Math.min, BA = {};
  47257. function sJ(t) {
  47258. return ot.extend(t);
  47259. }
  47260. var Zke = xke;
  47261. function lJ(t, e) {
  47262. return Zke(t, e);
  47263. }
  47264. function Na(t, e) {
  47265. BA[t] = e;
  47266. }
  47267. function Jx(t) {
  47268. if (BA.hasOwnProperty(t))
  47269. return BA[t];
  47270. }
  47271. function W0(t, e, n, r) {
  47272. var i = jK(t, e);
  47273. return n && (r === "center" && (n = uJ(n, i.getBoundingRect())), HR(i, n)), i;
  47274. }
  47275. function QR(t, e, n) {
  47276. var r = new lr({
  47277. style: {
  47278. image: t,
  47279. x: e.x,
  47280. y: e.y,
  47281. width: e.width,
  47282. height: e.height
  47283. },
  47284. onload: function(i) {
  47285. if (n === "center") {
  47286. var a = {
  47287. width: i.width,
  47288. height: i.height
  47289. };
  47290. r.setStyle(uJ(e, a));
  47291. }
  47292. }
  47293. });
  47294. return r;
  47295. }
  47296. function uJ(t, e) {
  47297. var n = e.width / e.height, r = t.height * n, i;
  47298. r <= t.width ? i = t.height : (r = t.width, i = r / n);
  47299. var a = t.x + t.width / 2, o = t.y + t.height / 2;
  47300. return {
  47301. x: a - r / 2,
  47302. y: o - i / 2,
  47303. width: r,
  47304. height: i
  47305. };
  47306. }
  47307. var Bi = wke;
  47308. function HR(t, e) {
  47309. if (t.applyTransform) {
  47310. var n = t.getBoundingRect(), r = n.calculateTransform(e);
  47311. t.applyTransform(r);
  47312. }
  47313. }
  47314. function Hh(t, e) {
  47315. return PK(t, t, {
  47316. lineWidth: e
  47317. }), t;
  47318. }
  47319. function Uke(t) {
  47320. return $K(t.shape, t.shape, t.style), t;
  47321. }
  47322. var Q_ = kc;
  47323. function ql(t, e) {
  47324. for (var n = R0([]); t && t !== e; )
  47325. Xo(n, t.getLocalTransform(), n), t = t.parent;
  47326. return n;
  47327. }
  47328. function ro(t, e, n) {
  47329. return e && !wr(e) && (e = Es.getLocalTransform(e)), n && (e = Lf([], e)), ar([], t, e);
  47330. }
  47331. function ew(t, e, n) {
  47332. 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];
  47333. return a = ro(a, e, n), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top";
  47334. }
  47335. function WB(t) {
  47336. return !t.isGroup;
  47337. }
  47338. function Xke(t) {
  47339. return t.shape != null;
  47340. }
  47341. function Q0(t, e, n) {
  47342. if (!t || !e)
  47343. return;
  47344. function r(o) {
  47345. var s = {};
  47346. return o.traverse(function(l) {
  47347. WB(l) && l.anid && (s[l.anid] = l);
  47348. }), s;
  47349. }
  47350. function i(o) {
  47351. var s = {
  47352. x: o.x,
  47353. y: o.y,
  47354. rotation: o.rotation
  47355. };
  47356. return Xke(o) && (s.shape = le({}, o.shape)), s;
  47357. }
  47358. var a = r(t);
  47359. e.traverse(function(o) {
  47360. if (WB(o) && o.anid) {
  47361. var s = a[o.anid];
  47362. if (s) {
  47363. var l = i(o);
  47364. o.attr(i(s)), Ct(o, l, n, Fe(o).dataIndex);
  47365. }
  47366. }
  47367. });
  47368. }
  47369. function GR(t, e) {
  47370. return ce(t, function(n) {
  47371. var r = n[0];
  47372. r = cO(r, e.x), r = fO(r, e.x + e.width);
  47373. var i = n[1];
  47374. return i = cO(i, e.y), i = fO(i, e.y + e.height), [r, i];
  47375. });
  47376. }
  47377. function cJ(t, e) {
  47378. var n = cO(t.x, e.x), r = fO(t.x + t.width, e.x + e.width), i = cO(t.y, e.y), a = fO(t.y + t.height, e.y + e.height);
  47379. if (r >= n && a >= i)
  47380. return {
  47381. x: n,
  47382. y: i,
  47383. width: r - n,
  47384. height: a - i
  47385. };
  47386. }
  47387. function _p(t, e, n) {
  47388. var r = le({
  47389. rectHover: !0
  47390. }, e), i = r.style = {
  47391. strokeNoScale: !0
  47392. };
  47393. if (n = n || {
  47394. x: -1,
  47395. y: -1,
  47396. width: 2,
  47397. height: 2
  47398. }, t)
  47399. return t.indexOf("image://") === 0 ? (i.image = t.slice(8), Re(i, n), new lr(r)) : W0(t.replace("path://", ""), r, n, "center");
  47400. }
  47401. function Yv(t, e, n, r, i) {
  47402. for (var a = 0, o = i[i.length - 1]; a < i.length; a++) {
  47403. var s = i[a];
  47404. if (fJ(t, e, n, r, s[0], s[1], o[0], o[1]))
  47405. return !0;
  47406. o = s;
  47407. }
  47408. }
  47409. function fJ(t, e, n, r, i, a, o, s) {
  47410. var l = n - t, u = r - e, c = o - i, f = s - a, d = xT(c, f, l, u);
  47411. if (Yke(d))
  47412. return !1;
  47413. var h = t - i, p = e - a, v = xT(h, p, l, u) / d;
  47414. if (v < 0 || v > 1)
  47415. return !1;
  47416. var g = xT(h, p, c, f) / d;
  47417. return !(g < 0 || g > 1);
  47418. }
  47419. function xT(t, e, n, r) {
  47420. return t * r - n * e;
  47421. }
  47422. function Yke(t) {
  47423. return t <= 1e-6 && t >= -1e-6;
  47424. }
  47425. function Op(t) {
  47426. var e = t.itemTooltipOption, n = t.componentModel, r = t.itemName, i = Oe(e) ? {
  47427. formatter: e
  47428. } : e, a = n.mainType, o = n.componentIndex, s = {
  47429. componentType: a,
  47430. name: r,
  47431. $vars: ["name"]
  47432. };
  47433. s[a + "Index"] = o;
  47434. var l = t.formatterParamsExtra;
  47435. l && k(st(l), function(c) {
  47436. Ce(s, c) || (s[c] = l[c], s.$vars.push(c));
  47437. });
  47438. var u = Fe(t.el);
  47439. u.componentMainType = a, u.componentIndex = o, u.tooltipConfig = {
  47440. name: r,
  47441. option: Re({
  47442. content: r,
  47443. encodeHTMLContent: !0,
  47444. formatterParams: s
  47445. }, i)
  47446. };
  47447. }
  47448. function QB(t, e) {
  47449. var n;
  47450. t.isGroup && (n = e(t)), n || t.traverse(e);
  47451. }
  47452. function Tu(t, e) {
  47453. if (t)
  47454. if (ue(t))
  47455. for (var n = 0; n < t.length; n++)
  47456. QB(t[n], e);
  47457. else
  47458. QB(t, e);
  47459. }
  47460. Na("circle", ul);
  47461. Na("ellipse", Yx);
  47462. Na("sector", ii);
  47463. Na("ring", V0);
  47464. Na("polygon", ai);
  47465. Na("polyline", oi);
  47466. Na("rect", mt);
  47467. Na("line", Un);
  47468. Na("bezierCurve", F0);
  47469. Na("arc", qx);
  47470. const Nf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  47471. __proto__: null,
  47472. Arc: qx,
  47473. BezierCurve: F0,
  47474. BoundingRect: Je,
  47475. Circle: ul,
  47476. CompoundPath: Kx,
  47477. Ellipse: Yx,
  47478. Group: Ve,
  47479. Image: lr,
  47480. IncrementalDisplayable: aJ,
  47481. Line: Un,
  47482. LinearGradient: yp,
  47483. OrientedBoundingRect: uO,
  47484. Path: ot,
  47485. Point: Ke,
  47486. Polygon: ai,
  47487. Polyline: oi,
  47488. RadialGradient: FR,
  47489. Rect: mt,
  47490. Ring: V0,
  47491. Sector: ii,
  47492. Text: gt,
  47493. applyTransform: ro,
  47494. clipPointsByRect: GR,
  47495. clipRectByRect: cJ,
  47496. createIcon: _p,
  47497. extendPath: lJ,
  47498. extendShape: sJ,
  47499. getShapeClass: Jx,
  47500. getTransform: ql,
  47501. groupTransition: Q0,
  47502. initProps: Yt,
  47503. isElementRemoved: rh,
  47504. lineLineIntersect: fJ,
  47505. linePolygonIntersect: Yv,
  47506. makeImage: QR,
  47507. makePath: W0,
  47508. mergePath: Bi,
  47509. registerShape: Na,
  47510. removeElement: uu,
  47511. removeElementWithFadeOut: $m,
  47512. resizePath: HR,
  47513. setTooltipConfig: Op,
  47514. subPixelOptimize: Q_,
  47515. subPixelOptimizeLine: Hh,
  47516. subPixelOptimizeRect: Uke,
  47517. transformDirection: ew,
  47518. traverseElements: Tu,
  47519. updateProps: Ct
  47520. }, Symbol.toStringTag, { value: "Module" }));
  47521. var tw = {};
  47522. function dJ(t, e) {
  47523. for (var n = 0; n < ri.length; n++) {
  47524. var r = ri[n], i = e[r], a = t.ensureState(r);
  47525. a.style = a.style || {}, a.style.text = i;
  47526. }
  47527. var o = t.currentStates.slice();
  47528. t.clearStates(!0), t.setStyle({
  47529. text: e.normal
  47530. }), t.useStates(o, !0);
  47531. }
  47532. function zA(t, e, n) {
  47533. var r = t.labelFetcher, i = t.labelDataIndex, a = t.labelDimIndex, o = e.normal, s;
  47534. r && (s = r.getFormattedLabel(i, "normal", null, a, o && o.get("formatter"), n != null ? {
  47535. interpolatedValue: n
  47536. } : null)), s == null && (s = Me(t.defaultText) ? t.defaultText(i, t, n) : t.defaultText);
  47537. for (var l = {
  47538. normal: s
  47539. }, u = 0; u < ri.length; u++) {
  47540. var c = ri[u], f = e[c];
  47541. l[c] = We(r ? r.getFormattedLabel(i, c, null, a, f && f.get("formatter")) : null, s);
  47542. }
  47543. return l;
  47544. }
  47545. function Pr(t, e, n, r) {
  47546. n = n || tw;
  47547. for (var i = t instanceof gt, a = !1, o = 0; o < Pm.length; o++) {
  47548. var s = e[Pm[o]];
  47549. if (s && s.getShallow("show")) {
  47550. a = !0;
  47551. break;
  47552. }
  47553. }
  47554. var l = i ? t : t.getTextContent();
  47555. if (a) {
  47556. i || (l || (l = new gt(), t.setTextContent(l)), t.stateProxy && (l.stateProxy = t.stateProxy));
  47557. var u = zA(n, e), c = e.normal, f = !!c.getShallow("show"), d = Zt(c, r && r.normal, n, !1, !i);
  47558. d.text = u.normal, i || t.setTextConfig(dO(c, n, !1));
  47559. for (var o = 0; o < ri.length; o++) {
  47560. var h = ri[o], s = e[h];
  47561. if (s) {
  47562. var p = l.ensureState(h), v = !!We(s.getShallow("show"), f);
  47563. if (v !== f && (p.ignore = !v), p.style = Zt(s, r && r[h], n, !0, !i), p.style.text = u[h], !i) {
  47564. var g = t.ensureState(h);
  47565. g.textConfig = dO(s, n, !0);
  47566. }
  47567. }
  47568. }
  47569. 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 && (Sp(l).setLabelText = function(m) {
  47570. var y = zA(n, e, m);
  47571. dJ(l, y);
  47572. });
  47573. } else l && (l.ignore = !0);
  47574. t.dirty();
  47575. }
  47576. function er(t, e) {
  47577. e = e || "label";
  47578. for (var n = {
  47579. normal: t.getModel(e)
  47580. }, r = 0; r < ri.length; r++) {
  47581. var i = ri[r];
  47582. n[i] = t.getModel([i, e]);
  47583. }
  47584. return n;
  47585. }
  47586. function Zt(t, e, n, r, i) {
  47587. var a = {};
  47588. return qke(a, t, n, r, i), e && le(a, e), a;
  47589. }
  47590. function dO(t, e, n) {
  47591. e = e || {};
  47592. var r = {}, i, a = t.getShallow("rotate"), o = We(t.getShallow("distance"), n ? null : 5), s = t.getShallow("offset");
  47593. 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;
  47594. }
  47595. function qke(t, e, n, r, i) {
  47596. n = n || tw;
  47597. var a = e.ecModel, o = a && a.option.textStyle, s = Kke(e), l;
  47598. if (s) {
  47599. l = {};
  47600. for (var u in s)
  47601. if (s.hasOwnProperty(u)) {
  47602. var c = e.getModel(["rich", u]);
  47603. ZB(l[u] = {}, c, o, n, r, i, !1, !0);
  47604. }
  47605. }
  47606. l && (t.rich = l);
  47607. var f = e.get("overflow");
  47608. f && (t.overflow = f);
  47609. var d = e.get("minMargin");
  47610. d != null && (t.margin = d), ZB(t, e, o, n, r, i, !0, !1);
  47611. }
  47612. function Kke(t) {
  47613. for (var e; t && t !== t.ecModel; ) {
  47614. var n = (t.option || tw).rich;
  47615. if (n) {
  47616. e = e || {};
  47617. for (var r = st(n), i = 0; i < r.length; i++) {
  47618. var a = r[i];
  47619. e[a] = 1;
  47620. }
  47621. }
  47622. t = t.parentModel;
  47623. }
  47624. return e;
  47625. }
  47626. var HB = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], GB = ["align", "lineHeight", "width", "height", "tag", "verticalAlign", "ellipsis"], jB = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
  47627. function ZB(t, e, n, r, i, a, o, s) {
  47628. n = !i && n || tw;
  47629. var l = r && r.inheritColor, u = e.getShallow("color"), c = e.getShallow("textBorderColor"), f = We(e.getShallow("opacity"), n.opacity);
  47630. (u === "inherit" || u === "auto") && (process.env.NODE_ENV !== "production" && u === "auto" && Cn("color: 'auto'", "color: 'inherit'"), l ? u = l : u = null), (c === "inherit" || c === "auto") && (process.env.NODE_ENV !== "production" && c === "auto" && Cn("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);
  47631. var d = We(e.getShallow("textBorderWidth"), n.textBorderWidth);
  47632. d != null && (t.lineWidth = d);
  47633. var h = We(e.getShallow("textBorderType"), n.textBorderType);
  47634. h != null && (t.lineDash = h);
  47635. var p = We(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
  47636. 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);
  47637. for (var v = 0; v < HB.length; v++) {
  47638. var g = HB[v], m = We(e.getShallow(g), n[g]);
  47639. m != null && (t[g] = m);
  47640. }
  47641. for (var v = 0; v < GB.length; v++) {
  47642. var g = GB[v], m = e.getShallow(g);
  47643. m != null && (t[g] = m);
  47644. }
  47645. if (t.verticalAlign == null) {
  47646. var y = e.getShallow("baseline");
  47647. y != null && (t.verticalAlign = y);
  47648. }
  47649. if (!o || !r.disableBox) {
  47650. for (var v = 0; v < jB.length; v++) {
  47651. var g = jB[v], m = e.getShallow(g);
  47652. m != null && (t[g] = m);
  47653. }
  47654. var b = e.getShallow("borderType");
  47655. b != null && (t.borderDash = b), (t.backgroundColor === "auto" || t.backgroundColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.backgroundColor === "auto" && Cn("backgroundColor: 'auto'", "backgroundColor: 'inherit'"), t.backgroundColor = l), (t.borderColor === "auto" || t.borderColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.borderColor === "auto" && Cn("borderColor: 'auto'", "borderColor: 'inherit'"), t.borderColor = l);
  47656. }
  47657. }
  47658. function jR(t, e) {
  47659. var n = e && e.getModel("textStyle");
  47660. return ba([
  47661. // FIXME in node-canvas fontWeight is before fontStyle
  47662. t.fontStyle || n && n.getShallow("fontStyle") || "",
  47663. t.fontWeight || n && n.getShallow("fontWeight") || "",
  47664. (t.fontSize || n && n.getShallow("fontSize") || 12) + "px",
  47665. t.fontFamily || n && n.getShallow("fontFamily") || "sans-serif"
  47666. ].join(" "));
  47667. }
  47668. var Sp = bt();
  47669. function hJ(t, e, n, r) {
  47670. if (t) {
  47671. var i = Sp(t);
  47672. i.prevValue = i.value, i.value = n;
  47673. var a = e.normal;
  47674. i.valueAnimation = a.get("valueAnimation"), i.valueAnimation && (i.precision = a.get("precision"), i.defaultInterpolatedText = r, i.statesModels = e);
  47675. }
  47676. }
  47677. function pJ(t, e, n, r, i) {
  47678. var a = Sp(t);
  47679. if (!a.valueAnimation || a.prevValue === a.value)
  47680. return;
  47681. var o = a.defaultInterpolatedText, s = We(a.interpolatedValue, a.prevValue), l = a.value;
  47682. function u(c) {
  47683. var f = mK(n, a.precision, s, l, c);
  47684. a.interpolatedValue = c === 1 ? null : f;
  47685. var d = zA({
  47686. labelDataIndex: e,
  47687. labelFetcher: i,
  47688. defaultText: o ? o(f) : f + ""
  47689. }, a.statesModels, f);
  47690. dJ(t, d);
  47691. }
  47692. t.percent = 0, (a.prevValue == null ? Yt : Ct)(t, {
  47693. // percent is used to prevent animation from being aborted #15916
  47694. percent: 1
  47695. }, r, e, null, u);
  47696. }
  47697. var Jke = ["textStyle", "color"], wT = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], CT = new gt(), eLe = (
  47698. /** @class */
  47699. function() {
  47700. function t() {
  47701. }
  47702. return t.prototype.getTextColor = function(e) {
  47703. var n = this.ecModel;
  47704. return this.getShallow("color") || (!e && n ? n.get(Jke) : null);
  47705. }, t.prototype.getFont = function() {
  47706. return jR({
  47707. fontStyle: this.getShallow("fontStyle"),
  47708. fontWeight: this.getShallow("fontWeight"),
  47709. fontSize: this.getShallow("fontSize"),
  47710. fontFamily: this.getShallow("fontFamily")
  47711. }, this.ecModel);
  47712. }, t.prototype.getTextRect = function(e) {
  47713. for (var n = {
  47714. text: e,
  47715. verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
  47716. }, r = 0; r < wT.length; r++)
  47717. n[wT[r]] = this.getShallow(wT[r]);
  47718. return CT.useStyle(n), CT.update(), CT.getBoundingRect();
  47719. }, t;
  47720. }()
  47721. ), vJ = [
  47722. ["lineWidth", "width"],
  47723. ["stroke", "color"],
  47724. ["opacity"],
  47725. ["shadowBlur"],
  47726. ["shadowOffsetX"],
  47727. ["shadowOffsetY"],
  47728. ["shadowColor"],
  47729. ["lineDash", "type"],
  47730. ["lineDashOffset", "dashOffset"],
  47731. ["lineCap", "cap"],
  47732. ["lineJoin", "join"],
  47733. ["miterLimit"]
  47734. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  47735. // So do not transfer decal directly.
  47736. ], tLe = bf(vJ), nLe = (
  47737. /** @class */
  47738. function() {
  47739. function t() {
  47740. }
  47741. return t.prototype.getLineStyle = function(e) {
  47742. return tLe(this, e);
  47743. }, t;
  47744. }()
  47745. ), gJ = [
  47746. ["fill", "color"],
  47747. ["stroke", "borderColor"],
  47748. ["lineWidth", "borderWidth"],
  47749. ["opacity"],
  47750. ["shadowBlur"],
  47751. ["shadowOffsetX"],
  47752. ["shadowOffsetY"],
  47753. ["shadowColor"],
  47754. ["lineDash", "borderType"],
  47755. ["lineDashOffset", "borderDashOffset"],
  47756. ["lineCap", "borderCap"],
  47757. ["lineJoin", "borderJoin"],
  47758. ["miterLimit", "borderMiterLimit"]
  47759. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  47760. // So do not transfer decal directly.
  47761. ], rLe = bf(gJ), iLe = (
  47762. /** @class */
  47763. function() {
  47764. function t() {
  47765. }
  47766. return t.prototype.getItemStyle = function(e, n) {
  47767. return rLe(this, e, n);
  47768. }, t;
  47769. }()
  47770. ), Bf = (
  47771. /** @class */
  47772. function() {
  47773. function t(e, n, r) {
  47774. this.parentModel = n, this.ecModel = r, this.option = e;
  47775. }
  47776. return t.prototype.init = function(e, n, r) {
  47777. }, t.prototype.mergeOption = function(e, n) {
  47778. qe(this.option, e, !0);
  47779. }, t.prototype.get = function(e, n) {
  47780. return e == null ? this.option : this._doGet(this.parsePath(e), !n && this.parentModel);
  47781. }, t.prototype.getShallow = function(e, n) {
  47782. var r = this.option, i = r == null ? r : r[e];
  47783. if (i == null && !n) {
  47784. var a = this.parentModel;
  47785. a && (i = a.getShallow(e));
  47786. }
  47787. return i;
  47788. }, t.prototype.getModel = function(e, n) {
  47789. var r = e != null, i = r ? this.parsePath(e) : null, a = r ? this._doGet(i) : this.option;
  47790. return n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(i)), new t(a, n, this.ecModel);
  47791. }, t.prototype.isEmpty = function() {
  47792. return this.option == null;
  47793. }, t.prototype.restoreData = function() {
  47794. }, t.prototype.clone = function() {
  47795. var e = this.constructor;
  47796. return new e(Le(this.option));
  47797. }, t.prototype.parsePath = function(e) {
  47798. return typeof e == "string" ? e.split(".") : e;
  47799. }, t.prototype.resolveParentPath = function(e) {
  47800. return e;
  47801. }, t.prototype.isAnimationEnabled = function() {
  47802. if (!vt.node && this.option) {
  47803. if (this.option.animation != null)
  47804. return !!this.option.animation;
  47805. if (this.parentModel)
  47806. return this.parentModel.isAnimationEnabled();
  47807. }
  47808. }, t.prototype._doGet = function(e, n) {
  47809. var r = this.option;
  47810. if (!e)
  47811. return r;
  47812. for (var i = 0; i < e.length && !(e[i] && (r = r && typeof r == "object" ? r[e[i]] : null, r == null)); i++)
  47813. ;
  47814. return r == null && n && (r = n._doGet(this.resolveParentPath(e), n.parentModel)), r;
  47815. }, t;
  47816. }()
  47817. );
  47818. IR(Bf);
  47819. dRe(Bf);
  47820. xn(Bf, nLe);
  47821. xn(Bf, iLe);
  47822. xn(Bf, mRe);
  47823. xn(Bf, eLe);
  47824. const Wt = Bf;
  47825. var aLe = Math.round(Math.random() * 10);
  47826. function xp(t) {
  47827. return [t || "", aLe++].join("_");
  47828. }
  47829. function oLe(t) {
  47830. var e = {};
  47831. t.registerSubTypeDefaulter = function(n, r) {
  47832. var i = Fo(n);
  47833. e[i.main] = r;
  47834. }, t.determineSubType = function(n, r) {
  47835. var i = r.type;
  47836. if (!i) {
  47837. var a = Fo(n).main;
  47838. t.hasSubTypes(n) && e[a] && (i = e[a](r));
  47839. }
  47840. return i;
  47841. };
  47842. }
  47843. function sLe(t, e) {
  47844. t.topologicalTravel = function(a, o, s, l) {
  47845. if (!a.length)
  47846. return;
  47847. var u = n(o), c = u.graph, f = u.noEntryList, d = {};
  47848. for (k(a, function(y) {
  47849. d[y] = !0;
  47850. }); f.length; ) {
  47851. var h = f.pop(), p = c[h], v = !!d[h];
  47852. v && (s.call(l, h, p.originalDeps.slice()), delete d[h]), k(p.successor, v ? m : g);
  47853. }
  47854. k(d, function() {
  47855. var y = "";
  47856. throw process.env.NODE_ENV !== "production" && (y = ni("Circular dependency may exists: ", d, a, o)), new Error(y);
  47857. });
  47858. function g(y) {
  47859. c[y].entryCount--, c[y].entryCount === 0 && f.push(y);
  47860. }
  47861. function m(y) {
  47862. d[y] = !0, g(y);
  47863. }
  47864. };
  47865. function n(a) {
  47866. var o = {}, s = [];
  47867. return k(a, function(l) {
  47868. var u = r(o, l), c = u.originalDeps = e(l), f = i(c, a);
  47869. u.entryCount = f.length, u.entryCount === 0 && s.push(l), k(f, function(d) {
  47870. et(u.predecessor, d) < 0 && u.predecessor.push(d);
  47871. var h = r(o, d);
  47872. et(h.successor, d) < 0 && h.successor.push(l);
  47873. });
  47874. }), {
  47875. graph: o,
  47876. noEntryList: s
  47877. };
  47878. }
  47879. function r(a, o) {
  47880. return a[o] || (a[o] = {
  47881. predecessor: [],
  47882. successor: []
  47883. }), a[o];
  47884. }
  47885. function i(a, o) {
  47886. var s = [];
  47887. return k(a, function(l) {
  47888. et(o, l) >= 0 && s.push(l);
  47889. }), s;
  47890. }
  47891. }
  47892. function Pu(t, e) {
  47893. return qe(qe({}, t, !0), e, !0);
  47894. }
  47895. const lLe = {
  47896. time: {
  47897. month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  47898. monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  47899. dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  47900. dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
  47901. },
  47902. legend: {
  47903. selector: {
  47904. all: "All",
  47905. inverse: "Inv"
  47906. }
  47907. },
  47908. toolbox: {
  47909. brush: {
  47910. title: {
  47911. rect: "Box Select",
  47912. polygon: "Lasso Select",
  47913. lineX: "Horizontally Select",
  47914. lineY: "Vertically Select",
  47915. keep: "Keep Selections",
  47916. clear: "Clear Selections"
  47917. }
  47918. },
  47919. dataView: {
  47920. title: "Data View",
  47921. lang: ["Data View", "Close", "Refresh"]
  47922. },
  47923. dataZoom: {
  47924. title: {
  47925. zoom: "Zoom",
  47926. back: "Zoom Reset"
  47927. }
  47928. },
  47929. magicType: {
  47930. title: {
  47931. line: "Switch to Line Chart",
  47932. bar: "Switch to Bar Chart",
  47933. stack: "Stack",
  47934. tiled: "Tile"
  47935. }
  47936. },
  47937. restore: {
  47938. title: "Restore"
  47939. },
  47940. saveAsImage: {
  47941. title: "Save as Image",
  47942. lang: ["Right Click to Save Image"]
  47943. }
  47944. },
  47945. series: {
  47946. typeNames: {
  47947. pie: "Pie chart",
  47948. bar: "Bar chart",
  47949. line: "Line chart",
  47950. scatter: "Scatter plot",
  47951. effectScatter: "Ripple scatter plot",
  47952. radar: "Radar chart",
  47953. tree: "Tree",
  47954. treemap: "Treemap",
  47955. boxplot: "Boxplot",
  47956. candlestick: "Candlestick",
  47957. k: "K line chart",
  47958. heatmap: "Heat map",
  47959. map: "Map",
  47960. parallel: "Parallel coordinate map",
  47961. lines: "Line graph",
  47962. graph: "Relationship graph",
  47963. sankey: "Sankey diagram",
  47964. funnel: "Funnel chart",
  47965. gauge: "Gauge",
  47966. pictorialBar: "Pictorial bar",
  47967. themeRiver: "Theme River Map",
  47968. sunburst: "Sunburst",
  47969. custom: "Custom chart",
  47970. chart: "Chart"
  47971. }
  47972. },
  47973. aria: {
  47974. general: {
  47975. withTitle: 'This is a chart about "{title}"',
  47976. withoutTitle: "This is a chart"
  47977. },
  47978. series: {
  47979. single: {
  47980. prefix: "",
  47981. withName: " with type {seriesType} named {seriesName}.",
  47982. withoutName: " with type {seriesType}."
  47983. },
  47984. multiple: {
  47985. prefix: ". It consists of {seriesCount} series count.",
  47986. withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
  47987. withoutName: " The {seriesId} series is a {seriesType}.",
  47988. separator: {
  47989. middle: "",
  47990. end: ""
  47991. }
  47992. }
  47993. },
  47994. data: {
  47995. allData: "The data is as follows: ",
  47996. partialData: "The first {displayCnt} items are: ",
  47997. withName: "the data for {name} is {value}",
  47998. withoutName: "{value}",
  47999. separator: {
  48000. middle: ", ",
  48001. end: ". "
  48002. }
  48003. }
  48004. }
  48005. }, uLe = {
  48006. time: {
  48007. month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  48008. monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  48009. dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  48010. dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
  48011. },
  48012. legend: {
  48013. selector: {
  48014. all: "全选",
  48015. inverse: "反选"
  48016. }
  48017. },
  48018. toolbox: {
  48019. brush: {
  48020. title: {
  48021. rect: "矩形选择",
  48022. polygon: "圈选",
  48023. lineX: "横向选择",
  48024. lineY: "纵向选择",
  48025. keep: "保持选择",
  48026. clear: "清除选择"
  48027. }
  48028. },
  48029. dataView: {
  48030. title: "数据视图",
  48031. lang: ["数据视图", "关闭", "刷新"]
  48032. },
  48033. dataZoom: {
  48034. title: {
  48035. zoom: "区域缩放",
  48036. back: "区域缩放还原"
  48037. }
  48038. },
  48039. magicType: {
  48040. title: {
  48041. line: "切换为折线图",
  48042. bar: "切换为柱状图",
  48043. stack: "切换为堆叠",
  48044. tiled: "切换为平铺"
  48045. }
  48046. },
  48047. restore: {
  48048. title: "还原"
  48049. },
  48050. saveAsImage: {
  48051. title: "保存为图片",
  48052. lang: ["右键另存为图片"]
  48053. }
  48054. },
  48055. series: {
  48056. typeNames: {
  48057. pie: "饼图",
  48058. bar: "柱状图",
  48059. line: "折线图",
  48060. scatter: "散点图",
  48061. effectScatter: "涟漪散点图",
  48062. radar: "雷达图",
  48063. tree: "树图",
  48064. treemap: "矩形树图",
  48065. boxplot: "箱型图",
  48066. candlestick: "K线图",
  48067. k: "K线图",
  48068. heatmap: "热力图",
  48069. map: "地图",
  48070. parallel: "平行坐标图",
  48071. lines: "线图",
  48072. graph: "关系图",
  48073. sankey: "桑基图",
  48074. funnel: "漏斗图",
  48075. gauge: "仪表盘图",
  48076. pictorialBar: "象形柱图",
  48077. themeRiver: "主题河流图",
  48078. sunburst: "旭日图",
  48079. custom: "自定义图表",
  48080. chart: "图表"
  48081. }
  48082. },
  48083. aria: {
  48084. general: {
  48085. withTitle: "这是一个关于“{title}”的图表。",
  48086. withoutTitle: "这是一个图表,"
  48087. },
  48088. series: {
  48089. single: {
  48090. prefix: "",
  48091. withName: "图表类型是{seriesType},表示{seriesName}。",
  48092. withoutName: "图表类型是{seriesType}。"
  48093. },
  48094. multiple: {
  48095. prefix: "它由{seriesCount}个图表系列组成。",
  48096. withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
  48097. withoutName: "第{seriesId}个系列是一个{seriesType},",
  48098. separator: {
  48099. middle: ";",
  48100. end: "。"
  48101. }
  48102. }
  48103. },
  48104. data: {
  48105. allData: "其数据是——",
  48106. partialData: "其中,前{displayCnt}项是——",
  48107. withName: "{name}的数据是{value}",
  48108. withoutName: "{value}",
  48109. separator: {
  48110. middle: ",",
  48111. end: ""
  48112. }
  48113. }
  48114. }
  48115. };
  48116. var hO = "ZH", ZR = "EN", ih = ZR, H_ = {}, UR = {}, mJ = vt.domSupported ? function() {
  48117. var t = (
  48118. /* eslint-disable-next-line */
  48119. (document.documentElement.lang || navigator.language || navigator.browserLanguage || ih).toUpperCase()
  48120. );
  48121. return t.indexOf(hO) > -1 ? hO : ih;
  48122. }() : ih;
  48123. function XR(t, e) {
  48124. t = t.toUpperCase(), UR[t] = new Wt(e), H_[t] = e;
  48125. }
  48126. function cLe(t) {
  48127. if (Oe(t)) {
  48128. var e = H_[t.toUpperCase()] || {};
  48129. return t === hO || t === ZR ? Le(e) : qe(Le(e), Le(H_[ih]), !1);
  48130. } else
  48131. return qe(Le(t), Le(H_[ih]), !1);
  48132. }
  48133. function VA(t) {
  48134. return UR[t];
  48135. }
  48136. function fLe() {
  48137. return UR[ih];
  48138. }
  48139. XR(ZR, lLe);
  48140. XR(hO, uLe);
  48141. var YR = 1e3, qR = YR * 60, Ng = qR * 60, ma = Ng * 24, UB = ma * 365, qv = {
  48142. year: "{yyyy}",
  48143. month: "{MMM}",
  48144. day: "{d}",
  48145. hour: "{HH}:{mm}",
  48146. minute: "{HH}:{mm}",
  48147. second: "{HH}:{mm}:{ss}",
  48148. millisecond: "{HH}:{mm}:{ss} {SSS}",
  48149. none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
  48150. }, ib = "{yyyy}-{MM}-{dd}", XB = {
  48151. year: "{yyyy}",
  48152. month: "{yyyy}-{MM}",
  48153. day: ib,
  48154. hour: ib + " " + qv.hour,
  48155. minute: ib + " " + qv.minute,
  48156. second: ib + " " + qv.second,
  48157. millisecond: qv.none
  48158. }, TT = ["year", "month", "day", "hour", "minute", "second", "millisecond"], yJ = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
  48159. function Hr(t, e) {
  48160. return t += "", "0000".substr(0, e - t.length) + t;
  48161. }
  48162. function ah(t) {
  48163. switch (t) {
  48164. case "half-year":
  48165. case "quarter":
  48166. return "month";
  48167. case "week":
  48168. case "half-week":
  48169. return "day";
  48170. case "half-day":
  48171. case "quarter-day":
  48172. return "hour";
  48173. default:
  48174. return t;
  48175. }
  48176. }
  48177. function dLe(t) {
  48178. return t === ah(t);
  48179. }
  48180. function hLe(t) {
  48181. switch (t) {
  48182. case "year":
  48183. case "month":
  48184. return "day";
  48185. case "millisecond":
  48186. return "millisecond";
  48187. default:
  48188. return "second";
  48189. }
  48190. }
  48191. function H0(t, e, n, r) {
  48192. var i = Ki(t), a = i[KR(n)](), o = i[oh(n)]() + 1, s = Math.floor((o - 1) / 3) + 1, l = i[nw(n)](), u = i["get" + (n ? "UTC" : "") + "Day"](), c = i[Am(n)](), f = (c - 1) % 12 + 1, d = i[rw(n)](), h = i[iw(n)](), p = i[aw(n)](), v = c >= 12 ? "pm" : "am", g = v.toUpperCase(), m = r instanceof Wt ? r : VA(r || mJ) || fLe(), y = m.getModel("time"), b = y.get("month"), _ = y.get("monthAbbr"), O = y.get("dayOfWeek"), S = y.get("dayOfWeekAbbr");
  48193. return (e || "").replace(/{a}/g, v + "").replace(/{A}/g, g + "").replace(/{yyyy}/g, a + "").replace(/{yy}/g, Hr(a % 100 + "", 2)).replace(/{Q}/g, s + "").replace(/{MMMM}/g, b[o - 1]).replace(/{MMM}/g, _[o - 1]).replace(/{MM}/g, Hr(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, Hr(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, O[u]).replace(/{ee}/g, S[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Hr(c, 2)).replace(/{H}/g, c + "").replace(/{hh}/g, Hr(f + "", 2)).replace(/{h}/g, f + "").replace(/{mm}/g, Hr(d, 2)).replace(/{m}/g, d + "").replace(/{ss}/g, Hr(h, 2)).replace(/{s}/g, h + "").replace(/{SSS}/g, Hr(p, 3)).replace(/{S}/g, p + "");
  48194. }
  48195. function pLe(t, e, n, r, i) {
  48196. var a = null;
  48197. if (Oe(n))
  48198. a = n;
  48199. else if (Me(n))
  48200. a = n(t.value, e, {
  48201. level: t.level
  48202. });
  48203. else {
  48204. var o = le({}, qv);
  48205. if (t.level > 0)
  48206. for (var s = 0; s < TT.length; ++s)
  48207. o[TT[s]] = "{primary|" + o[TT[s]] + "}";
  48208. var l = n ? n.inherit === !1 ? n : Re(n, o) : o, u = bJ(t.value, i);
  48209. if (l[u])
  48210. a = l[u];
  48211. else if (l.inherit) {
  48212. for (var c = yJ.indexOf(u), s = c - 1; s >= 0; --s)
  48213. if (l[u]) {
  48214. a = l[u];
  48215. break;
  48216. }
  48217. a = a || o.none;
  48218. }
  48219. if (ue(a)) {
  48220. var f = t.level == null ? 0 : t.level >= 0 ? t.level : a.length + t.level;
  48221. f = Math.min(f, a.length - 1), a = a[f];
  48222. }
  48223. }
  48224. return H0(new Date(t.value), a, i, r);
  48225. }
  48226. function bJ(t, e) {
  48227. var n = Ki(t), r = n[oh(e)]() + 1, i = n[nw(e)](), a = n[Am(e)](), o = n[rw(e)](), s = n[iw(e)](), l = n[aw(e)](), u = l === 0, c = u && s === 0, f = c && o === 0, d = f && a === 0, h = d && i === 1, p = h && r === 1;
  48228. return p ? "year" : h ? "month" : d ? "day" : f ? "hour" : c ? "minute" : u ? "second" : "millisecond";
  48229. }
  48230. function YB(t, e, n) {
  48231. var r = St(t) ? Ki(t) : t;
  48232. switch (e = e || bJ(t, n), e) {
  48233. case "year":
  48234. return r[KR(n)]();
  48235. case "half-year":
  48236. return r[oh(n)]() >= 6 ? 1 : 0;
  48237. case "quarter":
  48238. return Math.floor((r[oh(n)]() + 1) / 4);
  48239. case "month":
  48240. return r[oh(n)]();
  48241. case "day":
  48242. return r[nw(n)]();
  48243. case "half-day":
  48244. return r[Am(n)]() / 24;
  48245. case "hour":
  48246. return r[Am(n)]();
  48247. case "minute":
  48248. return r[rw(n)]();
  48249. case "second":
  48250. return r[iw(n)]();
  48251. case "millisecond":
  48252. return r[aw(n)]();
  48253. }
  48254. }
  48255. function KR(t) {
  48256. return t ? "getUTCFullYear" : "getFullYear";
  48257. }
  48258. function oh(t) {
  48259. return t ? "getUTCMonth" : "getMonth";
  48260. }
  48261. function nw(t) {
  48262. return t ? "getUTCDate" : "getDate";
  48263. }
  48264. function Am(t) {
  48265. return t ? "getUTCHours" : "getHours";
  48266. }
  48267. function rw(t) {
  48268. return t ? "getUTCMinutes" : "getMinutes";
  48269. }
  48270. function iw(t) {
  48271. return t ? "getUTCSeconds" : "getSeconds";
  48272. }
  48273. function aw(t) {
  48274. return t ? "getUTCMilliseconds" : "getMilliseconds";
  48275. }
  48276. function vLe(t) {
  48277. return t ? "setUTCFullYear" : "setFullYear";
  48278. }
  48279. function _J(t) {
  48280. return t ? "setUTCMonth" : "setMonth";
  48281. }
  48282. function OJ(t) {
  48283. return t ? "setUTCDate" : "setDate";
  48284. }
  48285. function SJ(t) {
  48286. return t ? "setUTCHours" : "setHours";
  48287. }
  48288. function xJ(t) {
  48289. return t ? "setUTCMinutes" : "setMinutes";
  48290. }
  48291. function wJ(t) {
  48292. return t ? "setUTCSeconds" : "setSeconds";
  48293. }
  48294. function CJ(t) {
  48295. return t ? "setUTCMilliseconds" : "setMilliseconds";
  48296. }
  48297. function gLe(t, e, n, r, i, a, o, s) {
  48298. var l = new gt({
  48299. style: {
  48300. text: t,
  48301. font: e,
  48302. align: n,
  48303. verticalAlign: r,
  48304. padding: i,
  48305. rich: a,
  48306. overflow: o ? "truncate" : null,
  48307. lineHeight: s
  48308. }
  48309. });
  48310. return l.getBoundingRect();
  48311. }
  48312. function JR(t) {
  48313. if (!Wx(t))
  48314. return Oe(t) ? t : "-";
  48315. var e = (t + "").split(".");
  48316. return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "");
  48317. }
  48318. function ek(t, e) {
  48319. return t = (t || "").toLowerCase().replace(/-(.)/g, function(n, r) {
  48320. return r.toUpperCase();
  48321. }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t;
  48322. }
  48323. var zf = Lx;
  48324. function FA(t, e, n) {
  48325. var r = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";
  48326. function i(c) {
  48327. return c && ba(c) ? c : "-";
  48328. }
  48329. function a(c) {
  48330. return !!(c != null && !isNaN(c) && isFinite(c));
  48331. }
  48332. var o = e === "time", s = t instanceof Date;
  48333. if (o || s) {
  48334. var l = o ? Ki(t) : t;
  48335. if (isNaN(+l)) {
  48336. if (s)
  48337. return "-";
  48338. } else return H0(l, r, n);
  48339. }
  48340. if (e === "ordinal")
  48341. return ym(t) ? i(t) : St(t) && a(t) ? t + "" : "-";
  48342. var u = as(t);
  48343. return a(u) ? JR(u) : ym(t) ? i(t) : typeof t == "boolean" ? t + "" : "-";
  48344. }
  48345. var qB = ["a", "b", "c", "d", "e", "f", "g"], PT = function(t, e) {
  48346. return "{" + t + (e ?? "") + "}";
  48347. };
  48348. function tk(t, e, n) {
  48349. ue(e) || (e = [e]);
  48350. var r = e.length;
  48351. if (!r)
  48352. return "";
  48353. for (var i = e[0].$vars || [], a = 0; a < i.length; a++) {
  48354. var o = qB[a];
  48355. t = t.replace(PT(o), PT(o, 0));
  48356. }
  48357. for (var s = 0; s < r; s++)
  48358. for (var l = 0; l < i.length; l++) {
  48359. var u = e[s][i[l]];
  48360. t = t.replace(PT(qB[l], s), n ? jr(u) : u);
  48361. }
  48362. return t;
  48363. }
  48364. function mLe(t, e, n) {
  48365. return k(e, function(r, i) {
  48366. t = t.replace("{" + i + "}", r);
  48367. }), t;
  48368. }
  48369. function TJ(t, e) {
  48370. var n = Oe(t) ? {
  48371. color: t,
  48372. extraCssText: e
  48373. } : t || {}, r = n.color, i = n.type;
  48374. e = n.extraCssText;
  48375. var a = n.renderMode || "html";
  48376. if (!r)
  48377. return "";
  48378. if (a === "html")
  48379. 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:' + jr(r) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + jr(r) + ";" + (e || "") + '"></span>';
  48380. var o = n.markerId || "markerX";
  48381. return {
  48382. renderMode: a,
  48383. content: "{" + o + "|} ",
  48384. style: i === "subItem" ? {
  48385. width: 4,
  48386. height: 4,
  48387. borderRadius: 2,
  48388. backgroundColor: r
  48389. } : {
  48390. width: 10,
  48391. height: 10,
  48392. borderRadius: 5,
  48393. backgroundColor: r
  48394. }
  48395. };
  48396. }
  48397. function yLe(t, e, n) {
  48398. process.env.NODE_ENV !== "production" && Cn("echarts.format.formatTime", "echarts.time.format"), (t === "week" || t === "month" || t === "quarter" || t === "half-year" || t === "year") && (t = `MM-dd
  48399. yyyy`);
  48400. var r = Ki(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"]();
  48401. return t = t.replace("MM", Hr(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", Hr(a % 100 + "", 2)).replace("dd", Hr(s, 2)).replace("d", s).replace("hh", Hr(l, 2)).replace("h", l).replace("mm", Hr(u, 2)).replace("m", u).replace("ss", Hr(c, 2)).replace("s", c).replace("SSS", Hr(f, 3)), t;
  48402. }
  48403. function bLe(t) {
  48404. return t && t.charAt(0).toUpperCase() + t.substr(1);
  48405. }
  48406. function Of(t, e) {
  48407. return e = e || "transparent", Oe(t) ? t : Ie(t) && t.colorStops && (t.colorStops[0] || {}).color || e;
  48408. }
  48409. function pO(t, e) {
  48410. if (e === "_blank" || e === "blank") {
  48411. var n = window.open();
  48412. n.opener = null, n.location.href = t;
  48413. } else
  48414. window.open(t, e);
  48415. }
  48416. var G_ = k, PJ = ["left", "right", "top", "bottom", "width", "height"], Nc = [["width", "left", "right"], ["height", "top", "bottom"]];
  48417. function nk(t, e, n, r, i) {
  48418. var a = 0, o = 0;
  48419. r == null && (r = 1 / 0), i == null && (i = 1 / 0);
  48420. var s = 0;
  48421. e.eachChild(function(l, u) {
  48422. var c = l.getBoundingRect(), f = e.childAt(u + 1), d = f && f.getBoundingRect(), h, p;
  48423. if (t === "horizontal") {
  48424. var v = c.width + (d ? -d.x + c.x : 0);
  48425. h = a + v, h > r || l.newline ? (a = 0, h = v, o += s + n, s = c.height) : s = Math.max(s, c.height);
  48426. } else {
  48427. var g = c.height + (d ? -d.y + c.y : 0);
  48428. p = o + g, p > i || l.newline ? (a += s + n, o = 0, p = g, s = c.width) : s = Math.max(s, c.width);
  48429. }
  48430. l.newline || (l.x = a, l.y = o, l.markRedraw(), t === "horizontal" ? a = h + n : o = p + n);
  48431. });
  48432. }
  48433. var tf = nk;
  48434. Ue(nk, "vertical");
  48435. Ue(nk, "horizontal");
  48436. function _Le(t, e, n) {
  48437. var r = e.width, i = e.height, a = _e(t.left, r), o = _e(t.top, i), s = _e(t.right, r), l = _e(t.bottom, i);
  48438. 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 = zf(n || 0), {
  48439. width: Math.max(s - a - n[1] - n[3], 0),
  48440. height: Math.max(l - o - n[0] - n[2], 0)
  48441. };
  48442. }
  48443. function Rn(t, e, n) {
  48444. n = zf(n || 0);
  48445. var r = e.width, i = e.height, a = _e(t.left, r), o = _e(t.top, i), s = _e(t.right, r), l = _e(t.bottom, i), u = _e(t.width, r), c = _e(t.height, i), f = n[2] + n[0], d = n[1] + n[3], h = t.aspect;
  48446. 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) {
  48447. case "center":
  48448. a = r / 2 - u / 2 - n[3];
  48449. break;
  48450. case "right":
  48451. a = r - u - d;
  48452. break;
  48453. }
  48454. switch (t.top || t.bottom) {
  48455. case "middle":
  48456. case "center":
  48457. o = i / 2 - c / 2 - n[0];
  48458. break;
  48459. case "bottom":
  48460. o = i - c - f;
  48461. break;
  48462. }
  48463. a = a || 0, o = o || 0, isNaN(u) && (u = r - d - a - (s || 0)), isNaN(c) && (c = i - f - o - (l || 0));
  48464. var p = new Je(a + n[3], o + n[0], u, c);
  48465. return p.margin = n, p;
  48466. }
  48467. function ow(t, e, n, r, i, a) {
  48468. var o = !i || !i.hv || i.hv[0], s = !i || !i.hv || i.hv[1], l = i && i.boundingMode || "all";
  48469. if (a = a || t, a.x = t.x, a.y = t.y, !o && !s)
  48470. return !1;
  48471. var u;
  48472. if (l === "raw")
  48473. u = t.type === "group" ? new Je(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
  48474. else if (u = t.getBoundingRect(), t.needLocalTransform()) {
  48475. var c = t.getLocalTransform();
  48476. u = u.clone(), u.applyTransform(c);
  48477. }
  48478. var f = Rn(Re({
  48479. width: u.width,
  48480. height: u.height
  48481. }, e), n, r), d = o ? f.x - u.x : 0, h = s ? f.y - u.y : 0;
  48482. return l === "raw" ? (a.x = d, a.y = h) : (a.x += d, a.y += h), a === t && t.markRedraw(), !0;
  48483. }
  48484. function OLe(t, e) {
  48485. return t[Nc[e][0]] != null || t[Nc[e][1]] != null && t[Nc[e][2]] != null;
  48486. }
  48487. function Em(t) {
  48488. var e = t.layoutMode || t.constructor.layoutMode;
  48489. return Ie(e) ? e : e ? {
  48490. type: e
  48491. } : null;
  48492. }
  48493. function cu(t, e, n) {
  48494. var r = n && n.ignoreSize;
  48495. !ue(r) && (r = [r, r]);
  48496. var i = o(Nc[0], 0), a = o(Nc[1], 1);
  48497. u(Nc[0], t, i), u(Nc[1], t, a);
  48498. function o(c, f) {
  48499. var d = {}, h = 0, p = {}, v = 0, g = 2;
  48500. if (G_(c, function(b) {
  48501. p[b] = t[b];
  48502. }), G_(c, function(b) {
  48503. s(e, b) && (d[b] = p[b] = e[b]), l(d, b) && h++, l(p, b) && v++;
  48504. }), r[f])
  48505. return l(e, c[1]) ? p[c[2]] = null : l(e, c[2]) && (p[c[1]] = null), p;
  48506. if (v === g || !h)
  48507. return p;
  48508. if (h >= g)
  48509. return d;
  48510. for (var m = 0; m < c.length; m++) {
  48511. var y = c[m];
  48512. if (!s(d, y) && s(t, y)) {
  48513. d[y] = t[y];
  48514. break;
  48515. }
  48516. }
  48517. return d;
  48518. }
  48519. function s(c, f) {
  48520. return c.hasOwnProperty(f);
  48521. }
  48522. function l(c, f) {
  48523. return c[f] != null && c[f] !== "auto";
  48524. }
  48525. function u(c, f, d) {
  48526. G_(c, function(h) {
  48527. f[h] = d[h];
  48528. });
  48529. }
  48530. }
  48531. function wp(t) {
  48532. return $J({}, t);
  48533. }
  48534. function $J(t, e) {
  48535. return e && t && G_(PJ, function(n) {
  48536. e.hasOwnProperty(n) && (t[n] = e[n]);
  48537. }), t;
  48538. }
  48539. var SLe = bt(), rt = (
  48540. /** @class */
  48541. function(t) {
  48542. q(e, t);
  48543. function e(n, r, i) {
  48544. var a = t.call(this, n, r, i) || this;
  48545. return a.uid = xp("ec_cpt_model"), a;
  48546. }
  48547. return e.prototype.init = function(n, r, i) {
  48548. this.mergeDefaultAndTheme(n, i);
  48549. }, e.prototype.mergeDefaultAndTheme = function(n, r) {
  48550. var i = Em(this), a = i ? wp(n) : {}, o = r.getTheme();
  48551. qe(n, o.get(this.mainType)), qe(n, this.getDefaultOption()), i && cu(n, a, i);
  48552. }, e.prototype.mergeOption = function(n, r) {
  48553. qe(this.option, n, !0);
  48554. var i = Em(this);
  48555. i && cu(this.option, n, i);
  48556. }, e.prototype.optionUpdated = function(n, r) {
  48557. }, e.prototype.getDefaultOption = function() {
  48558. var n = this.constructor;
  48559. if (!uRe(n))
  48560. return n.defaultOption;
  48561. var r = SLe(this);
  48562. if (!r.defaultOption) {
  48563. for (var i = [], a = n; a; ) {
  48564. var o = a.prototype.defaultOption;
  48565. o && i.push(o), a = a.superClass;
  48566. }
  48567. for (var s = {}, l = i.length - 1; l >= 0; l--)
  48568. s = qe(s, i[l], !0);
  48569. r.defaultOption = s;
  48570. }
  48571. return r.defaultOption;
  48572. }, e.prototype.getReferringComponents = function(n, r) {
  48573. var i = n + "Index", a = n + "Id";
  48574. return B0(this.ecModel, n, {
  48575. index: this.get(i, !0),
  48576. id: this.get(a, !0)
  48577. }, r);
  48578. }, e.prototype.getBoxLayoutParams = function() {
  48579. var n = this;
  48580. return {
  48581. left: n.get("left"),
  48582. top: n.get("top"),
  48583. right: n.get("right"),
  48584. bottom: n.get("bottom"),
  48585. width: n.get("width"),
  48586. height: n.get("height")
  48587. };
  48588. }, e.prototype.getZLevelKey = function() {
  48589. return "";
  48590. }, e.prototype.setZLevel = function(n) {
  48591. this.option.zlevel = n;
  48592. }, e.protoInitialize = function() {
  48593. var n = e.prototype;
  48594. n.type = "component", n.id = "", n.name = "", n.mainType = "", n.subType = "", n.componentIndex = 0;
  48595. }(), e;
  48596. }(Wt)
  48597. );
  48598. bK(rt, Wt);
  48599. Hx(rt);
  48600. oLe(rt);
  48601. sLe(rt, xLe);
  48602. function xLe(t) {
  48603. var e = [];
  48604. return k(rt.getClassesByMainType(t), function(n) {
  48605. e = e.concat(n.dependencies || n.prototype.dependencies || []);
  48606. }), e = ce(e, function(n) {
  48607. return Fo(n).main;
  48608. }), t !== "dataset" && et(e, "dataset") <= 0 && e.unshift("dataset"), e;
  48609. }
  48610. var AJ = "";
  48611. typeof navigator < "u" && (AJ = navigator.platform || "");
  48612. var ld = "rgba(0, 0, 0, 0.2)";
  48613. const wLe = {
  48614. darkMode: "auto",
  48615. // backgroundColor: 'rgba(0,0,0,0)',
  48616. colorBy: "series",
  48617. color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
  48618. gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  48619. aria: {
  48620. decal: {
  48621. decals: [{
  48622. color: ld,
  48623. dashArrayX: [1, 0],
  48624. dashArrayY: [2, 5],
  48625. symbolSize: 1,
  48626. rotation: Math.PI / 6
  48627. }, {
  48628. color: ld,
  48629. symbol: "circle",
  48630. dashArrayX: [[8, 8], [0, 8, 8, 0]],
  48631. dashArrayY: [6, 0],
  48632. symbolSize: 0.8
  48633. }, {
  48634. color: ld,
  48635. dashArrayX: [1, 0],
  48636. dashArrayY: [4, 3],
  48637. rotation: -Math.PI / 4
  48638. }, {
  48639. color: ld,
  48640. dashArrayX: [[6, 6], [0, 6, 6, 0]],
  48641. dashArrayY: [6, 0]
  48642. }, {
  48643. color: ld,
  48644. dashArrayX: [[1, 0], [1, 6]],
  48645. dashArrayY: [1, 0, 6, 0],
  48646. rotation: Math.PI / 4
  48647. }, {
  48648. color: ld,
  48649. symbol: "triangle",
  48650. dashArrayX: [[9, 9], [0, 9, 9, 0]],
  48651. dashArrayY: [7, 2],
  48652. symbolSize: 0.75
  48653. }]
  48654. }
  48655. },
  48656. // If xAxis and yAxis declared, grid is created by default.
  48657. // grid: {},
  48658. textStyle: {
  48659. // color: '#000',
  48660. // decoration: 'none',
  48661. // PENDING
  48662. fontFamily: AJ.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  48663. // fontFamily: 'Arial, Verdana, sans-serif',
  48664. fontSize: 12,
  48665. fontStyle: "normal",
  48666. fontWeight: "normal"
  48667. },
  48668. // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/
  48669. // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
  48670. // Default is source-over
  48671. blendMode: null,
  48672. stateAnimation: {
  48673. duration: 300,
  48674. easing: "cubicOut"
  48675. },
  48676. animation: "auto",
  48677. animationDuration: 1e3,
  48678. animationDurationUpdate: 500,
  48679. animationEasing: "cubicInOut",
  48680. animationEasingUpdate: "cubicInOut",
  48681. animationThreshold: 2e3,
  48682. // Configuration for progressive/incremental rendering
  48683. progressiveThreshold: 3e3,
  48684. progressive: 400,
  48685. // Threshold of if use single hover layer to optimize.
  48686. // It is recommended that `hoverLayerThreshold` is equivalent to or less than
  48687. // `progressiveThreshold`, otherwise hover will cause restart of progressive,
  48688. // which is unexpected.
  48689. // see example <echarts/test/heatmap-large.html>.
  48690. hoverLayerThreshold: 3e3,
  48691. // See: module:echarts/scale/Time
  48692. useUTC: !1
  48693. };
  48694. var WA = Pe(["tooltip", "label", "itemName", "itemId", "itemGroupId", "itemChildGroupId", "seriesName"]), Ba = "original", zr = "arrayRows", za = "objectRows", us = "keyedColumns", Rs = "typedArray", EJ = "unknown", Yo = "column", Cp = "row", cr = {
  48695. Must: 1,
  48696. Might: 2,
  48697. Not: 3
  48698. // Other cases
  48699. }, MJ = bt();
  48700. function CLe(t) {
  48701. MJ(t).datasetMap = Pe();
  48702. }
  48703. function IJ(t, e, n) {
  48704. var r = {}, i = ik(e);
  48705. if (!i || !t)
  48706. return r;
  48707. var a = [], o = [], s = e.ecModel, l = MJ(s).datasetMap, u = i.uid + "_" + n.seriesLayoutBy, c, f;
  48708. t = t.slice(), k(t, function(v, g) {
  48709. var m = Ie(v) ? v : t[g] = {
  48710. name: v
  48711. };
  48712. m.type === "ordinal" && c == null && (c = g, f = p(m)), r[m.name] = [];
  48713. });
  48714. var d = l.get(u) || l.set(u, {
  48715. categoryWayDim: f,
  48716. valueWayDim: 0
  48717. });
  48718. k(t, function(v, g) {
  48719. var m = v.name, y = p(v);
  48720. if (c == null) {
  48721. var b = d.valueWayDim;
  48722. h(r[m], b, y), h(o, b, y), d.valueWayDim += y;
  48723. } else if (c === g)
  48724. h(r[m], 0, y), h(a, 0, y);
  48725. else {
  48726. var b = d.categoryWayDim;
  48727. h(r[m], b, y), h(o, b, y), d.categoryWayDim += y;
  48728. }
  48729. });
  48730. function h(v, g, m) {
  48731. for (var y = 0; y < m; y++)
  48732. v.push(g + y);
  48733. }
  48734. function p(v) {
  48735. var g = v.dimsDef;
  48736. return g ? g.length : 1;
  48737. }
  48738. return a.length && (r.itemName = a), o.length && (r.seriesName = o), r;
  48739. }
  48740. function rk(t, e, n) {
  48741. var r = {}, i = ik(t);
  48742. if (!i)
  48743. return r;
  48744. var a = e.sourceFormat, o = e.dimensionsDefine, s;
  48745. (a === za || a === us) && k(o, function(c, f) {
  48746. (Ie(c) ? c.name : c) === "name" && (s = f);
  48747. });
  48748. var l = function() {
  48749. for (var c = {}, f = {}, d = [], h = 0, p = Math.min(5, n); h < p; h++) {
  48750. var v = RJ(e.data, a, e.seriesLayoutBy, o, e.startIndex, h);
  48751. d.push(v);
  48752. var g = v === cr.Not;
  48753. if (g && c.v == null && h !== s && (c.v = h), (c.n == null || c.n === c.v || !g && d[c.n] === cr.Not) && (c.n = h), m(c) && d[c.n] !== cr.Not)
  48754. return c;
  48755. g || (v === cr.Might && f.v == null && h !== s && (f.v = h), (f.n == null || f.n === f.v) && (f.n = h));
  48756. }
  48757. function m(y) {
  48758. return y.v != null && y.n != null;
  48759. }
  48760. return m(c) ? c : m(f) ? f : null;
  48761. }();
  48762. if (l) {
  48763. r.value = [l.v];
  48764. var u = s ?? l.n;
  48765. r.itemName = [u], r.seriesName = [u];
  48766. }
  48767. return r;
  48768. }
  48769. function ik(t) {
  48770. var e = t.get("data", !0);
  48771. if (!e)
  48772. return B0(t.ecModel, "dataset", {
  48773. index: t.get("datasetIndex", !0),
  48774. id: t.get("datasetId", !0)
  48775. }, Dn).models[0];
  48776. }
  48777. function TLe(t) {
  48778. return !t.get("transform", !0) && !t.get("fromTransformResult", !0) ? [] : B0(t.ecModel, "dataset", {
  48779. index: t.get("fromDatasetIndex", !0),
  48780. id: t.get("fromDatasetId", !0)
  48781. }, Dn).models;
  48782. }
  48783. function DJ(t, e) {
  48784. return RJ(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
  48785. }
  48786. function RJ(t, e, n, r, i, a) {
  48787. var o, s = 5;
  48788. if (Br(t))
  48789. return cr.Not;
  48790. var l, u;
  48791. if (r) {
  48792. var c = r[a];
  48793. Ie(c) ? (l = c.name, u = c.type) : Oe(c) && (l = c);
  48794. }
  48795. if (u != null)
  48796. return u === "ordinal" ? cr.Must : cr.Not;
  48797. if (e === zr) {
  48798. var f = t;
  48799. if (n === Cp) {
  48800. for (var d = f[a], h = 0; h < (d || []).length && h < s; h++)
  48801. if ((o = _(d[i + h])) != null)
  48802. return o;
  48803. } else
  48804. for (var h = 0; h < f.length && h < s; h++) {
  48805. var p = f[i + h];
  48806. if (p && (o = _(p[a])) != null)
  48807. return o;
  48808. }
  48809. } else if (e === za) {
  48810. var v = t;
  48811. if (!l)
  48812. return cr.Not;
  48813. for (var h = 0; h < v.length && h < s; h++) {
  48814. var g = v[h];
  48815. if (g && (o = _(g[l])) != null)
  48816. return o;
  48817. }
  48818. } else if (e === us) {
  48819. var m = t;
  48820. if (!l)
  48821. return cr.Not;
  48822. var d = m[l];
  48823. if (!d || Br(d))
  48824. return cr.Not;
  48825. for (var h = 0; h < d.length && h < s; h++)
  48826. if ((o = _(d[h])) != null)
  48827. return o;
  48828. } else if (e === Ba)
  48829. for (var y = t, h = 0; h < y.length && h < s; h++) {
  48830. var g = y[h], b = gp(g);
  48831. if (!ue(b))
  48832. return cr.Not;
  48833. if ((o = _(b[a])) != null)
  48834. return o;
  48835. }
  48836. function _(O) {
  48837. var S = Oe(O);
  48838. if (O != null && Number.isFinite(Number(O)) && O !== "")
  48839. return S ? cr.Might : cr.Not;
  48840. if (S && O !== "-")
  48841. return cr.Must;
  48842. }
  48843. return cr.Not;
  48844. }
  48845. var QA = Pe();
  48846. function PLe(t, e) {
  48847. ke(QA.get(t) == null && e), QA.set(t, e);
  48848. }
  48849. function $Le(t, e, n) {
  48850. var r = QA.get(e);
  48851. if (!r)
  48852. return n;
  48853. var i = r(t);
  48854. if (!i)
  48855. return n;
  48856. if (process.env.NODE_ENV !== "production")
  48857. for (var a = 0; a < i.length; a++)
  48858. ke(Wh(i[a]));
  48859. return n.concat(i);
  48860. }
  48861. var KB = bt(), ALe = bt(), ak = (
  48862. /** @class */
  48863. function() {
  48864. function t() {
  48865. }
  48866. return t.prototype.getColorFromPalette = function(e, n, r) {
  48867. var i = Qt(this.get("color", !0)), a = this.get("colorLayer", !0);
  48868. return kJ(this, KB, i, a, e, n, r);
  48869. }, t.prototype.clearColorPalette = function() {
  48870. MLe(this, KB);
  48871. }, t;
  48872. }()
  48873. );
  48874. function HA(t, e, n, r) {
  48875. var i = Qt(t.get(["aria", "decal", "decals"]));
  48876. return kJ(t, ALe, i, null, e, n, r);
  48877. }
  48878. function ELe(t, e) {
  48879. for (var n = t.length, r = 0; r < n; r++)
  48880. if (t[r].length > e)
  48881. return t[r];
  48882. return t[n - 1];
  48883. }
  48884. function kJ(t, e, n, r, i, a, o) {
  48885. a = a || t;
  48886. var s = e(a), l = s.paletteIdx || 0, u = s.paletteNameMap = s.paletteNameMap || {};
  48887. if (u.hasOwnProperty(i))
  48888. return u[i];
  48889. var c = o == null || !r ? n : ELe(r, o);
  48890. if (c = c || n, !(!c || !c.length)) {
  48891. var f = c[l];
  48892. return i && (u[i] = f), s.paletteIdx = (l + 1) % c.length, f;
  48893. }
  48894. }
  48895. function MLe(t, e) {
  48896. e(t).paletteIdx = 0, e(t).paletteNameMap = {};
  48897. }
  48898. var ab, cv, JB, $T = "\0_ec_inner", ez = 1, ILe = {
  48899. grid: "GridComponent",
  48900. polar: "PolarComponent",
  48901. geo: "GeoComponent",
  48902. singleAxis: "SingleAxisComponent",
  48903. parallel: "ParallelComponent",
  48904. calendar: "CalendarComponent",
  48905. graphic: "GraphicComponent",
  48906. toolbox: "ToolboxComponent",
  48907. tooltip: "TooltipComponent",
  48908. axisPointer: "AxisPointerComponent",
  48909. brush: "BrushComponent",
  48910. title: "TitleComponent",
  48911. timeline: "TimelineComponent",
  48912. markPoint: "MarkPointComponent",
  48913. markLine: "MarkLineComponent",
  48914. markArea: "MarkAreaComponent",
  48915. legend: "LegendComponent",
  48916. dataZoom: "DataZoomComponent",
  48917. visualMap: "VisualMapComponent",
  48918. // aria: 'AriaComponent',
  48919. // dataset: 'DatasetComponent',
  48920. // Dependencies
  48921. xAxis: "GridComponent",
  48922. yAxis: "GridComponent",
  48923. angleAxis: "PolarComponent",
  48924. radiusAxis: "PolarComponent"
  48925. }, DLe = {
  48926. line: "LineChart",
  48927. bar: "BarChart",
  48928. pie: "PieChart",
  48929. scatter: "ScatterChart",
  48930. radar: "RadarChart",
  48931. map: "MapChart",
  48932. tree: "TreeChart",
  48933. treemap: "TreemapChart",
  48934. graph: "GraphChart",
  48935. gauge: "GaugeChart",
  48936. funnel: "FunnelChart",
  48937. parallel: "ParallelChart",
  48938. sankey: "SankeyChart",
  48939. boxplot: "BoxplotChart",
  48940. candlestick: "CandlestickChart",
  48941. effectScatter: "EffectScatterChart",
  48942. lines: "LinesChart",
  48943. heatmap: "HeatmapChart",
  48944. pictorialBar: "PictorialBarChart",
  48945. themeRiver: "ThemeRiverChart",
  48946. sunburst: "SunburstChart",
  48947. custom: "CustomChart"
  48948. }, vO = {};
  48949. function RLe(t) {
  48950. k(t, function(e, n) {
  48951. if (!rt.hasClass(n)) {
  48952. var r = ILe[n];
  48953. r && !vO[r] && (Cr("Component " + n + ` is used but not imported.
  48954. import { ` + r + ` } from 'echarts/components';
  48955. echarts.use([` + r + "]);"), vO[r] = !0);
  48956. }
  48957. });
  48958. }
  48959. var ok = (
  48960. /** @class */
  48961. function(t) {
  48962. q(e, t);
  48963. function e() {
  48964. return t !== null && t.apply(this, arguments) || this;
  48965. }
  48966. return e.prototype.init = function(n, r, i, a, o, s) {
  48967. a = a || {}, this.option = null, this._theme = new Wt(a), this._locale = new Wt(o), this._optionManager = s;
  48968. }, e.prototype.setOption = function(n, r, i) {
  48969. process.env.NODE_ENV !== "production" && (ke(n != null, "option is null/undefined"), ke(n[$T] !== ez, "please use chart.getOption()"));
  48970. var a = rz(r);
  48971. this._optionManager.setOption(n, i, a), this._resetOption(null, a);
  48972. }, e.prototype.resetOption = function(n, r) {
  48973. return this._resetOption(n, rz(r));
  48974. }, e.prototype._resetOption = function(n, r) {
  48975. var i = !1, a = this._optionManager;
  48976. if (!n || n === "recreate") {
  48977. var o = a.mountOption(n === "recreate");
  48978. process.env.NODE_ENV !== "production" && RLe(o), !this.option || n === "recreate" ? JB(this, o) : (this.restoreData(), this._mergeOption(o, r)), i = !0;
  48979. }
  48980. if ((n === "timeline" || n === "media") && this.restoreData(), !n || n === "recreate" || n === "timeline") {
  48981. var s = a.getTimelineOption(this);
  48982. s && (i = !0, this._mergeOption(s, r));
  48983. }
  48984. if (!n || n === "recreate" || n === "media") {
  48985. var l = a.getMediaOption(this);
  48986. l.length && k(l, function(u) {
  48987. i = !0, this._mergeOption(u, r);
  48988. }, this);
  48989. }
  48990. return i;
  48991. }, e.prototype.mergeOption = function(n) {
  48992. this._mergeOption(n, null);
  48993. }, e.prototype._mergeOption = function(n, r) {
  48994. var i = this.option, a = this._componentsMap, o = this._componentsCount, s = [], l = Pe(), u = r && r.replaceMergeMainTypeMap;
  48995. CLe(this), k(n, function(f, d) {
  48996. f != null && (rt.hasClass(d) ? d && (s.push(d), l.set(d, !0)) : i[d] = i[d] == null ? Le(f) : qe(i[d], f, !0));
  48997. }), u && u.each(function(f, d) {
  48998. rt.hasClass(d) && !l.get(d) && (s.push(d), l.set(d, !0));
  48999. }), rt.topologicalTravel(s, rt.getAllClassMainTypes(), c, this);
  49000. function c(f) {
  49001. var d = $Le(this, f, Qt(n[f])), h = a.get(f), p = (
  49002. // `!oldCmptList` means init. See the comment in `mappingToExists`
  49003. h ? u && u.get(f) ? "replaceMerge" : "normalMerge" : "replaceAll"
  49004. ), v = pK(h, d, p);
  49005. eRe(v, f, rt), i[f] = null, a.set(f, null), o.set(f, 0);
  49006. var g = [], m = [], y = 0, b, _;
  49007. k(v, function(O, S) {
  49008. var x = O.existing, C = O.newOption;
  49009. if (!C)
  49010. x && (x.mergeOption({}, this), x.optionUpdated({}, !1));
  49011. else {
  49012. var T = f === "series", w = rt.getClass(
  49013. f,
  49014. O.keyInfo.subType,
  49015. !T
  49016. // Give a more detailed warn later if series don't exists
  49017. );
  49018. if (!w) {
  49019. if (process.env.NODE_ENV !== "production") {
  49020. var P = O.keyInfo.subType, $ = DLe[P];
  49021. vO[P] || (vO[P] = !0, Cr($ ? "Series " + P + ` is used but not imported.
  49022. import { ` + $ + ` } from 'echarts/charts';
  49023. echarts.use([` + $ + "]);" : "Unknown series " + P));
  49024. }
  49025. return;
  49026. }
  49027. if (f === "tooltip") {
  49028. if (b) {
  49029. process.env.NODE_ENV !== "production" && (_ || (dn("Currently only one tooltip component is allowed."), _ = !0));
  49030. return;
  49031. }
  49032. b = !0;
  49033. }
  49034. if (x && x.constructor === w)
  49035. x.name = O.keyInfo.name, x.mergeOption(C, this), x.optionUpdated(C, !1);
  49036. else {
  49037. var A = le({
  49038. componentIndex: S
  49039. }, O.keyInfo);
  49040. x = new w(C, this, this, A), le(x, A), O.brandNew && (x.__requireNewView = !0), x.init(C, this, this), x.optionUpdated(null, !0);
  49041. }
  49042. }
  49043. x ? (g.push(x.option), m.push(x), y++) : (g.push(void 0), m.push(void 0));
  49044. }, this), i[f] = g, a.set(f, m), o.set(f, y), f === "series" && ab(this);
  49045. }
  49046. this._seriesIndices || ab(this);
  49047. }, e.prototype.getOption = function() {
  49048. var n = Le(this.option);
  49049. return k(n, function(r, i) {
  49050. if (rt.hasClass(i)) {
  49051. for (var a = Qt(r), o = a.length, s = !1, l = o - 1; l >= 0; l--)
  49052. a[l] && !Wh(a[l]) ? s = !0 : (a[l] = null, !s && o--);
  49053. a.length = o, n[i] = a;
  49054. }
  49055. }), delete n[$T], n;
  49056. }, e.prototype.getTheme = function() {
  49057. return this._theme;
  49058. }, e.prototype.getLocaleModel = function() {
  49059. return this._locale;
  49060. }, e.prototype.setUpdatePayload = function(n) {
  49061. this._payload = n;
  49062. }, e.prototype.getUpdatePayload = function() {
  49063. return this._payload;
  49064. }, e.prototype.getComponent = function(n, r) {
  49065. var i = this._componentsMap.get(n);
  49066. if (i) {
  49067. var a = i[r || 0];
  49068. if (a)
  49069. return a;
  49070. if (r == null) {
  49071. for (var o = 0; o < i.length; o++)
  49072. if (i[o])
  49073. return i[o];
  49074. }
  49075. }
  49076. }, e.prototype.queryComponents = function(n) {
  49077. var r = n.mainType;
  49078. if (!r)
  49079. return [];
  49080. var i = n.index, a = n.id, o = n.name, s = this._componentsMap.get(r);
  49081. if (!s || !s.length)
  49082. return [];
  49083. var l;
  49084. return i != null ? (l = [], k(Qt(i), function(u) {
  49085. s[u] && l.push(s[u]);
  49086. })) : a != null ? l = tz("id", a, s) : o != null ? l = tz("name", o, s) : l = Nt(s, function(u) {
  49087. return !!u;
  49088. }), nz(l, n);
  49089. }, e.prototype.findComponents = function(n) {
  49090. var r = n.query, i = n.mainType, a = s(r), o = a ? this.queryComponents(a) : Nt(this._componentsMap.get(i), function(u) {
  49091. return !!u;
  49092. });
  49093. return l(nz(o, n));
  49094. function s(u) {
  49095. var c = i + "Index", f = i + "Id", d = i + "Name";
  49096. return u && (u[c] != null || u[f] != null || u[d] != null) ? {
  49097. mainType: i,
  49098. // subType will be filtered finally.
  49099. index: u[c],
  49100. id: u[f],
  49101. name: u[d]
  49102. } : null;
  49103. }
  49104. function l(u) {
  49105. return n.filter ? Nt(u, n.filter) : u;
  49106. }
  49107. }, e.prototype.eachComponent = function(n, r, i) {
  49108. var a = this._componentsMap;
  49109. if (Me(n)) {
  49110. var o = r, s = n;
  49111. a.each(function(f, d) {
  49112. for (var h = 0; f && h < f.length; h++) {
  49113. var p = f[h];
  49114. p && s.call(o, d, p, p.componentIndex);
  49115. }
  49116. });
  49117. } else
  49118. for (var l = Oe(n) ? a.get(n) : Ie(n) ? this.findComponents(n) : null, u = 0; l && u < l.length; u++) {
  49119. var c = l[u];
  49120. c && r.call(i, c, c.componentIndex);
  49121. }
  49122. }, e.prototype.getSeriesByName = function(n) {
  49123. var r = Vn(n, null);
  49124. return Nt(this._componentsMap.get("series"), function(i) {
  49125. return !!i && r != null && i.name === r;
  49126. });
  49127. }, e.prototype.getSeriesByIndex = function(n) {
  49128. return this._componentsMap.get("series")[n];
  49129. }, e.prototype.getSeriesByType = function(n) {
  49130. return Nt(this._componentsMap.get("series"), function(r) {
  49131. return !!r && r.subType === n;
  49132. });
  49133. }, e.prototype.getSeries = function() {
  49134. return Nt(this._componentsMap.get("series"), function(n) {
  49135. return !!n;
  49136. });
  49137. }, e.prototype.getSeriesCount = function() {
  49138. return this._componentsCount.get("series");
  49139. }, e.prototype.eachSeries = function(n, r) {
  49140. cv(this), k(this._seriesIndices, function(i) {
  49141. var a = this._componentsMap.get("series")[i];
  49142. n.call(r, a, i);
  49143. }, this);
  49144. }, e.prototype.eachRawSeries = function(n, r) {
  49145. k(this._componentsMap.get("series"), function(i) {
  49146. i && n.call(r, i, i.componentIndex);
  49147. });
  49148. }, e.prototype.eachSeriesByType = function(n, r, i) {
  49149. cv(this), k(this._seriesIndices, function(a) {
  49150. var o = this._componentsMap.get("series")[a];
  49151. o.subType === n && r.call(i, o, a);
  49152. }, this);
  49153. }, e.prototype.eachRawSeriesByType = function(n, r, i) {
  49154. return k(this.getSeriesByType(n), r, i);
  49155. }, e.prototype.isSeriesFiltered = function(n) {
  49156. return cv(this), this._seriesIndicesMap.get(n.componentIndex) == null;
  49157. }, e.prototype.getCurrentSeriesIndices = function() {
  49158. return (this._seriesIndices || []).slice();
  49159. }, e.prototype.filterSeries = function(n, r) {
  49160. cv(this);
  49161. var i = [];
  49162. k(this._seriesIndices, function(a) {
  49163. var o = this._componentsMap.get("series")[a];
  49164. n.call(r, o, a) && i.push(a);
  49165. }, this), this._seriesIndices = i, this._seriesIndicesMap = Pe(i);
  49166. }, e.prototype.restoreData = function(n) {
  49167. ab(this);
  49168. var r = this._componentsMap, i = [];
  49169. r.each(function(a, o) {
  49170. rt.hasClass(o) && i.push(o);
  49171. }), rt.topologicalTravel(i, rt.getAllClassMainTypes(), function(a) {
  49172. k(r.get(a), function(o) {
  49173. o && (a !== "series" || !kLe(o, n)) && o.restoreData();
  49174. });
  49175. });
  49176. }, e.internalField = function() {
  49177. ab = function(n) {
  49178. var r = n._seriesIndices = [];
  49179. k(n._componentsMap.get("series"), function(i) {
  49180. i && r.push(i.componentIndex);
  49181. }), n._seriesIndicesMap = Pe(r);
  49182. }, cv = function(n) {
  49183. if (process.env.NODE_ENV !== "production" && !n._seriesIndices)
  49184. throw new Error("Option should contains series.");
  49185. }, JB = function(n, r) {
  49186. n.option = {}, n.option[$T] = ez, n._componentsMap = Pe({
  49187. series: []
  49188. }), n._componentsCount = Pe();
  49189. var i = r.aria;
  49190. Ie(i) && i.enabled == null && (i.enabled = !0), LLe(r, n._theme.option), qe(r, wLe, !1), n._mergeOption(r, null);
  49191. };
  49192. }(), e;
  49193. }(Wt)
  49194. );
  49195. function kLe(t, e) {
  49196. if (e) {
  49197. var n = e.seriesIndex, r = e.seriesId, i = e.seriesName;
  49198. return n != null && t.componentIndex !== n || r != null && t.id !== r || i != null && t.name !== i;
  49199. }
  49200. }
  49201. function LLe(t, e) {
  49202. var n = t.color && !t.colorLayer;
  49203. k(e, function(r, i) {
  49204. i === "colorLayer" && n || rt.hasClass(i) || (typeof r == "object" ? t[i] = t[i] ? qe(t[i], r, !1) : Le(r) : t[i] == null && (t[i] = r));
  49205. });
  49206. }
  49207. function tz(t, e, n) {
  49208. if (ue(e)) {
  49209. var r = Pe();
  49210. return k(e, function(a) {
  49211. if (a != null) {
  49212. var o = Vn(a, null);
  49213. o != null && r.set(a, !0);
  49214. }
  49215. }), Nt(n, function(a) {
  49216. return a && r.get(a[t]);
  49217. });
  49218. } else {
  49219. var i = Vn(e, null);
  49220. return Nt(n, function(a) {
  49221. return a && i != null && a[t] === i;
  49222. });
  49223. }
  49224. }
  49225. function nz(t, e) {
  49226. return e.hasOwnProperty("subType") ? Nt(t, function(n) {
  49227. return n && n.subType === e.subType;
  49228. }) : t;
  49229. }
  49230. function rz(t) {
  49231. var e = Pe();
  49232. return t && k(Qt(t.replaceMerge), function(n) {
  49233. process.env.NODE_ENV !== "production" && ke(rt.hasClass(n), '"' + n + '" is not valid component main type in "replaceMerge"'), e.set(n, !0);
  49234. }), {
  49235. replaceMergeMainTypeMap: e
  49236. };
  49237. }
  49238. xn(ok, ak);
  49239. var NLe = [
  49240. "getDom",
  49241. "getZr",
  49242. "getWidth",
  49243. "getHeight",
  49244. "getDevicePixelRatio",
  49245. "dispatchAction",
  49246. "isSSR",
  49247. "isDisposed",
  49248. "on",
  49249. "off",
  49250. "getDataURL",
  49251. "getConnectedDataURL",
  49252. // 'getModel',
  49253. "getOption",
  49254. // 'getViewOfComponentModel',
  49255. // 'getViewOfSeriesModel',
  49256. "getId",
  49257. "updateLabelLayout"
  49258. ], LJ = (
  49259. /** @class */
  49260. /* @__PURE__ */ function() {
  49261. function t(e) {
  49262. k(NLe, function(n) {
  49263. this[n] = xe(e[n], e);
  49264. }, this);
  49265. }
  49266. return t;
  49267. }()
  49268. ), AT = {}, Vf = (
  49269. /** @class */
  49270. function() {
  49271. function t() {
  49272. this._coordinateSystems = [];
  49273. }
  49274. return t.prototype.create = function(e, n) {
  49275. var r = [];
  49276. k(AT, function(i, a) {
  49277. var o = i.create(e, n);
  49278. r = r.concat(o || []);
  49279. }), this._coordinateSystems = r;
  49280. }, t.prototype.update = function(e, n) {
  49281. k(this._coordinateSystems, function(r) {
  49282. r.update && r.update(e, n);
  49283. });
  49284. }, t.prototype.getCoordinateSystems = function() {
  49285. return this._coordinateSystems.slice();
  49286. }, t.register = function(e, n) {
  49287. AT[e] = n;
  49288. }, t.get = function(e) {
  49289. return AT[e];
  49290. }, t;
  49291. }()
  49292. ), BLe = /^(min|max)?(.+)$/, zLe = (
  49293. /** @class */
  49294. function() {
  49295. function t(e) {
  49296. this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e;
  49297. }
  49298. return t.prototype.setOption = function(e, n, r) {
  49299. e && (k(Qt(e.series), function(o) {
  49300. o && o.data && Br(o.data) && bm(o.data);
  49301. }), k(Qt(e.dataset), function(o) {
  49302. o && o.source && Br(o.source) && bm(o.source);
  49303. })), e = Le(e);
  49304. var i = this._optionBackup, a = VLe(e, n, !i);
  49305. 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;
  49306. }, t.prototype.mountOption = function(e) {
  49307. var n = this._optionBackup;
  49308. return this._timelineOptions = n.timelineOptions, this._mediaList = n.mediaList, this._mediaDefault = n.mediaDefault, this._currentMediaIndices = [], Le(e ? n.baseOption : this._newBaseOption);
  49309. }, t.prototype.getTimelineOption = function(e) {
  49310. var n, r = this._timelineOptions;
  49311. if (r.length) {
  49312. var i = e.getComponent("timeline");
  49313. i && (n = Le(
  49314. // FIXME:TS as TimelineModel or quivlant interface
  49315. r[i.getCurrentIndex()]
  49316. ));
  49317. }
  49318. return n;
  49319. }, t.prototype.getMediaOption = function(e) {
  49320. var n = this._api.getWidth(), r = this._api.getHeight(), i = this._mediaList, a = this._mediaDefault, o = [], s = [];
  49321. if (!i.length && !a)
  49322. return s;
  49323. for (var l = 0, u = i.length; l < u; l++)
  49324. FLe(i[l].query, n, r) && o.push(l);
  49325. return !o.length && a && (o = [-1]), o.length && !QLe(o, this._currentMediaIndices) && (s = ce(o, function(c) {
  49326. return Le(c === -1 ? a.option : i[c].option);
  49327. })), this._currentMediaIndices = o, s;
  49328. }, t;
  49329. }()
  49330. );
  49331. function VLe(t, e, n) {
  49332. 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);
  49333. o ? (a = o, a.timeline || (a.timeline = s)) : ((f || c) && (t.options = t.media = null), a = t), c && (ue(u) ? k(u, function(h) {
  49334. process.env.NODE_ENV !== "production" && h && !h.option && Ie(h.query) && Ie(h.query.option) && Cr("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"), h && h.option && (h.query ? r.push(h) : i || (i = h));
  49335. }) : process.env.NODE_ENV !== "production" && Cr("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), d(a), k(l, function(h) {
  49336. return d(h);
  49337. }), k(r, function(h) {
  49338. return d(h.option);
  49339. });
  49340. function d(h) {
  49341. k(e, function(p) {
  49342. p(h, n);
  49343. });
  49344. }
  49345. return {
  49346. baseOption: a,
  49347. timelineOptions: l || [],
  49348. mediaDefault: i,
  49349. mediaList: r
  49350. };
  49351. }
  49352. function FLe(t, e, n) {
  49353. var r = {
  49354. width: e,
  49355. height: n,
  49356. aspectratio: e / n
  49357. // lower case for convenience.
  49358. }, i = !0;
  49359. return k(t, function(a, o) {
  49360. var s = o.match(BLe);
  49361. if (!(!s || !s[1] || !s[2])) {
  49362. var l = s[1], u = s[2].toLowerCase();
  49363. WLe(r[u], a, l) || (i = !1);
  49364. }
  49365. }), i;
  49366. }
  49367. function WLe(t, e, n) {
  49368. return n === "min" ? t >= e : n === "max" ? t <= e : t === e;
  49369. }
  49370. function QLe(t, e) {
  49371. return t.join(",") === e.join(",");
  49372. }
  49373. var na = k, Mm = Ie, iz = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
  49374. function ET(t) {
  49375. var e = t && t.itemStyle;
  49376. if (e)
  49377. for (var n = 0, r = iz.length; n < r; n++) {
  49378. var i = iz[n], a = e.normal, o = e.emphasis;
  49379. a && a[i] && (process.env.NODE_ENV !== "production" && Cn("itemStyle.normal." + i, i), t[i] = t[i] || {}, t[i].normal ? qe(t[i].normal, a[i]) : t[i].normal = a[i], a[i] = null), o && o[i] && (process.env.NODE_ENV !== "production" && Cn("itemStyle.emphasis." + i, "emphasis." + i), t[i] = t[i] || {}, t[i].emphasis ? qe(t[i].emphasis, o[i]) : t[i].emphasis = o[i], o[i] = null);
  49380. }
  49381. }
  49382. function Dr(t, e, n) {
  49383. if (t && t[e] && (t[e].normal || t[e].emphasis)) {
  49384. var r = t[e].normal, i = t[e].emphasis;
  49385. r && (process.env.NODE_ENV !== "production" && Ia("'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, Re(t[e], r)) : t[e] = r), i && (process.env.NODE_ENV !== "production" && Ia(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));
  49386. }
  49387. }
  49388. function Kv(t) {
  49389. Dr(t, "itemStyle"), Dr(t, "lineStyle"), Dr(t, "areaStyle"), Dr(t, "label"), Dr(t, "labelLine"), Dr(t, "upperLabel"), Dr(t, "edgeLabel");
  49390. }
  49391. function En(t, e) {
  49392. var n = Mm(t) && t[e], r = Mm(n) && n.textStyle;
  49393. if (r) {
  49394. process.env.NODE_ENV !== "production" && Ia("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now.");
  49395. for (var i = 0, a = lB.length; i < a; i++) {
  49396. var o = lB[i];
  49397. r.hasOwnProperty(o) && (n[o] = r[o]);
  49398. }
  49399. }
  49400. }
  49401. function ca(t) {
  49402. t && (Kv(t), En(t, "label"), t.emphasis && En(t.emphasis, "label"));
  49403. }
  49404. function HLe(t) {
  49405. if (Mm(t)) {
  49406. ET(t), Kv(t), En(t, "label"), En(t, "upperLabel"), En(t, "edgeLabel"), t.emphasis && (En(t.emphasis, "label"), En(t.emphasis, "upperLabel"), En(t.emphasis, "edgeLabel"));
  49407. var e = t.markPoint;
  49408. e && (ET(e), ca(e));
  49409. var n = t.markLine;
  49410. n && (ET(n), ca(n));
  49411. var r = t.markArea;
  49412. r && ca(r);
  49413. var i = t.data;
  49414. if (t.type === "graph") {
  49415. i = i || t.nodes;
  49416. var a = t.links || t.edges;
  49417. if (a && !Br(a))
  49418. for (var o = 0; o < a.length; o++)
  49419. ca(a[o]);
  49420. k(t.categories, function(u) {
  49421. Kv(u);
  49422. });
  49423. }
  49424. if (i && !Br(i))
  49425. for (var o = 0; o < i.length; o++)
  49426. ca(i[o]);
  49427. if (e = t.markPoint, e && e.data)
  49428. for (var s = e.data, o = 0; o < s.length; o++)
  49429. ca(s[o]);
  49430. if (n = t.markLine, n && n.data)
  49431. for (var l = n.data, o = 0; o < l.length; o++)
  49432. ue(l[o]) ? (ca(l[o][0]), ca(l[o][1])) : ca(l[o]);
  49433. t.type === "gauge" ? (En(t, "axisLabel"), En(t, "title"), En(t, "detail")) : t.type === "treemap" ? (Dr(t.breadcrumb, "itemStyle"), k(t.levels, function(u) {
  49434. Kv(u);
  49435. })) : t.type === "tree" && Kv(t.leaves);
  49436. }
  49437. }
  49438. function ys(t) {
  49439. return ue(t) ? t : t ? [t] : [];
  49440. }
  49441. function az(t) {
  49442. return (ue(t) ? t[0] : t) || {};
  49443. }
  49444. function GLe(t, e) {
  49445. na(ys(t.series), function(r) {
  49446. Mm(r) && HLe(r);
  49447. });
  49448. var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  49449. e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), na(n, function(r) {
  49450. na(ys(t[r]), function(i) {
  49451. i && (En(i, "axisLabel"), En(i.axisPointer, "label"));
  49452. });
  49453. }), na(ys(t.parallel), function(r) {
  49454. var i = r && r.parallelAxisDefault;
  49455. En(i, "axisLabel"), En(i && i.axisPointer, "label");
  49456. }), na(ys(t.calendar), function(r) {
  49457. Dr(r, "itemStyle"), En(r, "dayLabel"), En(r, "monthLabel"), En(r, "yearLabel");
  49458. }), na(ys(t.radar), function(r) {
  49459. En(r, "name"), r.name && r.axisName == null && (r.axisName = r.name, delete r.name, process.env.NODE_ENV !== "production" && Ia("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" && Ia("nameGap property in radar component has been changed to axisNameGap")), process.env.NODE_ENV !== "production" && na(r.indicator, function(i) {
  49460. i.text && Cn("text", "name", "radar.indicator");
  49461. });
  49462. }), na(ys(t.geo), function(r) {
  49463. Mm(r) && (ca(r), na(ys(r.regions), function(i) {
  49464. ca(i);
  49465. }));
  49466. }), na(ys(t.timeline), function(r) {
  49467. ca(r), Dr(r, "label"), Dr(r, "itemStyle"), Dr(r, "controlStyle", !0);
  49468. var i = r.data;
  49469. ue(i) && k(i, function(a) {
  49470. Ie(a) && (Dr(a, "label"), Dr(a, "itemStyle"));
  49471. });
  49472. }), na(ys(t.toolbox), function(r) {
  49473. Dr(r, "iconStyle"), na(r.feature, function(i) {
  49474. Dr(i, "iconStyle");
  49475. });
  49476. }), En(az(t.axisPointer), "label"), En(az(t.tooltip).axisPointer, "label");
  49477. }
  49478. function jLe(t, e) {
  49479. for (var n = e.split(","), r = t, i = 0; i < n.length && (r = r && r[n[i]], r != null); i++)
  49480. ;
  49481. return r;
  49482. }
  49483. function ZLe(t, e, n, r) {
  49484. for (var i = e.split(","), a = t, o, s = 0; s < i.length - 1; s++)
  49485. o = i[s], a[o] == null && (a[o] = {}), a = a[o];
  49486. a[i[s]] == null && (a[i[s]] = n);
  49487. }
  49488. function oz(t) {
  49489. t && k(ULe, function(e) {
  49490. e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]);
  49491. });
  49492. }
  49493. var ULe = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], XLe = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], MT = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
  49494. function fv(t) {
  49495. var e = t && t.itemStyle;
  49496. if (e)
  49497. for (var n = 0; n < MT.length; n++) {
  49498. var r = MT[n][1], i = MT[n][0];
  49499. e[r] != null && (e[i] = e[r], process.env.NODE_ENV !== "production" && Cn(r, i));
  49500. }
  49501. }
  49502. function sz(t) {
  49503. t && t.alignTo === "edge" && t.margin != null && t.edgeDistance == null && (process.env.NODE_ENV !== "production" && Cn("label.margin", "label.edgeDistance", "pie"), t.edgeDistance = t.margin);
  49504. }
  49505. function lz(t) {
  49506. t && t.downplay && !t.blur && (t.blur = t.downplay, process.env.NODE_ENV !== "production" && Cn("downplay", "blur", "sunburst"));
  49507. }
  49508. function YLe(t) {
  49509. t && t.focusNodeAdjacency != null && (t.emphasis = t.emphasis || {}, t.emphasis.focus == null && (process.env.NODE_ENV !== "production" && Cn("focusNodeAdjacency", "emphasis: { focus: 'adjacency'}", "graph/sankey"), t.emphasis.focus = "adjacency"));
  49510. }
  49511. function NJ(t, e) {
  49512. if (t)
  49513. for (var n = 0; n < t.length; n++)
  49514. e(t[n]), t[n] && NJ(t[n].children, e);
  49515. }
  49516. function BJ(t, e) {
  49517. GLe(t, e), t.series = Qt(t.series), k(t.series, function(n) {
  49518. if (Ie(n)) {
  49519. var r = n.type;
  49520. if (r === "line")
  49521. n.clipOverflow != null && (n.clip = n.clipOverflow, process.env.NODE_ENV !== "production" && Cn("clipOverflow", "clip", "line"));
  49522. else if (r === "pie" || r === "gauge") {
  49523. n.clockWise != null && (n.clockwise = n.clockWise, process.env.NODE_ENV !== "production" && Cn("clockWise", "clockwise")), sz(n.label);
  49524. var i = n.data;
  49525. if (i && !Br(i))
  49526. for (var a = 0; a < i.length; a++)
  49527. sz(i[a]);
  49528. n.hoverOffset != null && (n.emphasis = n.emphasis || {}, (n.emphasis.scaleSize = null) && (process.env.NODE_ENV !== "production" && Cn("hoverOffset", "emphasis.scaleSize"), n.emphasis.scaleSize = n.hoverOffset));
  49529. } else if (r === "gauge") {
  49530. var o = jLe(n, "pointer.color");
  49531. o != null && ZLe(n, "itemStyle.color", o);
  49532. } else if (r === "bar") {
  49533. fv(n), fv(n.backgroundStyle), fv(n.emphasis);
  49534. var i = n.data;
  49535. if (i && !Br(i))
  49536. for (var a = 0; a < i.length; a++)
  49537. typeof i[a] == "object" && (fv(i[a]), fv(i[a] && i[a].emphasis));
  49538. } else if (r === "sunburst") {
  49539. var s = n.highlightPolicy;
  49540. s && (n.emphasis = n.emphasis || {}, n.emphasis.focus || (n.emphasis.focus = s, process.env.NODE_ENV !== "production" && Cn("highlightPolicy", "emphasis.focus", "sunburst"))), lz(n), NJ(n.data, lz);
  49541. } else r === "graph" || r === "sankey" ? YLe(n) : r === "map" && (n.mapType && !n.map && (process.env.NODE_ENV !== "production" && Cn("mapType", "map", "map"), n.map = n.mapType), n.mapLocation && (process.env.NODE_ENV !== "production" && Ia("`mapLocation` is not used anymore."), Re(n, n.mapLocation)));
  49542. n.hoverAnimation != null && (n.emphasis = n.emphasis || {}, n.emphasis && n.emphasis.scale == null && (process.env.NODE_ENV !== "production" && Cn("hoverAnimation", "emphasis.scale"), n.emphasis.scale = n.hoverAnimation)), oz(n);
  49543. }
  49544. }), t.dataRange && (t.visualMap = t.dataRange), k(XLe, function(n) {
  49545. var r = t[n];
  49546. r && (ue(r) || (r = [r]), k(r, function(i) {
  49547. oz(i);
  49548. }));
  49549. });
  49550. }
  49551. function qLe(t) {
  49552. var e = Pe();
  49553. t.eachSeries(function(n) {
  49554. var r = n.get("stack");
  49555. if (r) {
  49556. var i = e.get(r) || e.set(r, []), a = n.getData(), o = {
  49557. // Used for calculate axis extent automatically.
  49558. // TODO: Type getCalculationInfo return more specific type?
  49559. stackResultDimension: a.getCalculationInfo("stackResultDimension"),
  49560. stackedOverDimension: a.getCalculationInfo("stackedOverDimension"),
  49561. stackedDimension: a.getCalculationInfo("stackedDimension"),
  49562. stackedByDimension: a.getCalculationInfo("stackedByDimension"),
  49563. isStackedByIndex: a.getCalculationInfo("isStackedByIndex"),
  49564. data: a,
  49565. seriesModel: n
  49566. };
  49567. if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension))
  49568. return;
  49569. i.length && a.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o);
  49570. }
  49571. }), e.each(KLe);
  49572. }
  49573. function KLe(t) {
  49574. k(t, function(e, n) {
  49575. var r = [], i = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, l = e.seriesModel.get("stackStrategy") || "samesign";
  49576. o.modify(a, function(u, c, f) {
  49577. var d = o.get(e.stackedDimension, f);
  49578. if (isNaN(d))
  49579. return i;
  49580. var h, p;
  49581. s ? p = o.getRawIndex(f) : h = o.get(e.stackedByDimension, f);
  49582. for (var v = NaN, g = n - 1; g >= 0; g--) {
  49583. var m = t[g];
  49584. if (s || (p = m.data.rawIndexOf(m.stackedByDimension, h)), p >= 0) {
  49585. var y = m.data.getByRawIndex(m.stackResultDimension, p);
  49586. if (l === "all" || l === "positive" && y > 0 || l === "negative" && y < 0 || l === "samesign" && d >= 0 && y > 0 || l === "samesign" && d <= 0 && y < 0) {
  49587. d = FDe(d, y), v = y;
  49588. break;
  49589. }
  49590. }
  49591. }
  49592. return r[0] = d, r[1] = v, r;
  49593. });
  49594. });
  49595. }
  49596. var sw = (
  49597. /** @class */
  49598. /* @__PURE__ */ function() {
  49599. function t(e) {
  49600. this.data = e.data || (e.sourceFormat === us ? {} : []), this.sourceFormat = e.sourceFormat || EJ, this.seriesLayoutBy = e.seriesLayoutBy || Yo, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
  49601. var n = this.dimensionsDefine = e.dimensionsDefine;
  49602. if (n)
  49603. for (var r = 0; r < n.length; r++) {
  49604. var i = n[r];
  49605. i.type == null && DJ(this, r) === cr.Must && (i.type = "ordinal");
  49606. }
  49607. }
  49608. return t;
  49609. }()
  49610. );
  49611. function sk(t) {
  49612. return t instanceof sw;
  49613. }
  49614. function GA(t, e, n) {
  49615. n = n || zJ(t);
  49616. var r = e.seriesLayoutBy, i = e4e(t, n, r, e.sourceHeader, e.dimensions), a = new sw({
  49617. data: t,
  49618. sourceFormat: n,
  49619. seriesLayoutBy: r,
  49620. dimensionsDefine: i.dimensionsDefine,
  49621. startIndex: i.startIndex,
  49622. dimensionsDetectedCount: i.dimensionsDetectedCount,
  49623. metaRawOption: Le(e)
  49624. });
  49625. return a;
  49626. }
  49627. function lk(t) {
  49628. return new sw({
  49629. data: t,
  49630. sourceFormat: Br(t) ? Rs : Ba
  49631. });
  49632. }
  49633. function JLe(t) {
  49634. return new sw({
  49635. data: t.data,
  49636. sourceFormat: t.sourceFormat,
  49637. seriesLayoutBy: t.seriesLayoutBy,
  49638. dimensionsDefine: Le(t.dimensionsDefine),
  49639. startIndex: t.startIndex,
  49640. dimensionsDetectedCount: t.dimensionsDetectedCount
  49641. });
  49642. }
  49643. function zJ(t) {
  49644. var e = EJ;
  49645. if (Br(t))
  49646. e = Rs;
  49647. else if (ue(t)) {
  49648. t.length === 0 && (e = zr);
  49649. for (var n = 0, r = t.length; n < r; n++) {
  49650. var i = t[n];
  49651. if (i != null) {
  49652. if (ue(i) || Br(i)) {
  49653. e = zr;
  49654. break;
  49655. } else if (Ie(i)) {
  49656. e = za;
  49657. break;
  49658. }
  49659. }
  49660. }
  49661. } else if (Ie(t)) {
  49662. for (var a in t)
  49663. if (Ce(t, a) && wr(t[a])) {
  49664. e = us;
  49665. break;
  49666. }
  49667. }
  49668. return e;
  49669. }
  49670. function e4e(t, e, n, r, i) {
  49671. var a, o;
  49672. if (!t)
  49673. return {
  49674. dimensionsDefine: uz(i),
  49675. startIndex: o,
  49676. dimensionsDetectedCount: a
  49677. };
  49678. if (e === zr) {
  49679. var s = t;
  49680. r === "auto" || r == null ? cz(function(u) {
  49681. u != null && u !== "-" && (Oe(u) ? o == null && (o = 1) : o = 0);
  49682. }, n, s, 10) : o = St(r) ? r : r ? 1 : 0, !i && o === 1 && (i = [], cz(function(u, c) {
  49683. i[c] = u != null ? u + "" : "";
  49684. }, n, s, 1 / 0)), a = i ? i.length : n === Cp ? s.length : s[0] ? s[0].length : null;
  49685. } else if (e === za)
  49686. i || (i = t4e(t));
  49687. else if (e === us)
  49688. i || (i = [], k(t, function(u, c) {
  49689. i.push(c);
  49690. }));
  49691. else if (e === Ba) {
  49692. var l = gp(t[0]);
  49693. a = ue(l) && l.length || 1;
  49694. } else e === Rs && process.env.NODE_ENV !== "production" && ke(!!i, "dimensions must be given if data is TypedArray.");
  49695. return {
  49696. startIndex: o,
  49697. dimensionsDefine: uz(i),
  49698. dimensionsDetectedCount: a
  49699. };
  49700. }
  49701. function t4e(t) {
  49702. for (var e = 0, n; e < t.length && !(n = t[e++]); )
  49703. ;
  49704. if (n)
  49705. return st(n);
  49706. }
  49707. function uz(t) {
  49708. if (t) {
  49709. var e = Pe();
  49710. return ce(t, function(n, r) {
  49711. n = Ie(n) ? n : {
  49712. name: n
  49713. };
  49714. var i = {
  49715. name: n.name,
  49716. displayName: n.displayName,
  49717. type: n.type
  49718. };
  49719. if (i.name == null)
  49720. return i;
  49721. i.name += "", i.displayName == null && (i.displayName = i.name);
  49722. var a = e.get(i.name);
  49723. return a ? i.name += "-" + a.count++ : e.set(i.name, {
  49724. count: 1
  49725. }), i;
  49726. });
  49727. }
  49728. }
  49729. function cz(t, e, n, r) {
  49730. if (e === Cp)
  49731. for (var i = 0; i < n.length && i < r; i++)
  49732. t(n[i] ? n[i][0] : null, i);
  49733. else
  49734. for (var a = n[0] || [], i = 0; i < a.length && i < r; i++)
  49735. t(a[i], i);
  49736. }
  49737. function VJ(t) {
  49738. var e = t.sourceFormat;
  49739. return e === za || e === us;
  49740. }
  49741. var tc, nc, rc, fz, dz, FJ = (
  49742. /** @class */
  49743. function() {
  49744. function t(e, n) {
  49745. var r = sk(e) ? e : lk(e);
  49746. this._source = r;
  49747. var i = this._data = r.data;
  49748. if (r.sourceFormat === Rs) {
  49749. if (process.env.NODE_ENV !== "production" && n == null)
  49750. throw new Error("Typed array data must specify dimension size");
  49751. this._offset = 0, this._dimSize = n, this._data = i;
  49752. }
  49753. dz(this, i, r);
  49754. }
  49755. return t.prototype.getSource = function() {
  49756. return this._source;
  49757. }, t.prototype.count = function() {
  49758. return 0;
  49759. }, t.prototype.getItem = function(e, n) {
  49760. }, t.prototype.appendData = function(e) {
  49761. }, t.prototype.clean = function() {
  49762. }, t.protoInitialize = function() {
  49763. var e = t.prototype;
  49764. e.pure = !1, e.persistent = !0;
  49765. }(), t.internalField = function() {
  49766. var e;
  49767. dz = function(o, s, l) {
  49768. var u = l.sourceFormat, c = l.seriesLayoutBy, f = l.startIndex, d = l.dimensionsDefine, h = fz[uk(u, c)];
  49769. if (process.env.NODE_ENV !== "production" && ke(h, "Invalide sourceFormat: " + u), le(o, h), u === Rs)
  49770. o.getItem = n, o.count = i, o.fillStorage = r;
  49771. else {
  49772. var p = WJ(u, c);
  49773. o.getItem = xe(p, null, s, f, d);
  49774. var v = QJ(u, c);
  49775. o.count = xe(v, null, s, f, d);
  49776. }
  49777. };
  49778. var n = function(o, s) {
  49779. o = o - this._offset, s = s || [];
  49780. for (var l = this._data, u = this._dimSize, c = u * o, f = 0; f < u; f++)
  49781. s[f] = l[c + f];
  49782. return s;
  49783. }, r = function(o, s, l, u) {
  49784. for (var c = this._data, f = this._dimSize, d = 0; d < f; d++) {
  49785. 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++) {
  49786. var b = c[y * f + d];
  49787. m[o + y] = b, b < p && (p = b), b > v && (v = b);
  49788. }
  49789. h[0] = p, h[1] = v;
  49790. }
  49791. }, i = function() {
  49792. return this._data ? this._data.length / this._dimSize : 0;
  49793. };
  49794. fz = (e = {}, e[zr + "_" + Yo] = {
  49795. pure: !0,
  49796. appendData: a
  49797. }, e[zr + "_" + Cp] = {
  49798. pure: !0,
  49799. appendData: function() {
  49800. throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
  49801. }
  49802. }, e[za] = {
  49803. pure: !0,
  49804. appendData: a
  49805. }, e[us] = {
  49806. pure: !0,
  49807. appendData: function(o) {
  49808. var s = this._data;
  49809. k(o, function(l, u) {
  49810. for (var c = s[u] || (s[u] = []), f = 0; f < (l || []).length; f++)
  49811. c.push(l[f]);
  49812. });
  49813. }
  49814. }, e[Ba] = {
  49815. appendData: a
  49816. }, e[Rs] = {
  49817. persistent: !1,
  49818. pure: !0,
  49819. appendData: function(o) {
  49820. process.env.NODE_ENV !== "production" && ke(Br(o), "Added data must be TypedArray if data in initialization is TypedArray"), this._data = o;
  49821. },
  49822. // Clean self if data is already used.
  49823. clean: function() {
  49824. this._offset += this.count(), this._data = null;
  49825. }
  49826. }, e);
  49827. function a(o) {
  49828. for (var s = 0; s < o.length; s++)
  49829. this._data.push(o[s]);
  49830. }
  49831. }(), t;
  49832. }()
  49833. ), hz = function(t, e, n, r) {
  49834. return t[r];
  49835. }, n4e = (tc = {}, tc[zr + "_" + Yo] = function(t, e, n, r) {
  49836. return t[r + e];
  49837. }, tc[zr + "_" + Cp] = function(t, e, n, r, i) {
  49838. r += e;
  49839. for (var a = i || [], o = t, s = 0; s < o.length; s++) {
  49840. var l = o[s];
  49841. a[s] = l ? l[r] : null;
  49842. }
  49843. return a;
  49844. }, tc[za] = hz, tc[us] = function(t, e, n, r, i) {
  49845. for (var a = i || [], o = 0; o < n.length; o++) {
  49846. var s = n[o].name;
  49847. if (process.env.NODE_ENV !== "production" && s == null)
  49848. throw new Error();
  49849. var l = t[s];
  49850. a[o] = l ? l[r] : null;
  49851. }
  49852. return a;
  49853. }, tc[Ba] = hz, tc);
  49854. function WJ(t, e) {
  49855. var n = n4e[uk(t, e)];
  49856. return process.env.NODE_ENV !== "production" && ke(n, 'Do not support get item on "' + t + '", "' + e + '".'), n;
  49857. }
  49858. var pz = function(t, e, n) {
  49859. return t.length;
  49860. }, r4e = (nc = {}, nc[zr + "_" + Yo] = function(t, e, n) {
  49861. return Math.max(0, t.length - e);
  49862. }, nc[zr + "_" + Cp] = function(t, e, n) {
  49863. var r = t[0];
  49864. return r ? Math.max(0, r.length - e) : 0;
  49865. }, nc[za] = pz, nc[us] = function(t, e, n) {
  49866. var r = n[0].name;
  49867. if (process.env.NODE_ENV !== "production" && r == null)
  49868. throw new Error();
  49869. var i = t[r];
  49870. return i ? i.length : 0;
  49871. }, nc[Ba] = pz, nc);
  49872. function QJ(t, e) {
  49873. var n = r4e[uk(t, e)];
  49874. return process.env.NODE_ENV !== "production" && ke(n, 'Do not support count on "' + t + '", "' + e + '".'), n;
  49875. }
  49876. var IT = function(t, e, n) {
  49877. return t[e];
  49878. }, i4e = (rc = {}, rc[zr] = IT, rc[za] = function(t, e, n) {
  49879. return t[n];
  49880. }, rc[us] = IT, rc[Ba] = function(t, e, n) {
  49881. var r = gp(t);
  49882. return r instanceof Array ? r[e] : r;
  49883. }, rc[Rs] = IT, rc);
  49884. function HJ(t) {
  49885. var e = i4e[t];
  49886. return process.env.NODE_ENV !== "production" && ke(e, 'Do not support get value on "' + t + '".'), e;
  49887. }
  49888. function uk(t, e) {
  49889. return t === zr ? t + "_" + e : t;
  49890. }
  49891. function Gh(t, e, n) {
  49892. if (t) {
  49893. var r = t.getRawDataItem(e);
  49894. if (r != null) {
  49895. var i = t.getStore(), a = i.getSource().sourceFormat;
  49896. if (n != null) {
  49897. var o = t.getDimensionIndex(n), s = i.getDimensionProperty(o);
  49898. return HJ(a)(r, o, s);
  49899. } else {
  49900. var l = r;
  49901. return a === Ba && (l = gp(r)), l;
  49902. }
  49903. }
  49904. }
  49905. }
  49906. var a4e = /\{@(.+?)\}/g, lw = (
  49907. /** @class */
  49908. function() {
  49909. function t() {
  49910. }
  49911. return t.prototype.getDataParams = function(e, n) {
  49912. 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();
  49913. return {
  49914. componentType: f,
  49915. componentSubType: this.subType,
  49916. componentIndex: this.componentIndex,
  49917. seriesType: d ? this.subType : null,
  49918. seriesIndex: this.seriesIndex,
  49919. seriesId: d ? this.id : null,
  49920. seriesName: d ? this.name : null,
  49921. name: o,
  49922. dataIndex: a,
  49923. data: s,
  49924. dataType: n,
  49925. value: i,
  49926. color: u,
  49927. borderColor: c,
  49928. dimensionNames: h ? h.fullDimensions : null,
  49929. encode: h ? h.encode : null,
  49930. // Param name list for mapping `a`, `b`, `c`, `d`, `e`
  49931. $vars: ["seriesName", "name", "value"]
  49932. };
  49933. }, t.prototype.getFormattedLabel = function(e, n, r, i, a, o) {
  49934. n = n || "normal";
  49935. var s = this.getData(r), l = this.getDataParams(e, r);
  49936. if (o && (l.value = o.interpolatedValue), i != null && ue(l.value) && (l.value = l.value[i]), !a) {
  49937. var u = s.getItemModel(e);
  49938. a = u.get(n === "normal" ? ["label", "formatter"] : [n, "label", "formatter"]);
  49939. }
  49940. if (Me(a))
  49941. return l.status = n, l.dimensionIndex = i, a(l);
  49942. if (Oe(a)) {
  49943. var c = tk(a, l);
  49944. return c.replace(a4e, function(f, d) {
  49945. var h = d.length, p = d;
  49946. p.charAt(0) === "[" && p.charAt(h - 1) === "]" && (p = +p.slice(1, h - 1), process.env.NODE_ENV !== "production" && isNaN(p) && Cr("Invalide label formatter: @" + d + ", only support @[0], @[1], @[2], ..."));
  49947. var v = Gh(s, e, p);
  49948. if (o && ue(o.interpolatedValue)) {
  49949. var g = s.getDimensionIndex(p);
  49950. g >= 0 && (v = o.interpolatedValue[g]);
  49951. }
  49952. return v != null ? v + "" : "";
  49953. });
  49954. }
  49955. }, t.prototype.getRawValue = function(e, n) {
  49956. return Gh(this.getData(n), e);
  49957. }, t.prototype.formatTooltip = function(e, n, r) {
  49958. }, t;
  49959. }()
  49960. );
  49961. function vz(t) {
  49962. var e, n;
  49963. return Ie(t) ? t.type ? n = t : process.env.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + ni(t)) : e = t, {
  49964. text: e,
  49965. // markers: markers || markersExisting,
  49966. frag: n
  49967. };
  49968. }
  49969. function Bg(t) {
  49970. return new o4e(t);
  49971. }
  49972. var o4e = (
  49973. /** @class */
  49974. function() {
  49975. function t(e) {
  49976. e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0;
  49977. }
  49978. return t.prototype.perform = function(e) {
  49979. var n = this._upstream, r = e && e.skip;
  49980. if (this._dirty && n) {
  49981. var i = this.context;
  49982. i.data = i.outputData = n.context.outputData;
  49983. }
  49984. this.__pipeline && (this.__pipeline.currentTask = this);
  49985. var a;
  49986. this._plan && !r && (a = this._plan(this.context));
  49987. var o = c(this._modBy), s = this._modDataCount || 0, l = c(e && e.modBy), u = e && e.modDataCount || 0;
  49988. (o !== l || s !== u) && (a = "reset");
  49989. function c(y) {
  49990. return !(y >= 1) && (y = 1), y;
  49991. }
  49992. var f;
  49993. (this._dirty || a === "reset") && (this._dirty = !1, f = this._doReset(r)), this._modBy = l, this._modDataCount = u;
  49994. var d = e && e.step;
  49995. if (n ? (process.env.NODE_ENV !== "production" && ke(n._outputDueEnd != null), this._dueEnd = n._outputDueEnd) : (process.env.NODE_ENV !== "production" && ke(!this._progress || this._count), this._dueEnd = this._count ? this._count(this.context) : 1 / 0), this._progress) {
  49996. var h = this._dueIndex, p = Math.min(d != null ? this._dueIndex + d : 1 / 0, this._dueEnd);
  49997. if (!r && (f || h < p)) {
  49998. var v = this._progress;
  49999. if (ue(v))
  50000. for (var g = 0; g < v.length; g++)
  50001. this._doProgress(v[g], h, p, l, u);
  50002. else
  50003. this._doProgress(v, h, p, l, u);
  50004. }
  50005. this._dueIndex = p;
  50006. var m = this._settedOutputEnd != null ? this._settedOutputEnd : p;
  50007. process.env.NODE_ENV !== "production" && ke(m >= this._outputDueEnd), this._outputDueEnd = m;
  50008. } else
  50009. this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;
  50010. return this.unfinished();
  50011. }, t.prototype.dirty = function() {
  50012. this._dirty = !0, this._onDirty && this._onDirty(this.context);
  50013. }, t.prototype._doProgress = function(e, n, r, i, a) {
  50014. gz.reset(n, r, i, a), this._callingProgress = e, this._callingProgress({
  50015. start: n,
  50016. end: r,
  50017. count: r - n,
  50018. next: gz.next
  50019. }, this.context);
  50020. }, t.prototype._doReset = function(e) {
  50021. this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null;
  50022. var n, r;
  50023. !e && this._reset && (n = this._reset(this.context), n && n.progress && (r = n.forceFirstProgress, n = n.progress), ue(n) && !n.length && (n = null)), this._progress = n, this._modBy = this._modDataCount = null;
  50024. var i = this._downstream;
  50025. return i && i.dirty(), r;
  50026. }, t.prototype.unfinished = function() {
  50027. return this._progress && this._dueIndex < this._dueEnd;
  50028. }, t.prototype.pipe = function(e) {
  50029. process.env.NODE_ENV !== "production" && ke(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty());
  50030. }, t.prototype.dispose = function() {
  50031. this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
  50032. }, t.prototype.getUpstream = function() {
  50033. return this._upstream;
  50034. }, t.prototype.getDownstream = function() {
  50035. return this._downstream;
  50036. }, t.prototype.setOutputEnd = function(e) {
  50037. this._outputDueEnd = this._settedOutputEnd = e;
  50038. }, t;
  50039. }()
  50040. ), gz = /* @__PURE__ */ function() {
  50041. var t, e, n, r, i, a = {
  50042. reset: function(l, u, c, f) {
  50043. e = l, t = u, n = c, r = f, i = Math.ceil(r / n), a.next = n > 1 && r > 0 ? s : o;
  50044. }
  50045. };
  50046. return a;
  50047. function o() {
  50048. return e < t ? e++ : null;
  50049. }
  50050. function s() {
  50051. var l = e % i * n + Math.ceil(e / i), u = e >= t ? null : l < r ? l : e;
  50052. return e++, u;
  50053. }
  50054. }();
  50055. function Kl(t, e) {
  50056. var n = e && e.type;
  50057. return n === "ordinal" ? t : (n === "time" && !St(t) && t != null && t !== "-" && (t = +Ki(t)), t == null || t === "" ? NaN : Number(t));
  50058. }
  50059. var s4e = Pe({
  50060. number: function(t) {
  50061. return parseFloat(t);
  50062. },
  50063. time: function(t) {
  50064. return +Ki(t);
  50065. },
  50066. trim: function(t) {
  50067. return Oe(t) ? ba(t) : t;
  50068. }
  50069. });
  50070. function GJ(t) {
  50071. return s4e.get(t);
  50072. }
  50073. var jJ = {
  50074. lt: function(t, e) {
  50075. return t < e;
  50076. },
  50077. lte: function(t, e) {
  50078. return t <= e;
  50079. },
  50080. gt: function(t, e) {
  50081. return t > e;
  50082. },
  50083. gte: function(t, e) {
  50084. return t >= e;
  50085. }
  50086. }, l4e = (
  50087. /** @class */
  50088. function() {
  50089. function t(e, n) {
  50090. if (!St(n)) {
  50091. var r = "";
  50092. process.env.NODE_ENV !== "production" && (r = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), Et(r);
  50093. }
  50094. this._opFn = jJ[e], this._rvalFloat = as(n);
  50095. }
  50096. return t.prototype.evaluate = function(e) {
  50097. return St(e) ? this._opFn(e, this._rvalFloat) : this._opFn(as(e), this._rvalFloat);
  50098. }, t;
  50099. }()
  50100. ), ZJ = (
  50101. /** @class */
  50102. function() {
  50103. function t(e, n) {
  50104. var r = e === "desc";
  50105. this._resultLT = r ? 1 : -1, n == null && (n = r ? "min" : "max"), this._incomparable = n === "min" ? -1 / 0 : 1 / 0;
  50106. }
  50107. return t.prototype.evaluate = function(e, n) {
  50108. var r = St(e) ? e : as(e), i = St(n) ? n : as(n), a = isNaN(r), o = isNaN(i);
  50109. if (a && (r = this._incomparable), o && (i = this._incomparable), a && o) {
  50110. var s = Oe(e), l = Oe(n);
  50111. s && (r = l ? e : 0), l && (i = s ? n : 0);
  50112. }
  50113. return r < i ? this._resultLT : r > i ? -this._resultLT : 0;
  50114. }, t;
  50115. }()
  50116. ), u4e = (
  50117. /** @class */
  50118. function() {
  50119. function t(e, n) {
  50120. this._rval = n, this._isEQ = e, this._rvalTypeof = typeof n, this._rvalFloat = as(n);
  50121. }
  50122. return t.prototype.evaluate = function(e) {
  50123. var n = e === this._rval;
  50124. if (!n) {
  50125. var r = typeof e;
  50126. r !== this._rvalTypeof && (r === "number" || this._rvalTypeof === "number") && (n = as(e) === this._rvalFloat);
  50127. }
  50128. return this._isEQ ? n : !n;
  50129. }, t;
  50130. }()
  50131. );
  50132. function c4e(t, e) {
  50133. return t === "eq" || t === "ne" ? new u4e(t === "eq", e) : Ce(jJ, t) ? new l4e(t, e) : null;
  50134. }
  50135. var f4e = (
  50136. /** @class */
  50137. function() {
  50138. function t() {
  50139. }
  50140. return t.prototype.getRawData = function() {
  50141. throw new Error("not supported");
  50142. }, t.prototype.getRawDataItem = function(e) {
  50143. throw new Error("not supported");
  50144. }, t.prototype.cloneRawData = function() {
  50145. }, t.prototype.getDimensionInfo = function(e) {
  50146. }, t.prototype.cloneAllDimensionInfo = function() {
  50147. }, t.prototype.count = function() {
  50148. }, t.prototype.retrieveValue = function(e, n) {
  50149. }, t.prototype.retrieveValueFromItem = function(e, n) {
  50150. }, t.prototype.convertValue = function(e, n) {
  50151. return Kl(e, n);
  50152. }, t;
  50153. }()
  50154. );
  50155. function d4e(t, e) {
  50156. var n = new f4e(), r = t.data, i = n.sourceFormat = t.sourceFormat, a = t.startIndex, o = "";
  50157. t.seriesLayoutBy !== Yo && (process.env.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), Et(o));
  50158. var s = [], l = {}, u = t.dimensionsDefine;
  50159. if (u)
  50160. k(u, function(v, g) {
  50161. var m = v.name, y = {
  50162. index: g,
  50163. name: m,
  50164. displayName: v.displayName
  50165. };
  50166. if (s.push(y), m != null) {
  50167. var b = "";
  50168. Ce(l, m) && (process.env.NODE_ENV !== "production" && (b = 'dimension name "' + m + '" duplicated.'), Et(b)), l[m] = y;
  50169. }
  50170. });
  50171. else
  50172. for (var c = 0; c < t.dimensionsDetectedCount; c++)
  50173. s.push({
  50174. index: c
  50175. });
  50176. var f = WJ(i, Yo);
  50177. e.__isBuiltIn && (n.getRawDataItem = function(v) {
  50178. return f(r, a, s, v);
  50179. }, n.getRawData = xe(h4e, null, t)), n.cloneRawData = xe(p4e, null, t);
  50180. var d = QJ(i, Yo);
  50181. n.count = xe(d, null, r, a, s);
  50182. var h = HJ(i);
  50183. n.retrieveValue = function(v, g) {
  50184. var m = f(r, a, s, v);
  50185. return p(m, g);
  50186. };
  50187. var p = n.retrieveValueFromItem = function(v, g) {
  50188. if (v != null) {
  50189. var m = s[g];
  50190. if (m)
  50191. return h(v, g, m.name);
  50192. }
  50193. };
  50194. return n.getDimensionInfo = xe(v4e, null, s, l), n.cloneAllDimensionInfo = xe(g4e, null, s), n;
  50195. }
  50196. function h4e(t) {
  50197. var e = t.sourceFormat;
  50198. if (!ck(e)) {
  50199. var n = "";
  50200. process.env.NODE_ENV !== "production" && (n = "`getRawData` is not supported in source format " + e), Et(n);
  50201. }
  50202. return t.data;
  50203. }
  50204. function p4e(t) {
  50205. var e = t.sourceFormat, n = t.data;
  50206. if (!ck(e)) {
  50207. var r = "";
  50208. process.env.NODE_ENV !== "production" && (r = "`cloneRawData` is not supported in source format " + e), Et(r);
  50209. }
  50210. if (e === zr) {
  50211. for (var i = [], a = 0, o = n.length; a < o; a++)
  50212. i.push(n[a].slice());
  50213. return i;
  50214. } else if (e === za) {
  50215. for (var i = [], a = 0, o = n.length; a < o; a++)
  50216. i.push(le({}, n[a]));
  50217. return i;
  50218. }
  50219. }
  50220. function v4e(t, e, n) {
  50221. if (n != null) {
  50222. if (St(n) || !isNaN(n) && !Ce(e, n))
  50223. return t[n];
  50224. if (Ce(e, n))
  50225. return e[n];
  50226. }
  50227. }
  50228. function g4e(t) {
  50229. return Le(t);
  50230. }
  50231. var UJ = Pe();
  50232. function m4e(t) {
  50233. t = Le(t);
  50234. var e = t.type, n = "";
  50235. e || (process.env.NODE_ENV !== "production" && (n = "Must have a `type` when `registerTransform`."), Et(n));
  50236. var r = e.split(":");
  50237. r.length !== 2 && (process.env.NODE_ENV !== "production" && (n = 'Name must include namespace like "ns:regression".'), Et(n));
  50238. var i = !1;
  50239. r[0] === "echarts" && (e = r[1], i = !0), t.__isBuiltIn = i, UJ.set(e, t);
  50240. }
  50241. function y4e(t, e, n) {
  50242. var r = Qt(t), i = r.length, a = "";
  50243. i || (process.env.NODE_ENV !== "production" && (a = "If `transform` declared, it should at least contain one transform."), Et(a));
  50244. for (var o = 0, s = i; o < s; o++) {
  50245. var l = r[o];
  50246. e = b4e(l, e, n, i === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1));
  50247. }
  50248. return e;
  50249. }
  50250. function b4e(t, e, n, r) {
  50251. var i = "";
  50252. e.length || (process.env.NODE_ENV !== "production" && (i = "Must have at least one upstream dataset."), Et(i)), Ie(t) || (process.env.NODE_ENV !== "production" && (i = "transform declaration must be an object rather than " + typeof t + "."), Et(i));
  50253. var a = t.type, o = UJ.get(a);
  50254. o || (process.env.NODE_ENV !== "production" && (i = 'Can not find transform on type "' + a + '".'), Et(i));
  50255. var s = ce(e, function(c) {
  50256. return d4e(c, o);
  50257. }), l = Qt(o.transform({
  50258. upstream: s[0],
  50259. upstreamList: s,
  50260. config: Le(t.config)
  50261. }));
  50262. if (process.env.NODE_ENV !== "production" && t.print) {
  50263. var u = ce(l, function(c) {
  50264. var f = r != null ? " === pipe index: " + r : "";
  50265. return ["=== dataset index: " + n.datasetIndex + f + " ===", "- transform result data:", ni(c.data), "- transform result dimensions:", ni(c.dimensions)].join(`
  50266. `);
  50267. }).join(`
  50268. `);
  50269. GDe(u);
  50270. }
  50271. return ce(l, function(c, f) {
  50272. var d = "";
  50273. Ie(c) || (process.env.NODE_ENV !== "production" && (d = "A transform should not return some empty results."), Et(d)), c.data || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be not be null or undefined"), Et(d));
  50274. var h = zJ(c.data);
  50275. ck(h) || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be array rows or object rows."), Et(d));
  50276. var p, v = e[0];
  50277. if (v && f === 0 && !c.dimensions) {
  50278. var g = v.startIndex;
  50279. g && (c.data = v.data.slice(0, g).concat(c.data)), p = {
  50280. seriesLayoutBy: Yo,
  50281. sourceHeader: g,
  50282. dimensions: v.metaRawOption.dimensions
  50283. };
  50284. } else
  50285. p = {
  50286. seriesLayoutBy: Yo,
  50287. sourceHeader: 0,
  50288. dimensions: c.dimensions
  50289. };
  50290. return GA(c.data, p, null);
  50291. });
  50292. }
  50293. function ck(t) {
  50294. return t === zr || t === za;
  50295. }
  50296. var uw = "undefined", _4e = typeof Uint32Array === uw ? Array : Uint32Array, O4e = typeof Uint16Array === uw ? Array : Uint16Array, XJ = typeof Int32Array === uw ? Array : Int32Array, mz = typeof Float64Array === uw ? Array : Float64Array, YJ = {
  50297. float: mz,
  50298. int: XJ,
  50299. // Ordinal data type can be string or int
  50300. ordinal: Array,
  50301. number: Array,
  50302. time: mz
  50303. }, DT;
  50304. function dv(t) {
  50305. return t > 65535 ? _4e : O4e;
  50306. }
  50307. function ud() {
  50308. return [1 / 0, -1 / 0];
  50309. }
  50310. function S4e(t) {
  50311. var e = t.constructor;
  50312. return e === Array ? t.slice() : new e(t);
  50313. }
  50314. function yz(t, e, n, r, i) {
  50315. var a = YJ[n || "float"];
  50316. if (i) {
  50317. var o = t[e], s = o && o.length;
  50318. if (s !== r) {
  50319. for (var l = new a(r), u = 0; u < s; u++)
  50320. l[u] = o[u];
  50321. t[e] = l;
  50322. }
  50323. } else
  50324. t[e] = new a(r);
  50325. }
  50326. var jA = (
  50327. /** @class */
  50328. function() {
  50329. function t() {
  50330. this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = Pe();
  50331. }
  50332. return t.prototype.initData = function(e, n, r) {
  50333. process.env.NODE_ENV !== "production" && ke(Me(e.getItem) && Me(e.count), "Invalid data provider."), this._provider = e, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
  50334. var i = e.getSource(), a = this.defaultDimValueGetter = DT[i.sourceFormat];
  50335. this._dimValueGetter = r || a, this._rawExtent = [];
  50336. var o = VJ(i);
  50337. this._dimensions = ce(n, function(s) {
  50338. return process.env.NODE_ENV !== "production" && o && ke(s.property != null), {
  50339. // Only pick these two props. Not leak other properties like orderMeta.
  50340. type: s.type,
  50341. property: s.property
  50342. };
  50343. }), this._initDataFromProvider(0, e.count());
  50344. }, t.prototype.getProvider = function() {
  50345. return this._provider;
  50346. }, t.prototype.getSource = function() {
  50347. return this._provider.getSource();
  50348. }, t.prototype.ensureCalculationDimension = function(e, n) {
  50349. var r = this._calcDimNameToIdx, i = this._dimensions, a = r.get(e);
  50350. if (a != null) {
  50351. if (i[a].type === n)
  50352. return a;
  50353. } else
  50354. a = i.length;
  50355. return i[a] = {
  50356. type: n
  50357. }, r.set(e, a), this._chunks[a] = new YJ[n || "float"](this._rawCount), this._rawExtent[a] = ud(), a;
  50358. }, t.prototype.collectOrdinalMeta = function(e, n) {
  50359. var r = this._chunks[e], i = this._dimensions[e], a = this._rawExtent, o = i.ordinalOffset || 0, s = r.length;
  50360. o === 0 && (a[e] = ud());
  50361. for (var l = a[e], u = o; u < s; u++) {
  50362. var c = r[u] = n.parseAndCollect(r[u]);
  50363. isNaN(c) || (l[0] = Math.min(c, l[0]), l[1] = Math.max(c, l[1]));
  50364. }
  50365. i.ordinalMeta = n, i.ordinalOffset = s, i.type = "ordinal";
  50366. }, t.prototype.getOrdinalMeta = function(e) {
  50367. var n = this._dimensions[e], r = n.ordinalMeta;
  50368. return r;
  50369. }, t.prototype.getDimensionProperty = function(e) {
  50370. var n = this._dimensions[e];
  50371. return n && n.property;
  50372. }, t.prototype.appendData = function(e) {
  50373. process.env.NODE_ENV !== "production" && ke(!this._indices, "appendData can only be called on raw data.");
  50374. var n = this._provider, r = this.count();
  50375. n.appendData(e);
  50376. var i = n.count();
  50377. return n.persistent || (i += r), r < i && this._initDataFromProvider(r, i, !0), [r, i];
  50378. }, t.prototype.appendValues = function(e, n) {
  50379. 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++) {
  50380. var c = i[u];
  50381. yz(r, u, c.type, l, !0);
  50382. }
  50383. for (var f = [], d = s; d < l; d++)
  50384. for (var h = d - s, p = 0; p < a; p++) {
  50385. var c = i[p], v = DT.arrayRows.call(this, e[h] || f, c.property, h, p);
  50386. r[p][d] = v;
  50387. var g = o[p];
  50388. v < g[0] && (g[0] = v), v > g[1] && (g[1] = v);
  50389. }
  50390. return this._rawCount = this._count = l, {
  50391. start: s,
  50392. end: l
  50393. };
  50394. }, t.prototype._initDataFromProvider = function(e, n, r) {
  50395. for (var i = this._provider, a = this._chunks, o = this._dimensions, s = o.length, l = this._rawExtent, u = ce(o, function(y) {
  50396. return y.property;
  50397. }), c = 0; c < s; c++) {
  50398. var f = o[c];
  50399. l[c] || (l[c] = ud()), yz(a, c, f.type, n, r);
  50400. }
  50401. if (i.fillStorage)
  50402. i.fillStorage(e, n, a, l);
  50403. else
  50404. for (var d = [], h = e; h < n; h++) {
  50405. d = i.getItem(h, d);
  50406. for (var p = 0; p < s; p++) {
  50407. var v = a[p], g = this._dimValueGetter(d, u[p], h, p);
  50408. v[h] = g;
  50409. var m = l[p];
  50410. g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
  50411. }
  50412. }
  50413. !i.persistent && i.clean && i.clean(), this._rawCount = this._count = n, this._extent = [];
  50414. }, t.prototype.count = function() {
  50415. return this._count;
  50416. }, t.prototype.get = function(e, n) {
  50417. if (!(n >= 0 && n < this._count))
  50418. return NaN;
  50419. var r = this._chunks[e];
  50420. return r ? r[this.getRawIndex(n)] : NaN;
  50421. }, t.prototype.getValues = function(e, n) {
  50422. var r = [], i = [];
  50423. if (n == null) {
  50424. n = e, e = [];
  50425. for (var a = 0; a < this._dimensions.length; a++)
  50426. i.push(a);
  50427. } else
  50428. i = e;
  50429. for (var a = 0, o = i.length; a < o; a++)
  50430. r.push(this.get(i[a], n));
  50431. return r;
  50432. }, t.prototype.getByRawIndex = function(e, n) {
  50433. if (!(n >= 0 && n < this._rawCount))
  50434. return NaN;
  50435. var r = this._chunks[e];
  50436. return r ? r[n] : NaN;
  50437. }, t.prototype.getSum = function(e) {
  50438. var n = this._chunks[e], r = 0;
  50439. if (n)
  50440. for (var i = 0, a = this.count(); i < a; i++) {
  50441. var o = this.get(e, i);
  50442. isNaN(o) || (r += o);
  50443. }
  50444. return r;
  50445. }, t.prototype.getMedian = function(e) {
  50446. var n = [];
  50447. this.each([e], function(a) {
  50448. isNaN(a) || n.push(a);
  50449. });
  50450. var r = n.sort(function(a, o) {
  50451. return a - o;
  50452. }), i = this.count();
  50453. return i === 0 ? 0 : i % 2 === 1 ? r[(i - 1) / 2] : (r[i / 2] + r[i / 2 - 1]) / 2;
  50454. }, t.prototype.indexOfRawIndex = function(e) {
  50455. if (e >= this._rawCount || e < 0)
  50456. return -1;
  50457. if (!this._indices)
  50458. return e;
  50459. var n = this._indices, r = n[e];
  50460. if (r != null && r < this._count && r === e)
  50461. return e;
  50462. for (var i = 0, a = this._count - 1; i <= a; ) {
  50463. var o = (i + a) / 2 | 0;
  50464. if (n[o] < e)
  50465. i = o + 1;
  50466. else if (n[o] > e)
  50467. a = o - 1;
  50468. else
  50469. return o;
  50470. }
  50471. return -1;
  50472. }, t.prototype.indicesOfNearest = function(e, n, r) {
  50473. var i = this._chunks, a = i[e], o = [];
  50474. if (!a)
  50475. return o;
  50476. r == null && (r = 1 / 0);
  50477. for (var s = 1 / 0, l = -1, u = 0, c = 0, f = this.count(); c < f; c++) {
  50478. var d = this.getRawIndex(c), h = n - a[d], p = Math.abs(h);
  50479. p <= r && ((p < s || p === s && h >= 0 && l < 0) && (s = p, l = h, u = 0), h === l && (o[u++] = c));
  50480. }
  50481. return o.length = u, o;
  50482. }, t.prototype.getIndices = function() {
  50483. var e, n = this._indices;
  50484. if (n) {
  50485. var r = n.constructor, i = this._count;
  50486. if (r === Array) {
  50487. e = new r(i);
  50488. for (var a = 0; a < i; a++)
  50489. e[a] = n[a];
  50490. } else
  50491. e = new r(n.buffer, 0, i);
  50492. } else {
  50493. var r = dv(this._rawCount);
  50494. e = new r(this.count());
  50495. for (var a = 0; a < e.length; a++)
  50496. e[a] = a;
  50497. }
  50498. return e;
  50499. }, t.prototype.filter = function(e, n) {
  50500. if (!this._count)
  50501. return this;
  50502. for (var r = this.clone(), i = r.count(), a = dv(r._rawCount), o = new a(i), s = [], l = e.length, u = 0, c = e[0], f = r._chunks, d = 0; d < i; d++) {
  50503. var h = void 0, p = r.getRawIndex(d);
  50504. if (l === 0)
  50505. h = n(d);
  50506. else if (l === 1) {
  50507. var v = f[c][p];
  50508. h = n(v, d);
  50509. } else {
  50510. for (var g = 0; g < l; g++)
  50511. s[g] = f[e[g]][p];
  50512. s[g] = d, h = n.apply(null, s);
  50513. }
  50514. h && (o[u++] = p);
  50515. }
  50516. return u < i && (r._indices = o), r._count = u, r._extent = [], r._updateGetRawIdx(), r;
  50517. }, t.prototype.selectRange = function(e) {
  50518. var n = this.clone(), r = n._count;
  50519. if (!r)
  50520. return this;
  50521. var i = st(e), a = i.length;
  50522. if (!a)
  50523. return this;
  50524. var o = n.count(), s = dv(n._rawCount), l = new s(o), u = 0, c = i[0], f = e[c][0], d = e[c][1], h = n._chunks, p = !1;
  50525. if (!n._indices) {
  50526. var v = 0;
  50527. if (a === 1) {
  50528. for (var g = h[i[0]], m = 0; m < r; m++) {
  50529. var y = g[m];
  50530. (y >= f && y <= d || isNaN(y)) && (l[u++] = v), v++;
  50531. }
  50532. p = !0;
  50533. } else if (a === 2) {
  50534. for (var g = h[i[0]], b = h[i[1]], _ = e[i[1]][0], O = e[i[1]][1], m = 0; m < r; m++) {
  50535. var y = g[m], S = b[m];
  50536. (y >= f && y <= d || isNaN(y)) && (S >= _ && S <= O || isNaN(S)) && (l[u++] = v), v++;
  50537. }
  50538. p = !0;
  50539. }
  50540. }
  50541. if (!p)
  50542. if (a === 1)
  50543. for (var m = 0; m < o; m++) {
  50544. var x = n.getRawIndex(m), y = h[i[0]][x];
  50545. (y >= f && y <= d || isNaN(y)) && (l[u++] = x);
  50546. }
  50547. else
  50548. for (var m = 0; m < o; m++) {
  50549. for (var C = !0, x = n.getRawIndex(m), T = 0; T < a; T++) {
  50550. var w = i[T], y = h[w][x];
  50551. (y < e[w][0] || y > e[w][1]) && (C = !1);
  50552. }
  50553. C && (l[u++] = n.getRawIndex(m));
  50554. }
  50555. return u < o && (n._indices = l), n._count = u, n._extent = [], n._updateGetRawIdx(), n;
  50556. }, t.prototype.map = function(e, n) {
  50557. var r = this.clone(e);
  50558. return this._updateDims(r, e, n), r;
  50559. }, t.prototype.modify = function(e, n) {
  50560. this._updateDims(this, e, n);
  50561. }, t.prototype._updateDims = function(e, n, r) {
  50562. for (var i = e._chunks, a = [], o = n.length, s = e.count(), l = [], u = e._rawExtent, c = 0; c < n.length; c++)
  50563. u[n[c]] = ud();
  50564. for (var f = 0; f < s; f++) {
  50565. for (var d = e.getRawIndex(f), h = 0; h < o; h++)
  50566. l[h] = i[n[h]][d];
  50567. l[o] = f;
  50568. var p = r && r.apply(null, l);
  50569. if (p != null) {
  50570. typeof p != "object" && (a[0] = p, p = a);
  50571. for (var c = 0; c < p.length; c++) {
  50572. var v = n[c], g = p[c], m = u[v], y = i[v];
  50573. y && (y[d] = g), g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
  50574. }
  50575. }
  50576. }
  50577. }, t.prototype.lttbDownSample = function(e, n) {
  50578. 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 (dv(this._rawCount))(Math.min((Math.ceil(o / l) + 2) * 2, o));
  50579. h[s++] = u;
  50580. for (var p = 1; p < o - 1; p += l) {
  50581. for (var v = Math.min(p + l, o - 1), g = Math.min(p + l * 2, o), m = (g + v) / 2, y = 0, b = v; b < g; b++) {
  50582. var _ = this.getRawIndex(b), O = a[_];
  50583. isNaN(O) || (y += O);
  50584. }
  50585. y /= g - v;
  50586. var S = p, x = Math.min(p + l, o), C = p - 1, T = a[u];
  50587. c = -1, d = S;
  50588. for (var w = -1, P = 0, b = S; b < x; b++) {
  50589. var _ = this.getRawIndex(b), O = a[_];
  50590. if (isNaN(O)) {
  50591. P++, w < 0 && (w = _);
  50592. continue;
  50593. }
  50594. f = Math.abs((C - m) * (O - T) - (C - b) * (y - T)), f > c && (c = f, d = _);
  50595. }
  50596. P > 0 && P < x - S && (h[s++] = Math.min(w, d), d = Math.max(w, d)), h[s++] = d, u = d;
  50597. }
  50598. return h[s++] = this.getRawIndex(o - 1), r._count = s, r._indices = h, r.getRawIndex = this._getRawIdx, r;
  50599. }, t.prototype.downSample = function(e, n, r, i) {
  50600. 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] = ud(), d = new (dv(this._rawCount))(Math.ceil(c / l)), h = 0, p = 0; p < c; p += l) {
  50601. l > c - p && (l = c - p, s.length = l);
  50602. for (var v = 0; v < l; v++) {
  50603. var g = this.getRawIndex(p + v);
  50604. s[v] = u[g];
  50605. }
  50606. var m = r(s), y = this.getRawIndex(Math.min(p + i(s, m) || 0, c - 1));
  50607. u[y] = m, m < f[0] && (f[0] = m), m > f[1] && (f[1] = m), d[h++] = y;
  50608. }
  50609. return a._count = h, a._indices = d, a._updateGetRawIdx(), a;
  50610. }, t.prototype.each = function(e, n) {
  50611. if (this._count)
  50612. for (var r = e.length, i = this._chunks, a = 0, o = this.count(); a < o; a++) {
  50613. var s = this.getRawIndex(a);
  50614. switch (r) {
  50615. case 0:
  50616. n(a);
  50617. break;
  50618. case 1:
  50619. n(i[e[0]][s], a);
  50620. break;
  50621. case 2:
  50622. n(i[e[0]][s], i[e[1]][s], a);
  50623. break;
  50624. default:
  50625. for (var l = 0, u = []; l < r; l++)
  50626. u[l] = i[e[l]][s];
  50627. u[l] = a, n.apply(null, u);
  50628. }
  50629. }
  50630. }, t.prototype.getDataExtent = function(e) {
  50631. var n = this._chunks[e], r = ud();
  50632. if (!n)
  50633. return r;
  50634. var i = this.count(), a = !this._indices, o;
  50635. if (a)
  50636. return this._rawExtent[e].slice();
  50637. if (o = this._extent[e], o)
  50638. return o.slice();
  50639. o = r;
  50640. for (var s = o[0], l = o[1], u = 0; u < i; u++) {
  50641. var c = this.getRawIndex(u), f = n[c];
  50642. f < s && (s = f), f > l && (l = f);
  50643. }
  50644. return o = [s, l], this._extent[e] = o, o;
  50645. }, t.prototype.getRawDataItem = function(e) {
  50646. var n = this.getRawIndex(e);
  50647. if (this._provider.persistent)
  50648. return this._provider.getItem(n);
  50649. for (var r = [], i = this._chunks, a = 0; a < i.length; a++)
  50650. r.push(i[a][n]);
  50651. return r;
  50652. }, t.prototype.clone = function(e, n) {
  50653. var r = new t(), i = this._chunks, a = e && Ma(e, function(s, l) {
  50654. return s[l] = !0, s;
  50655. }, {});
  50656. if (a)
  50657. for (var o = 0; o < i.length; o++)
  50658. r._chunks[o] = a[o] ? S4e(i[o]) : i[o];
  50659. else
  50660. r._chunks = i;
  50661. return this._copyCommonProps(r), n || (r._indices = this._cloneIndices()), r._updateGetRawIdx(), r;
  50662. }, t.prototype._copyCommonProps = function(e) {
  50663. e._count = this._count, e._rawCount = this._rawCount, e._provider = this._provider, e._dimensions = this._dimensions, e._extent = Le(this._extent), e._rawExtent = Le(this._rawExtent);
  50664. }, t.prototype._cloneIndices = function() {
  50665. if (this._indices) {
  50666. var e = this._indices.constructor, n = void 0;
  50667. if (e === Array) {
  50668. var r = this._indices.length;
  50669. n = new e(r);
  50670. for (var i = 0; i < r; i++)
  50671. n[i] = this._indices[i];
  50672. } else
  50673. n = new e(this._indices);
  50674. return n;
  50675. }
  50676. return null;
  50677. }, t.prototype._getRawIdxIdentity = function(e) {
  50678. return e;
  50679. }, t.prototype._getRawIdx = function(e) {
  50680. return e < this._count && e >= 0 ? this._indices[e] : -1;
  50681. }, t.prototype._updateGetRawIdx = function() {
  50682. this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;
  50683. }, t.internalField = function() {
  50684. function e(n, r, i, a) {
  50685. return Kl(n[a], this._dimensions[a]);
  50686. }
  50687. DT = {
  50688. arrayRows: e,
  50689. objectRows: function(n, r, i, a) {
  50690. return Kl(n[r], this._dimensions[a]);
  50691. },
  50692. keyedColumns: e,
  50693. original: function(n, r, i, a) {
  50694. var o = n && (n.value == null ? n : n.value);
  50695. return Kl(o instanceof Array ? o[a] : o, this._dimensions[a]);
  50696. },
  50697. typedArray: function(n, r, i, a) {
  50698. return n[a];
  50699. }
  50700. };
  50701. }(), t;
  50702. }()
  50703. ), qJ = (
  50704. /** @class */
  50705. function() {
  50706. function t(e) {
  50707. this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e;
  50708. }
  50709. return t.prototype.dirty = function() {
  50710. this._setLocalSource([], []), this._storeList = [], this._dirty = !0;
  50711. }, t.prototype._setLocalSource = function(e, n) {
  50712. this._sourceList = e, this._upstreamSignList = n, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0);
  50713. }, t.prototype._getVersionSign = function() {
  50714. return this._sourceHost.uid + "_" + this._versionSignBase;
  50715. }, t.prototype.prepareSource = function() {
  50716. this._isDirty() && (this._createSource(), this._dirty = !1);
  50717. }, t.prototype._createSource = function() {
  50718. this._setLocalSource([], []);
  50719. var e = this._sourceHost, n = this._getUpstreamSourceManagers(), r = !!n.length, i, a;
  50720. if (hv(e)) {
  50721. var o = e, s = void 0, l = void 0, u = void 0;
  50722. if (r) {
  50723. var c = n[0];
  50724. c.prepareSource(), u = c.getSource(), s = u.data, l = u.sourceFormat, a = [c._getVersionSign()];
  50725. } else
  50726. s = o.get("data", !0), l = Br(s) ? Rs : Ba, a = [];
  50727. var f = this._getSourceMetaRawOption() || {}, d = u && u.metaRawOption || {}, h = We(f.seriesLayoutBy, d.seriesLayoutBy) || null, p = We(f.sourceHeader, d.sourceHeader), v = We(f.dimensions, d.dimensions), g = h !== d.seriesLayoutBy || !!p != !!d.sourceHeader || v;
  50728. i = g ? [GA(s, {
  50729. seriesLayoutBy: h,
  50730. sourceHeader: p,
  50731. dimensions: v
  50732. }, l)] : [];
  50733. } else {
  50734. var m = e;
  50735. if (r) {
  50736. var y = this._applyTransform(n);
  50737. i = y.sourceList, a = y.upstreamSignList;
  50738. } else {
  50739. var b = m.get("source", !0);
  50740. i = [GA(b, this._getSourceMetaRawOption(), null)], a = [];
  50741. }
  50742. }
  50743. process.env.NODE_ENV !== "production" && ke(i && a), this._setLocalSource(i, a);
  50744. }, t.prototype._applyTransform = function(e) {
  50745. var n = this._sourceHost, r = n.get("transform", !0), i = n.get("fromTransformResult", !0);
  50746. if (process.env.NODE_ENV !== "production" && ke(i != null || r != null), i != null) {
  50747. var a = "";
  50748. e.length !== 1 && (process.env.NODE_ENV !== "production" && (a = "When using `fromTransformResult`, there should be only one upstream dataset"), _z(a));
  50749. }
  50750. var o, s = [], l = [];
  50751. return k(e, function(u) {
  50752. u.prepareSource();
  50753. var c = u.getSource(i || 0), f = "";
  50754. i != null && !c && (process.env.NODE_ENV !== "production" && (f = "Can not retrieve result by `fromTransformResult`: " + i), _z(f)), s.push(c), l.push(u._getVersionSign());
  50755. }), r ? o = y4e(r, s, {
  50756. datasetIndex: n.componentIndex
  50757. }) : i != null && (o = [JLe(s[0])]), {
  50758. sourceList: o,
  50759. upstreamSignList: l
  50760. };
  50761. }, t.prototype._isDirty = function() {
  50762. if (this._dirty)
  50763. return !0;
  50764. for (var e = this._getUpstreamSourceManagers(), n = 0; n < e.length; n++) {
  50765. var r = e[n];
  50766. if (
  50767. // Consider the case that there is ancestor diry, call it recursively.
  50768. // The performance is probably not an issue because usually the chain is not long.
  50769. r._isDirty() || this._upstreamSignList[n] !== r._getVersionSign()
  50770. )
  50771. return !0;
  50772. }
  50773. }, t.prototype.getSource = function(e) {
  50774. e = e || 0;
  50775. var n = this._sourceList[e];
  50776. if (!n) {
  50777. var r = this._getUpstreamSourceManagers();
  50778. return r[0] && r[0].getSource(e);
  50779. }
  50780. return n;
  50781. }, t.prototype.getSharedDataStore = function(e) {
  50782. process.env.NODE_ENV !== "production" && ke(hv(this._sourceHost), "Can only call getDataStore on series source manager.");
  50783. var n = e.makeStoreSchema();
  50784. return this._innerGetDataStore(n.dimensions, e.source, n.hash);
  50785. }, t.prototype._innerGetDataStore = function(e, n, r) {
  50786. var i = 0, a = this._storeList, o = a[i];
  50787. o || (o = a[i] = {});
  50788. var s = o[r];
  50789. if (!s) {
  50790. var l = this._getUpstreamSourceManagers()[0];
  50791. hv(this._sourceHost) && l ? s = l._innerGetDataStore(e, n, r) : (s = new jA(), s.initData(new FJ(n, e.length), e)), o[r] = s;
  50792. }
  50793. return s;
  50794. }, t.prototype._getUpstreamSourceManagers = function() {
  50795. var e = this._sourceHost;
  50796. if (hv(e)) {
  50797. var n = ik(e);
  50798. return n ? [n.getSourceManager()] : [];
  50799. } else
  50800. return ce(TLe(e), function(r) {
  50801. return r.getSourceManager();
  50802. });
  50803. }, t.prototype._getSourceMetaRawOption = function() {
  50804. var e = this._sourceHost, n, r, i;
  50805. if (hv(e))
  50806. n = e.get("seriesLayoutBy", !0), r = e.get("sourceHeader", !0), i = e.get("dimensions", !0);
  50807. else if (!this._getUpstreamSourceManagers().length) {
  50808. var a = e;
  50809. n = a.get("seriesLayoutBy", !0), r = a.get("sourceHeader", !0), i = a.get("dimensions", !0);
  50810. }
  50811. return {
  50812. seriesLayoutBy: n,
  50813. sourceHeader: r,
  50814. dimensions: i
  50815. };
  50816. }, t;
  50817. }()
  50818. );
  50819. function bz(t) {
  50820. var e = t.option.transform;
  50821. e && bm(t.option.transform);
  50822. }
  50823. function hv(t) {
  50824. return t.mainType === "series";
  50825. }
  50826. function _z(t) {
  50827. throw new Error(t);
  50828. }
  50829. var KJ = "line-height:1";
  50830. function JJ(t, e) {
  50831. 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";
  50832. return e === "html" ? {
  50833. // eslint-disable-next-line max-len
  50834. nameStyle: "font-size:" + jr(r + "") + "px;color:" + jr(n) + ";font-weight:" + jr(i + ""),
  50835. // eslint-disable-next-line max-len
  50836. valueStyle: "font-size:" + jr(o + "") + "px;color:" + jr(a) + ";font-weight:" + jr(s + "")
  50837. } : {
  50838. nameStyle: {
  50839. fontSize: r,
  50840. fill: n,
  50841. fontWeight: i
  50842. },
  50843. valueStyle: {
  50844. fontSize: o,
  50845. fill: a,
  50846. fontWeight: s
  50847. }
  50848. };
  50849. }
  50850. var x4e = [0, 10, 20, 30], w4e = ["", `
  50851. `, `
  50852. `, `
  50853. `];
  50854. function tr(t, e) {
  50855. return e.type = t, e;
  50856. }
  50857. function ZA(t) {
  50858. return t.type === "section";
  50859. }
  50860. function eee(t) {
  50861. return ZA(t) ? C4e : T4e;
  50862. }
  50863. function tee(t) {
  50864. if (ZA(t)) {
  50865. var e = 0, n = t.blocks.length, r = n > 1 || n > 0 && !t.noHeader;
  50866. return k(t.blocks, function(i) {
  50867. var a = tee(i);
  50868. a >= e && (e = a + +(r && // 0 always can not be readable gap level.
  50869. (!a || ZA(i) && !i.noHeader)));
  50870. }), e;
  50871. }
  50872. return 0;
  50873. }
  50874. function C4e(t, e, n, r) {
  50875. var i = e.noHeader, a = P4e(tee(e)), o = [], s = e.blocks || [];
  50876. ke(!s || ue(s)), s = s || [];
  50877. var l = t.orderMode;
  50878. if (e.sortBlocks && l) {
  50879. s = s.slice();
  50880. var u = {
  50881. valueAsc: "asc",
  50882. valueDesc: "desc"
  50883. };
  50884. if (Ce(u, l)) {
  50885. var c = new ZJ(u[l], null);
  50886. s.sort(function(p, v) {
  50887. return c.evaluate(p.sortParam, v.sortParam);
  50888. });
  50889. } else l === "seriesDesc" && s.reverse();
  50890. }
  50891. k(s, function(p, v) {
  50892. var g = e.valueFormatter, m = eee(p)(
  50893. // Inherit valueFormatter
  50894. g ? le(le({}, t), {
  50895. valueFormatter: g
  50896. }) : t,
  50897. p,
  50898. v > 0 ? a.html : 0,
  50899. r
  50900. );
  50901. m != null && o.push(m);
  50902. });
  50903. var f = t.renderMode === "richText" ? o.join(a.richText) : UA(o.join(""), i ? n : a.html);
  50904. if (i)
  50905. return f;
  50906. var d = FA(e.header, "ordinal", t.useUTC), h = JJ(r, t.renderMode).nameStyle;
  50907. return t.renderMode === "richText" ? nee(t, d, h) + a.richText + f : UA('<div style="' + h + ";" + KJ + ';">' + jr(d) + "</div>" + f, n);
  50908. }
  50909. function T4e(t, e, n, r) {
  50910. 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(_) {
  50911. return _ = ue(_) ? _ : [_], ce(_, function(O, S) {
  50912. return FA(O, ue(h) ? h[S] : h, u);
  50913. });
  50914. };
  50915. if (!(a && o)) {
  50916. var f = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", i), d = a ? "" : FA(l, "ordinal", u), h = e.valueType, p = o ? [] : c(e.value, e.dataIndex), v = !s || !a, g = !s && a, m = JJ(r, i), y = m.nameStyle, b = m.valueStyle;
  50917. return i === "richText" ? (s ? "" : f) + (a ? "" : nee(t, d, y)) + (o ? "" : E4e(t, p, v, g, b)) : UA((s ? "" : f) + (a ? "" : $4e(d, !s, y)) + (o ? "" : A4e(p, v, g, b)), n);
  50918. }
  50919. }
  50920. function Oz(t, e, n, r, i, a) {
  50921. if (t) {
  50922. var o = eee(t), s = {
  50923. useUTC: i,
  50924. renderMode: n,
  50925. orderMode: r,
  50926. markupStyleCreator: e,
  50927. valueFormatter: t.valueFormatter
  50928. };
  50929. return o(s, t, 0, a);
  50930. }
  50931. }
  50932. function P4e(t) {
  50933. return {
  50934. html: x4e[t],
  50935. richText: w4e[t]
  50936. };
  50937. }
  50938. function UA(t, e) {
  50939. var n = '<div style="clear:both"></div>', r = "margin: " + e + "px 0 0";
  50940. return '<div style="' + r + ";" + KJ + ';">' + t + n + "</div>";
  50941. }
  50942. function $4e(t, e, n) {
  50943. var r = e ? "margin-left:2px" : "";
  50944. return '<span style="' + n + ";" + r + '">' + jr(t) + "</span>";
  50945. }
  50946. function A4e(t, e, n, r) {
  50947. var i = n ? "10px" : "20px", a = e ? "float:right;margin-left:" + i : "";
  50948. return t = ue(t) ? t : [t], '<span style="' + a + ";" + r + '">' + ce(t, function(o) {
  50949. return jr(o);
  50950. }).join("&nbsp;&nbsp;") + "</span>";
  50951. }
  50952. function nee(t, e, n) {
  50953. return t.markupStyleCreator.wrapRichTextStyle(e, n);
  50954. }
  50955. function E4e(t, e, n, r, i) {
  50956. var a = [i], o = r ? 10 : 20;
  50957. return n && a.push({
  50958. padding: [0, 0, 0, o],
  50959. align: "right"
  50960. }), t.markupStyleCreator.wrapRichTextStyle(ue(e) ? e.join(" ") : e, a);
  50961. }
  50962. function ree(t, e) {
  50963. var n = t.getData().getItemVisual(e, "style"), r = n[t.visualDrawType];
  50964. return Of(r);
  50965. }
  50966. function iee(t, e) {
  50967. var n = t.get("padding");
  50968. return n ?? (e === "richText" ? [8, 10] : 10);
  50969. }
  50970. var RT = (
  50971. /** @class */
  50972. function() {
  50973. function t() {
  50974. this.richTextStyles = {}, this._nextStyleNameId = cK();
  50975. }
  50976. return t.prototype._generateStyleName = function() {
  50977. return "__EC_aUTo_" + this._nextStyleNameId++;
  50978. }, t.prototype.makeTooltipMarker = function(e, n, r) {
  50979. var i = r === "richText" ? this._generateStyleName() : null, a = TJ({
  50980. color: n,
  50981. type: e,
  50982. renderMode: r,
  50983. markerId: i
  50984. });
  50985. return Oe(a) ? a : (process.env.NODE_ENV !== "production" && ke(i), this.richTextStyles[i] = a.style, a.content);
  50986. }, t.prototype.wrapRichTextStyle = function(e, n) {
  50987. var r = {};
  50988. ue(n) ? k(n, function(a) {
  50989. return le(r, a);
  50990. }) : le(r, n);
  50991. var i = this._generateStyleName();
  50992. return this.richTextStyles[i] = r, "{" + i + "|" + e + "}";
  50993. }, t;
  50994. }()
  50995. );
  50996. function aee(t) {
  50997. 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 = ue(s), u = ree(e, n), c, f, d, h;
  50998. if (o > 1 || l && !o) {
  50999. var p = M4e(s, e, n, a, u);
  51000. c = p.inlineValues, f = p.inlineValueTypes, d = p.blocks, h = p.inlineValues[0];
  51001. } else if (o) {
  51002. var v = i.getDimensionInfo(a[0]);
  51003. h = c = Gh(i, n, a[0]), f = v.type;
  51004. } else
  51005. h = c = l ? s[0] : s;
  51006. var g = ER(e), m = g && e.name || "", y = i.getName(n), b = r ? m : y;
  51007. return tr("section", {
  51008. header: m,
  51009. // When series name is not specified, do not show a header line with only '-'.
  51010. // This case always happens in tooltip.trigger: 'item'.
  51011. noHeader: r || !g,
  51012. sortParam: h,
  51013. blocks: [tr("nameValue", {
  51014. markerType: "item",
  51015. markerColor: u,
  51016. // Do not mix display seriesName and itemName in one tooltip,
  51017. // which might confuses users.
  51018. name: b,
  51019. // name dimension might be auto assigned, where the name might
  51020. // be not readable. So we check trim here.
  51021. noName: !ba(b),
  51022. value: c,
  51023. valueType: f,
  51024. dataIndex: n
  51025. })].concat(d || [])
  51026. });
  51027. }
  51028. function M4e(t, e, n, r, i) {
  51029. var a = e.getData(), o = Ma(t, function(f, d, h) {
  51030. var p = a.getDimensionInfo(h);
  51031. return f = f || p && p.tooltip !== !1 && p.displayName != null;
  51032. }, !1), s = [], l = [], u = [];
  51033. r.length ? k(r, function(f) {
  51034. c(Gh(a, n, f), f);
  51035. }) : k(t, c);
  51036. function c(f, d) {
  51037. var h = a.getDimensionInfo(d);
  51038. !h || h.otherDims.tooltip === !1 || (o ? u.push(tr("nameValue", {
  51039. markerType: "subItem",
  51040. markerColor: i,
  51041. name: h.displayName,
  51042. value: f,
  51043. valueType: h.type
  51044. })) : (s.push(f), l.push(h.type)));
  51045. }
  51046. return {
  51047. inlineValues: s,
  51048. inlineValueTypes: l,
  51049. blocks: u
  51050. };
  51051. }
  51052. var pl = bt();
  51053. function ob(t, e) {
  51054. return t.getName(e) || t.getId(e);
  51055. }
  51056. var j_ = "__universalTransitionEnabled", Ht = (
  51057. /** @class */
  51058. function(t) {
  51059. q(e, t);
  51060. function e() {
  51061. var n = t !== null && t.apply(this, arguments) || this;
  51062. return n._selectedDataIndicesMap = {}, n;
  51063. }
  51064. return e.prototype.init = function(n, r, i) {
  51065. this.seriesIndex = this.componentIndex, this.dataTask = Bg({
  51066. count: D4e,
  51067. reset: R4e
  51068. }), this.dataTask.context = {
  51069. model: this
  51070. }, this.mergeDefaultAndTheme(n, i);
  51071. var a = pl(this).sourceManager = new qJ(this);
  51072. a.prepareSource();
  51073. var o = this.getInitialData(n, i);
  51074. xz(o, this), this.dataTask.context.data = o, process.env.NODE_ENV !== "production" && ke(o, "getInitialData returned invalid data."), pl(this).dataBeforeProcessed = o, Sz(this), this._initSelectedMapFromData(o);
  51075. }, e.prototype.mergeDefaultAndTheme = function(n, r) {
  51076. var i = Em(this), a = i ? wp(n) : {}, o = this.subType;
  51077. rt.hasClass(o) && (o += "Series"), qe(n, r.getTheme().get(this.subType)), qe(n, this.getDefaultOption()), mf(n, "label", ["show"]), this.fillDataTextStyle(n.data), i && cu(n, a, i);
  51078. }, e.prototype.mergeOption = function(n, r) {
  51079. n = qe(this.option, n, !0), this.fillDataTextStyle(n.data);
  51080. var i = Em(this);
  51081. i && cu(this.option, n, i);
  51082. var a = pl(this).sourceManager;
  51083. a.dirty(), a.prepareSource();
  51084. var o = this.getInitialData(n, r);
  51085. xz(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, pl(this).dataBeforeProcessed = o, Sz(this), this._initSelectedMapFromData(o);
  51086. }, e.prototype.fillDataTextStyle = function(n) {
  51087. if (n && !Br(n))
  51088. for (var r = ["show"], i = 0; i < n.length; i++)
  51089. n[i] && n[i].label && mf(n[i], "label", r);
  51090. }, e.prototype.getInitialData = function(n, r) {
  51091. }, e.prototype.appendData = function(n) {
  51092. var r = this.getRawData();
  51093. r.appendData(n.data);
  51094. }, e.prototype.getData = function(n) {
  51095. var r = XA(this);
  51096. if (r) {
  51097. var i = r.context.data;
  51098. return n == null || !i.getLinkedData ? i : i.getLinkedData(n);
  51099. } else
  51100. return pl(this).data;
  51101. }, e.prototype.getAllData = function() {
  51102. var n = this.getData();
  51103. return n && n.getLinkedDataAll ? n.getLinkedDataAll() : [{
  51104. data: n
  51105. }];
  51106. }, e.prototype.setData = function(n) {
  51107. var r = XA(this);
  51108. if (r) {
  51109. var i = r.context;
  51110. i.outputData = n, r !== this.dataTask && (i.data = n);
  51111. }
  51112. pl(this).data = n;
  51113. }, e.prototype.getEncode = function() {
  51114. var n = this.get("encode", !0);
  51115. if (n)
  51116. return Pe(n);
  51117. }, e.prototype.getSourceManager = function() {
  51118. return pl(this).sourceManager;
  51119. }, e.prototype.getSource = function() {
  51120. return this.getSourceManager().getSource();
  51121. }, e.prototype.getRawData = function() {
  51122. return pl(this).dataBeforeProcessed;
  51123. }, e.prototype.getColorBy = function() {
  51124. var n = this.get("colorBy");
  51125. return n || "series";
  51126. }, e.prototype.isColorBySeries = function() {
  51127. return this.getColorBy() === "series";
  51128. }, e.prototype.getBaseAxis = function() {
  51129. var n = this.coordinateSystem;
  51130. return n && n.getBaseAxis && n.getBaseAxis();
  51131. }, e.prototype.formatTooltip = function(n, r, i) {
  51132. return aee({
  51133. series: this,
  51134. dataIndex: n,
  51135. multipleSeries: r
  51136. });
  51137. }, e.prototype.isAnimationEnabled = function() {
  51138. var n = this.ecModel;
  51139. if (vt.node && !(n && n.ssr))
  51140. return !1;
  51141. var r = this.getShallow("animation");
  51142. return r && this.getData().count() > this.getShallow("animationThreshold") && (r = !1), !!r;
  51143. }, e.prototype.restoreData = function() {
  51144. this.dataTask.dirty();
  51145. }, e.prototype.getColorFromPalette = function(n, r, i) {
  51146. var a = this.ecModel, o = ak.prototype.getColorFromPalette.call(this, n, r, i);
  51147. return o || (o = a.getColorFromPalette(n, r, i)), o;
  51148. }, e.prototype.coordDimToDataDim = function(n) {
  51149. return this.getRawData().mapDimensionsAll(n);
  51150. }, e.prototype.getProgressive = function() {
  51151. return this.get("progressive");
  51152. }, e.prototype.getProgressiveThreshold = function() {
  51153. return this.get("progressiveThreshold");
  51154. }, e.prototype.select = function(n, r) {
  51155. this._innerSelect(this.getData(r), n);
  51156. }, e.prototype.unselect = function(n, r) {
  51157. var i = this.option.selectedMap;
  51158. if (i) {
  51159. var a = this.option.selectedMode, o = this.getData(r);
  51160. if (a === "series" || i === "all") {
  51161. this.option.selectedMap = {}, this._selectedDataIndicesMap = {};
  51162. return;
  51163. }
  51164. for (var s = 0; s < n.length; s++) {
  51165. var l = n[s], u = ob(o, l);
  51166. i[u] = !1, this._selectedDataIndicesMap[u] = -1;
  51167. }
  51168. }
  51169. }, e.prototype.toggleSelect = function(n, r) {
  51170. for (var i = [], a = 0; a < n.length; a++)
  51171. i[0] = n[a], this.isSelected(n[a], r) ? this.unselect(i, r) : this.select(i, r);
  51172. }, e.prototype.getSelectedDataIndices = function() {
  51173. if (this.option.selectedMap === "all")
  51174. return [].slice.call(this.getData().getIndices());
  51175. for (var n = this._selectedDataIndicesMap, r = st(n), i = [], a = 0; a < r.length; a++) {
  51176. var o = n[r[a]];
  51177. o >= 0 && i.push(o);
  51178. }
  51179. return i;
  51180. }, e.prototype.isSelected = function(n, r) {
  51181. var i = this.option.selectedMap;
  51182. if (!i)
  51183. return !1;
  51184. var a = this.getData(r);
  51185. return (i === "all" || i[ob(a, n)]) && !a.getItemModel(n).get(["select", "disabled"]);
  51186. }, e.prototype.isUniversalTransitionEnabled = function() {
  51187. if (this[j_])
  51188. return !0;
  51189. var n = this.option.universalTransition;
  51190. return n ? n === !0 ? !0 : n && n.enabled : !1;
  51191. }, e.prototype._innerSelect = function(n, r) {
  51192. var i, a, o = this.option, s = o.selectedMode, l = r.length;
  51193. if (!(!s || !l)) {
  51194. if (s === "series")
  51195. o.selectedMap = "all";
  51196. else if (s === "multiple") {
  51197. Ie(o.selectedMap) || (o.selectedMap = {});
  51198. for (var u = o.selectedMap, c = 0; c < l; c++) {
  51199. var f = r[c], d = ob(n, f);
  51200. u[d] = !0, this._selectedDataIndicesMap[d] = n.getRawIndex(f);
  51201. }
  51202. } else if (s === "single" || s === !0) {
  51203. var h = r[l - 1], d = ob(n, h);
  51204. o.selectedMap = (i = {}, i[d] = !0, i), this._selectedDataIndicesMap = (a = {}, a[d] = n.getRawIndex(h), a);
  51205. }
  51206. }
  51207. }, e.prototype._initSelectedMapFromData = function(n) {
  51208. if (!this.option.selectedMap) {
  51209. var r = [];
  51210. n.hasItemOption && n.each(function(i) {
  51211. var a = n.getRawDataItem(i);
  51212. a && a.selected && r.push(i);
  51213. }), r.length > 0 && this._innerSelect(n, r);
  51214. }
  51215. }, e.registerClass = function(n) {
  51216. return rt.registerClass(n);
  51217. }, e.protoInitialize = function() {
  51218. var n = e.prototype;
  51219. n.type = "series.__base__", n.seriesIndex = 0, n.ignoreStyleOnData = !1, n.hasSymbolVisual = !1, n.defaultSymbol = "circle", n.visualStyleAccessPath = "itemStyle", n.visualDrawType = "fill";
  51220. }(), e;
  51221. }(rt)
  51222. );
  51223. xn(Ht, lw);
  51224. xn(Ht, ak);
  51225. bK(Ht, rt);
  51226. function Sz(t) {
  51227. var e = t.name;
  51228. ER(t) || (t.name = I4e(t) || e);
  51229. }
  51230. function I4e(t) {
  51231. var e = t.getRawData(), n = e.mapDimensionsAll("seriesName"), r = [];
  51232. return k(n, function(i) {
  51233. var a = e.getDimensionInfo(i);
  51234. a.displayName && r.push(a.displayName);
  51235. }), r.join(" ");
  51236. }
  51237. function D4e(t) {
  51238. return t.model.getRawData().count();
  51239. }
  51240. function R4e(t) {
  51241. var e = t.model;
  51242. return e.setData(e.getRawData().cloneShallow()), k4e;
  51243. }
  51244. function k4e(t, e) {
  51245. e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
  51246. }
  51247. function xz(t, e) {
  51248. k(_m(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), function(n) {
  51249. t.wrapMethod(n, Ue(L4e, e));
  51250. });
  51251. }
  51252. function L4e(t, e) {
  51253. var n = XA(t);
  51254. return n && n.setOutputEnd((e || this).count()), e;
  51255. }
  51256. function XA(t) {
  51257. var e = (t.ecModel || {}).scheduler, n = e && e.getPipeline(t.uid);
  51258. if (n) {
  51259. var r = n.currentTask;
  51260. if (r) {
  51261. var i = r.agentStubMap;
  51262. i && (r = i.get(t.uid));
  51263. }
  51264. return r;
  51265. }
  51266. }
  51267. var Xt = (
  51268. /** @class */
  51269. function() {
  51270. function t() {
  51271. this.group = new Ve(), this.uid = xp("viewComponent");
  51272. }
  51273. return t.prototype.init = function(e, n) {
  51274. }, t.prototype.render = function(e, n, r, i) {
  51275. }, t.prototype.dispose = function(e, n) {
  51276. }, t.prototype.updateView = function(e, n, r, i) {
  51277. }, t.prototype.updateLayout = function(e, n, r, i) {
  51278. }, t.prototype.updateVisual = function(e, n, r, i) {
  51279. }, t.prototype.toggleBlurSeries = function(e, n, r) {
  51280. }, t.prototype.eachRendered = function(e) {
  51281. var n = this.group;
  51282. n && n.traverse(e);
  51283. }, t;
  51284. }()
  51285. );
  51286. IR(Xt);
  51287. Hx(Xt);
  51288. function Tp() {
  51289. var t = bt();
  51290. return function(e) {
  51291. 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);
  51292. return (i !== o || a !== s) && "reset";
  51293. };
  51294. }
  51295. var oee = bt(), N4e = Tp(), zt = (
  51296. /** @class */
  51297. function() {
  51298. function t() {
  51299. this.group = new Ve(), this.uid = xp("viewChart"), this.renderTask = Bg({
  51300. plan: B4e,
  51301. reset: z4e
  51302. }), this.renderTask.context = {
  51303. view: this
  51304. };
  51305. }
  51306. return t.prototype.init = function(e, n) {
  51307. }, t.prototype.render = function(e, n, r, i) {
  51308. if (process.env.NODE_ENV !== "production")
  51309. throw new Error("render method must been implemented");
  51310. }, t.prototype.highlight = function(e, n, r, i) {
  51311. var a = e.getData(i && i.dataType);
  51312. if (!a) {
  51313. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + i.dataType);
  51314. return;
  51315. }
  51316. Cz(a, i, "emphasis");
  51317. }, t.prototype.downplay = function(e, n, r, i) {
  51318. var a = e.getData(i && i.dataType);
  51319. if (!a) {
  51320. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + i.dataType);
  51321. return;
  51322. }
  51323. Cz(a, i, "normal");
  51324. }, t.prototype.remove = function(e, n) {
  51325. this.group.removeAll();
  51326. }, t.prototype.dispose = function(e, n) {
  51327. }, t.prototype.updateView = function(e, n, r, i) {
  51328. this.render(e, n, r, i);
  51329. }, t.prototype.updateLayout = function(e, n, r, i) {
  51330. this.render(e, n, r, i);
  51331. }, t.prototype.updateVisual = function(e, n, r, i) {
  51332. this.render(e, n, r, i);
  51333. }, t.prototype.eachRendered = function(e) {
  51334. Tu(this.group, e);
  51335. }, t.markUpdateMethod = function(e, n) {
  51336. oee(e).updateMethod = n;
  51337. }, t.protoInitialize = function() {
  51338. var e = t.prototype;
  51339. e.type = "chart";
  51340. }(), t;
  51341. }()
  51342. );
  51343. function wz(t, e, n) {
  51344. t && lu(t) && (e === "emphasis" ? Zs : Us)(t, n);
  51345. }
  51346. function Cz(t, e, n) {
  51347. var r = yf(t, e), i = e && e.highlightKey != null ? gke(e.highlightKey) : null;
  51348. r != null ? k(Qt(r), function(a) {
  51349. wz(t.getItemGraphicEl(a), n, i);
  51350. }) : t.eachItemGraphicEl(function(a) {
  51351. wz(a, n, i);
  51352. });
  51353. }
  51354. IR(zt, ["dispose"]);
  51355. Hx(zt);
  51356. function B4e(t) {
  51357. return N4e(t.model);
  51358. }
  51359. function z4e(t) {
  51360. var e = t.model, n = t.ecModel, r = t.api, i = t.payload, a = e.pipelineContext.progressiveRender, o = t.view, s = i && oee(i).updateMethod, l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
  51361. return l !== "render" && o[l](e, n, r, i), V4e[l];
  51362. }
  51363. var V4e = {
  51364. incrementalPrepareRender: {
  51365. progress: function(t, e) {
  51366. e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
  51367. }
  51368. },
  51369. render: {
  51370. // Put view.render in `progress` to support appendData. But in this case
  51371. // view.render should not be called in reset, otherwise it will be called
  51372. // twise. Use `forceFirstProgress` to make sure that view.render is called
  51373. // in any cases.
  51374. forceFirstProgress: !0,
  51375. progress: function(t, e) {
  51376. e.view.render(e.model, e.ecModel, e.api, e.payload);
  51377. }
  51378. }
  51379. }, gO = "\0__throttleOriginMethod", Tz = "\0__throttleRate", Pz = "\0__throttleType";
  51380. function cw(t, e, n) {
  51381. var r, i = 0, a = 0, o = null, s, l, u, c;
  51382. e = e || 0;
  51383. function f() {
  51384. a = (/* @__PURE__ */ new Date()).getTime(), o = null, t.apply(l, u || []);
  51385. }
  51386. var d = function() {
  51387. for (var h = [], p = 0; p < arguments.length; p++)
  51388. h[p] = arguments[p];
  51389. r = (/* @__PURE__ */ new Date()).getTime(), l = this, u = h;
  51390. var v = c || e, g = c || n;
  51391. c = null, s = r - (g ? i : a) - v, clearTimeout(o), g ? o = setTimeout(f, v) : s >= 0 ? f() : o = setTimeout(f, -s), i = r;
  51392. };
  51393. return d.clear = function() {
  51394. o && (clearTimeout(o), o = null);
  51395. }, d.debounceNextCall = function(h) {
  51396. c = h;
  51397. }, d;
  51398. }
  51399. function Pp(t, e, n, r) {
  51400. var i = t[e];
  51401. if (i) {
  51402. var a = i[gO] || i, o = i[Pz], s = i[Tz];
  51403. if (s !== n || o !== r) {
  51404. if (n == null || !r)
  51405. return t[e] = a;
  51406. i = t[e] = cw(a, n, r === "debounce"), i[gO] = a, i[Pz] = r, i[Tz] = n;
  51407. }
  51408. return i;
  51409. }
  51410. }
  51411. function Im(t, e) {
  51412. var n = t[e];
  51413. n && n[gO] && (n.clear && n.clear(), t[e] = n[gO]);
  51414. }
  51415. var $z = bt(), Az = {
  51416. itemStyle: bf(gJ, !0),
  51417. lineStyle: bf(vJ, !0)
  51418. }, F4e = {
  51419. lineStyle: "stroke",
  51420. itemStyle: "fill"
  51421. };
  51422. function see(t, e) {
  51423. var n = t.visualStyleMapper || Az[e];
  51424. return n || (console.warn("Unknown style type '" + e + "'."), Az.itemStyle);
  51425. }
  51426. function lee(t, e) {
  51427. var n = t.visualDrawType || F4e[e];
  51428. return n || (console.warn("Unknown style type '" + e + "'."), "fill");
  51429. }
  51430. var W4e = {
  51431. createOnAllSeries: !0,
  51432. performRawSeries: !0,
  51433. reset: function(t, e) {
  51434. var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = t.getModel(r), a = see(t, r), o = a(i), s = i.getShallow("decal");
  51435. s && (n.setVisual("decal", s), s.dirty = !0);
  51436. var l = lee(t, r), u = o[l], c = Me(u) ? u : null, f = o.fill === "auto" || o.stroke === "auto";
  51437. if (!o[l] || c || f) {
  51438. var d = t.getColorFromPalette(
  51439. // TODO series count changed.
  51440. t.name,
  51441. null,
  51442. e.getSeriesCount()
  51443. );
  51444. o[l] || (o[l] = d, n.setVisual("colorFromPalette", !0)), o.fill = o.fill === "auto" || Me(o.fill) ? d : o.fill, o.stroke = o.stroke === "auto" || Me(o.stroke) ? d : o.stroke;
  51445. }
  51446. if (n.setVisual("style", o), n.setVisual("drawType", l), !e.isSeriesFiltered(t) && c)
  51447. return n.setVisual("colorFromPalette", !1), {
  51448. dataEach: function(h, p) {
  51449. var v = t.getDataParams(p), g = le({}, o);
  51450. g[l] = c(v), h.setItemVisual(p, "style", g);
  51451. }
  51452. };
  51453. }
  51454. }, pv = new Wt(), Q4e = {
  51455. createOnAllSeries: !0,
  51456. performRawSeries: !0,
  51457. reset: function(t, e) {
  51458. if (!(t.ignoreStyleOnData || e.isSeriesFiltered(t))) {
  51459. var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = see(t, r), a = n.getVisual("drawType");
  51460. return {
  51461. dataEach: n.hasItemOption ? function(o, s) {
  51462. var l = o.getRawDataItem(s);
  51463. if (l && l[r]) {
  51464. pv.option = l[r];
  51465. var u = i(pv), c = o.ensureUniqueItemVisual(s, "style");
  51466. le(c, u), pv.option.decal && (o.setItemVisual(s, "decal", pv.option.decal), pv.option.decal.dirty = !0), a in u && o.setItemVisual(s, "colorFromPalette", !1);
  51467. }
  51468. } : null
  51469. };
  51470. }
  51471. }
  51472. }, H4e = {
  51473. performRawSeries: !0,
  51474. overallReset: function(t) {
  51475. var e = Pe();
  51476. t.eachSeries(function(n) {
  51477. var r = n.getColorBy();
  51478. if (!n.isColorBySeries()) {
  51479. var i = n.type + "-" + r, a = e.get(i);
  51480. a || (a = {}, e.set(i, a)), $z(n).scope = a;
  51481. }
  51482. }), t.eachSeries(function(n) {
  51483. if (!(n.isColorBySeries() || t.isSeriesFiltered(n))) {
  51484. var r = n.getRawData(), i = {}, a = n.getData(), o = $z(n).scope, s = n.visualStyleAccessPath || "itemStyle", l = lee(n, s);
  51485. a.each(function(u) {
  51486. var c = a.getRawIndex(u);
  51487. i[c] = u;
  51488. }), r.each(function(u) {
  51489. var c = i[u], f = a.getItemVisual(c, "colorFromPalette");
  51490. if (f) {
  51491. var d = a.ensureUniqueItemVisual(c, "style"), h = r.getName(u) || u + "", p = r.count();
  51492. d[l] = n.getColorFromPalette(h, o, p);
  51493. }
  51494. });
  51495. }
  51496. });
  51497. }
  51498. }, sb = Math.PI;
  51499. function G4e(t, e) {
  51500. e = e || {}, Re(e, {
  51501. text: "loading",
  51502. textColor: "#000",
  51503. fontSize: 12,
  51504. fontWeight: "normal",
  51505. fontStyle: "normal",
  51506. fontFamily: "sans-serif",
  51507. maskColor: "rgba(255, 255, 255, 0.8)",
  51508. showSpinner: !0,
  51509. color: "#5470c6",
  51510. spinnerRadius: 10,
  51511. lineWidth: 5,
  51512. zlevel: 0
  51513. });
  51514. var n = new Ve(), r = new mt({
  51515. style: {
  51516. fill: e.maskColor
  51517. },
  51518. zlevel: e.zlevel,
  51519. z: 1e4
  51520. });
  51521. n.add(r);
  51522. var i = new gt({
  51523. style: {
  51524. text: e.text,
  51525. fill: e.textColor,
  51526. fontSize: e.fontSize,
  51527. fontWeight: e.fontWeight,
  51528. fontStyle: e.fontStyle,
  51529. fontFamily: e.fontFamily
  51530. },
  51531. zlevel: e.zlevel,
  51532. z: 10001
  51533. }), a = new mt({
  51534. style: {
  51535. fill: "none"
  51536. },
  51537. textContent: i,
  51538. textConfig: {
  51539. position: "right",
  51540. distance: 10
  51541. },
  51542. zlevel: e.zlevel,
  51543. z: 10001
  51544. });
  51545. n.add(a);
  51546. var o;
  51547. return e.showSpinner && (o = new qx({
  51548. shape: {
  51549. startAngle: -sb / 2,
  51550. endAngle: -sb / 2 + 0.1,
  51551. r: e.spinnerRadius
  51552. },
  51553. style: {
  51554. stroke: e.color,
  51555. lineCap: "round",
  51556. lineWidth: e.lineWidth
  51557. },
  51558. zlevel: e.zlevel,
  51559. z: 10001
  51560. }), o.animateShape(!0).when(1e3, {
  51561. endAngle: sb * 3 / 2
  51562. }).start("circularInOut"), o.animateShape(!0).when(1e3, {
  51563. startAngle: sb * 3 / 2
  51564. }).delay(300).start("circularInOut"), n.add(o)), n.resize = function() {
  51565. 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;
  51566. e.showSpinner && o.setShape({
  51567. cx: u,
  51568. cy: c
  51569. }), a.setShape({
  51570. x: u - l,
  51571. y: c - l,
  51572. width: l * 2,
  51573. height: l * 2
  51574. }), r.setShape({
  51575. x: 0,
  51576. y: 0,
  51577. width: t.getWidth(),
  51578. height: t.getHeight()
  51579. });
  51580. }, n.resize(), n;
  51581. }
  51582. var uee = (
  51583. /** @class */
  51584. function() {
  51585. function t(e, n, r, i) {
  51586. this._stageTaskMap = Pe(), this.ecInstance = e, this.api = n, r = this._dataProcessorHandlers = r.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = r.concat(i);
  51587. }
  51588. return t.prototype.restoreData = function(e, n) {
  51589. e.restoreData(n), this._stageTaskMap.each(function(r) {
  51590. var i = r.overallTask;
  51591. i && i.dirty();
  51592. });
  51593. }, t.prototype.getPerformArgs = function(e, n) {
  51594. if (e.__pipeline) {
  51595. 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;
  51596. return {
  51597. step: o,
  51598. modBy: l,
  51599. modDataCount: s
  51600. };
  51601. }
  51602. }, t.prototype.getPipeline = function(e) {
  51603. return this._pipelineMap.get(e);
  51604. }, t.prototype.updateStreamModes = function(e, n) {
  51605. 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;
  51606. e.pipelineContext = r.context = {
  51607. progressiveRender: o,
  51608. modDataCount: l,
  51609. large: s
  51610. };
  51611. }, t.prototype.restorePipelines = function(e) {
  51612. var n = this, r = n._pipelineMap = Pe();
  51613. e.eachSeries(function(i) {
  51614. var a = i.getProgressive(), o = i.uid;
  51615. r.set(o, {
  51616. id: o,
  51617. head: null,
  51618. tail: null,
  51619. threshold: i.getProgressiveThreshold(),
  51620. progressiveEnabled: a && !(i.preventIncremental && i.preventIncremental()),
  51621. blockIndex: -1,
  51622. step: Math.round(a || 700),
  51623. count: 0
  51624. }), n._pipe(i, i.dataTask);
  51625. });
  51626. }, t.prototype.prepareStageTasks = function() {
  51627. var e = this._stageTaskMap, n = this.api.getModel(), r = this.api;
  51628. k(this._allHandlers, function(i) {
  51629. var a = e.get(i.uid) || e.set(i.uid, {}), o = "";
  51630. process.env.NODE_ENV !== "production" && (o = '"reset" and "overallReset" must not be both specified.'), ke(!(i.reset && i.overallReset), o), i.reset && this._createSeriesStageTask(i, a, n, r), i.overallReset && this._createOverallStageTask(i, a, n, r);
  51631. }, this);
  51632. }, t.prototype.prepareView = function(e, n, r, i) {
  51633. var a = e.renderTask, o = a.context;
  51634. o.model = n, o.ecModel = r, o.api = i, a.__block = !e.incrementalPrepareRender, this._pipe(n, a);
  51635. }, t.prototype.performDataProcessorTasks = function(e, n) {
  51636. this._performStageTasks(this._dataProcessorHandlers, e, n, {
  51637. block: !0
  51638. });
  51639. }, t.prototype.performVisualTasks = function(e, n, r) {
  51640. this._performStageTasks(this._visualHandlers, e, n, r);
  51641. }, t.prototype._performStageTasks = function(e, n, r, i) {
  51642. i = i || {};
  51643. var a = !1, o = this;
  51644. k(e, function(l, u) {
  51645. if (!(i.visualType && i.visualType !== l.visualType)) {
  51646. var c = o._stageTaskMap.get(l.uid), f = c.seriesTaskMap, d = c.overallTask;
  51647. if (d) {
  51648. var h, p = d.agentStubMap;
  51649. p.each(function(g) {
  51650. s(i, g) && (g.dirty(), h = !0);
  51651. }), h && d.dirty(), o.updatePayload(d, r);
  51652. var v = o.getPerformArgs(d, i.block);
  51653. p.each(function(g) {
  51654. g.perform(v);
  51655. }), d.perform(v) && (a = !0);
  51656. } else f && f.each(function(g, m) {
  51657. s(i, g) && g.dirty();
  51658. var y = o.getPerformArgs(g, i.block);
  51659. y.skip = !l.performRawSeries && n.isSeriesFiltered(g.context.model), o.updatePayload(g, r), g.perform(y) && (a = !0);
  51660. });
  51661. }
  51662. });
  51663. function s(l, u) {
  51664. return l.setDirty && (!l.dirtyMap || l.dirtyMap.get(u.__pipeline.id));
  51665. }
  51666. this.unfinished = a || this.unfinished;
  51667. }, t.prototype.performSeriesTasks = function(e) {
  51668. var n;
  51669. e.eachSeries(function(r) {
  51670. n = r.dataTask.perform() || n;
  51671. }), this.unfinished = n || this.unfinished;
  51672. }, t.prototype.plan = function() {
  51673. this._pipelineMap.each(function(e) {
  51674. var n = e.tail;
  51675. do {
  51676. if (n.__block) {
  51677. e.blockIndex = n.__idxInPipeline;
  51678. break;
  51679. }
  51680. n = n.getUpstream();
  51681. } while (n);
  51682. });
  51683. }, t.prototype.updatePayload = function(e, n) {
  51684. n !== "remain" && (e.context.payload = n);
  51685. }, t.prototype._createSeriesStageTask = function(e, n, r, i) {
  51686. var a = this, o = n.seriesTaskMap, s = n.seriesTaskMap = Pe(), l = e.seriesType, u = e.getTargetSeries;
  51687. e.createOnAllSeries ? r.eachRawSeries(c) : l ? r.eachRawSeriesByType(l, c) : u && u(r, i).each(c);
  51688. function c(f) {
  51689. var d = f.uid, h = s.set(d, o && o.get(d) || Bg({
  51690. plan: Y4e,
  51691. reset: q4e,
  51692. count: J4e
  51693. }));
  51694. h.context = {
  51695. model: f,
  51696. ecModel: r,
  51697. api: i,
  51698. // PENDING: `useClearVisual` not used?
  51699. useClearVisual: e.isVisual && !e.isLayout,
  51700. plan: e.plan,
  51701. reset: e.reset,
  51702. scheduler: a
  51703. }, a._pipe(f, h);
  51704. }
  51705. }, t.prototype._createOverallStageTask = function(e, n, r, i) {
  51706. var a = this, o = n.overallTask = n.overallTask || Bg({
  51707. reset: j4e
  51708. });
  51709. o.context = {
  51710. ecModel: r,
  51711. api: i,
  51712. overallReset: e.overallReset,
  51713. scheduler: a
  51714. };
  51715. var s = o.agentStubMap, l = o.agentStubMap = Pe(), u = e.seriesType, c = e.getTargetSeries, f = !0, d = !1, h = "";
  51716. process.env.NODE_ENV !== "production" && (h = '"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'), ke(!e.createOnAllSeries, h), u ? r.eachRawSeriesByType(u, p) : c ? c(r, i).each(p) : (f = !1, k(r.getSeries(), p));
  51717. function p(v) {
  51718. var g = v.uid, m = l.set(g, s && s.get(g) || // When the result of `getTargetSeries` changed, the overallTask
  51719. // should be set as dirty and re-performed.
  51720. (d = !0, Bg({
  51721. reset: Z4e,
  51722. onDirty: X4e
  51723. })));
  51724. m.context = {
  51725. model: v,
  51726. overallProgress: f
  51727. // FIXME:TS never used, so comment it
  51728. // modifyOutputEnd: modifyOutputEnd
  51729. }, m.agent = o, m.__block = f, a._pipe(v, m);
  51730. }
  51731. d && o.dirty();
  51732. }, t.prototype._pipe = function(e, n) {
  51733. var r = e.uid, i = this._pipelineMap.get(r);
  51734. !i.head && (i.head = n), i.tail && i.tail.pipe(n), i.tail = n, n.__idxInPipeline = i.count++, n.__pipeline = i;
  51735. }, t.wrapStageHandler = function(e, n) {
  51736. return Me(e) && (e = {
  51737. overallReset: e,
  51738. seriesType: e8e(e)
  51739. }), e.uid = xp("stageHandler"), n && (e.visualType = n), e;
  51740. }, t;
  51741. }()
  51742. );
  51743. function j4e(t) {
  51744. t.overallReset(t.ecModel, t.api, t.payload);
  51745. }
  51746. function Z4e(t) {
  51747. return t.overallProgress && U4e;
  51748. }
  51749. function U4e() {
  51750. this.agent.dirty(), this.getDownstream().dirty();
  51751. }
  51752. function X4e() {
  51753. this.agent && this.agent.dirty();
  51754. }
  51755. function Y4e(t) {
  51756. return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null;
  51757. }
  51758. function q4e(t) {
  51759. t.useClearVisual && t.data.clearAllVisual();
  51760. var e = t.resetDefines = Qt(t.reset(t.model, t.ecModel, t.api, t.payload));
  51761. return e.length > 1 ? ce(e, function(n, r) {
  51762. return cee(r);
  51763. }) : K4e;
  51764. }
  51765. var K4e = cee(0);
  51766. function cee(t) {
  51767. return function(e, n) {
  51768. var r = n.data, i = n.resetDefines[t];
  51769. if (i && i.dataEach)
  51770. for (var a = e.start; a < e.end; a++)
  51771. i.dataEach(r, a);
  51772. else i && i.progress && i.progress(e, r);
  51773. };
  51774. }
  51775. function J4e(t) {
  51776. return t.data.count();
  51777. }
  51778. function e8e(t) {
  51779. mO = null;
  51780. try {
  51781. t(Dm, fee);
  51782. } catch {
  51783. }
  51784. return mO;
  51785. }
  51786. var Dm = {}, fee = {}, mO;
  51787. dee(Dm, ok);
  51788. dee(fee, LJ);
  51789. Dm.eachSeriesByType = Dm.eachRawSeriesByType = function(t) {
  51790. mO = t;
  51791. };
  51792. Dm.eachComponent = function(t) {
  51793. t.mainType === "series" && t.subType && (mO = t.subType);
  51794. };
  51795. function dee(t, e) {
  51796. for (var n in e.prototype)
  51797. t[n] = On;
  51798. }
  51799. var Ez = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"];
  51800. const t8e = {
  51801. color: Ez,
  51802. colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], Ez]
  51803. };
  51804. var Wr = "#B9B8CE", Mz = "#100C2A", lb = function() {
  51805. return {
  51806. axisLine: {
  51807. lineStyle: {
  51808. color: Wr
  51809. }
  51810. },
  51811. splitLine: {
  51812. lineStyle: {
  51813. color: "#484753"
  51814. }
  51815. },
  51816. splitArea: {
  51817. areaStyle: {
  51818. color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
  51819. }
  51820. },
  51821. minorSplitLine: {
  51822. lineStyle: {
  51823. color: "#20203B"
  51824. }
  51825. }
  51826. };
  51827. }, Iz = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], hee = {
  51828. darkMode: !0,
  51829. color: Iz,
  51830. backgroundColor: Mz,
  51831. axisPointer: {
  51832. lineStyle: {
  51833. color: "#817f91"
  51834. },
  51835. crossStyle: {
  51836. color: "#817f91"
  51837. },
  51838. label: {
  51839. // TODO Contrast of label backgorundColor
  51840. color: "#fff"
  51841. }
  51842. },
  51843. legend: {
  51844. textStyle: {
  51845. color: Wr
  51846. }
  51847. },
  51848. textStyle: {
  51849. color: Wr
  51850. },
  51851. title: {
  51852. textStyle: {
  51853. color: "#EEF1FA"
  51854. },
  51855. subtextStyle: {
  51856. color: "#B9B8CE"
  51857. }
  51858. },
  51859. toolbox: {
  51860. iconStyle: {
  51861. borderColor: Wr
  51862. }
  51863. },
  51864. dataZoom: {
  51865. borderColor: "#71708A",
  51866. textStyle: {
  51867. color: Wr
  51868. },
  51869. brushStyle: {
  51870. color: "rgba(135,163,206,0.3)"
  51871. },
  51872. handleStyle: {
  51873. color: "#353450",
  51874. borderColor: "#C5CBE3"
  51875. },
  51876. moveHandleStyle: {
  51877. color: "#B0B6C3",
  51878. opacity: 0.3
  51879. },
  51880. fillerColor: "rgba(135,163,206,0.2)",
  51881. emphasis: {
  51882. handleStyle: {
  51883. borderColor: "#91B7F2",
  51884. color: "#4D587D"
  51885. },
  51886. moveHandleStyle: {
  51887. color: "#636D9A",
  51888. opacity: 0.7
  51889. }
  51890. },
  51891. dataBackground: {
  51892. lineStyle: {
  51893. color: "#71708A",
  51894. width: 1
  51895. },
  51896. areaStyle: {
  51897. color: "#71708A"
  51898. }
  51899. },
  51900. selectedDataBackground: {
  51901. lineStyle: {
  51902. color: "#87A3CE"
  51903. },
  51904. areaStyle: {
  51905. color: "#87A3CE"
  51906. }
  51907. }
  51908. },
  51909. visualMap: {
  51910. textStyle: {
  51911. color: Wr
  51912. }
  51913. },
  51914. timeline: {
  51915. lineStyle: {
  51916. color: Wr
  51917. },
  51918. label: {
  51919. color: Wr
  51920. },
  51921. controlStyle: {
  51922. color: Wr,
  51923. borderColor: Wr
  51924. }
  51925. },
  51926. calendar: {
  51927. itemStyle: {
  51928. color: Mz
  51929. },
  51930. dayLabel: {
  51931. color: Wr
  51932. },
  51933. monthLabel: {
  51934. color: Wr
  51935. },
  51936. yearLabel: {
  51937. color: Wr
  51938. }
  51939. },
  51940. timeAxis: lb(),
  51941. logAxis: lb(),
  51942. valueAxis: lb(),
  51943. categoryAxis: lb(),
  51944. line: {
  51945. symbol: "circle"
  51946. },
  51947. graph: {
  51948. color: Iz
  51949. },
  51950. gauge: {
  51951. title: {
  51952. color: Wr
  51953. },
  51954. axisLine: {
  51955. lineStyle: {
  51956. color: [[1, "rgba(207,212,219,0.2)"]]
  51957. }
  51958. },
  51959. axisLabel: {
  51960. color: Wr
  51961. },
  51962. detail: {
  51963. color: "#EEF1FA"
  51964. }
  51965. },
  51966. candlestick: {
  51967. itemStyle: {
  51968. color: "#f64e56",
  51969. color0: "#54ea92",
  51970. borderColor: "#f64e56",
  51971. borderColor0: "#54ea92"
  51972. // borderColor: '#ca2824',
  51973. // borderColor0: '#09a443'
  51974. }
  51975. }
  51976. };
  51977. hee.categoryAxis.splitLine.show = !1;
  51978. var n8e = (
  51979. /** @class */
  51980. function() {
  51981. function t() {
  51982. }
  51983. return t.prototype.normalizeQuery = function(e) {
  51984. var n = {}, r = {}, i = {};
  51985. if (Oe(e)) {
  51986. var a = Fo(e);
  51987. n.mainType = a.main || null, n.subType = a.sub || null;
  51988. } else {
  51989. var o = ["Index", "Name", "Id"], s = {
  51990. name: 1,
  51991. dataIndex: 1,
  51992. dataType: 1
  51993. };
  51994. k(e, function(l, u) {
  51995. for (var c = !1, f = 0; f < o.length; f++) {
  51996. var d = o[f], h = u.lastIndexOf(d);
  51997. if (h > 0 && h === u.length - d.length) {
  51998. var p = u.slice(0, h);
  51999. p !== "data" && (n.mainType = p, n[d.toLowerCase()] = l, c = !0);
  52000. }
  52001. }
  52002. s.hasOwnProperty(u) && (r[u] = l, c = !0), c || (i[u] = l);
  52003. });
  52004. }
  52005. return {
  52006. cptQuery: n,
  52007. dataQuery: r,
  52008. otherQuery: i
  52009. };
  52010. }, t.prototype.filter = function(e, n) {
  52011. var r = this.eventInfo;
  52012. if (!r)
  52013. return !0;
  52014. var i = r.targetEl, a = r.packedEvent, o = r.model, s = r.view;
  52015. if (!o || !s)
  52016. return !0;
  52017. var l = n.cptQuery, u = n.dataQuery;
  52018. 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));
  52019. function c(f, d, h, p) {
  52020. return f[h] == null || d[p || h] === f[h];
  52021. }
  52022. }, t.prototype.afterTrigger = function() {
  52023. this.eventInfo = null;
  52024. }, t;
  52025. }()
  52026. ), YA = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], Dz = YA.concat(["symbolKeepAspect"]), r8e = {
  52027. createOnAllSeries: !0,
  52028. // For legend.
  52029. performRawSeries: !0,
  52030. reset: function(t, e) {
  52031. var n = t.getData();
  52032. if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon), !t.hasSymbolVisual)
  52033. return;
  52034. for (var r = {}, i = {}, a = !1, o = 0; o < YA.length; o++) {
  52035. var s = YA[o], l = t.get(s);
  52036. Me(l) ? (a = !0, i[s] = l) : r[s] = l;
  52037. }
  52038. if (r.symbol = r.symbol || t.defaultSymbol, n.setVisual(le({
  52039. legendIcon: t.legendIcon || r.symbol,
  52040. symbolKeepAspect: t.get("symbolKeepAspect")
  52041. }, r)), e.isSeriesFiltered(t))
  52042. return;
  52043. var u = st(i);
  52044. function c(f, d) {
  52045. for (var h = t.getRawValue(d), p = t.getDataParams(d), v = 0; v < u.length; v++) {
  52046. var g = u[v];
  52047. f.setItemVisual(d, g, i[g](h, p));
  52048. }
  52049. }
  52050. return {
  52051. dataEach: a ? c : null
  52052. };
  52053. }
  52054. }, i8e = {
  52055. createOnAllSeries: !0,
  52056. // For legend.
  52057. performRawSeries: !0,
  52058. reset: function(t, e) {
  52059. if (!t.hasSymbolVisual || e.isSeriesFiltered(t))
  52060. return;
  52061. var n = t.getData();
  52062. function r(i, a) {
  52063. for (var o = i.getItemModel(a), s = 0; s < Dz.length; s++) {
  52064. var l = Dz[s], u = o.getShallow(l, !0);
  52065. u != null && i.setItemVisual(a, l, u);
  52066. }
  52067. }
  52068. return {
  52069. dataEach: n.hasItemOption ? r : null
  52070. };
  52071. }
  52072. };
  52073. function fk(t, e, n) {
  52074. switch (n) {
  52075. case "color":
  52076. var r = t.getItemVisual(e, "style");
  52077. return r[t.getVisual("drawType")];
  52078. case "opacity":
  52079. return t.getItemVisual(e, "style").opacity;
  52080. case "symbol":
  52081. case "symbolSize":
  52082. case "liftZ":
  52083. return t.getItemVisual(e, n);
  52084. default:
  52085. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  52086. }
  52087. }
  52088. function G0(t, e) {
  52089. switch (e) {
  52090. case "color":
  52091. var n = t.getVisual("style");
  52092. return n[t.getVisual("drawType")];
  52093. case "opacity":
  52094. return t.getVisual("style").opacity;
  52095. case "symbol":
  52096. case "symbolSize":
  52097. case "liftZ":
  52098. return t.getVisual(e);
  52099. default:
  52100. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + e);
  52101. }
  52102. }
  52103. function pee(t, e, n, r) {
  52104. switch (n) {
  52105. case "color":
  52106. var i = t.ensureUniqueItemVisual(e, "style");
  52107. i[t.getVisual("drawType")] = r, t.setItemVisual(e, "colorFromPalette", !1);
  52108. break;
  52109. case "opacity":
  52110. t.ensureUniqueItemVisual(e, "style").opacity = r;
  52111. break;
  52112. case "symbol":
  52113. case "symbolSize":
  52114. case "liftZ":
  52115. t.setItemVisual(e, n, r);
  52116. break;
  52117. default:
  52118. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  52119. }
  52120. }
  52121. function vee(t, e) {
  52122. function n(r, i) {
  52123. var a = [];
  52124. return r.eachComponent({
  52125. mainType: "series",
  52126. subType: t,
  52127. query: i
  52128. }, function(o) {
  52129. a.push(o.seriesIndex);
  52130. }), a;
  52131. }
  52132. k([[t + "ToggleSelect", "toggleSelect"], [t + "Select", "select"], [t + "UnSelect", "unselect"]], function(r) {
  52133. e(r[0], function(i, a, o) {
  52134. i = le({}, i), process.env.NODE_ENV !== "production" && Cn(i.type, r[1]), o.dispatchAction(le(i, {
  52135. type: r[1],
  52136. seriesIndex: n(a, i)
  52137. }));
  52138. });
  52139. });
  52140. }
  52141. function cd(t, e, n, r, i) {
  52142. var a = t + e;
  52143. n.isSilent(a) || (process.env.NODE_ENV !== "production" && Ia("event " + a + " is deprecated."), r.eachComponent({
  52144. mainType: "series",
  52145. subType: "pie"
  52146. }, function(o) {
  52147. for (var s = o.seriesIndex, l = o.option.selectedMap, u = i.selected, c = 0; c < u.length; c++)
  52148. if (u[c].seriesIndex === s) {
  52149. var f = o.getData(), d = yf(f, i.fromActionPayload);
  52150. n.trigger(a, {
  52151. type: a,
  52152. seriesId: o.id,
  52153. name: ue(d) ? f.getName(d[0]) : f.getName(d),
  52154. selected: Oe(l) ? l : le({}, l)
  52155. });
  52156. }
  52157. }));
  52158. }
  52159. function a8e(t, e, n) {
  52160. t.on("selectchanged", function(r) {
  52161. var i = n.getModel();
  52162. r.isFromClick ? (cd("map", "selectchanged", e, i, r), cd("pie", "selectchanged", e, i, r)) : r.fromAction === "select" ? (cd("map", "selected", e, i, r), cd("pie", "selected", e, i, r)) : r.fromAction === "unselect" && (cd("map", "unselected", e, i, r), cd("pie", "unselected", e, i, r));
  52163. });
  52164. }
  52165. function Bc(t, e, n) {
  52166. for (var r; t && !(e(t) && (r = t, n)); )
  52167. t = t.__hostTarget || t.parent;
  52168. return r;
  52169. }
  52170. var o8e = Math.round(Math.random() * 9), s8e = typeof Object.defineProperty == "function", l8e = function() {
  52171. function t() {
  52172. this._id = "__ec_inner_" + o8e++;
  52173. }
  52174. return t.prototype.get = function(e) {
  52175. return this._guard(e)[this._id];
  52176. }, t.prototype.set = function(e, n) {
  52177. var r = this._guard(e);
  52178. return s8e ? Object.defineProperty(r, this._id, {
  52179. value: n,
  52180. enumerable: !1,
  52181. configurable: !0
  52182. }) : r[this._id] = n, this;
  52183. }, t.prototype.delete = function(e) {
  52184. return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1;
  52185. }, t.prototype.has = function(e) {
  52186. return !!this._guard(e)[this._id];
  52187. }, t.prototype._guard = function(e) {
  52188. if (e !== Object(e))
  52189. throw TypeError("Value of WeakMap is not a non-null object.");
  52190. return e;
  52191. }, t;
  52192. }(), u8e = ot.extend({
  52193. type: "triangle",
  52194. shape: {
  52195. cx: 0,
  52196. cy: 0,
  52197. width: 0,
  52198. height: 0
  52199. },
  52200. buildPath: function(t, e) {
  52201. var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
  52202. t.moveTo(n, r - a), t.lineTo(n + i, r + a), t.lineTo(n - i, r + a), t.closePath();
  52203. }
  52204. }), c8e = ot.extend({
  52205. type: "diamond",
  52206. shape: {
  52207. cx: 0,
  52208. cy: 0,
  52209. width: 0,
  52210. height: 0
  52211. },
  52212. buildPath: function(t, e) {
  52213. var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
  52214. t.moveTo(n, r - a), t.lineTo(n + i, r), t.lineTo(n, r + a), t.lineTo(n - i, r), t.closePath();
  52215. }
  52216. }), f8e = ot.extend({
  52217. type: "pin",
  52218. shape: {
  52219. // x, y on the cusp
  52220. x: 0,
  52221. y: 0,
  52222. width: 0,
  52223. height: 0
  52224. },
  52225. buildPath: function(t, e) {
  52226. 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;
  52227. 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();
  52228. }
  52229. }), d8e = ot.extend({
  52230. type: "arrow",
  52231. shape: {
  52232. x: 0,
  52233. y: 0,
  52234. width: 0,
  52235. height: 0
  52236. },
  52237. buildPath: function(t, e) {
  52238. var n = e.height, r = e.width, i = e.x, a = e.y, o = r / 3 * 2;
  52239. 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();
  52240. }
  52241. }), h8e = {
  52242. line: Un,
  52243. rect: mt,
  52244. roundRect: mt,
  52245. square: mt,
  52246. circle: ul,
  52247. diamond: c8e,
  52248. pin: f8e,
  52249. arrow: d8e,
  52250. triangle: u8e
  52251. }, p8e = {
  52252. line: function(t, e, n, r, i) {
  52253. i.x1 = t, i.y1 = e + r / 2, i.x2 = t + n, i.y2 = e + r / 2;
  52254. },
  52255. rect: function(t, e, n, r, i) {
  52256. i.x = t, i.y = e, i.width = n, i.height = r;
  52257. },
  52258. roundRect: function(t, e, n, r, i) {
  52259. i.x = t, i.y = e, i.width = n, i.height = r, i.r = Math.min(n, r) / 4;
  52260. },
  52261. square: function(t, e, n, r, i) {
  52262. var a = Math.min(n, r);
  52263. i.x = t, i.y = e, i.width = a, i.height = a;
  52264. },
  52265. circle: function(t, e, n, r, i) {
  52266. i.cx = t + n / 2, i.cy = e + r / 2, i.r = Math.min(n, r) / 2;
  52267. },
  52268. diamond: function(t, e, n, r, i) {
  52269. i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  52270. },
  52271. pin: function(t, e, n, r, i) {
  52272. i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  52273. },
  52274. arrow: function(t, e, n, r, i) {
  52275. i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  52276. },
  52277. triangle: function(t, e, n, r, i) {
  52278. i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  52279. }
  52280. }, yO = {};
  52281. k(h8e, function(t, e) {
  52282. yO[e] = new t();
  52283. });
  52284. var v8e = ot.extend({
  52285. type: "symbol",
  52286. shape: {
  52287. symbolType: "",
  52288. x: 0,
  52289. y: 0,
  52290. width: 0,
  52291. height: 0
  52292. },
  52293. calculateTextPosition: function(t, e, n) {
  52294. var r = aO(t, e, n), i = this.shape;
  52295. return i && i.symbolType === "pin" && e.position === "inside" && (r.y = n.y + n.height * 0.4), r;
  52296. },
  52297. buildPath: function(t, e, n) {
  52298. var r = e.symbolType;
  52299. if (r !== "none") {
  52300. var i = yO[r];
  52301. i || (r = "rect", i = yO[r]), p8e[r](e.x, e.y, e.width, e.height, i.shape), i.buildPath(t, i.shape, n);
  52302. }
  52303. }
  52304. });
  52305. function g8e(t, e) {
  52306. if (this.type !== "image") {
  52307. var n = this.style;
  52308. this.__isEmptyBrush ? (n.stroke = t, n.fill = e || "#fff", n.lineWidth = 2) : this.shape.symbolType === "line" ? n.stroke = t : n.fill = t, this.markRedraw();
  52309. }
  52310. }
  52311. function $n(t, e, n, r, i, a, o) {
  52312. var s = t.indexOf("empty") === 0;
  52313. s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
  52314. var l;
  52315. return t.indexOf("image://") === 0 ? l = QR(t.slice(8), new Je(e, n, r, i), o ? "center" : "cover") : t.indexOf("path://") === 0 ? l = W0(t.slice(7), {}, new Je(e, n, r, i), o ? "center" : "cover") : l = new v8e({
  52316. shape: {
  52317. symbolType: t,
  52318. x: e,
  52319. y: n,
  52320. width: r,
  52321. height: i
  52322. }
  52323. }), l.__isEmptyBrush = s, l.setColor = g8e, a && l.setColor(a), l;
  52324. }
  52325. function $p(t) {
  52326. return ue(t) || (t = [+t, +t]), [t[0] || 0, t[1] || 0];
  52327. }
  52328. function Ff(t, e) {
  52329. if (t != null)
  52330. return ue(t) || (t = [t, t]), [_e(t[0], e[0]) || 0, _e(We(t[1], t[0]), e[1]) || 0];
  52331. }
  52332. function zc(t) {
  52333. return isFinite(t);
  52334. }
  52335. function m8e(t, e, n) {
  52336. 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;
  52337. 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 = zc(r) ? r : 0, i = zc(i) ? i : 1, a = zc(a) ? a : 0, o = zc(o) ? o : 0;
  52338. var s = t.createLinearGradient(r, a, i, o);
  52339. return s;
  52340. }
  52341. function y8e(t, e, n) {
  52342. 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;
  52343. e.global || (o = o * r + n.x, s = s * i + n.y, l = l * a), o = zc(o) ? o : 0.5, s = zc(s) ? s : 0.5, l = l >= 0 && zc(l) ? l : 0.5;
  52344. var u = t.createRadialGradient(o, s, 0, o, s, l);
  52345. return u;
  52346. }
  52347. function qA(t, e, n) {
  52348. for (var r = e.type === "radial" ? y8e(t, e, n) : m8e(t, e, n), i = e.colorStops, a = 0; a < i.length; a++)
  52349. r.addColorStop(i[a].offset, i[a].color);
  52350. return r;
  52351. }
  52352. function b8e(t, e) {
  52353. if (t === e || !t && !e)
  52354. return !1;
  52355. if (!t || !e || t.length !== e.length)
  52356. return !0;
  52357. for (var n = 0; n < t.length; n++)
  52358. if (t[n] !== e[n])
  52359. return !0;
  52360. return !1;
  52361. }
  52362. function ub(t) {
  52363. return parseInt(t, 10);
  52364. }
  52365. function Wd(t, e, n) {
  52366. var r = ["width", "height"][e], i = ["clientWidth", "clientHeight"][e], a = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e];
  52367. if (n[r] != null && n[r] !== "auto")
  52368. return parseFloat(n[r]);
  52369. var s = document.defaultView.getComputedStyle(t);
  52370. return (t[i] || ub(s[r]) || ub(t.style[r])) - (ub(s[a]) || 0) - (ub(s[o]) || 0) | 0;
  52371. }
  52372. function _8e(t, e) {
  52373. return !t || t === "solid" || !(e > 0) ? null : t === "dashed" ? [4 * e, 2 * e] : t === "dotted" ? [e] : St(t) ? [t] : ue(t) ? t : null;
  52374. }
  52375. function dk(t) {
  52376. var e = t.style, n = e.lineDash && e.lineWidth > 0 && _8e(e.lineDash, e.lineWidth), r = e.lineDashOffset;
  52377. if (n) {
  52378. var i = e.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
  52379. i && i !== 1 && (n = ce(n, function(a) {
  52380. return a / i;
  52381. }), r /= i);
  52382. }
  52383. return [n, r];
  52384. }
  52385. var O8e = new os(!0);
  52386. function bO(t) {
  52387. var e = t.stroke;
  52388. return !(e == null || e === "none" || !(t.lineWidth > 0));
  52389. }
  52390. function Rz(t) {
  52391. return typeof t == "string" && t !== "none";
  52392. }
  52393. function _O(t) {
  52394. var e = t.fill;
  52395. return e != null && e !== "none";
  52396. }
  52397. function kz(t, e) {
  52398. if (e.fillOpacity != null && e.fillOpacity !== 1) {
  52399. var n = t.globalAlpha;
  52400. t.globalAlpha = e.fillOpacity * e.opacity, t.fill(), t.globalAlpha = n;
  52401. } else
  52402. t.fill();
  52403. }
  52404. function Lz(t, e) {
  52405. if (e.strokeOpacity != null && e.strokeOpacity !== 1) {
  52406. var n = t.globalAlpha;
  52407. t.globalAlpha = e.strokeOpacity * e.opacity, t.stroke(), t.globalAlpha = n;
  52408. } else
  52409. t.stroke();
  52410. }
  52411. function KA(t, e, n) {
  52412. var r = DR(e.image, e.__image, n);
  52413. if (Gx(r)) {
  52414. var i = t.createPattern(r, e.repeat || "repeat");
  52415. if (typeof DOMMatrix == "function" && i && i.setTransform) {
  52416. var a = new DOMMatrix();
  52417. a.translateSelf(e.x || 0, e.y || 0), a.rotateSelf(0, 0, (e.rotation || 0) * Tg), a.scaleSelf(e.scaleX || 1, e.scaleY || 1), i.setTransform(a);
  52418. }
  52419. return i;
  52420. }
  52421. }
  52422. function S8e(t, e, n, r) {
  52423. var i, a = bO(n), o = _O(n), s = n.strokePercent, l = s < 1, u = !e.path;
  52424. (!e.silent || l) && u && e.createPathProxy();
  52425. var c = e.path || O8e, f = e.__dirty;
  52426. if (!r) {
  52427. 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, b = void 0, _ = void 0, O = void 0, S = void 0;
  52428. (p || v) && (S = e.getBoundingRect()), p && (y = f ? qA(t, d, S) : e.__canvasFillGradient, e.__canvasFillGradient = y), v && (b = f ? qA(t, h, S) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = b), g && (_ = f || !e.__canvasFillPattern ? KA(t, d, e) : e.__canvasFillPattern, e.__canvasFillPattern = _), m && (O = f || !e.__canvasStrokePattern ? KA(t, h, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = _), p ? t.fillStyle = y : g && (_ ? t.fillStyle = _ : o = !1), v ? t.strokeStyle = b : m && (O ? t.strokeStyle = O : a = !1);
  52429. }
  52430. var x = e.getGlobalScale();
  52431. c.setScale(x[0], x[1], e.segmentIgnoreThreshold);
  52432. var C, T;
  52433. t.setLineDash && n.lineDash && (i = dk(e), C = i[0], T = i[1]);
  52434. var w = !0;
  52435. (u || f & Ad) && (c.setDPR(t.dpr), l ? c.setContext(null) : (c.setContext(t), w = !1), c.reset(), e.buildPath(c, e.shape, r), c.toStatic(), e.pathUpdated()), w && c.rebuildPath(t, l ? s : 1), C && (t.setLineDash(C), t.lineDashOffset = T), r || (n.strokeFirst ? (a && Lz(t, n), o && kz(t, n)) : (o && kz(t, n), a && Lz(t, n))), C && t.setLineDash([]);
  52436. }
  52437. function x8e(t, e, n) {
  52438. var r = e.__image = DR(n.image, e.__image, e, e.onload);
  52439. if (!(!r || !Gx(r))) {
  52440. var i = n.x || 0, a = n.y || 0, o = e.getWidth(), s = e.getHeight(), l = r.width / r.height;
  52441. 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) {
  52442. var u = n.sx || 0, c = n.sy || 0;
  52443. t.drawImage(r, u, c, n.sWidth, n.sHeight, i, a, o, s);
  52444. } else if (n.sx && n.sy) {
  52445. var u = n.sx, c = n.sy, f = o - u, d = s - c;
  52446. t.drawImage(r, u, c, f, d, i, a, o, s);
  52447. } else
  52448. t.drawImage(r, i, a, o, s);
  52449. }
  52450. }
  52451. function w8e(t, e, n) {
  52452. var r, i = n.text;
  52453. if (i != null && (i += ""), i) {
  52454. t.font = n.font || iu, t.textAlign = n.textAlign, t.textBaseline = n.textBaseline;
  52455. var a = void 0, o = void 0;
  52456. t.setLineDash && n.lineDash && (r = dk(e), a = r[0], o = r[1]), a && (t.setLineDash(a), t.lineDashOffset = o), n.strokeFirst ? (bO(n) && t.strokeText(i, n.x, n.y), _O(n) && t.fillText(i, n.x, n.y)) : (_O(n) && t.fillText(i, n.x, n.y), bO(n) && t.strokeText(i, n.x, n.y)), a && t.setLineDash([]);
  52457. }
  52458. }
  52459. var Nz = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], Bz = [
  52460. ["lineCap", "butt"],
  52461. ["lineJoin", "miter"],
  52462. ["miterLimit", 10]
  52463. ];
  52464. function gee(t, e, n, r, i) {
  52465. var a = !1;
  52466. if (!r && (n = n || {}, e === n))
  52467. return !1;
  52468. if (r || e.opacity !== n.opacity) {
  52469. yi(t, i), a = !0;
  52470. var o = Math.max(Math.min(e.opacity, 1), 0);
  52471. t.globalAlpha = isNaN(o) ? Jc.opacity : o;
  52472. }
  52473. (r || e.blend !== n.blend) && (a || (yi(t, i), a = !0), t.globalCompositeOperation = e.blend || Jc.blend);
  52474. for (var s = 0; s < Nz.length; s++) {
  52475. var l = Nz[s];
  52476. (r || e[l] !== n[l]) && (a || (yi(t, i), a = !0), t[l] = t.dpr * (e[l] || 0));
  52477. }
  52478. return (r || e.shadowColor !== n.shadowColor) && (a || (yi(t, i), a = !0), t.shadowColor = e.shadowColor || Jc.shadowColor), a;
  52479. }
  52480. function zz(t, e, n, r, i) {
  52481. var a = Rm(e, i.inHover), o = r ? null : n && Rm(n, i.inHover) || {};
  52482. if (a === o)
  52483. return !1;
  52484. var s = gee(t, a, o, r, i);
  52485. if ((r || a.fill !== o.fill) && (s || (yi(t, i), s = !0), Rz(a.fill) && (t.fillStyle = a.fill)), (r || a.stroke !== o.stroke) && (s || (yi(t, i), s = !0), Rz(a.stroke) && (t.strokeStyle = a.stroke)), (r || a.opacity !== o.opacity) && (s || (yi(t, i), s = !0), t.globalAlpha = a.opacity == null ? 1 : a.opacity), e.hasStroke()) {
  52486. var l = a.lineWidth, u = l / (a.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
  52487. t.lineWidth !== u && (s || (yi(t, i), s = !0), t.lineWidth = u);
  52488. }
  52489. for (var c = 0; c < Bz.length; c++) {
  52490. var f = Bz[c], d = f[0];
  52491. (r || a[d] !== o[d]) && (s || (yi(t, i), s = !0), t[d] = a[d] || f[1]);
  52492. }
  52493. return s;
  52494. }
  52495. function C8e(t, e, n, r, i) {
  52496. return gee(t, Rm(e, i.inHover), n && Rm(n, i.inHover), r, i);
  52497. }
  52498. function mee(t, e) {
  52499. var n = e.transform, r = t.dpr || 1;
  52500. 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);
  52501. }
  52502. function T8e(t, e, n) {
  52503. for (var r = !1, i = 0; i < t.length; i++) {
  52504. var a = t[i];
  52505. r = r || a.isZeroArea(), mee(e, a), e.beginPath(), a.buildPath(e, a.shape), e.clip();
  52506. }
  52507. n.allClipped = r;
  52508. }
  52509. function P8e(t, e) {
  52510. 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);
  52511. }
  52512. var Vz = 1, Fz = 2, Wz = 3, Qz = 4;
  52513. function $8e(t) {
  52514. var e = _O(t), n = bO(t);
  52515. return !(t.lineDash || !(+e ^ +n) || e && typeof t.fill != "string" || n && typeof t.stroke != "string" || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1);
  52516. }
  52517. function yi(t, e) {
  52518. e.batchFill && t.fill(), e.batchStroke && t.stroke(), e.batchFill = "", e.batchStroke = "";
  52519. }
  52520. function Rm(t, e) {
  52521. return e && t.__hoverStyle || t.style;
  52522. }
  52523. function hk(t, e) {
  52524. Vc(t, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0);
  52525. }
  52526. function Vc(t, e, n, r) {
  52527. var i = e.transform;
  52528. if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) {
  52529. e.__dirty &= ~Ni, e.__isRendered = !1;
  52530. return;
  52531. }
  52532. var a = e.__clipPaths, o = n.prevElClipPaths, s = !1, l = !1;
  52533. if ((!o || b8e(a, o)) && (o && o.length && (yi(t, n), t.restore(), l = s = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), a && a.length && (yi(t, n), t.save(), T8e(a, t, n), s = !0), n.prevElClipPaths = a), n.allClipped) {
  52534. e.__isRendered = !1;
  52535. return;
  52536. }
  52537. e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
  52538. var u = n.prevEl;
  52539. u || (l = s = !0);
  52540. var c = e instanceof ot && e.autoBatch && $8e(e.style);
  52541. s || P8e(i, u.transform) ? (yi(t, n), mee(t, e)) : c || yi(t, n);
  52542. var f = Rm(e, n.inHover);
  52543. e instanceof ot ? (n.lastDrawType !== Vz && (l = !0, n.lastDrawType = Vz), zz(t, e, u, l, n), (!c || !n.batchFill && !n.batchStroke) && t.beginPath(), S8e(t, e, f, c), c && (n.batchFill = f.fill || "", n.batchStroke = f.stroke || "")) : e instanceof Qh ? (n.lastDrawType !== Wz && (l = !0, n.lastDrawType = Wz), zz(t, e, u, l, n), w8e(t, e, f)) : e instanceof lr ? (n.lastDrawType !== Fz && (l = !0, n.lastDrawType = Fz), C8e(t, e, u, l, n), x8e(t, e, f)) : e.getTemporalDisplayables && (n.lastDrawType !== Qz && (l = !0, n.lastDrawType = Qz), A8e(t, e, n)), c && r && yi(t, n), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), n.prevEl = e, e.__dirty = 0, e.__isRendered = !0;
  52544. }
  52545. function A8e(t, e, n) {
  52546. var r = e.getDisplayables(), i = e.getTemporalDisplayables();
  52547. t.save();
  52548. var a = {
  52549. prevElClipPaths: null,
  52550. prevEl: null,
  52551. allClipped: !1,
  52552. viewWidth: n.viewWidth,
  52553. viewHeight: n.viewHeight,
  52554. inHover: n.inHover
  52555. }, o, s;
  52556. for (o = e.getCursor(), s = r.length; o < s; o++) {
  52557. var l = r[o];
  52558. l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Vc(t, l, a, o === s - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  52559. }
  52560. for (var u = 0, c = i.length; u < c; u++) {
  52561. var l = i[u];
  52562. l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Vc(t, l, a, u === c - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  52563. }
  52564. e.clearTemporalDisplayables(), e.notClear = !0, t.restore();
  52565. }
  52566. var kT = new l8e(), Hz = new k0(100), Gz = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
  52567. function jh(t, e) {
  52568. if (t === "none")
  52569. return null;
  52570. var n = e.getDevicePixelRatio(), r = e.getZr(), i = r.painter.type === "svg";
  52571. t.dirty && kT.delete(t);
  52572. var a = kT.get(t);
  52573. if (a)
  52574. return a;
  52575. var o = Re(t, {
  52576. symbol: "rect",
  52577. symbolSize: 1,
  52578. symbolKeepAspect: !0,
  52579. color: "rgba(0, 0, 0, 0.2)",
  52580. backgroundColor: null,
  52581. dashArrayX: 5,
  52582. dashArrayY: 5,
  52583. rotation: 0,
  52584. maxTileWidth: 512,
  52585. maxTileHeight: 512
  52586. });
  52587. o.backgroundColor === "none" && (o.backgroundColor = null);
  52588. var s = {
  52589. repeat: "repeat"
  52590. };
  52591. return l(s), s.rotation = o.rotation, s.scaleX = s.scaleY = i ? 1 : 1 / n, kT.set(t, s), t.dirty = !1, s;
  52592. function l(u) {
  52593. for (var c = [n], f = !0, d = 0; d < Gz.length; ++d) {
  52594. var h = o[Gz[d]];
  52595. if (h != null && !ue(h) && !Oe(h) && !St(h) && typeof h != "boolean") {
  52596. f = !1;
  52597. break;
  52598. }
  52599. c.push(h);
  52600. }
  52601. var p;
  52602. if (f) {
  52603. p = c.join(",") + (i ? "-svg" : "");
  52604. var v = Hz.get(p);
  52605. v && (i ? u.svgElement = v : u.image = v);
  52606. }
  52607. var g = bee(o.dashArrayX), m = E8e(o.dashArrayY), y = yee(o.symbol), b = M8e(g), _ = _ee(m), O = !i && oo.createCanvas(), S = i && {
  52608. tag: "g",
  52609. attrs: {},
  52610. key: "dcl",
  52611. children: []
  52612. }, x = T(), C;
  52613. O && (O.width = x.width * n, O.height = x.height * n, C = O.getContext("2d")), w(), f && Hz.put(p, O || S), u.image = O, u.svgElement = S, u.svgWidth = x.width, u.svgHeight = x.height;
  52614. function T() {
  52615. for (var P = 1, $ = 0, A = b.length; $ < A; ++$)
  52616. P = aB(P, b[$]);
  52617. for (var D = 1, $ = 0, A = y.length; $ < A; ++$)
  52618. D = aB(D, y[$].length);
  52619. P *= D;
  52620. var E = _ * b.length * y.length;
  52621. if (process.env.NODE_ENV !== "production") {
  52622. var R = function(N) {
  52623. console.warn("Calculated decal size is greater than " + N + " due to decal option settings so " + N + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + N + " to be larger to avoid incontinuity.");
  52624. };
  52625. P > o.maxTileWidth && R("maxTileWidth"), E > o.maxTileHeight && R("maxTileHeight");
  52626. }
  52627. return {
  52628. width: Math.max(1, Math.min(P, o.maxTileWidth)),
  52629. height: Math.max(1, Math.min(E, o.maxTileHeight))
  52630. };
  52631. }
  52632. function w() {
  52633. C && (C.clearRect(0, 0, O.width, O.height), o.backgroundColor && (C.fillStyle = o.backgroundColor, C.fillRect(0, 0, O.width, O.height)));
  52634. for (var P = 0, $ = 0; $ < m.length; ++$)
  52635. P += m[$];
  52636. if (P <= 0)
  52637. return;
  52638. for (var A = -_, D = 0, E = 0, R = 0; A < x.height; ) {
  52639. if (D % 2 === 0) {
  52640. for (var N = E / 2 % y.length, V = 0, B = 0, W = 0; V < x.width * 2; ) {
  52641. for (var F = 0, $ = 0; $ < g[R].length; ++$)
  52642. F += g[R][$];
  52643. if (F <= 0)
  52644. break;
  52645. if (B % 2 === 0) {
  52646. var Q = (1 - o.symbolSize) * 0.5, Z = V + g[R][B] * Q, ne = A + m[D] * Q, ee = g[R][B] * o.symbolSize, oe = m[D] * o.symbolSize, K = W / 2 % y[N].length;
  52647. ie(Z, ne, ee, oe, y[N][K]);
  52648. }
  52649. V += g[R][B], ++W, ++B, B === g[R].length && (B = 0);
  52650. }
  52651. ++R, R === g.length && (R = 0);
  52652. }
  52653. A += m[D], ++E, ++D, D === m.length && (D = 0);
  52654. }
  52655. function ie(X, H, G, re, fe) {
  52656. var de = i ? 1 : n, Ee = $n(fe, X * de, H * de, G * de, re * de, o.color, o.symbolKeepAspect);
  52657. if (i) {
  52658. var $e = r.painter.renderOneToVNode(Ee);
  52659. $e && S.children.push($e);
  52660. } else
  52661. hk(C, Ee);
  52662. }
  52663. }
  52664. }
  52665. }
  52666. function yee(t) {
  52667. if (!t || t.length === 0)
  52668. return [["rect"]];
  52669. if (Oe(t))
  52670. return [[t]];
  52671. for (var e = !0, n = 0; n < t.length; ++n)
  52672. if (!Oe(t[n])) {
  52673. e = !1;
  52674. break;
  52675. }
  52676. if (e)
  52677. return yee([t]);
  52678. for (var r = [], n = 0; n < t.length; ++n)
  52679. Oe(t[n]) ? r.push([t[n]]) : r.push(t[n]);
  52680. return r;
  52681. }
  52682. function bee(t) {
  52683. if (!t || t.length === 0)
  52684. return [[0, 0]];
  52685. if (St(t)) {
  52686. var e = Math.ceil(t);
  52687. return [[e, e]];
  52688. }
  52689. for (var n = !0, r = 0; r < t.length; ++r)
  52690. if (!St(t[r])) {
  52691. n = !1;
  52692. break;
  52693. }
  52694. if (n)
  52695. return bee([t]);
  52696. for (var i = [], r = 0; r < t.length; ++r)
  52697. if (St(t[r])) {
  52698. var e = Math.ceil(t[r]);
  52699. i.push([e, e]);
  52700. } else {
  52701. var e = ce(t[r], function(s) {
  52702. return Math.ceil(s);
  52703. });
  52704. e.length % 2 === 1 ? i.push(e.concat(e)) : i.push(e);
  52705. }
  52706. return i;
  52707. }
  52708. function E8e(t) {
  52709. if (!t || typeof t == "object" && t.length === 0)
  52710. return [0, 0];
  52711. if (St(t)) {
  52712. var e = Math.ceil(t);
  52713. return [e, e];
  52714. }
  52715. var n = ce(t, function(r) {
  52716. return Math.ceil(r);
  52717. });
  52718. return t.length % 2 ? n.concat(n) : n;
  52719. }
  52720. function M8e(t) {
  52721. return ce(t, function(e) {
  52722. return _ee(e);
  52723. });
  52724. }
  52725. function _ee(t) {
  52726. for (var e = 0, n = 0; n < t.length; ++n)
  52727. e += t[n];
  52728. return t.length % 2 === 1 ? e * 2 : e;
  52729. }
  52730. function I8e(t, e) {
  52731. t.eachRawSeries(function(n) {
  52732. if (!t.isSeriesFiltered(n)) {
  52733. var r = n.getData();
  52734. r.hasItemVisual() && r.each(function(o) {
  52735. var s = r.getItemVisual(o, "decal");
  52736. if (s) {
  52737. var l = r.ensureUniqueItemVisual(o, "style");
  52738. l.decal = jh(s, e);
  52739. }
  52740. });
  52741. var i = r.getVisual("decal");
  52742. if (i) {
  52743. var a = r.getVisual("style");
  52744. a.decal = jh(i, e);
  52745. }
  52746. }
  52747. });
  52748. }
  52749. var Ua = new La(), OO = {};
  52750. function D8e(t, e) {
  52751. process.env.NODE_ENV !== "production" && OO[t] && Cr("Already has an implementation of " + t + "."), OO[t] = e;
  52752. }
  52753. function Oee(t) {
  52754. return process.env.NODE_ENV !== "production" && (OO[t] || Cr("Implementation of " + t + " doesn't exists.")), OO[t];
  52755. }
  52756. var R8e = "5.5.1", k8e = {
  52757. zrender: "5.6.0"
  52758. }, L8e = 1, N8e = 800, B8e = 900, z8e = 1e3, V8e = 2e3, F8e = 5e3, See = 1e3, W8e = 1100, pk = 2e3, xee = 3e3, Q8e = 4e3, fw = 4500, H8e = 4600, G8e = 5e3, j8e = 6e3, wee = 7e3, Cee = {
  52759. PROCESSOR: {
  52760. FILTER: z8e,
  52761. SERIES_FILTER: N8e,
  52762. STATISTIC: F8e
  52763. },
  52764. VISUAL: {
  52765. LAYOUT: See,
  52766. PROGRESSIVE_LAYOUT: W8e,
  52767. GLOBAL: pk,
  52768. CHART: xee,
  52769. POST_CHART_LAYOUT: H8e,
  52770. COMPONENT: Q8e,
  52771. BRUSH: G8e,
  52772. CHART_ITEM: fw,
  52773. ARIA: j8e,
  52774. DECAL: wee
  52775. }
  52776. }, Mr = "__flagInMainProcess", li = "__pendingUpdate", LT = "__needsUpdateStatus", jz = /^[a-zA-Z0-9_]+$/, NT = "__connectUpdateStatus", Zz = 0, Z8e = 1, U8e = 2;
  52777. function Tee(t) {
  52778. return function() {
  52779. for (var e = [], n = 0; n < arguments.length; n++)
  52780. e[n] = arguments[n];
  52781. if (this.isDisposed()) {
  52782. Ri(this.id);
  52783. return;
  52784. }
  52785. return $ee(this, t, e);
  52786. };
  52787. }
  52788. function Pee(t) {
  52789. return function() {
  52790. for (var e = [], n = 0; n < arguments.length; n++)
  52791. e[n] = arguments[n];
  52792. return $ee(this, t, e);
  52793. };
  52794. }
  52795. function $ee(t, e, n) {
  52796. return n[0] = n[0] && n[0].toLowerCase(), La.prototype[e].apply(t, n);
  52797. }
  52798. var Aee = (
  52799. /** @class */
  52800. function(t) {
  52801. q(e, t);
  52802. function e() {
  52803. return t !== null && t.apply(this, arguments) || this;
  52804. }
  52805. return e;
  52806. }(La)
  52807. ), Eee = Aee.prototype;
  52808. Eee.on = Pee("on");
  52809. Eee.off = Pee("off");
  52810. var fd, BT, cb, vl, zT, VT, FT, vv, gv, Uz, Xz, WT, Yz, fb, qz, Mee, ra, Kz, SO = (
  52811. /** @class */
  52812. function(t) {
  52813. q(e, t);
  52814. function e(n, r, i) {
  52815. var a = t.call(this, new n8e()) || this;
  52816. a._chartsViews = [], a._chartsMap = {}, a._componentsViews = [], a._componentsMap = {}, a._pendingActions = [], i = i || {}, Oe(r) && (r = Iee[r]), a._dom = n;
  52817. var o = "canvas", s = "auto", l = !1;
  52818. if (process.env.NODE_ENV !== "production") {
  52819. var u = (
  52820. /* eslint-disable-next-line */
  52821. vt.hasGlobalWindow ? window : global
  52822. );
  52823. u && (o = We(u.__ECHARTS__DEFAULT__RENDERER__, o), s = We(u.__ECHARTS__DEFAULT__COARSE_POINTER, s), l = We(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, l));
  52824. }
  52825. i.ssr && oK(function(h) {
  52826. var p = Fe(h), v = p.dataIndex;
  52827. if (v != null) {
  52828. var g = Pe();
  52829. return g.set("series_index", p.seriesIndex), g.set("data_index", v), p.ssrType && g.set("ssr_type", p.ssrType), g;
  52830. }
  52831. });
  52832. var c = a._zr = wA(n, {
  52833. renderer: i.renderer || o,
  52834. devicePixelRatio: i.devicePixelRatio,
  52835. width: i.width,
  52836. height: i.height,
  52837. ssr: i.ssr,
  52838. useDirtyRect: We(i.useDirtyRect, l),
  52839. useCoarsePointer: We(i.useCoarsePointer, s),
  52840. pointerSize: i.pointerSize
  52841. });
  52842. a._ssr = i.ssr, a._throttledZrFlush = cw(xe(c.flush, c), 17), r = Le(r), r && BJ(r, !0), a._theme = r, a._locale = cLe(i.locale || mJ), a._coordSysMgr = new Vf();
  52843. var f = a._api = qz(a);
  52844. function d(h, p) {
  52845. return h.__prio - p.__prio;
  52846. }
  52847. return L_(wO, d), L_(JA, d), a._scheduler = new uee(a, f, JA, wO), a._messageCenter = new Aee(), a._initEvents(), a.resize = xe(a.resize, a), c.animation.on("frame", a._onframe, a), Uz(c, a), Xz(c, a), bm(a), a;
  52848. }
  52849. return e.prototype._onframe = function() {
  52850. if (!this._disposed) {
  52851. Kz(this);
  52852. var n = this._scheduler;
  52853. if (this[li]) {
  52854. var r = this[li].silent;
  52855. this[Mr] = !0;
  52856. try {
  52857. fd(this), vl.update.call(this, null, this[li].updateParams);
  52858. } catch (l) {
  52859. throw this[Mr] = !1, this[li] = null, l;
  52860. }
  52861. this._zr.flush(), this[Mr] = !1, this[li] = null, vv.call(this, r), gv.call(this, r);
  52862. } else if (n.unfinished) {
  52863. var i = L8e, a = this._model, o = this._api;
  52864. n.unfinished = !1;
  52865. do {
  52866. var s = +/* @__PURE__ */ new Date();
  52867. n.performSeriesTasks(a), n.performDataProcessorTasks(a), VT(this, a), n.performVisualTasks(a), fb(this, this._model, o, "remain", {}), i -= +/* @__PURE__ */ new Date() - s;
  52868. } while (i > 0 && n.unfinished);
  52869. n.unfinished || this._zr.flush();
  52870. }
  52871. }
  52872. }, e.prototype.getDom = function() {
  52873. return this._dom;
  52874. }, e.prototype.getId = function() {
  52875. return this.id;
  52876. }, e.prototype.getZr = function() {
  52877. return this._zr;
  52878. }, e.prototype.isSSR = function() {
  52879. return this._ssr;
  52880. }, e.prototype.setOption = function(n, r, i) {
  52881. if (this[Mr]) {
  52882. process.env.NODE_ENV !== "production" && Cr("`setOption` should not be called during main process.");
  52883. return;
  52884. }
  52885. if (this._disposed) {
  52886. Ri(this.id);
  52887. return;
  52888. }
  52889. var a, o, s;
  52890. if (Ie(r) && (i = r.lazyUpdate, a = r.silent, o = r.replaceMerge, s = r.transition, r = r.notMerge), this[Mr] = !0, !this._model || r) {
  52891. var l = new zLe(this._api), u = this._theme, c = this._model = new ok();
  52892. c.scheduler = this._scheduler, c.ssr = this._ssr, c.init(null, null, null, u, this._locale, l);
  52893. }
  52894. this._model.setOption(n, {
  52895. replaceMerge: o
  52896. }, eE);
  52897. var f = {
  52898. seriesTransition: s,
  52899. optionChanged: !0
  52900. };
  52901. if (i)
  52902. this[li] = {
  52903. silent: a,
  52904. updateParams: f
  52905. }, this[Mr] = !1, this.getZr().wakeUp();
  52906. else {
  52907. try {
  52908. fd(this), vl.update.call(this, null, f);
  52909. } catch (d) {
  52910. throw this[li] = null, this[Mr] = !1, d;
  52911. }
  52912. this._ssr || this._zr.flush(), this[li] = null, this[Mr] = !1, vv.call(this, a), gv.call(this, a);
  52913. }
  52914. }, e.prototype.setTheme = function() {
  52915. Ia("ECharts#setTheme() is DEPRECATED in ECharts 3.0");
  52916. }, e.prototype.getModel = function() {
  52917. return this._model;
  52918. }, e.prototype.getOption = function() {
  52919. return this._model && this._model.getOption();
  52920. }, e.prototype.getWidth = function() {
  52921. return this._zr.getWidth();
  52922. }, e.prototype.getHeight = function() {
  52923. return this._zr.getHeight();
  52924. }, e.prototype.getDevicePixelRatio = function() {
  52925. return this._zr.painter.dpr || vt.hasGlobalWindow && window.devicePixelRatio || 1;
  52926. }, e.prototype.getRenderedCanvas = function(n) {
  52927. return process.env.NODE_ENV !== "production" && Cn("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(n);
  52928. }, e.prototype.renderToCanvas = function(n) {
  52929. n = n || {};
  52930. var r = this._zr.painter;
  52931. if (process.env.NODE_ENV !== "production" && r.type !== "canvas")
  52932. throw new Error("renderToCanvas can only be used in the canvas renderer.");
  52933. return r.getRenderedCanvas({
  52934. backgroundColor: n.backgroundColor || this._model.get("backgroundColor"),
  52935. pixelRatio: n.pixelRatio || this.getDevicePixelRatio()
  52936. });
  52937. }, e.prototype.renderToSVGString = function(n) {
  52938. n = n || {};
  52939. var r = this._zr.painter;
  52940. if (process.env.NODE_ENV !== "production" && r.type !== "svg")
  52941. throw new Error("renderToSVGString can only be used in the svg renderer.");
  52942. return r.renderToString({
  52943. useViewBox: n.useViewBox
  52944. });
  52945. }, e.prototype.getSvgDataURL = function() {
  52946. if (vt.svgSupported) {
  52947. var n = this._zr, r = n.storage.getDisplayList();
  52948. return k(r, function(i) {
  52949. i.stopAnimation(null, !0);
  52950. }), n.painter.toDataURL();
  52951. }
  52952. }, e.prototype.getDataURL = function(n) {
  52953. if (this._disposed) {
  52954. Ri(this.id);
  52955. return;
  52956. }
  52957. n = n || {};
  52958. var r = n.excludeComponents, i = this._model, a = [], o = this;
  52959. k(r, function(l) {
  52960. i.eachComponent({
  52961. mainType: l
  52962. }, function(u) {
  52963. var c = o._componentsMap[u.__viewId];
  52964. c.group.ignore || (a.push(c), c.group.ignore = !0);
  52965. });
  52966. });
  52967. var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(n).toDataURL("image/" + (n && n.type || "png"));
  52968. return k(a, function(l) {
  52969. l.group.ignore = !1;
  52970. }), s;
  52971. }, e.prototype.getConnectedDataURL = function(n) {
  52972. if (this._disposed) {
  52973. Ri(this.id);
  52974. return;
  52975. }
  52976. var r = n.type === "svg", i = this.group, a = Math.min, o = Math.max, s = 1 / 0;
  52977. if (CO[i]) {
  52978. var l = s, u = s, c = -s, f = -s, d = [], h = n && n.pixelRatio || this.getDevicePixelRatio();
  52979. k(nf, function(b, _) {
  52980. if (b.group === i) {
  52981. var O = r ? b.getZr().painter.getSvgDom().innerHTML : b.renderToCanvas(Le(n)), S = b.getDom().getBoundingClientRect();
  52982. l = a(S.left, l), u = a(S.top, u), c = o(S.right, c), f = o(S.bottom, f), d.push({
  52983. dom: O,
  52984. left: S.left,
  52985. top: S.top
  52986. });
  52987. }
  52988. }), l *= h, u *= h, c *= h, f *= h;
  52989. var p = c - l, v = f - u, g = oo.createCanvas(), m = wA(g, {
  52990. renderer: r ? "svg" : "canvas"
  52991. });
  52992. if (m.resize({
  52993. width: p,
  52994. height: v
  52995. }), r) {
  52996. var y = "";
  52997. return k(d, function(b) {
  52998. var _ = b.left - l, O = b.top - u;
  52999. y += '<g transform="translate(' + _ + "," + O + ')">' + b.dom + "</g>";
  53000. }), m.painter.getSvgRoot().innerHTML = y, n.connectedBackgroundColor && m.painter.setBackgroundColor(n.connectedBackgroundColor), m.refreshImmediately(), m.painter.toDataURL();
  53001. } else
  53002. return n.connectedBackgroundColor && m.add(new mt({
  53003. shape: {
  53004. x: 0,
  53005. y: 0,
  53006. width: p,
  53007. height: v
  53008. },
  53009. style: {
  53010. fill: n.connectedBackgroundColor
  53011. }
  53012. })), k(d, function(b) {
  53013. var _ = new lr({
  53014. style: {
  53015. x: b.left * h - l,
  53016. y: b.top * h - u,
  53017. image: b.dom
  53018. }
  53019. });
  53020. m.add(_);
  53021. }), m.refreshImmediately(), g.toDataURL("image/" + (n && n.type || "png"));
  53022. } else
  53023. return this.getDataURL(n);
  53024. }, e.prototype.convertToPixel = function(n, r) {
  53025. return zT(this, "convertToPixel", n, r);
  53026. }, e.prototype.convertFromPixel = function(n, r) {
  53027. return zT(this, "convertFromPixel", n, r);
  53028. }, e.prototype.containPixel = function(n, r) {
  53029. if (this._disposed) {
  53030. Ri(this.id);
  53031. return;
  53032. }
  53033. var i = this._model, a, o = Dg(i, n);
  53034. return k(o, function(s, l) {
  53035. l.indexOf("Models") >= 0 && k(s, function(u) {
  53036. var c = u.coordinateSystem;
  53037. if (c && c.containPoint)
  53038. a = a || !!c.containPoint(r);
  53039. else if (l === "seriesModels") {
  53040. var f = this._chartsMap[u.__viewId];
  53041. f && f.containPoint ? a = a || f.containPoint(r, u) : process.env.NODE_ENV !== "production" && dn(l + ": " + (f ? "The found component do not support containPoint." : "No view mapping to the found component."));
  53042. } else
  53043. process.env.NODE_ENV !== "production" && dn(l + ": containPoint is not supported");
  53044. }, this);
  53045. }, this), !!a;
  53046. }, e.prototype.getVisual = function(n, r) {
  53047. var i = this._model, a = Dg(i, n, {
  53048. defaultMainType: "series"
  53049. }), o = a.seriesModel;
  53050. process.env.NODE_ENV !== "production" && (o || dn("There is no specified series model"));
  53051. var s = o.getData(), l = a.hasOwnProperty("dataIndexInside") ? a.dataIndexInside : a.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(a.dataIndex) : null;
  53052. return l != null ? fk(s, l, r) : G0(s, r);
  53053. }, e.prototype.getViewOfComponentModel = function(n) {
  53054. return this._componentsMap[n.__viewId];
  53055. }, e.prototype.getViewOfSeriesModel = function(n) {
  53056. return this._chartsMap[n.__viewId];
  53057. }, e.prototype._initEvents = function() {
  53058. var n = this;
  53059. k(X8e, function(r) {
  53060. var i = function(a) {
  53061. var o = n.getModel(), s = a.target, l, u = r === "globalout";
  53062. if (u ? l = {} : s && Bc(s, function(p) {
  53063. var v = Fe(p);
  53064. if (v && v.dataIndex != null) {
  53065. var g = v.dataModel || o.getSeriesByIndex(v.seriesIndex);
  53066. return l = g && g.getDataParams(v.dataIndex, v.dataType, s) || {}, !0;
  53067. } else if (v.eventData)
  53068. return l = le({}, v.eventData), !0;
  53069. }, !0), l) {
  53070. var c = l.componentType, f = l.componentIndex;
  53071. (c === "markLine" || c === "markPoint" || c === "markArea") && (c = "series", f = l.seriesIndex);
  53072. var d = c && f != null && o.getComponent(c, f), h = d && n[d.mainType === "series" ? "_chartsMap" : "_componentsMap"][d.__viewId];
  53073. process.env.NODE_ENV !== "production" && !u && !(d && h) && dn("model or view can not be found by params"), l.event = a, l.type = r, n._$eventProcessor.eventInfo = {
  53074. targetEl: s,
  53075. packedEvent: l,
  53076. model: d,
  53077. view: h
  53078. }, n.trigger(r, l);
  53079. }
  53080. };
  53081. i.zrEventfulCallAtLast = !0, n._zr.on(r, i, n);
  53082. }), k(zg, function(r, i) {
  53083. n._messageCenter.on(i, function(a) {
  53084. this.trigger(i, a);
  53085. }, n);
  53086. }), k(["selectchanged"], function(r) {
  53087. n._messageCenter.on(r, function(i) {
  53088. this.trigger(r, i);
  53089. }, n);
  53090. }), a8e(this._messageCenter, this, this._api);
  53091. }, e.prototype.isDisposed = function() {
  53092. return this._disposed;
  53093. }, e.prototype.clear = function() {
  53094. if (this._disposed) {
  53095. Ri(this.id);
  53096. return;
  53097. }
  53098. this.setOption({
  53099. series: []
  53100. }, !0);
  53101. }, e.prototype.dispose = function() {
  53102. if (this._disposed) {
  53103. Ri(this.id);
  53104. return;
  53105. }
  53106. this._disposed = !0;
  53107. var n = this.getDom();
  53108. n && gK(this.getDom(), gk, "");
  53109. var r = this, i = r._api, a = r._model;
  53110. k(r._componentsViews, function(o) {
  53111. o.dispose(a, i);
  53112. }), k(r._chartsViews, function(o) {
  53113. o.dispose(a, i);
  53114. }), 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 nf[r.id];
  53115. }, e.prototype.resize = function(n) {
  53116. if (this[Mr]) {
  53117. process.env.NODE_ENV !== "production" && Cr("`resize` should not be called during main process.");
  53118. return;
  53119. }
  53120. if (this._disposed) {
  53121. Ri(this.id);
  53122. return;
  53123. }
  53124. this._zr.resize(n);
  53125. var r = this._model;
  53126. if (this._loadingFX && this._loadingFX.resize(), !!r) {
  53127. var i = r.resetOption("media"), a = n && n.silent;
  53128. this[li] && (a == null && (a = this[li].silent), i = !0, this[li] = null), this[Mr] = !0;
  53129. try {
  53130. i && fd(this), vl.update.call(this, {
  53131. type: "resize",
  53132. animation: le({
  53133. // Disable animation
  53134. duration: 0
  53135. }, n && n.animation)
  53136. });
  53137. } catch (o) {
  53138. throw this[Mr] = !1, o;
  53139. }
  53140. this[Mr] = !1, vv.call(this, a), gv.call(this, a);
  53141. }
  53142. }, e.prototype.showLoading = function(n, r) {
  53143. if (this._disposed) {
  53144. Ri(this.id);
  53145. return;
  53146. }
  53147. if (Ie(n) && (r = n, n = ""), n = n || "default", this.hideLoading(), !tE[n]) {
  53148. process.env.NODE_ENV !== "production" && dn("Loading effects " + n + " not exists.");
  53149. return;
  53150. }
  53151. var i = tE[n](this._api, r), a = this._zr;
  53152. this._loadingFX = i, a.add(i);
  53153. }, e.prototype.hideLoading = function() {
  53154. if (this._disposed) {
  53155. Ri(this.id);
  53156. return;
  53157. }
  53158. this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null;
  53159. }, e.prototype.makeActionFromEvent = function(n) {
  53160. var r = le({}, n);
  53161. return r.type = zg[n.type], r;
  53162. }, e.prototype.dispatchAction = function(n, r) {
  53163. if (this._disposed) {
  53164. Ri(this.id);
  53165. return;
  53166. }
  53167. if (Ie(r) || (r = {
  53168. silent: !!r
  53169. }), !!xO[n.type] && this._model) {
  53170. if (this[Mr]) {
  53171. this._pendingActions.push(n);
  53172. return;
  53173. }
  53174. var i = r.silent;
  53175. FT.call(this, n, i);
  53176. var a = r.flush;
  53177. a ? this._zr.flush() : a !== !1 && vt.browser.weChat && this._throttledZrFlush(), vv.call(this, i), gv.call(this, i);
  53178. }
  53179. }, e.prototype.updateLabelLayout = function() {
  53180. Ua.trigger("series:layoutlabels", this._model, this._api, {
  53181. // Not adding series labels.
  53182. // TODO
  53183. updatedSeries: []
  53184. });
  53185. }, e.prototype.appendData = function(n) {
  53186. if (this._disposed) {
  53187. Ri(this.id);
  53188. return;
  53189. }
  53190. var r = n.seriesIndex, i = this.getModel(), a = i.getSeriesByIndex(r);
  53191. process.env.NODE_ENV !== "production" && ke(n.data && a), a.appendData(n), this._scheduler.unfinished = !0, this.getZr().wakeUp();
  53192. }, e.internalField = function() {
  53193. fd = function(f) {
  53194. var d = f._scheduler;
  53195. d.restorePipelines(f._model), d.prepareStageTasks(), BT(f, !0), BT(f, !1), d.plan();
  53196. }, BT = function(f, d) {
  53197. 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, b = 0; b < v.length; b++)
  53198. v[b].__alive = !1;
  53199. d ? h.eachComponent(function(S, x) {
  53200. S !== "series" && _(x);
  53201. }) : h.eachSeries(_);
  53202. function _(S) {
  53203. var x = S.__requireNewView;
  53204. S.__requireNewView = !1;
  53205. var C = "_ec_" + S.id + "_" + S.type, T = !x && g[C];
  53206. if (!T) {
  53207. var w = Fo(S.type), P = d ? Xt.getClass(w.main, w.sub) : (
  53208. // FIXME:TS
  53209. // (ChartView as ChartViewConstructor).getClass('series', classType.sub)
  53210. // For backward compat, still support a chart type declared as only subType
  53211. // like "liquidfill", but recommend "series.liquidfill"
  53212. // But need a base class to make a type series.
  53213. zt.getClass(w.sub)
  53214. );
  53215. process.env.NODE_ENV !== "production" && ke(P, w.sub + " does not exist."), T = new P(), T.init(h, y), g[C] = T, v.push(T), m.add(T.group);
  53216. }
  53217. S.__viewId = T.__id = C, T.__alive = !0, T.__model = S, T.group.__ecComponentInfo = {
  53218. mainType: S.mainType,
  53219. index: S.componentIndex
  53220. }, !d && p.prepareView(T, S, h, y);
  53221. }
  53222. for (var b = 0; b < v.length; ) {
  53223. var O = v[b];
  53224. O.__alive ? b++ : (!d && O.renderTask.dispose(), m.remove(O.group), O.dispose(h, y), v.splice(b, 1), g[O.__id] === O && delete g[O.__id], O.__id = O.group.__ecComponentInfo = null);
  53225. }
  53226. }, cb = function(f, d, h, p, v) {
  53227. var g = f._model;
  53228. if (g.setUpdatePayload(h), !p) {
  53229. k([].concat(f._componentsViews).concat(f._chartsViews), O);
  53230. return;
  53231. }
  53232. var m = {};
  53233. m[p + "Id"] = h[p + "Id"], m[p + "Index"] = h[p + "Index"], m[p + "Name"] = h[p + "Name"];
  53234. var y = {
  53235. mainType: p,
  53236. query: m
  53237. };
  53238. v && (y.subType = v);
  53239. var b = h.excludeSeriesId, _;
  53240. b != null && (_ = Pe(), k(Qt(b), function(S) {
  53241. var x = Vn(S, null);
  53242. x != null && _.set(x, !0);
  53243. })), g && g.eachComponent(y, function(S) {
  53244. var x = _ && _.get(S.id) != null;
  53245. if (!x)
  53246. if (RB(h))
  53247. if (S instanceof Ht)
  53248. h.type === ef && !h.notBlur && !S.get(["emphasis", "disabled"]) && lke(S, h, f._api);
  53249. else {
  53250. var C = zR(S.mainType, S.componentIndex, h.name, f._api), T = C.focusSelf, w = C.dispatchers;
  53251. h.type === ef && T && !h.notBlur && RA(S.mainType, S.componentIndex, f._api), w && k(w, function(P) {
  53252. h.type === ef ? Zs(P) : Us(P);
  53253. });
  53254. }
  53255. else LA(h) && S instanceof Ht && (fke(S, h, f._api), IB(S), ra(f));
  53256. }, f), g && g.eachComponent(y, function(S) {
  53257. var x = _ && _.get(S.id) != null;
  53258. x || O(f[p === "series" ? "_chartsMap" : "_componentsMap"][S.__viewId]);
  53259. }, f);
  53260. function O(S) {
  53261. S && S.__alive && S[d] && S[d](S.__model, g, f._api, h);
  53262. }
  53263. }, vl = {
  53264. prepareAndUpdate: function(f) {
  53265. fd(this), vl.update.call(this, f, {
  53266. // Needs to mark option changed if newOption is given.
  53267. // It's from MagicType.
  53268. // TODO If use a separate flag optionChanged in payload?
  53269. optionChanged: f.newOption != null
  53270. });
  53271. },
  53272. update: function(f, d) {
  53273. var h = this._model, p = this._api, v = this._zr, g = this._coordSysMgr, m = this._scheduler;
  53274. if (h) {
  53275. h.setUpdatePayload(f), m.restoreData(h, f), m.performSeriesTasks(h), g.create(h, p), m.performDataProcessorTasks(h, f), VT(this, h), g.update(h, p), n(h), m.performVisualTasks(h, f), WT(this, h, p, f, d);
  53276. var y = h.get("backgroundColor") || "transparent", b = h.get("darkMode");
  53277. v.setBackgroundColor(y), b != null && b !== "auto" && v.setDarkMode(b), Ua.trigger("afterupdate", h, p);
  53278. }
  53279. },
  53280. updateTransform: function(f) {
  53281. var d = this, h = this._model, p = this._api;
  53282. if (h) {
  53283. h.setUpdatePayload(f);
  53284. var v = [];
  53285. h.eachComponent(function(m, y) {
  53286. if (m !== "series") {
  53287. var b = d.getViewOfComponentModel(y);
  53288. if (b && b.__alive)
  53289. if (b.updateTransform) {
  53290. var _ = b.updateTransform(y, h, p, f);
  53291. _ && _.update && v.push(b);
  53292. } else
  53293. v.push(b);
  53294. }
  53295. });
  53296. var g = Pe();
  53297. h.eachSeries(function(m) {
  53298. var y = d._chartsMap[m.__viewId];
  53299. if (y.updateTransform) {
  53300. var b = y.updateTransform(m, h, p, f);
  53301. b && b.update && g.set(m.uid, 1);
  53302. } else
  53303. g.set(m.uid, 1);
  53304. }), n(h), this._scheduler.performVisualTasks(h, f, {
  53305. setDirty: !0,
  53306. dirtyMap: g
  53307. }), fb(this, h, p, f, {}, g), Ua.trigger("afterupdate", h, p);
  53308. }
  53309. },
  53310. updateView: function(f) {
  53311. var d = this._model;
  53312. d && (d.setUpdatePayload(f), zt.markUpdateMethod(f, "updateView"), n(d), this._scheduler.performVisualTasks(d, f, {
  53313. setDirty: !0
  53314. }), WT(this, d, this._api, f, {}), Ua.trigger("afterupdate", d, this._api));
  53315. },
  53316. updateVisual: function(f) {
  53317. var d = this, h = this._model;
  53318. h && (h.setUpdatePayload(f), h.eachSeries(function(p) {
  53319. p.getData().clearAllVisual();
  53320. }), zt.markUpdateMethod(f, "updateVisual"), n(h), this._scheduler.performVisualTasks(h, f, {
  53321. visualType: "visual",
  53322. setDirty: !0
  53323. }), h.eachComponent(function(p, v) {
  53324. if (p !== "series") {
  53325. var g = d.getViewOfComponentModel(v);
  53326. g && g.__alive && g.updateVisual(v, h, d._api, f);
  53327. }
  53328. }), h.eachSeries(function(p) {
  53329. var v = d._chartsMap[p.__viewId];
  53330. v.updateVisual(p, h, d._api, f);
  53331. }), Ua.trigger("afterupdate", h, this._api));
  53332. },
  53333. updateLayout: function(f) {
  53334. vl.update.call(this, f);
  53335. }
  53336. }, zT = function(f, d, h, p) {
  53337. if (f._disposed) {
  53338. Ri(f.id);
  53339. return;
  53340. }
  53341. for (var v = f._model, g = f._coordSysMgr.getCoordinateSystems(), m, y = Dg(v, h), b = 0; b < g.length; b++) {
  53342. var _ = g[b];
  53343. if (_[d] && (m = _[d](v, y, p)) != null)
  53344. return m;
  53345. }
  53346. process.env.NODE_ENV !== "production" && dn("No coordinate system that supports " + d + " found by the given finder.");
  53347. }, VT = function(f, d) {
  53348. var h = f._chartsMap, p = f._scheduler;
  53349. d.eachSeries(function(v) {
  53350. p.updateStreamModes(v, h[v.__viewId]);
  53351. });
  53352. }, FT = function(f, d) {
  53353. var h = this, p = this.getModel(), v = f.type, g = f.escapeConnect, m = xO[v], y = m.actionInfo, b = (y.update || "update").split(":"), _ = b.pop(), O = b[0] != null && Fo(b[0]);
  53354. this[Mr] = !0;
  53355. var S = [f], x = !1;
  53356. f.batch && (x = !0, S = ce(f.batch, function(D) {
  53357. return D = Re(le({}, D), f), D.batch = null, D;
  53358. }));
  53359. var C = [], T, w = LA(f), P = RB(f);
  53360. if (P && FK(this._api), k(S, function(D) {
  53361. if (T = m.action(D, h._model, h._api), T = T || le({}, D), T.type = y.event || T.type, C.push(T), P) {
  53362. var E = MR(f), R = E.queryOptionMap, N = E.mainTypeSpecified, V = N ? R.keys()[0] : "series";
  53363. cb(h, _, D, V), ra(h);
  53364. } else w ? (cb(h, _, D, "series"), ra(h)) : O && cb(h, _, D, O.main, O.sub);
  53365. }), _ !== "none" && !P && !w && !O)
  53366. try {
  53367. this[li] ? (fd(this), vl.update.call(this, f), this[li] = null) : vl[_].call(this, f);
  53368. } catch (D) {
  53369. throw this[Mr] = !1, D;
  53370. }
  53371. if (x ? T = {
  53372. type: y.event || v,
  53373. escapeConnect: g,
  53374. batch: C
  53375. } : T = C[0], this[Mr] = !1, !d) {
  53376. var $ = this._messageCenter;
  53377. if ($.trigger(T.type, T), w) {
  53378. var A = {
  53379. type: "selectchanged",
  53380. escapeConnect: g,
  53381. selected: dke(p),
  53382. isFromClick: f.isFromClick || !1,
  53383. fromAction: f.type,
  53384. fromActionPayload: f
  53385. };
  53386. $.trigger(A.type, A);
  53387. }
  53388. }
  53389. }, vv = function(f) {
  53390. for (var d = this._pendingActions; d.length; ) {
  53391. var h = d.shift();
  53392. FT.call(this, h, f);
  53393. }
  53394. }, gv = function(f) {
  53395. !f && this.trigger("updated");
  53396. }, Uz = function(f, d) {
  53397. f.on("rendered", function(h) {
  53398. d.trigger("rendered", h), // Although zr is dirty if initial animation is not finished
  53399. // and this checking is called on frame, we also check
  53400. // animation finished for robustness.
  53401. f.animation.isFinished() && !d[li] && !d._scheduler.unfinished && !d._pendingActions.length && d.trigger("finished");
  53402. });
  53403. }, Xz = function(f, d) {
  53404. f.on("mouseover", function(h) {
  53405. var p = h.target, v = Bc(p, lu);
  53406. v && (uke(v, h, d._api), ra(d));
  53407. }).on("mouseout", function(h) {
  53408. var p = h.target, v = Bc(p, lu);
  53409. v && (cke(v, h, d._api), ra(d));
  53410. }).on("click", function(h) {
  53411. var p = h.target, v = Bc(p, function(y) {
  53412. return Fe(y).dataIndex != null;
  53413. }, !0);
  53414. if (v) {
  53415. var g = v.selected ? "unselect" : "select", m = Fe(v);
  53416. d._api.dispatchAction({
  53417. type: g,
  53418. dataType: m.dataType,
  53419. dataIndexInside: m.dataIndex,
  53420. seriesIndex: m.seriesIndex,
  53421. isFromClick: !0
  53422. });
  53423. }
  53424. });
  53425. };
  53426. function n(f) {
  53427. f.clearColorPalette(), f.eachSeries(function(d) {
  53428. d.clearColorPalette();
  53429. });
  53430. }
  53431. function r(f) {
  53432. var d = [], h = [], p = !1;
  53433. if (f.eachComponent(function(y, b) {
  53434. var _ = b.get("zlevel") || 0, O = b.get("z") || 0, S = b.getZLevelKey();
  53435. p = p || !!S, (y === "series" ? h : d).push({
  53436. zlevel: _,
  53437. z: O,
  53438. idx: b.componentIndex,
  53439. type: y,
  53440. key: S
  53441. });
  53442. }), p) {
  53443. var v = d.concat(h), g, m;
  53444. L_(v, function(y, b) {
  53445. return y.zlevel === b.zlevel ? y.z - b.z : y.zlevel - b.zlevel;
  53446. }), k(v, function(y) {
  53447. var b = f.getComponent(y.type, y.idx), _ = y.zlevel, O = y.key;
  53448. g != null && (_ = Math.max(g, _)), O ? (_ === g && O !== m && _++, m = O) : m && (_ === g && _++, m = ""), g = _, b.setZLevel(_);
  53449. });
  53450. }
  53451. }
  53452. WT = function(f, d, h, p, v) {
  53453. r(d), Yz(f, d, h, p, v), k(f._chartsViews, function(g) {
  53454. g.__alive = !1;
  53455. }), fb(f, d, h, p, v), k(f._chartsViews, function(g) {
  53456. g.__alive || g.remove(d, h);
  53457. });
  53458. }, Yz = function(f, d, h, p, v, g) {
  53459. k(g || f._componentsViews, function(m) {
  53460. var y = m.__model;
  53461. u(y, m), m.render(y, d, h, p), s(y, m), c(y, m);
  53462. });
  53463. }, fb = function(f, d, h, p, v, g) {
  53464. var m = f._scheduler;
  53465. v = le(v || {}, {
  53466. updatedSeries: d.getSeries()
  53467. }), Ua.trigger("series:beforeupdate", d, h, v);
  53468. var y = !1;
  53469. d.eachSeries(function(b) {
  53470. var _ = f._chartsMap[b.__viewId];
  53471. _.__alive = !0;
  53472. var O = _.renderTask;
  53473. m.updatePayload(O, p), u(b, _), g && g.get(b.uid) && O.dirty(), O.perform(m.getPerformArgs(O)) && (y = !0), _.group.silent = !!b.get("silent"), o(b, _), IB(b);
  53474. }), m.unfinished = y || m.unfinished, Ua.trigger("series:layoutlabels", d, h, v), Ua.trigger("series:transition", d, h, v), d.eachSeries(function(b) {
  53475. var _ = f._chartsMap[b.__viewId];
  53476. s(b, _), c(b, _);
  53477. }), a(f, d), Ua.trigger("series:afterupdate", d, h, v);
  53478. }, ra = function(f) {
  53479. f[LT] = !0, f.getZr().wakeUp();
  53480. }, Kz = function(f) {
  53481. f[LT] && (f.getZr().storage.traverse(function(d) {
  53482. rh(d) || i(d);
  53483. }), f[LT] = !1);
  53484. };
  53485. function i(f) {
  53486. for (var d = [], h = f.currentStates, p = 0; p < h.length; p++) {
  53487. var v = h[p];
  53488. v === "emphasis" || v === "blur" || v === "select" || d.push(v);
  53489. }
  53490. f.selected && f.states.select && d.push("select"), f.hoverState === Ux && f.states.emphasis ? d.push("emphasis") : f.hoverState === z0 && f.states.blur && d.push("blur"), f.useStates(d);
  53491. }
  53492. function a(f, d) {
  53493. var h = f._zr, p = h.storage, v = 0;
  53494. p.traverse(function(g) {
  53495. g.isGroup || v++;
  53496. }), v > d.get("hoverLayerThreshold") && !vt.node && !vt.worker && d.eachSeries(function(g) {
  53497. if (!g.preventUsingHoverLayer) {
  53498. var m = f._chartsMap[g.__viewId];
  53499. m.__alive && m.eachRendered(function(y) {
  53500. y.states.emphasis && (y.states.emphasis.hoverLayer = !0);
  53501. });
  53502. }
  53503. });
  53504. }
  53505. function o(f, d) {
  53506. var h = f.get("blendMode") || null;
  53507. d.eachRendered(function(p) {
  53508. p.isGroup || (p.style.blend = h);
  53509. });
  53510. }
  53511. function s(f, d) {
  53512. if (!f.preventAutoZ) {
  53513. var h = f.get("z") || 0, p = f.get("zlevel") || 0;
  53514. d.eachRendered(function(v) {
  53515. return l(v, h, p, -1 / 0), !0;
  53516. });
  53517. }
  53518. }
  53519. function l(f, d, h, p) {
  53520. var v = f.getTextContent(), g = f.getTextGuideLine(), m = f.isGroup;
  53521. if (m)
  53522. for (var y = f.childrenRef(), b = 0; b < y.length; b++)
  53523. p = Math.max(l(y[b], d, h, p), p);
  53524. else
  53525. f.z = d, f.zlevel = h, p = Math.max(f.z2, p);
  53526. if (v && (v.z = d, v.zlevel = h, isFinite(p) && (v.z2 = p + 2)), g) {
  53527. var _ = f.textGuideLineConfig;
  53528. g.z = d, g.zlevel = h, isFinite(p) && (g.z2 = p + (_ && _.showAbove ? 1 : -1));
  53529. }
  53530. return p;
  53531. }
  53532. function u(f, d) {
  53533. d.eachRendered(function(h) {
  53534. if (!rh(h)) {
  53535. var p = h.getTextContent(), v = h.getTextGuideLine();
  53536. 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);
  53537. }
  53538. });
  53539. }
  53540. function c(f, d) {
  53541. var h = f.getModel("stateAnimation"), p = f.isAnimationEnabled(), v = h.get("duration"), g = v > 0 ? {
  53542. duration: v,
  53543. delay: h.get("delay"),
  53544. easing: h.get("easing")
  53545. // additive: stateAnimationModel.get('additive')
  53546. } : null;
  53547. d.eachRendered(function(m) {
  53548. if (m.states && m.states.emphasis) {
  53549. if (rh(m))
  53550. return;
  53551. if (m instanceof ot && mke(m), m.__dirty) {
  53552. var y = m.prevStates;
  53553. y && m.useStates(y);
  53554. }
  53555. if (p) {
  53556. m.stateTransition = g;
  53557. var b = m.getTextContent(), _ = m.getTextGuideLine();
  53558. b && (b.stateTransition = g), _ && (_.stateTransition = g);
  53559. }
  53560. m.__dirty && i(m);
  53561. }
  53562. });
  53563. }
  53564. qz = function(f) {
  53565. return new /** @class */
  53566. (function(d) {
  53567. q(h, d);
  53568. function h() {
  53569. return d !== null && d.apply(this, arguments) || this;
  53570. }
  53571. return h.prototype.getCoordinateSystems = function() {
  53572. return f._coordSysMgr.getCoordinateSystems();
  53573. }, h.prototype.getComponentByElement = function(p) {
  53574. for (; p; ) {
  53575. var v = p.__ecComponentInfo;
  53576. if (v != null)
  53577. return f._model.getComponent(v.mainType, v.index);
  53578. p = p.parent;
  53579. }
  53580. }, h.prototype.enterEmphasis = function(p, v) {
  53581. Zs(p, v), ra(f);
  53582. }, h.prototype.leaveEmphasis = function(p, v) {
  53583. Us(p, v), ra(f);
  53584. }, h.prototype.enterBlur = function(p) {
  53585. NK(p), ra(f);
  53586. }, h.prototype.leaveBlur = function(p) {
  53587. BR(p), ra(f);
  53588. }, h.prototype.enterSelect = function(p) {
  53589. BK(p), ra(f);
  53590. }, h.prototype.leaveSelect = function(p) {
  53591. zK(p), ra(f);
  53592. }, h.prototype.getModel = function() {
  53593. return f.getModel();
  53594. }, h.prototype.getViewOfComponentModel = function(p) {
  53595. return f.getViewOfComponentModel(p);
  53596. }, h.prototype.getViewOfSeriesModel = function(p) {
  53597. return f.getViewOfSeriesModel(p);
  53598. }, h;
  53599. }(LJ))(f);
  53600. }, Mee = function(f) {
  53601. function d(h, p) {
  53602. for (var v = 0; v < h.length; v++) {
  53603. var g = h[v];
  53604. g[NT] = p;
  53605. }
  53606. }
  53607. k(zg, function(h, p) {
  53608. f._messageCenter.on(p, function(v) {
  53609. if (CO[f.group] && f[NT] !== Zz) {
  53610. if (v && v.escapeConnect)
  53611. return;
  53612. var g = f.makeActionFromEvent(v), m = [];
  53613. k(nf, function(y) {
  53614. y !== f && y.group === f.group && m.push(y);
  53615. }), d(m, Zz), k(m, function(y) {
  53616. y[NT] !== Z8e && y.dispatchAction(g);
  53617. }), d(m, U8e);
  53618. }
  53619. });
  53620. });
  53621. };
  53622. }(), e;
  53623. }(La)
  53624. ), vk = SO.prototype;
  53625. vk.on = Tee("on");
  53626. vk.off = Tee("off");
  53627. vk.one = function(t, e, n) {
  53628. var r = this;
  53629. Ia("ECharts#one is deprecated.");
  53630. function i() {
  53631. for (var a = [], o = 0; o < arguments.length; o++)
  53632. a[o] = arguments[o];
  53633. e && e.apply && e.apply(this, a), r.off(t, i);
  53634. }
  53635. this.on.call(this, t, i, n);
  53636. };
  53637. var X8e = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
  53638. function Ri(t) {
  53639. process.env.NODE_ENV !== "production" && dn("Instance " + t + " has been disposed");
  53640. }
  53641. var xO = {}, zg = {}, JA = [], eE = [], wO = [], Iee = {}, tE = {}, nf = {}, CO = {}, Y8e = +/* @__PURE__ */ new Date() - 0, q8e = +/* @__PURE__ */ new Date() - 0, gk = "_echarts_instance_";
  53642. function Dee(t, e, n) {
  53643. var r = !(n && n.ssr);
  53644. if (r) {
  53645. if (process.env.NODE_ENV !== "production" && !t)
  53646. throw new Error("Initialize failed: invalid dom.");
  53647. var i = mk(t);
  53648. if (i)
  53649. return process.env.NODE_ENV !== "production" && dn("There is a chart instance already initialized on the dom."), i;
  53650. process.env.NODE_ENV !== "production" && au(t) && t.nodeName.toUpperCase() !== "CANVAS" && (!t.clientWidth && (!n || n.width == null) || !t.clientHeight && (!n || n.height == null)) && dn("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.");
  53651. }
  53652. var a = new SO(t, e, n);
  53653. return a.id = "ec_" + Y8e++, nf[a.id] = a, r && gK(t, gk, a.id), Mee(a), Ua.trigger("afterinit", a), a;
  53654. }
  53655. function K8e(t) {
  53656. if (ue(t)) {
  53657. var e = t;
  53658. t = null, k(e, function(n) {
  53659. n.group != null && (t = n.group);
  53660. }), t = t || "g_" + q8e++, k(e, function(n) {
  53661. n.group = t;
  53662. });
  53663. }
  53664. return CO[t] = !0, t;
  53665. }
  53666. function Ree(t) {
  53667. CO[t] = !1;
  53668. }
  53669. var J8e = Ree;
  53670. function eNe(t) {
  53671. Oe(t) ? t = nf[t] : t instanceof SO || (t = mk(t)), t instanceof SO && !t.isDisposed() && t.dispose();
  53672. }
  53673. function mk(t) {
  53674. return nf[aRe(t, gk)];
  53675. }
  53676. function tNe(t) {
  53677. return nf[t];
  53678. }
  53679. function yk(t, e) {
  53680. Iee[t] = e;
  53681. }
  53682. function bk(t) {
  53683. et(eE, t) < 0 && eE.push(t);
  53684. }
  53685. function _k(t, e) {
  53686. Ok(JA, t, e, V8e);
  53687. }
  53688. function kee(t) {
  53689. dw("afterinit", t);
  53690. }
  53691. function Lee(t) {
  53692. dw("afterupdate", t);
  53693. }
  53694. function dw(t, e) {
  53695. Ua.on(t, e);
  53696. }
  53697. function go(t, e, n) {
  53698. Me(e) && (n = e, e = "");
  53699. var r = Ie(t) ? t.type : [t, t = {
  53700. event: e
  53701. }][0];
  53702. t.event = (t.event || r).toLowerCase(), e = t.event, !zg[e] && (ke(jz.test(r) && jz.test(e)), xO[r] || (xO[r] = {
  53703. action: n,
  53704. actionInfo: t
  53705. }), zg[e] = r);
  53706. }
  53707. function Nee(t, e) {
  53708. Vf.register(t, e);
  53709. }
  53710. function nNe(t) {
  53711. var e = Vf.get(t);
  53712. if (e)
  53713. return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice();
  53714. }
  53715. function Bee(t, e) {
  53716. Ok(wO, t, e, See, "layout");
  53717. }
  53718. function $u(t, e) {
  53719. Ok(wO, t, e, xee, "visual");
  53720. }
  53721. var Jz = [];
  53722. function Ok(t, e, n, r, i) {
  53723. if ((Me(e) || Ie(e)) && (n = e, e = r), process.env.NODE_ENV !== "production") {
  53724. if (isNaN(e) || e == null)
  53725. throw new Error("Illegal priority");
  53726. k(t, function(o) {
  53727. ke(o.__raw !== n);
  53728. });
  53729. }
  53730. if (!(et(Jz, n) >= 0)) {
  53731. Jz.push(n);
  53732. var a = uee.wrapStageHandler(n, i);
  53733. a.__prio = e, a.__raw = n, t.push(a);
  53734. }
  53735. }
  53736. function Sk(t, e) {
  53737. tE[t] = e;
  53738. }
  53739. function rNe(t) {
  53740. process.env.NODE_ENV !== "production" && Ia("setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead."), Sq({
  53741. createCanvas: t
  53742. });
  53743. }
  53744. function zee(t, e, n) {
  53745. var r = Oee("registerMap");
  53746. r && r(t, e, n);
  53747. }
  53748. function iNe(t) {
  53749. var e = Oee("getMap");
  53750. return e && e(t);
  53751. }
  53752. var Vee = m4e;
  53753. $u(pk, W4e);
  53754. $u(fw, Q4e);
  53755. $u(fw, H4e);
  53756. $u(pk, r8e);
  53757. $u(fw, i8e);
  53758. $u(wee, I8e);
  53759. bk(BJ);
  53760. _k(B8e, qLe);
  53761. Sk("default", G4e);
  53762. go({
  53763. type: ef,
  53764. event: ef,
  53765. update: ef
  53766. }, On);
  53767. go({
  53768. type: F_,
  53769. event: F_,
  53770. update: F_
  53771. }, On);
  53772. go({
  53773. type: Rg,
  53774. event: Rg,
  53775. update: Rg
  53776. }, On);
  53777. go({
  53778. type: W_,
  53779. event: W_,
  53780. update: W_
  53781. }, On);
  53782. go({
  53783. type: kg,
  53784. event: kg,
  53785. update: kg
  53786. }, On);
  53787. yk("light", t8e);
  53788. yk("dark", hee);
  53789. var aNe = {}, eV = [], oNe = {
  53790. registerPreprocessor: bk,
  53791. registerProcessor: _k,
  53792. registerPostInit: kee,
  53793. registerPostUpdate: Lee,
  53794. registerUpdateLifecycle: dw,
  53795. registerAction: go,
  53796. registerCoordinateSystem: Nee,
  53797. registerLayout: Bee,
  53798. registerVisual: $u,
  53799. registerTransform: Vee,
  53800. registerLoading: Sk,
  53801. registerMap: zee,
  53802. registerImpl: D8e,
  53803. PRIORITY: Cee,
  53804. ComponentModel: rt,
  53805. ComponentView: Xt,
  53806. SeriesModel: Ht,
  53807. ChartView: zt,
  53808. // TODO Use ComponentModel and SeriesModel instead of Constructor
  53809. registerComponentModel: function(t) {
  53810. rt.registerClass(t);
  53811. },
  53812. registerComponentView: function(t) {
  53813. Xt.registerClass(t);
  53814. },
  53815. registerSeriesModel: function(t) {
  53816. Ht.registerClass(t);
  53817. },
  53818. registerChartView: function(t) {
  53819. zt.registerClass(t);
  53820. },
  53821. registerSubTypeDefaulter: function(t, e) {
  53822. rt.registerSubTypeDefaulter(t, e);
  53823. },
  53824. registerPainter: function(t, e) {
  53825. iK(t, e);
  53826. }
  53827. };
  53828. function at(t) {
  53829. if (ue(t)) {
  53830. k(t, function(e) {
  53831. at(e);
  53832. });
  53833. return;
  53834. }
  53835. et(eV, t) >= 0 || (eV.push(t), Me(t) && (t = {
  53836. install: t
  53837. }), t.install(oNe));
  53838. }
  53839. function mv(t) {
  53840. return t == null ? 0 : t.length || 1;
  53841. }
  53842. function tV(t) {
  53843. return t;
  53844. }
  53845. var Xs = (
  53846. /** @class */
  53847. function() {
  53848. function t(e, n, r, i, a, o) {
  53849. this._old = e, this._new = n, this._oldKeyGetter = r || tV, this._newKeyGetter = i || tV, this.context = a, this._diffModeMultiple = o === "multiple";
  53850. }
  53851. return t.prototype.add = function(e) {
  53852. return this._add = e, this;
  53853. }, t.prototype.update = function(e) {
  53854. return this._update = e, this;
  53855. }, t.prototype.updateManyToOne = function(e) {
  53856. return this._updateManyToOne = e, this;
  53857. }, t.prototype.updateOneToMany = function(e) {
  53858. return this._updateOneToMany = e, this;
  53859. }, t.prototype.updateManyToMany = function(e) {
  53860. return this._updateManyToMany = e, this;
  53861. }, t.prototype.remove = function(e) {
  53862. return this._remove = e, this;
  53863. }, t.prototype.execute = function() {
  53864. this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]();
  53865. }, t.prototype._executeOneToOne = function() {
  53866. var e = this._old, n = this._new, r = {}, i = new Array(e.length), a = new Array(n.length);
  53867. this._initIndexMap(e, null, i, "_oldKeyGetter"), this._initIndexMap(n, r, a, "_newKeyGetter");
  53868. for (var o = 0; o < e.length; o++) {
  53869. var s = i[o], l = r[s], u = mv(l);
  53870. if (u > 1) {
  53871. var c = l.shift();
  53872. l.length === 1 && (r[s] = l[0]), this._update && this._update(c, o);
  53873. } else u === 1 ? (r[s] = null, this._update && this._update(l, o)) : this._remove && this._remove(o);
  53874. }
  53875. this._performRestAdd(a, r);
  53876. }, t.prototype._executeMultiple = function() {
  53877. var e = this._old, n = this._new, r = {}, i = {}, a = [], o = [];
  53878. this._initIndexMap(e, r, a, "_oldKeyGetter"), this._initIndexMap(n, i, o, "_newKeyGetter");
  53879. for (var s = 0; s < a.length; s++) {
  53880. var l = a[s], u = r[l], c = i[l], f = mv(u), d = mv(c);
  53881. if (f > 1 && d === 1)
  53882. this._updateManyToOne && this._updateManyToOne(c, u), i[l] = null;
  53883. else if (f === 1 && d > 1)
  53884. this._updateOneToMany && this._updateOneToMany(c, u), i[l] = null;
  53885. else if (f === 1 && d === 1)
  53886. this._update && this._update(c, u), i[l] = null;
  53887. else if (f > 1 && d > 1)
  53888. this._updateManyToMany && this._updateManyToMany(c, u), i[l] = null;
  53889. else if (f > 1)
  53890. for (var h = 0; h < f; h++)
  53891. this._remove && this._remove(u[h]);
  53892. else
  53893. this._remove && this._remove(u);
  53894. }
  53895. this._performRestAdd(o, i);
  53896. }, t.prototype._performRestAdd = function(e, n) {
  53897. for (var r = 0; r < e.length; r++) {
  53898. var i = e[r], a = n[i], o = mv(a);
  53899. if (o > 1)
  53900. for (var s = 0; s < o; s++)
  53901. this._add && this._add(a[s]);
  53902. else o === 1 && this._add && this._add(a);
  53903. n[i] = null;
  53904. }
  53905. }, t.prototype._initIndexMap = function(e, n, r, i) {
  53906. for (var a = this._diffModeMultiple, o = 0; o < e.length; o++) {
  53907. var s = "_ec_" + this[i](e[o], o);
  53908. if (a || (r[o] = s), !!n) {
  53909. var l = n[s], u = mv(l);
  53910. u === 0 ? (n[s] = o, a && r.push(s)) : u === 1 ? n[s] = [l, o] : l.push(o);
  53911. }
  53912. }
  53913. }, t;
  53914. }()
  53915. ), sNe = (
  53916. /** @class */
  53917. function() {
  53918. function t(e, n) {
  53919. this._encode = e, this._schema = n;
  53920. }
  53921. return t.prototype.get = function() {
  53922. return {
  53923. // Do not generate full dimension name until fist used.
  53924. fullDimensions: this._getFullDimensionNames(),
  53925. encode: this._encode
  53926. };
  53927. }, t.prototype._getFullDimensionNames = function() {
  53928. return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames;
  53929. }, t;
  53930. }()
  53931. );
  53932. function lNe(t, e) {
  53933. var n = {}, r = n.encode = {}, i = Pe(), a = [], o = [], s = {};
  53934. k(t.dimensions, function(d) {
  53935. var h = t.getDimensionInfo(d), p = h.coordDim;
  53936. if (p) {
  53937. process.env.NODE_ENV !== "production" && ke(WA.get(p) == null);
  53938. var v = h.coordDimIndex;
  53939. QT(r, p)[v] = d, h.isExtraCoord || (i.set(p, 1), uNe(h.type) && (a[0] = d), QT(s, p)[v] = t.getDimensionIndex(h.name)), h.defaultTooltip && o.push(d);
  53940. }
  53941. WA.each(function(g, m) {
  53942. var y = QT(r, m), b = h.otherDims[m];
  53943. b != null && b !== !1 && (y[b] = h.name);
  53944. });
  53945. });
  53946. var l = [], u = {};
  53947. i.each(function(d, h) {
  53948. var p = r[h];
  53949. u[h] = p[0], l = l.concat(p);
  53950. }), n.dataDimsOnCoord = l, n.dataDimIndicesOnCoord = ce(l, function(d) {
  53951. return t.getDimensionInfo(d).storeDimIndex;
  53952. }), n.encodeFirstDimNotExtra = u;
  53953. var c = r.label;
  53954. c && c.length && (a = c.slice());
  53955. var f = r.tooltip;
  53956. return f && f.length ? o = f.slice() : o.length || (o = a.slice()), r.defaultedLabel = a, r.defaultedTooltip = o, n.userOutput = new sNe(s, e), n;
  53957. }
  53958. function QT(t, e) {
  53959. return t.hasOwnProperty(e) || (t[e] = []), t[e];
  53960. }
  53961. function TO(t) {
  53962. return t === "category" ? "ordinal" : t === "time" ? "time" : "float";
  53963. }
  53964. function uNe(t) {
  53965. return !(t === "ordinal" || t === "time");
  53966. }
  53967. var Z_ = (
  53968. /** @class */
  53969. /* @__PURE__ */ function() {
  53970. function t(e) {
  53971. this.otherDims = {}, e != null && le(this, e);
  53972. }
  53973. return t;
  53974. }()
  53975. ), cNe = bt(), fNe = {
  53976. float: "f",
  53977. int: "i",
  53978. ordinal: "o",
  53979. number: "n",
  53980. time: "t"
  53981. }, Fee = (
  53982. /** @class */
  53983. function() {
  53984. function t(e) {
  53985. this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
  53986. }
  53987. return t.prototype.isDimensionOmitted = function() {
  53988. return this._dimOmitted;
  53989. }, t.prototype._updateDimOmitted = function(e) {
  53990. this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = Hee(this.source)));
  53991. }, t.prototype.getSourceDimensionIndex = function(e) {
  53992. return We(this._dimNameMap.get(e), -1);
  53993. }, t.prototype.getSourceDimension = function(e) {
  53994. var n = this.source.dimensionsDefine;
  53995. if (n)
  53996. return n[e];
  53997. }, t.prototype.makeStoreSchema = function() {
  53998. for (var e = this._fullDimCount, n = VJ(this.source), r = !Gee(e), i = "", a = [], o = 0, s = 0; o < e; o++) {
  53999. var l = void 0, u = void 0, c = void 0, f = this.dimensions[s];
  54000. if (f && f.storeDimIndex === o)
  54001. l = n ? f.name : null, u = f.type, c = f.ordinalMeta, s++;
  54002. else {
  54003. var d = this.getSourceDimension(o);
  54004. d && (l = n ? d.name : null, u = d.type);
  54005. }
  54006. a.push({
  54007. property: l,
  54008. type: u,
  54009. ordinalMeta: c
  54010. }), n && l != null && (!f || !f.isCalculationCoord) && (i += r ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), i += "$", i += fNe[u] || "f", c && (i += c.uid), i += "$";
  54011. }
  54012. var h = this.source, p = [h.seriesLayoutBy, h.startIndex, i].join("$$");
  54013. return {
  54014. dimensions: a,
  54015. hash: p
  54016. };
  54017. }, t.prototype.makeOutputDimensionNames = function() {
  54018. for (var e = [], n = 0, r = 0; n < this._fullDimCount; n++) {
  54019. var i = void 0, a = this.dimensions[r];
  54020. if (a && a.storeDimIndex === n)
  54021. a.isCalculationCoord || (i = a.name), r++;
  54022. else {
  54023. var o = this.getSourceDimension(n);
  54024. o && (i = o.name);
  54025. }
  54026. e.push(i);
  54027. }
  54028. return e;
  54029. }, t.prototype.appendCalculationDimension = function(e) {
  54030. this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
  54031. }, t;
  54032. }()
  54033. );
  54034. function Wee(t) {
  54035. return t instanceof Fee;
  54036. }
  54037. function Qee(t) {
  54038. for (var e = Pe(), n = 0; n < (t || []).length; n++) {
  54039. var r = t[n], i = Ie(r) ? r.name : r;
  54040. i != null && e.get(i) == null && e.set(i, n);
  54041. }
  54042. return e;
  54043. }
  54044. function Hee(t) {
  54045. var e = cNe(t);
  54046. return e.dimNameMap || (e.dimNameMap = Qee(t.dimensionsDefine));
  54047. }
  54048. function Gee(t) {
  54049. return t > 30;
  54050. }
  54051. var yv = Ie, gl = ce, dNe = typeof Int32Array > "u" ? Array : Int32Array, hNe = "e\0\0", nV = -1, pNe = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], vNe = ["_approximateExtent"], rV, db, bv, dd, HT, hb, GT, gNe = (
  54052. /** @class */
  54053. function() {
  54054. function t(e, n) {
  54055. 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"];
  54056. var r, i = !1;
  54057. Wee(e) ? (r = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (i = !0, r = e), r = r || ["x", "y"];
  54058. for (var a = {}, o = [], s = {}, l = !1, u = {}, c = 0; c < r.length; c++) {
  54059. var f = r[c], d = Oe(f) ? new Z_({
  54060. name: f
  54061. }) : f instanceof Z_ ? f : new Z_(f), h = d.name;
  54062. d.type = d.type || "float", d.coordDim || (d.coordDim = h, d.coordDimIndex = 0);
  54063. var p = d.otherDims = d.otherDims || {};
  54064. 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" && ke(i || d.storeDimIndex >= 0), i && (d.storeDimIndex = c);
  54065. }
  54066. if (this.dimensions = o, this._dimInfos = a, this._initGetDimensionInfo(l), this.hostModel = n, this._invertedIndicesMap = s, this._dimOmitted) {
  54067. var v = this._dimIdxToName = Pe();
  54068. k(o, function(g) {
  54069. v.set(a[g].storeDimIndex, g);
  54070. });
  54071. }
  54072. }
  54073. return t.prototype.getDimension = function(e) {
  54074. var n = this._recognizeDimIndex(e);
  54075. if (n == null)
  54076. return e;
  54077. if (n = e, !this._dimOmitted)
  54078. return this.dimensions[n];
  54079. var r = this._dimIdxToName.get(n);
  54080. if (r != null)
  54081. return r;
  54082. var i = this._schema.getSourceDimension(n);
  54083. if (i)
  54084. return i.name;
  54085. }, t.prototype.getDimensionIndex = function(e) {
  54086. var n = this._recognizeDimIndex(e);
  54087. if (n != null)
  54088. return n;
  54089. if (e == null)
  54090. return -1;
  54091. var r = this._getDimInfo(e);
  54092. return r ? r.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
  54093. }, t.prototype._recognizeDimIndex = function(e) {
  54094. if (St(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0))
  54095. return +e;
  54096. }, t.prototype._getStoreDimIndex = function(e) {
  54097. var n = this.getDimensionIndex(e);
  54098. if (process.env.NODE_ENV !== "production" && n == null)
  54099. throw new Error("Unknown dimension " + e);
  54100. return n;
  54101. }, t.prototype.getDimensionInfo = function(e) {
  54102. return this._getDimInfo(this.getDimension(e));
  54103. }, t.prototype._initGetDimensionInfo = function(e) {
  54104. var n = this._dimInfos;
  54105. this._getDimInfo = e ? function(r) {
  54106. return n.hasOwnProperty(r) ? n[r] : void 0;
  54107. } : function(r) {
  54108. return n[r];
  54109. };
  54110. }, t.prototype.getDimensionsOnCoord = function() {
  54111. return this._dimSummary.dataDimsOnCoord.slice();
  54112. }, t.prototype.mapDimension = function(e, n) {
  54113. var r = this._dimSummary;
  54114. if (n == null)
  54115. return r.encodeFirstDimNotExtra[e];
  54116. var i = r.encode[e];
  54117. return i ? i[n] : null;
  54118. }, t.prototype.mapDimensionsAll = function(e) {
  54119. var n = this._dimSummary, r = n.encode[e];
  54120. return (r || []).slice();
  54121. }, t.prototype.getStore = function() {
  54122. return this._store;
  54123. }, t.prototype.initData = function(e, n, r) {
  54124. var i = this, a;
  54125. if (e instanceof jA && (a = e), !a) {
  54126. var o = this.dimensions, s = sk(e) || wr(e) ? new FJ(e, o.length) : e;
  54127. a = new jA();
  54128. var l = gl(o, function(u) {
  54129. return {
  54130. type: i._dimInfos[u].type,
  54131. property: u
  54132. };
  54133. });
  54134. a.initData(s, l, r);
  54135. }
  54136. this._store = a, this._nameList = (n || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, a.count()), this._dimSummary = lNe(this, this._schema), this.userOutput = this._dimSummary.userOutput;
  54137. }, t.prototype.appendData = function(e) {
  54138. var n = this._store.appendData(e);
  54139. this._doInit(n[0], n[1]);
  54140. }, t.prototype.appendValues = function(e, n) {
  54141. var r = this._store.appendValues(e, n.length), i = r.start, a = r.end, o = this._shouldMakeIdFromName();
  54142. if (this._updateOrdinalMeta(), n)
  54143. for (var s = i; s < a; s++) {
  54144. var l = s - i;
  54145. this._nameList[s] = n[l], o && GT(this, s);
  54146. }
  54147. }, t.prototype._updateOrdinalMeta = function() {
  54148. for (var e = this._store, n = this.dimensions, r = 0; r < n.length; r++) {
  54149. var i = this._dimInfos[n[r]];
  54150. i.ordinalMeta && e.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta);
  54151. }
  54152. }, t.prototype._shouldMakeIdFromName = function() {
  54153. var e = this._store.getProvider();
  54154. return this._idDimIdx == null && e.getSource().sourceFormat !== Rs && !e.fillStorage;
  54155. }, t.prototype._doInit = function(e, n) {
  54156. if (!(e >= n)) {
  54157. var r = this._store, i = r.getProvider();
  54158. this._updateOrdinalMeta();
  54159. var a = this._nameList, o = this._idList, s = i.getSource().sourceFormat, l = s === Ba;
  54160. if (l && !i.pure)
  54161. for (var u = [], c = e; c < n; c++) {
  54162. var f = i.getItem(c, u);
  54163. if (!this.hasItemOption && jDe(f) && (this.hasItemOption = !0), f) {
  54164. var d = f.name;
  54165. a[c] == null && d != null && (a[c] = Vn(d, null));
  54166. var h = f.id;
  54167. o[c] == null && h != null && (o[c] = Vn(h, null));
  54168. }
  54169. }
  54170. if (this._shouldMakeIdFromName())
  54171. for (var c = e; c < n; c++)
  54172. GT(this, c);
  54173. rV(this);
  54174. }
  54175. }, t.prototype.getApproximateExtent = function(e) {
  54176. return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e));
  54177. }, t.prototype.setApproximateExtent = function(e, n) {
  54178. n = this.getDimension(n), this._approximateExtent[n] = e.slice();
  54179. }, t.prototype.getCalculationInfo = function(e) {
  54180. return this._calculationInfo[e];
  54181. }, t.prototype.setCalculationInfo = function(e, n) {
  54182. yv(e) ? le(this._calculationInfo, e) : this._calculationInfo[e] = n;
  54183. }, t.prototype.getName = function(e) {
  54184. var n = this.getRawIndex(e), r = this._nameList[n];
  54185. return r == null && this._nameDimIdx != null && (r = bv(this, this._nameDimIdx, n)), r == null && (r = ""), r;
  54186. }, t.prototype._getCategory = function(e, n) {
  54187. var r = this._store.get(e, n), i = this._store.getOrdinalMeta(e);
  54188. return i ? i.categories[r] : r;
  54189. }, t.prototype.getId = function(e) {
  54190. return db(this, this.getRawIndex(e));
  54191. }, t.prototype.count = function() {
  54192. return this._store.count();
  54193. }, t.prototype.get = function(e, n) {
  54194. var r = this._store, i = this._dimInfos[e];
  54195. if (i)
  54196. return r.get(i.storeDimIndex, n);
  54197. }, t.prototype.getByRawIndex = function(e, n) {
  54198. var r = this._store, i = this._dimInfos[e];
  54199. if (i)
  54200. return r.getByRawIndex(i.storeDimIndex, n);
  54201. }, t.prototype.getIndices = function() {
  54202. return this._store.getIndices();
  54203. }, t.prototype.getDataExtent = function(e) {
  54204. return this._store.getDataExtent(this._getStoreDimIndex(e));
  54205. }, t.prototype.getSum = function(e) {
  54206. return this._store.getSum(this._getStoreDimIndex(e));
  54207. }, t.prototype.getMedian = function(e) {
  54208. return this._store.getMedian(this._getStoreDimIndex(e));
  54209. }, t.prototype.getValues = function(e, n) {
  54210. var r = this, i = this._store;
  54211. return ue(e) ? i.getValues(gl(e, function(a) {
  54212. return r._getStoreDimIndex(a);
  54213. }), n) : i.getValues(e);
  54214. }, t.prototype.hasValue = function(e) {
  54215. for (var n = this._dimSummary.dataDimIndicesOnCoord, r = 0, i = n.length; r < i; r++)
  54216. if (isNaN(this._store.get(n[r], e)))
  54217. return !1;
  54218. return !0;
  54219. }, t.prototype.indexOfName = function(e) {
  54220. for (var n = 0, r = this._store.count(); n < r; n++)
  54221. if (this.getName(n) === e)
  54222. return n;
  54223. return -1;
  54224. }, t.prototype.getRawIndex = function(e) {
  54225. return this._store.getRawIndex(e);
  54226. }, t.prototype.indexOfRawIndex = function(e) {
  54227. return this._store.indexOfRawIndex(e);
  54228. }, t.prototype.rawIndexOf = function(e, n) {
  54229. var r = e && this._invertedIndicesMap[e];
  54230. if (process.env.NODE_ENV !== "production" && !r)
  54231. throw new Error("Do not supported yet");
  54232. var i = r[n];
  54233. return i == null || isNaN(i) ? nV : i;
  54234. }, t.prototype.indicesOfNearest = function(e, n, r) {
  54235. return this._store.indicesOfNearest(this._getStoreDimIndex(e), n, r);
  54236. }, t.prototype.each = function(e, n, r) {
  54237. Me(e) && (r = n, n = e, e = []);
  54238. var i = r || this, a = gl(dd(e), this._getStoreDimIndex, this);
  54239. this._store.each(a, i ? xe(n, i) : n);
  54240. }, t.prototype.filterSelf = function(e, n, r) {
  54241. Me(e) && (r = n, n = e, e = []);
  54242. var i = r || this, a = gl(dd(e), this._getStoreDimIndex, this);
  54243. return this._store = this._store.filter(a, i ? xe(n, i) : n), this;
  54244. }, t.prototype.selectRange = function(e) {
  54245. var n = this, r = {}, i = st(e);
  54246. return k(i, function(a) {
  54247. var o = n._getStoreDimIndex(a);
  54248. r[o] = e[a];
  54249. }), this._store = this._store.selectRange(r), this;
  54250. }, t.prototype.mapArray = function(e, n, r) {
  54251. Me(e) && (r = n, n = e, e = []), r = r || this;
  54252. var i = [];
  54253. return this.each(e, function() {
  54254. i.push(n && n.apply(this, arguments));
  54255. }, r), i;
  54256. }, t.prototype.map = function(e, n, r, i) {
  54257. var a = r || i || this, o = gl(dd(e), this._getStoreDimIndex, this), s = hb(this);
  54258. return s._store = this._store.map(o, a ? xe(n, a) : n), s;
  54259. }, t.prototype.modify = function(e, n, r, i) {
  54260. var a = this, o = r || i || this;
  54261. process.env.NODE_ENV !== "production" && k(dd(e), function(l) {
  54262. var u = a.getDimensionInfo(l);
  54263. u.isCalculationCoord || console.error("Danger: only stack dimension can be modified");
  54264. });
  54265. var s = gl(dd(e), this._getStoreDimIndex, this);
  54266. this._store.modify(s, o ? xe(n, o) : n);
  54267. }, t.prototype.downSample = function(e, n, r, i) {
  54268. var a = hb(this);
  54269. return a._store = this._store.downSample(this._getStoreDimIndex(e), n, r, i), a;
  54270. }, t.prototype.lttbDownSample = function(e, n) {
  54271. var r = hb(this);
  54272. return r._store = this._store.lttbDownSample(this._getStoreDimIndex(e), n), r;
  54273. }, t.prototype.getRawDataItem = function(e) {
  54274. return this._store.getRawDataItem(e);
  54275. }, t.prototype.getItemModel = function(e) {
  54276. var n = this.hostModel, r = this.getRawDataItem(e);
  54277. return new Wt(r, n, n && n.ecModel);
  54278. }, t.prototype.diff = function(e) {
  54279. var n = this;
  54280. return new Xs(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(r) {
  54281. return db(e, r);
  54282. }, function(r) {
  54283. return db(n, r);
  54284. });
  54285. }, t.prototype.getVisual = function(e) {
  54286. var n = this._visual;
  54287. return n && n[e];
  54288. }, t.prototype.setVisual = function(e, n) {
  54289. this._visual = this._visual || {}, yv(e) ? le(this._visual, e) : this._visual[e] = n;
  54290. }, t.prototype.getItemVisual = function(e, n) {
  54291. var r = this._itemVisuals[e], i = r && r[n];
  54292. return i ?? this.getVisual(n);
  54293. }, t.prototype.hasItemVisual = function() {
  54294. return this._itemVisuals.length > 0;
  54295. }, t.prototype.ensureUniqueItemVisual = function(e, n) {
  54296. var r = this._itemVisuals, i = r[e];
  54297. i || (i = r[e] = {});
  54298. var a = i[n];
  54299. return a == null && (a = this.getVisual(n), ue(a) ? a = a.slice() : yv(a) && (a = le({}, a)), i[n] = a), a;
  54300. }, t.prototype.setItemVisual = function(e, n, r) {
  54301. var i = this._itemVisuals[e] || {};
  54302. this._itemVisuals[e] = i, yv(n) ? le(i, n) : i[n] = r;
  54303. }, t.prototype.clearAllVisual = function() {
  54304. this._visual = {}, this._itemVisuals = [];
  54305. }, t.prototype.setLayout = function(e, n) {
  54306. yv(e) ? le(this._layout, e) : this._layout[e] = n;
  54307. }, t.prototype.getLayout = function(e) {
  54308. return this._layout[e];
  54309. }, t.prototype.getItemLayout = function(e) {
  54310. return this._itemLayouts[e];
  54311. }, t.prototype.setItemLayout = function(e, n, r) {
  54312. this._itemLayouts[e] = r ? le(this._itemLayouts[e] || {}, n) : n;
  54313. }, t.prototype.clearItemLayouts = function() {
  54314. this._itemLayouts.length = 0;
  54315. }, t.prototype.setItemGraphicEl = function(e, n) {
  54316. var r = this.hostModel && this.hostModel.seriesIndex;
  54317. IA(r, this.dataType, e, n), this._graphicEls[e] = n;
  54318. }, t.prototype.getItemGraphicEl = function(e) {
  54319. return this._graphicEls[e];
  54320. }, t.prototype.eachItemGraphicEl = function(e, n) {
  54321. k(this._graphicEls, function(r, i) {
  54322. r && e && e.call(n, r, i);
  54323. });
  54324. }, t.prototype.cloneShallow = function(e) {
  54325. return e || (e = new t(this._schema ? this._schema : gl(this.dimensions, this._getDimInfo, this), this.hostModel)), HT(e, this), e._store = this._store, e;
  54326. }, t.prototype.wrapMethod = function(e, n) {
  54327. var r = this[e];
  54328. Me(r) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
  54329. var i = r.apply(this, arguments);
  54330. return n.apply(this, [i].concat(kx(arguments)));
  54331. });
  54332. }, t.internalField = function() {
  54333. rV = function(e) {
  54334. var n = e._invertedIndicesMap;
  54335. k(n, function(r, i) {
  54336. var a = e._dimInfos[i], o = a.ordinalMeta, s = e._store;
  54337. if (o) {
  54338. r = n[i] = new dNe(o.categories.length);
  54339. for (var l = 0; l < r.length; l++)
  54340. r[l] = nV;
  54341. for (var l = 0; l < s.count(); l++)
  54342. r[s.get(a.storeDimIndex, l)] = l;
  54343. }
  54344. });
  54345. }, bv = function(e, n, r) {
  54346. return Vn(e._getCategory(n, r), null);
  54347. }, db = function(e, n) {
  54348. var r = e._idList[n];
  54349. return r == null && e._idDimIdx != null && (r = bv(e, e._idDimIdx, n)), r == null && (r = hNe + n), r;
  54350. }, dd = function(e) {
  54351. return ue(e) || (e = e != null ? [e] : []), e;
  54352. }, hb = function(e) {
  54353. var n = new t(e._schema ? e._schema : gl(e.dimensions, e._getDimInfo, e), e.hostModel);
  54354. return HT(n, e), n;
  54355. }, HT = function(e, n) {
  54356. k(pNe.concat(n.__wrappedMethods || []), function(r) {
  54357. n.hasOwnProperty(r) && (e[r] = n[r]);
  54358. }), e.__wrappedMethods = n.__wrappedMethods, k(vNe, function(r) {
  54359. e[r] = Le(n[r]);
  54360. }), e._calculationInfo = le({}, n._calculationInfo);
  54361. }, GT = function(e, n) {
  54362. var r = e._nameList, i = e._idList, a = e._nameDimIdx, o = e._idDimIdx, s = r[n], l = i[n];
  54363. if (s == null && a != null && (r[n] = s = bv(e, a, n)), l == null && o != null && (i[n] = l = bv(e, o, n)), l == null && s != null) {
  54364. var u = e._nameRepeatCount, c = u[s] = (u[s] || 0) + 1;
  54365. l = s, c > 1 && (l += "__ec__" + c), i[n] = l;
  54366. }
  54367. };
  54368. }(), t;
  54369. }()
  54370. );
  54371. const Nr = gNe;
  54372. function mNe(t, e) {
  54373. return Ap(t, e).dimensions;
  54374. }
  54375. function Ap(t, e) {
  54376. sk(t) || (t = lk(t)), e = e || {};
  54377. var n = e.coordDimensions || [], r = e.dimensionsDefine || t.dimensionsDefine || [], i = Pe(), a = [], o = bNe(t, n, r, e.dimensionsCount), s = e.canOmitUnusedDimensions && Gee(o), l = r === t.dimensionsDefine, u = l ? Hee(t) : Qee(r), c = e.encodeDefine;
  54378. !c && e.encodeDefaulter && (c = e.encodeDefaulter(t, o));
  54379. for (var f = Pe(c), d = new XJ(o), h = 0; h < d.length; h++)
  54380. d[h] = -1;
  54381. function p(T) {
  54382. var w = d[T];
  54383. if (w < 0) {
  54384. var P = r[T], $ = Ie(P) ? P : {
  54385. name: P
  54386. }, A = new Z_(), D = $.name;
  54387. D != null && u.get(D) != null && (A.name = A.displayName = D), $.type != null && (A.type = $.type), $.displayName != null && (A.displayName = $.displayName);
  54388. var E = a.length;
  54389. return d[T] = E, A.storeDimIndex = T, a.push(A), A;
  54390. }
  54391. return a[w];
  54392. }
  54393. if (!s)
  54394. for (var h = 0; h < o; h++)
  54395. p(h);
  54396. f.each(function(T, w) {
  54397. var P = Qt(T).slice();
  54398. if (P.length === 1 && !Oe(P[0]) && P[0] < 0) {
  54399. f.set(w, !1);
  54400. return;
  54401. }
  54402. var $ = f.set(w, []);
  54403. k(P, function(A, D) {
  54404. var E = Oe(A) ? u.get(A) : A;
  54405. E != null && E < o && ($[D] = E, g(p(E), w, D));
  54406. });
  54407. });
  54408. var v = 0;
  54409. k(n, function(T) {
  54410. var w, P, $, A;
  54411. if (Oe(T))
  54412. w = T, A = {};
  54413. else {
  54414. A = T, w = A.name;
  54415. var D = A.ordinalMeta;
  54416. A.ordinalMeta = null, A = le({}, A), A.ordinalMeta = D, P = A.dimsDef, $ = A.otherDims, A.name = A.coordDim = A.coordDimIndex = A.dimsDef = A.otherDims = null;
  54417. }
  54418. var E = f.get(w);
  54419. if (E !== !1) {
  54420. if (E = Qt(E), !E.length)
  54421. for (var R = 0; R < (P && P.length || 1); R++) {
  54422. for (; v < o && p(v).coordDim != null; )
  54423. v++;
  54424. v < o && E.push(v++);
  54425. }
  54426. k(E, function(N, V) {
  54427. var B = p(N);
  54428. if (l && A.type != null && (B.type = A.type), g(Re(B, A), w, V), B.name == null && P) {
  54429. var W = P[V];
  54430. !Ie(W) && (W = {
  54431. name: W
  54432. }), B.name = B.displayName = W.name, B.defaultTooltip = W.defaultTooltip;
  54433. }
  54434. $ && Re(B.otherDims, $);
  54435. });
  54436. }
  54437. });
  54438. function g(T, w, P) {
  54439. WA.get(w) != null ? T.otherDims[w] = P : (T.coordDim = w, T.coordDimIndex = P, i.set(w, !0));
  54440. }
  54441. var m = e.generateCoord, y = e.generateCoordCount, b = y != null;
  54442. y = m ? y || 1 : 0;
  54443. var _ = m || "value";
  54444. function O(T) {
  54445. T.name == null && (T.name = T.coordDim);
  54446. }
  54447. if (s)
  54448. k(a, function(T) {
  54449. O(T);
  54450. }), a.sort(function(T, w) {
  54451. return T.storeDimIndex - w.storeDimIndex;
  54452. });
  54453. else
  54454. for (var S = 0; S < o; S++) {
  54455. var x = p(S), C = x.coordDim;
  54456. C == null && (x.coordDim = _Ne(_, i, b), x.coordDimIndex = 0, (!m || y <= 0) && (x.isExtraCoord = !0), y--), O(x), x.type == null && (DJ(t, S) === cr.Must || x.isExtraCoord && (x.otherDims.itemName != null || x.otherDims.seriesName != null)) && (x.type = "ordinal");
  54457. }
  54458. return yNe(a), new Fee({
  54459. source: t,
  54460. dimensions: a,
  54461. fullDimensionCount: o,
  54462. dimensionOmitted: s
  54463. });
  54464. }
  54465. function yNe(t) {
  54466. for (var e = Pe(), n = 0; n < t.length; n++) {
  54467. var r = t[n], i = r.name, a = e.get(i) || 0;
  54468. a > 0 && (r.name = i + (a - 1)), a++, e.set(i, a);
  54469. }
  54470. }
  54471. function bNe(t, e, n, r) {
  54472. var i = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, r || 0);
  54473. return k(e, function(a) {
  54474. var o;
  54475. Ie(a) && (o = a.dimsDef) && (i = Math.max(i, o.length));
  54476. }), i;
  54477. }
  54478. function _Ne(t, e, n) {
  54479. if (n || e.hasKey(t)) {
  54480. for (var r = 0; e.hasKey(t + r); )
  54481. r++;
  54482. t += r;
  54483. }
  54484. return e.set(t, !0), t;
  54485. }
  54486. var ONe = (
  54487. /** @class */
  54488. /* @__PURE__ */ function() {
  54489. function t(e) {
  54490. this.coordSysDims = [], this.axisMap = Pe(), this.categoryAxisMap = Pe(), this.coordSysName = e;
  54491. }
  54492. return t;
  54493. }()
  54494. );
  54495. function SNe(t) {
  54496. var e = t.get("coordinateSystem"), n = new ONe(e), r = xNe[e];
  54497. if (r)
  54498. return r(t, n, n.axisMap, n.categoryAxisMap), n;
  54499. }
  54500. var xNe = {
  54501. cartesian2d: function(t, e, n, r) {
  54502. var i = t.getReferringComponents("xAxis", Dn).models[0], a = t.getReferringComponents("yAxis", Dn).models[0];
  54503. if (process.env.NODE_ENV !== "production") {
  54504. if (!i)
  54505. throw new Error('xAxis "' + Tn(t.get("xAxisIndex"), t.get("xAxisId"), 0) + '" not found');
  54506. if (!a)
  54507. throw new Error('yAxis "' + Tn(t.get("xAxisIndex"), t.get("yAxisId"), 0) + '" not found');
  54508. }
  54509. e.coordSysDims = ["x", "y"], n.set("x", i), n.set("y", a), hd(i) && (r.set("x", i), e.firstCategoryDimIndex = 0), hd(a) && (r.set("y", a), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  54510. },
  54511. singleAxis: function(t, e, n, r) {
  54512. var i = t.getReferringComponents("singleAxis", Dn).models[0];
  54513. if (process.env.NODE_ENV !== "production" && !i)
  54514. throw new Error("singleAxis should be specified.");
  54515. e.coordSysDims = ["single"], n.set("single", i), hd(i) && (r.set("single", i), e.firstCategoryDimIndex = 0);
  54516. },
  54517. polar: function(t, e, n, r) {
  54518. var i = t.getReferringComponents("polar", Dn).models[0], a = i.findAxisModel("radiusAxis"), o = i.findAxisModel("angleAxis");
  54519. if (process.env.NODE_ENV !== "production") {
  54520. if (!o)
  54521. throw new Error("angleAxis option not found");
  54522. if (!a)
  54523. throw new Error("radiusAxis option not found");
  54524. }
  54525. e.coordSysDims = ["radius", "angle"], n.set("radius", a), n.set("angle", o), hd(a) && (r.set("radius", a), e.firstCategoryDimIndex = 0), hd(o) && (r.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  54526. },
  54527. geo: function(t, e, n, r) {
  54528. e.coordSysDims = ["lng", "lat"];
  54529. },
  54530. parallel: function(t, e, n, r) {
  54531. var i = t.ecModel, a = i.getComponent("parallel", t.get("parallelIndex")), o = e.coordSysDims = a.dimensions.slice();
  54532. k(a.parallelAxisIndex, function(s, l) {
  54533. var u = i.getComponent("parallelAxis", s), c = o[l];
  54534. n.set(c, u), hd(u) && (r.set(c, u), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = l));
  54535. });
  54536. }
  54537. };
  54538. function hd(t) {
  54539. return t.get("type") === "category";
  54540. }
  54541. function jee(t, e, n) {
  54542. n = n || {};
  54543. var r = n.byIndex, i = n.stackedCoordDimension, a, o, s;
  54544. wNe(e) ? a = e : (o = e.schema, a = o.dimensions, s = e.store);
  54545. var l = !!(t && t.get("stack")), u, c, f, d;
  54546. if (k(a, function(y, b) {
  54547. Oe(y) && (a[b] = y = {
  54548. name: y
  54549. }), l && !y.isExtraCoord && (!r && !u && y.ordinalMeta && (u = y), !c && y.type !== "ordinal" && y.type !== "time" && (!i || i === y.coordDim) && (c = y));
  54550. }), c && !r && !u && (r = !0), c) {
  54551. f = "__\0ecstackresult_" + t.id, d = "__\0ecstackedover_" + t.id, u && (u.createInvertedIndices = !0);
  54552. var h = c.coordDim, p = c.type, v = 0;
  54553. k(a, function(y) {
  54554. y.coordDim === h && v++;
  54555. });
  54556. var g = {
  54557. name: f,
  54558. coordDim: h,
  54559. coordDimIndex: v,
  54560. type: p,
  54561. isExtraCoord: !0,
  54562. isCalculationCoord: !0,
  54563. storeDimIndex: a.length
  54564. }, m = {
  54565. name: d,
  54566. // This dimension contains stack base (generally, 0), so do not set it as
  54567. // `stackedDimCoordDim` to avoid extent calculation, consider log scale.
  54568. coordDim: d,
  54569. coordDimIndex: v + 1,
  54570. type: p,
  54571. isExtraCoord: !0,
  54572. isCalculationCoord: !0,
  54573. storeDimIndex: a.length + 1
  54574. };
  54575. 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));
  54576. }
  54577. return {
  54578. stackedDimension: c && c.name,
  54579. stackedByDimension: u && u.name,
  54580. isStackedByIndex: r,
  54581. stackedOverDimension: d,
  54582. stackResultDimension: f
  54583. };
  54584. }
  54585. function wNe(t) {
  54586. return !Wee(t.schema);
  54587. }
  54588. function Ys(t, e) {
  54589. return !!e && e === t.getCalculationInfo("stackedDimension");
  54590. }
  54591. function xk(t, e) {
  54592. return Ys(t, e) ? t.getCalculationInfo("stackResultDimension") : e;
  54593. }
  54594. function CNe(t, e) {
  54595. var n = t.get("coordinateSystem"), r = Vf.get(n), i;
  54596. return e && e.coordSysDims && (i = ce(e.coordSysDims, function(a) {
  54597. var o = {
  54598. name: a
  54599. }, s = e.axisMap.get(a);
  54600. if (s) {
  54601. var l = s.get("type");
  54602. o.type = TO(l);
  54603. }
  54604. return o;
  54605. })), i || (i = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]), i;
  54606. }
  54607. function TNe(t, e, n) {
  54608. var r, i;
  54609. return n && k(t, function(a, o) {
  54610. var s = a.coordDim, l = n.categoryAxisMap.get(s);
  54611. l && (r == null && (r = o), a.ordinalMeta = l.getOrdinalMeta(), e && (a.createInvertedIndices = !0)), a.otherDims.itemName != null && (i = !0);
  54612. }), !i && r != null && (t[r].otherDims.itemName = 0), r;
  54613. }
  54614. function cs(t, e, n) {
  54615. n = n || {};
  54616. var r = e.getSourceManager(), i, a = !1;
  54617. t ? (a = !0, i = lk(t)) : (i = r.getSource(), a = i.sourceFormat === Ba);
  54618. var o = SNe(e), s = CNe(e, o), l = n.useEncodeDefaulter, u = Me(l) ? l : l ? Ue(IJ, s, e) : null, c = {
  54619. coordDimensions: s,
  54620. generateCoord: n.generateCoord,
  54621. encodeDefine: e.getEncode(),
  54622. encodeDefaulter: u,
  54623. canOmitUnusedDimensions: !a
  54624. }, f = Ap(i, c), d = TNe(f.dimensions, n.createInvertedIndices, o), h = a ? null : r.getSharedDataStore(f), p = jee(e, {
  54625. schema: f,
  54626. store: h
  54627. }), v = new Nr(f, e);
  54628. v.setCalculationInfo(p);
  54629. var g = d != null && PNe(i) ? function(m, y, b, _) {
  54630. return _ === d ? b : this.defaultDimValueGetter(m, y, b, _);
  54631. } : null;
  54632. return v.hasItemOption = !1, v.initData(
  54633. // Try to reuse the data store in sourceManager if using dataset.
  54634. a ? i : h,
  54635. null,
  54636. g
  54637. ), v;
  54638. }
  54639. function PNe(t) {
  54640. if (t.sourceFormat === Ba) {
  54641. var e = $Ne(t.data || []);
  54642. return !ue(gp(e));
  54643. }
  54644. }
  54645. function $Ne(t) {
  54646. for (var e = 0; e < t.length && t[e] == null; )
  54647. e++;
  54648. return t[e];
  54649. }
  54650. var fs = (
  54651. /** @class */
  54652. function() {
  54653. function t(e) {
  54654. this._setting = e || {}, this._extent = [1 / 0, -1 / 0];
  54655. }
  54656. return t.prototype.getSetting = function(e) {
  54657. return this._setting[e];
  54658. }, t.prototype.unionExtent = function(e) {
  54659. var n = this._extent;
  54660. e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1]);
  54661. }, t.prototype.unionExtentFromData = function(e, n) {
  54662. this.unionExtent(e.getApproximateExtent(n));
  54663. }, t.prototype.getExtent = function() {
  54664. return this._extent.slice();
  54665. }, t.prototype.setExtent = function(e, n) {
  54666. var r = this._extent;
  54667. isNaN(e) || (r[0] = e), isNaN(n) || (r[1] = n);
  54668. }, t.prototype.isInExtentRange = function(e) {
  54669. return this._extent[0] <= e && this._extent[1] >= e;
  54670. }, t.prototype.isBlank = function() {
  54671. return this._isBlank;
  54672. }, t.prototype.setBlank = function(e) {
  54673. this._isBlank = e;
  54674. }, t;
  54675. }()
  54676. );
  54677. Hx(fs);
  54678. var ANe = 0, nE = (
  54679. /** @class */
  54680. function() {
  54681. function t(e) {
  54682. this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++ANe;
  54683. }
  54684. return t.createByAxisModel = function(e) {
  54685. var n = e.option, r = n.data, i = r && ce(r, ENe);
  54686. return new t({
  54687. categories: i,
  54688. needCollect: !i,
  54689. // deduplication is default in axis.
  54690. deduplication: n.dedplication !== !1
  54691. });
  54692. }, t.prototype.getOrdinal = function(e) {
  54693. return this._getOrCreateMap().get(e);
  54694. }, t.prototype.parseAndCollect = function(e) {
  54695. var n, r = this._needCollect;
  54696. if (!Oe(e) && !r)
  54697. return e;
  54698. if (r && !this._deduplication)
  54699. return n = this.categories.length, this.categories[n] = e, n;
  54700. var i = this._getOrCreateMap();
  54701. return n = i.get(e), n == null && (r ? (n = this.categories.length, this.categories[n] = e, i.set(e, n)) : n = NaN), n;
  54702. }, t.prototype._getOrCreateMap = function() {
  54703. return this._map || (this._map = Pe(this.categories));
  54704. }, t;
  54705. }()
  54706. );
  54707. function ENe(t) {
  54708. return Ie(t) && t.value != null ? t.value : t + "";
  54709. }
  54710. function MNe(t) {
  54711. var e = Math.pow(10, N0(Math.abs(t))), n = Math.abs(t / e);
  54712. return n === 0 || n === 1 || n === 2 || n === 3 || n === 5;
  54713. }
  54714. function rE(t) {
  54715. return t.type === "interval" || t.type === "log";
  54716. }
  54717. function INe(t, e, n, r) {
  54718. var i = {}, a = t[1] - t[0], o = i.interval = AR(a / e, !0);
  54719. n != null && o < n && (o = i.interval = n), r != null && o > r && (o = i.interval = r);
  54720. var s = i.intervalPrecision = Zee(o), l = i.niceTickExtent = [mn(Math.ceil(t[0] / o) * o, s), mn(Math.floor(t[1] / o) * o, s)];
  54721. return DNe(l, t), i;
  54722. }
  54723. function jT(t) {
  54724. var e = Math.pow(10, N0(t)), n = t / e;
  54725. return n ? n === 2 ? n = 3 : n === 3 ? n = 5 : n *= 2 : n = 1, mn(n * e);
  54726. }
  54727. function Zee(t) {
  54728. return Ya(t) + 2;
  54729. }
  54730. function iV(t, e, n) {
  54731. t[e] = Math.max(Math.min(t[e], n[1]), n[0]);
  54732. }
  54733. function DNe(t, e) {
  54734. !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), iV(t, 0, e), iV(t, 1, e), t[0] > t[1] && (t[0] = t[1]);
  54735. }
  54736. function hw(t, e) {
  54737. return t >= e[0] && t <= e[1];
  54738. }
  54739. function pw(t, e) {
  54740. return e[1] === e[0] ? 0.5 : (t - e[0]) / (e[1] - e[0]);
  54741. }
  54742. function vw(t, e) {
  54743. return t * (e[1] - e[0]) + e[0];
  54744. }
  54745. var gw = (
  54746. /** @class */
  54747. function(t) {
  54748. q(e, t);
  54749. function e(n) {
  54750. var r = t.call(this, n) || this;
  54751. r.type = "ordinal";
  54752. var i = r.getSetting("ordinalMeta");
  54753. return i || (i = new nE({})), ue(i) && (i = new nE({
  54754. categories: ce(i, function(a) {
  54755. return Ie(a) ? a.value : a;
  54756. })
  54757. })), r._ordinalMeta = i, r._extent = r.getSetting("extent") || [0, i.categories.length - 1], r;
  54758. }
  54759. return e.prototype.parse = function(n) {
  54760. return n == null ? NaN : Oe(n) ? this._ordinalMeta.getOrdinal(n) : Math.round(n);
  54761. }, e.prototype.contain = function(n) {
  54762. return n = this.parse(n), hw(n, this._extent) && this._ordinalMeta.categories[n] != null;
  54763. }, e.prototype.normalize = function(n) {
  54764. return n = this._getTickNumber(this.parse(n)), pw(n, this._extent);
  54765. }, e.prototype.scale = function(n) {
  54766. return n = Math.round(vw(n, this._extent)), this.getRawOrdinalNumber(n);
  54767. }, e.prototype.getTicks = function() {
  54768. for (var n = [], r = this._extent, i = r[0]; i <= r[1]; )
  54769. n.push({
  54770. value: i
  54771. }), i++;
  54772. return n;
  54773. }, e.prototype.getMinorTicks = function(n) {
  54774. }, e.prototype.setSortInfo = function(n) {
  54775. if (n == null) {
  54776. this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
  54777. return;
  54778. }
  54779. 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) {
  54780. var u = r[o];
  54781. i[o] = u, a[u] = o;
  54782. }
  54783. for (var c = 0; o < s; ++o) {
  54784. for (; a[c] != null; )
  54785. c++;
  54786. i.push(c), a[c] = o;
  54787. }
  54788. }, e.prototype._getTickNumber = function(n) {
  54789. var r = this._ticksByOrdinalNumber;
  54790. return r && n >= 0 && n < r.length ? r[n] : n;
  54791. }, e.prototype.getRawOrdinalNumber = function(n) {
  54792. var r = this._ordinalNumbersByTick;
  54793. return r && n >= 0 && n < r.length ? r[n] : n;
  54794. }, e.prototype.getLabel = function(n) {
  54795. if (!this.isBlank()) {
  54796. var r = this.getRawOrdinalNumber(n.value), i = this._ordinalMeta.categories[r];
  54797. return i == null ? "" : i + "";
  54798. }
  54799. }, e.prototype.count = function() {
  54800. return this._extent[1] - this._extent[0] + 1;
  54801. }, e.prototype.unionExtentFromData = function(n, r) {
  54802. this.unionExtent(n.getApproximateExtent(r));
  54803. }, e.prototype.isInExtentRange = function(n) {
  54804. return n = this._getTickNumber(n), this._extent[0] <= n && this._extent[1] >= n;
  54805. }, e.prototype.getOrdinalMeta = function() {
  54806. return this._ordinalMeta;
  54807. }, e.prototype.calcNiceTicks = function() {
  54808. }, e.prototype.calcNiceExtent = function() {
  54809. }, e.type = "ordinal", e;
  54810. }(fs)
  54811. );
  54812. fs.registerClass(gw);
  54813. var ic = mn, qs = (
  54814. /** @class */
  54815. function(t) {
  54816. q(e, t);
  54817. function e() {
  54818. var n = t !== null && t.apply(this, arguments) || this;
  54819. return n.type = "interval", n._interval = 0, n._intervalPrecision = 2, n;
  54820. }
  54821. return e.prototype.parse = function(n) {
  54822. return n;
  54823. }, e.prototype.contain = function(n) {
  54824. return hw(n, this._extent);
  54825. }, e.prototype.normalize = function(n) {
  54826. return pw(n, this._extent);
  54827. }, e.prototype.scale = function(n) {
  54828. return vw(n, this._extent);
  54829. }, e.prototype.setExtent = function(n, r) {
  54830. var i = this._extent;
  54831. isNaN(n) || (i[0] = parseFloat(n)), isNaN(r) || (i[1] = parseFloat(r));
  54832. }, e.prototype.unionExtent = function(n) {
  54833. var r = this._extent;
  54834. n[0] < r[0] && (r[0] = n[0]), n[1] > r[1] && (r[1] = n[1]), this.setExtent(r[0], r[1]);
  54835. }, e.prototype.getInterval = function() {
  54836. return this._interval;
  54837. }, e.prototype.setInterval = function(n) {
  54838. this._interval = n, this._niceExtent = this._extent.slice(), this._intervalPrecision = Zee(n);
  54839. }, e.prototype.getTicks = function(n) {
  54840. var r = this._interval, i = this._extent, a = this._niceExtent, o = this._intervalPrecision, s = [];
  54841. if (!r)
  54842. return s;
  54843. var l = 1e4;
  54844. i[0] < a[0] && (n ? s.push({
  54845. value: ic(a[0] - r, o)
  54846. }) : s.push({
  54847. value: i[0]
  54848. }));
  54849. for (var u = a[0]; u <= a[1] && (s.push({
  54850. value: u
  54851. }), u = ic(u + r, o), u !== s[s.length - 1].value); )
  54852. if (s.length > l)
  54853. return [];
  54854. var c = s.length ? s[s.length - 1].value : a[1];
  54855. return i[1] > c && (n ? s.push({
  54856. value: ic(c + r, o)
  54857. }) : s.push({
  54858. value: i[1]
  54859. })), s;
  54860. }, e.prototype.getMinorTicks = function(n) {
  54861. for (var r = this.getTicks(!0), i = [], a = this.getExtent(), o = 1; o < r.length; o++) {
  54862. for (var s = r[o], l = r[o - 1], u = 0, c = [], f = s.value - l.value, d = f / n; u < n - 1; ) {
  54863. var h = ic(l.value + (u + 1) * d);
  54864. h > a[0] && h < a[1] && c.push(h), u++;
  54865. }
  54866. i.push(c);
  54867. }
  54868. return i;
  54869. }, e.prototype.getLabel = function(n, r) {
  54870. if (n == null)
  54871. return "";
  54872. var i = r && r.precision;
  54873. i == null ? i = Ya(n.value) || 0 : i === "auto" && (i = this._intervalPrecision);
  54874. var a = ic(n.value, i, !0);
  54875. return JR(a);
  54876. }, e.prototype.calcNiceTicks = function(n, r, i) {
  54877. n = n || 5;
  54878. var a = this._extent, o = a[1] - a[0];
  54879. if (isFinite(o)) {
  54880. o < 0 && (o = -o, a.reverse());
  54881. var s = INe(a, n, r, i);
  54882. this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent;
  54883. }
  54884. }, e.prototype.calcNiceExtent = function(n) {
  54885. var r = this._extent;
  54886. if (r[0] === r[1])
  54887. if (r[0] !== 0) {
  54888. var i = Math.abs(r[0]);
  54889. n.fixMax || (r[1] += i / 2), r[0] -= i / 2;
  54890. } else
  54891. r[1] = 1;
  54892. var a = r[1] - r[0];
  54893. isFinite(a) || (r[0] = 0, r[1] = 1), this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
  54894. var o = this._interval;
  54895. n.fixMin || (r[0] = ic(Math.floor(r[0] / o) * o)), n.fixMax || (r[1] = ic(Math.ceil(r[1] / o) * o));
  54896. }, e.prototype.setNiceExtent = function(n, r) {
  54897. this._niceExtent = [n, r];
  54898. }, e.type = "interval", e;
  54899. }(fs)
  54900. );
  54901. fs.registerClass(qs);
  54902. var Uee = typeof Float32Array < "u", RNe = Uee ? Float32Array : Array;
  54903. function Wo(t) {
  54904. return ue(t) ? Uee ? new Float32Array(t) : t : new RNe(t);
  54905. }
  54906. var iE = "__ec_stack_";
  54907. function wk(t) {
  54908. return t.get("stack") || iE + t.seriesIndex;
  54909. }
  54910. function Ck(t) {
  54911. return t.dim + t.index;
  54912. }
  54913. function kNe(t) {
  54914. var e = [], n = t.axis, r = "axis0";
  54915. if (n.type === "category") {
  54916. for (var i = n.getBandWidth(), a = 0; a < t.count; a++)
  54917. e.push(Re({
  54918. bandWidth: i,
  54919. axisKey: r,
  54920. stackId: iE + a
  54921. }, t));
  54922. for (var o = qee(e), s = [], a = 0; a < t.count; a++) {
  54923. var l = o[r][iE + a];
  54924. l.offsetCenter = l.offset + l.width / 2, s.push(l);
  54925. }
  54926. return s;
  54927. }
  54928. }
  54929. function Xee(t, e) {
  54930. var n = [];
  54931. return e.eachSeriesByType(t, function(r) {
  54932. ete(r) && n.push(r);
  54933. }), n;
  54934. }
  54935. function LNe(t) {
  54936. var e = {};
  54937. k(t, function(l) {
  54938. var u = l.coordinateSystem, c = u.getBaseAxis();
  54939. if (!(c.type !== "time" && c.type !== "value"))
  54940. 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) {
  54941. var m = p.get(h, v);
  54942. e[d] ? e[d].push(m) : e[d] = [m];
  54943. }
  54944. });
  54945. var n = {};
  54946. for (var r in e)
  54947. if (e.hasOwnProperty(r)) {
  54948. var i = e[r];
  54949. if (i) {
  54950. i.sort(function(l, u) {
  54951. return l - u;
  54952. });
  54953. for (var a = null, o = 1; o < i.length; ++o) {
  54954. var s = i[o] - i[o - 1];
  54955. s > 0 && (a = a === null ? s : Math.min(a, s));
  54956. }
  54957. n[r] = a;
  54958. }
  54959. }
  54960. return n;
  54961. }
  54962. function Yee(t) {
  54963. var e = LNe(t), n = [];
  54964. return k(t, function(r) {
  54965. var i = r.coordinateSystem, a = i.getBaseAxis(), o = a.getExtent(), s;
  54966. if (a.type === "category")
  54967. s = a.getBandWidth();
  54968. else if (a.type === "value" || a.type === "time") {
  54969. 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]);
  54970. s = u ? c / d * u : c;
  54971. } else {
  54972. var h = r.getData();
  54973. s = Math.abs(o[1] - o[0]) / h.count();
  54974. }
  54975. var p = _e(r.get("barWidth"), s), v = _e(r.get("barMaxWidth"), s), g = _e(
  54976. // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis,
  54977. // the auto-calculated bar width might be less than 0.5 / 1.
  54978. r.get("barMinWidth") || (tte(r) ? 0.5 : 1),
  54979. s
  54980. ), m = r.get("barGap"), y = r.get("barCategoryGap");
  54981. n.push({
  54982. bandWidth: s,
  54983. barWidth: p,
  54984. barMaxWidth: v,
  54985. barMinWidth: g,
  54986. barGap: m,
  54987. barCategoryGap: y,
  54988. axisKey: Ck(a),
  54989. stackId: wk(r)
  54990. });
  54991. }), qee(n);
  54992. }
  54993. function qee(t) {
  54994. var e = {};
  54995. k(t, function(r, i) {
  54996. var a = r.axisKey, o = r.bandWidth, s = e[a] || {
  54997. bandWidth: o,
  54998. remainedWidth: o,
  54999. autoWidthCount: 0,
  55000. categoryGap: null,
  55001. gap: "20%",
  55002. stacks: {}
  55003. }, l = s.stacks;
  55004. e[a] = s;
  55005. var u = r.stackId;
  55006. l[u] || s.autoWidthCount++, l[u] = l[u] || {
  55007. width: 0,
  55008. maxWidth: 0
  55009. };
  55010. var c = r.barWidth;
  55011. c && !l[u].width && (l[u].width = c, c = Math.min(s.remainedWidth, c), s.remainedWidth -= c);
  55012. var f = r.barMaxWidth;
  55013. f && (l[u].maxWidth = f);
  55014. var d = r.barMinWidth;
  55015. d && (l[u].minWidth = d);
  55016. var h = r.barGap;
  55017. h != null && (s.gap = h);
  55018. var p = r.barCategoryGap;
  55019. p != null && (s.categoryGap = p);
  55020. });
  55021. var n = {};
  55022. return k(e, function(r, i) {
  55023. n[i] = {};
  55024. var a = r.stacks, o = r.bandWidth, s = r.categoryGap;
  55025. if (s == null) {
  55026. var l = st(a).length;
  55027. s = Math.max(35 - l * 4, 15) + "%";
  55028. }
  55029. var u = _e(s, o), c = _e(r.gap, 1), f = r.remainedWidth, d = r.autoWidthCount, h = (f - u) / (d + (d - 1) * c);
  55030. h = Math.max(h, 0), k(a, function(m) {
  55031. var y = m.maxWidth, b = m.minWidth;
  55032. if (m.width) {
  55033. var _ = m.width;
  55034. y && (_ = Math.min(_, y)), b && (_ = Math.max(_, b)), m.width = _, f -= _ + c * _, d--;
  55035. } else {
  55036. var _ = h;
  55037. y && y < _ && (_ = Math.min(y, f)), b && b > _ && (_ = b), _ !== h && (m.width = _, f -= _ + c * _, d--);
  55038. }
  55039. }), h = (f - u) / (d + (d - 1) * c), h = Math.max(h, 0);
  55040. var p = 0, v;
  55041. k(a, function(m, y) {
  55042. m.width || (m.width = h), v = m, p += m.width * (1 + c);
  55043. }), v && (p -= v.width * c);
  55044. var g = -p / 2;
  55045. k(a, function(m, y) {
  55046. n[i][y] = n[i][y] || {
  55047. bandWidth: o,
  55048. offset: g,
  55049. width: m.width
  55050. }, g += m.width * (1 + c);
  55051. });
  55052. }), n;
  55053. }
  55054. function NNe(t, e, n) {
  55055. if (t && e) {
  55056. var r = t[Ck(e)];
  55057. return r != null && n != null ? r[wk(n)] : r;
  55058. }
  55059. }
  55060. function Kee(t, e) {
  55061. var n = Xee(t, e), r = Yee(n);
  55062. k(n, function(i) {
  55063. var a = i.getData(), o = i.coordinateSystem, s = o.getBaseAxis(), l = wk(i), u = r[Ck(s)][l], c = u.offset, f = u.width;
  55064. a.setLayout({
  55065. bandWidth: u.bandWidth,
  55066. offset: c,
  55067. size: f
  55068. });
  55069. });
  55070. }
  55071. function Jee(t) {
  55072. return {
  55073. seriesType: t,
  55074. plan: Tp(),
  55075. reset: function(e) {
  55076. if (ete(e)) {
  55077. 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 = Ys(n, u) && !!n.getCalculationInfo("stackedOnSeries"), d = a.isHorizontal(), h = BNe(i, a), p = tte(e), v = e.get("barMinHeight") || 0, g = c && n.getDimensionIndex(c), m = n.getLayout("size"), y = n.getLayout("offset");
  55078. return {
  55079. progress: function(b, _) {
  55080. for (var O = b.count, S = p && Wo(O * 3), x = p && l && Wo(O * 3), C = p && Wo(O), T = r.master.getRect(), w = d ? T.width : T.height, P, $ = _.getStore(), A = 0; (P = b.next()) != null; ) {
  55081. var D = $.get(f ? g : o, P), E = $.get(s, P), R = h, N = void 0;
  55082. f && (N = +D - $.get(o, P));
  55083. var V = void 0, B = void 0, W = void 0, F = void 0;
  55084. if (d) {
  55085. var Q = r.dataToPoint([D, E]);
  55086. if (f) {
  55087. var Z = r.dataToPoint([N, E]);
  55088. R = Z[0];
  55089. }
  55090. V = R, B = Q[1] + y, W = Q[0] - R, F = m, Math.abs(W) < v && (W = (W < 0 ? -1 : 1) * v);
  55091. } else {
  55092. var Q = r.dataToPoint([E, D]);
  55093. if (f) {
  55094. var Z = r.dataToPoint([E, N]);
  55095. R = Z[1];
  55096. }
  55097. V = Q[0] + y, B = R, W = m, F = Q[1] - R, Math.abs(F) < v && (F = (F <= 0 ? -1 : 1) * v);
  55098. }
  55099. p ? (S[A] = V, S[A + 1] = B, S[A + 2] = d ? W : F, x && (x[A] = d ? T.x : V, x[A + 1] = d ? B : T.y, x[A + 2] = w), C[P] = P) : _.setItemLayout(P, {
  55100. x: V,
  55101. y: B,
  55102. width: W,
  55103. height: F
  55104. }), A += 3;
  55105. }
  55106. p && _.setLayout({
  55107. largePoints: S,
  55108. largeDataIndices: C,
  55109. largeBackgroundPoints: x,
  55110. valueAxisHorizontal: d
  55111. });
  55112. }
  55113. };
  55114. }
  55115. }
  55116. };
  55117. }
  55118. function ete(t) {
  55119. return t.coordinateSystem && t.coordinateSystem.type === "cartesian2d";
  55120. }
  55121. function tte(t) {
  55122. return t.pipelineContext && t.pipelineContext.large;
  55123. }
  55124. function BNe(t, e) {
  55125. var n = e.model.get("startValue");
  55126. return n || (n = 0), e.toGlobalCoord(e.dataToCoord(e.type === "log" ? n > 0 ? n : 1 : n));
  55127. }
  55128. var zNe = function(t, e, n, r) {
  55129. for (; n < r; ) {
  55130. var i = n + r >>> 1;
  55131. t[i][1] < e ? n = i + 1 : r = i;
  55132. }
  55133. return n;
  55134. }, Tk = (
  55135. /** @class */
  55136. function(t) {
  55137. q(e, t);
  55138. function e(n) {
  55139. var r = t.call(this, n) || this;
  55140. return r.type = "time", r;
  55141. }
  55142. return e.prototype.getLabel = function(n) {
  55143. var r = this.getSetting("useUTC");
  55144. return H0(n.value, XB[hLe(ah(this._minLevelUnit))] || XB.second, r, this.getSetting("locale"));
  55145. }, e.prototype.getFormattedLabel = function(n, r, i) {
  55146. var a = this.getSetting("useUTC"), o = this.getSetting("locale");
  55147. return pLe(n, r, i, o, a);
  55148. }, e.prototype.getTicks = function() {
  55149. var n = this._interval, r = this._extent, i = [];
  55150. if (!n)
  55151. return i;
  55152. i.push({
  55153. value: r[0],
  55154. level: 0
  55155. });
  55156. var a = this.getSetting("useUTC"), o = jNe(this._minLevelUnit, this._approxInterval, a, r);
  55157. return i = i.concat(o), i.push({
  55158. value: r[1],
  55159. level: 0
  55160. }), i;
  55161. }, e.prototype.calcNiceExtent = function(n) {
  55162. var r = this._extent;
  55163. if (r[0] === r[1] && (r[0] -= ma, r[1] += ma), r[1] === -1 / 0 && r[0] === 1 / 0) {
  55164. var i = /* @__PURE__ */ new Date();
  55165. r[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), r[0] = r[1] - ma;
  55166. }
  55167. this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
  55168. }, e.prototype.calcNiceTicks = function(n, r, i) {
  55169. n = n || 10;
  55170. var a = this._extent, o = a[1] - a[0];
  55171. this._approxInterval = o / n, r != null && this._approxInterval < r && (this._approxInterval = r), i != null && this._approxInterval > i && (this._approxInterval = i);
  55172. var s = pb.length, l = Math.min(zNe(pb, this._approxInterval, 0, s), s - 1);
  55173. this._interval = pb[l][1], this._minLevelUnit = pb[Math.max(l - 1, 0)][0];
  55174. }, e.prototype.parse = function(n) {
  55175. return St(n) ? n : +Ki(n);
  55176. }, e.prototype.contain = function(n) {
  55177. return hw(this.parse(n), this._extent);
  55178. }, e.prototype.normalize = function(n) {
  55179. return pw(this.parse(n), this._extent);
  55180. }, e.prototype.scale = function(n) {
  55181. return vw(n, this._extent);
  55182. }, e.type = "time", e;
  55183. }(qs)
  55184. ), pb = [
  55185. // Format interval
  55186. ["second", YR],
  55187. ["minute", qR],
  55188. ["hour", Ng],
  55189. ["quarter-day", Ng * 6],
  55190. ["half-day", Ng * 12],
  55191. ["day", ma * 1.2],
  55192. ["half-week", ma * 3.5],
  55193. ["week", ma * 7],
  55194. ["month", ma * 31],
  55195. ["quarter", ma * 95],
  55196. ["half-year", UB / 2],
  55197. ["year", UB]
  55198. // 1Y
  55199. ];
  55200. function VNe(t, e, n, r) {
  55201. var i = Ki(e), a = Ki(n), o = function(p) {
  55202. return YB(i, p, r) === YB(a, p, r);
  55203. }, s = function() {
  55204. return o("year");
  55205. }, l = function() {
  55206. return s() && o("month");
  55207. }, u = function() {
  55208. return l() && o("day");
  55209. }, c = function() {
  55210. return u() && o("hour");
  55211. }, f = function() {
  55212. return c() && o("minute");
  55213. }, d = function() {
  55214. return f() && o("second");
  55215. }, h = function() {
  55216. return d() && o("millisecond");
  55217. };
  55218. switch (t) {
  55219. case "year":
  55220. return s();
  55221. case "month":
  55222. return l();
  55223. case "day":
  55224. return u();
  55225. case "hour":
  55226. return c();
  55227. case "minute":
  55228. return f();
  55229. case "second":
  55230. return d();
  55231. case "millisecond":
  55232. return h();
  55233. }
  55234. }
  55235. function FNe(t, e) {
  55236. return t /= ma, t > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1;
  55237. }
  55238. function WNe(t) {
  55239. var e = 30 * ma;
  55240. return t /= e, t > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1;
  55241. }
  55242. function QNe(t) {
  55243. return t /= Ng, t > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1;
  55244. }
  55245. function aV(t, e) {
  55246. return t /= e ? qR : YR, t > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1;
  55247. }
  55248. function HNe(t) {
  55249. return AR(t, !0);
  55250. }
  55251. function GNe(t, e, n) {
  55252. var r = new Date(t);
  55253. switch (ah(e)) {
  55254. case "year":
  55255. case "month":
  55256. r[_J(n)](0);
  55257. case "day":
  55258. r[OJ(n)](1);
  55259. case "hour":
  55260. r[SJ(n)](0);
  55261. case "minute":
  55262. r[xJ(n)](0);
  55263. case "second":
  55264. r[wJ(n)](0), r[CJ(n)](0);
  55265. }
  55266. return r.getTime();
  55267. }
  55268. function jNe(t, e, n, r) {
  55269. var i = 1e4, a = yJ, o = 0;
  55270. function s(w, P, $, A, D, E, R) {
  55271. for (var N = new Date(P), V = P, B = N[A](); V < $ && V <= r[1]; )
  55272. R.push({
  55273. value: V
  55274. }), B += w, N[D](B), V = N.getTime();
  55275. R.push({
  55276. value: V,
  55277. notAdd: !0
  55278. });
  55279. }
  55280. function l(w, P, $) {
  55281. var A = [], D = !P.length;
  55282. if (!VNe(ah(w), r[0], r[1], n)) {
  55283. D && (P = [{
  55284. // TODO Optimize. Not include so may ticks.
  55285. value: GNe(new Date(r[0]), w, n)
  55286. }, {
  55287. value: r[1]
  55288. }]);
  55289. for (var E = 0; E < P.length - 1; E++) {
  55290. var R = P[E].value, N = P[E + 1].value;
  55291. if (R !== N) {
  55292. var V = void 0, B = void 0, W = void 0, F = !1;
  55293. switch (w) {
  55294. case "year":
  55295. V = Math.max(1, Math.round(e / ma / 365)), B = KR(n), W = vLe(n);
  55296. break;
  55297. case "half-year":
  55298. case "quarter":
  55299. case "month":
  55300. V = WNe(e), B = oh(n), W = _J(n);
  55301. break;
  55302. case "week":
  55303. case "half-week":
  55304. case "day":
  55305. V = FNe(e), B = nw(n), W = OJ(n), F = !0;
  55306. break;
  55307. case "half-day":
  55308. case "quarter-day":
  55309. case "hour":
  55310. V = QNe(e), B = Am(n), W = SJ(n);
  55311. break;
  55312. case "minute":
  55313. V = aV(e, !0), B = rw(n), W = xJ(n);
  55314. break;
  55315. case "second":
  55316. V = aV(e, !1), B = iw(n), W = wJ(n);
  55317. break;
  55318. case "millisecond":
  55319. V = HNe(e), B = aw(n), W = CJ(n);
  55320. break;
  55321. }
  55322. s(V, R, N, B, W, F, A), w === "year" && $.length > 1 && E === 0 && $.unshift({
  55323. value: $[0].value - V
  55324. });
  55325. }
  55326. }
  55327. for (var E = 0; E < A.length; E++)
  55328. $.push(A[E]);
  55329. return A;
  55330. }
  55331. }
  55332. for (var u = [], c = [], f = 0, d = 0, h = 0; h < a.length && o++ < i; ++h) {
  55333. var p = ah(a[h]);
  55334. if (dLe(a[h])) {
  55335. l(a[h], u[u.length - 1] || [], c);
  55336. var v = a[h + 1] ? ah(a[h + 1]) : null;
  55337. if (p !== v) {
  55338. if (c.length) {
  55339. d = f, c.sort(function(w, P) {
  55340. return w.value - P.value;
  55341. });
  55342. for (var g = [], m = 0; m < c.length; ++m) {
  55343. var y = c[m].value;
  55344. (m === 0 || c[m - 1].value !== y) && (g.push(c[m]), y >= r[0] && y <= r[1] && f++);
  55345. }
  55346. var b = (r[1] - r[0]) / e;
  55347. if (f > b * 1.5 && d > b / 1.5 || (u.push(g), f > b || t === a[h]))
  55348. break;
  55349. }
  55350. c = [];
  55351. }
  55352. }
  55353. }
  55354. process.env.NODE_ENV !== "production" && o >= i && dn("Exceed safe limit.");
  55355. for (var _ = Nt(ce(u, function(w) {
  55356. return Nt(w, function(P) {
  55357. return P.value >= r[0] && P.value <= r[1] && !P.notAdd;
  55358. });
  55359. }), function(w) {
  55360. return w.length > 0;
  55361. }), O = [], S = _.length - 1, h = 0; h < _.length; ++h)
  55362. for (var x = _[h], C = 0; C < x.length; ++C)
  55363. O.push({
  55364. value: x[C].value,
  55365. level: S - h
  55366. });
  55367. O.sort(function(w, P) {
  55368. return w.value - P.value;
  55369. });
  55370. for (var T = [], h = 0; h < O.length; ++h)
  55371. (h === 0 || O[h].value !== O[h - 1].value) && T.push(O[h]);
  55372. return T;
  55373. }
  55374. fs.registerClass(Tk);
  55375. var oV = fs.prototype, Vg = qs.prototype, ZNe = mn, UNe = Math.floor, XNe = Math.ceil, vb = Math.pow, Ha = Math.log, Pk = (
  55376. /** @class */
  55377. function(t) {
  55378. q(e, t);
  55379. function e() {
  55380. var n = t !== null && t.apply(this, arguments) || this;
  55381. return n.type = "log", n.base = 10, n._originalScale = new qs(), n._interval = 0, n;
  55382. }
  55383. return e.prototype.getTicks = function(n) {
  55384. var r = this._originalScale, i = this._extent, a = r.getExtent(), o = Vg.getTicks.call(this, n);
  55385. return ce(o, function(s) {
  55386. var l = s.value, u = mn(vb(this.base, l));
  55387. return u = l === i[0] && this._fixMin ? gb(u, a[0]) : u, u = l === i[1] && this._fixMax ? gb(u, a[1]) : u, {
  55388. value: u
  55389. };
  55390. }, this);
  55391. }, e.prototype.setExtent = function(n, r) {
  55392. var i = Ha(this.base);
  55393. n = Ha(Math.max(0, n)) / i, r = Ha(Math.max(0, r)) / i, Vg.setExtent.call(this, n, r);
  55394. }, e.prototype.getExtent = function() {
  55395. var n = this.base, r = oV.getExtent.call(this);
  55396. r[0] = vb(n, r[0]), r[1] = vb(n, r[1]);
  55397. var i = this._originalScale, a = i.getExtent();
  55398. return this._fixMin && (r[0] = gb(r[0], a[0])), this._fixMax && (r[1] = gb(r[1], a[1])), r;
  55399. }, e.prototype.unionExtent = function(n) {
  55400. this._originalScale.unionExtent(n);
  55401. var r = this.base;
  55402. n[0] = Ha(n[0]) / Ha(r), n[1] = Ha(n[1]) / Ha(r), oV.unionExtent.call(this, n);
  55403. }, e.prototype.unionExtentFromData = function(n, r) {
  55404. this.unionExtent(n.getApproximateExtent(r));
  55405. }, e.prototype.calcNiceTicks = function(n) {
  55406. n = n || 10;
  55407. var r = this._extent, i = r[1] - r[0];
  55408. if (!(i === 1 / 0 || i <= 0)) {
  55409. var a = uK(i), o = n / i * a;
  55410. for (o <= 0.5 && (a *= 10); !isNaN(a) && Math.abs(a) < 1 && Math.abs(a) > 0; )
  55411. a *= 10;
  55412. var s = [mn(XNe(r[0] / a) * a), mn(UNe(r[1] / a) * a)];
  55413. this._interval = a, this._niceExtent = s;
  55414. }
  55415. }, e.prototype.calcNiceExtent = function(n) {
  55416. Vg.calcNiceExtent.call(this, n), this._fixMin = n.fixMin, this._fixMax = n.fixMax;
  55417. }, e.prototype.parse = function(n) {
  55418. return n;
  55419. }, e.prototype.contain = function(n) {
  55420. return n = Ha(n) / Ha(this.base), hw(n, this._extent);
  55421. }, e.prototype.normalize = function(n) {
  55422. return n = Ha(n) / Ha(this.base), pw(n, this._extent);
  55423. }, e.prototype.scale = function(n) {
  55424. return n = vw(n, this._extent), vb(this.base, n);
  55425. }, e.type = "log", e;
  55426. }(fs)
  55427. ), nte = Pk.prototype;
  55428. nte.getMinorTicks = Vg.getMinorTicks;
  55429. nte.getLabel = Vg.getLabel;
  55430. function gb(t, e) {
  55431. return ZNe(t, Ya(e));
  55432. }
  55433. fs.registerClass(Pk);
  55434. var YNe = (
  55435. /** @class */
  55436. function() {
  55437. function t(e, n, r) {
  55438. this._prepareParams(e, n, r);
  55439. }
  55440. return t.prototype._prepareParams = function(e, n, r) {
  55441. r[1] < r[0] && (r = [NaN, NaN]), this._dataMin = r[0], this._dataMax = r[1];
  55442. var i = this._isOrdinal = e.type === "ordinal";
  55443. this._needCrossZero = e.type === "interval" && n.getNeedCrossZero && n.getNeedCrossZero();
  55444. var a = n.get("min", !0);
  55445. a == null && (a = n.get("startValue", !0));
  55446. var o = this._modelMinRaw = a;
  55447. Me(o) ? this._modelMinNum = mb(e, o({
  55448. min: r[0],
  55449. max: r[1]
  55450. })) : o !== "dataMin" && (this._modelMinNum = mb(e, o));
  55451. var s = this._modelMaxRaw = n.get("max", !0);
  55452. if (Me(s) ? this._modelMaxNum = mb(e, s({
  55453. min: r[0],
  55454. max: r[1]
  55455. })) : s !== "dataMax" && (this._modelMaxNum = mb(e, s)), i)
  55456. this._axisDataLen = n.getCategories().length;
  55457. else {
  55458. var l = n.get("boundaryGap"), u = ue(l) ? l : [l || 0, l || 0];
  55459. 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 = [lo(u[0], 1), lo(u[1], 1)];
  55460. }
  55461. }, t.prototype.calculate = function() {
  55462. 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;
  55463. 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);
  55464. var f = ou(s) || ou(l) || e && !i;
  55465. this._needCrossZero && (s > 0 && l > 0 && !u && (s = 0), s < 0 && l < 0 && !c && (l = 0));
  55466. var d = this._determinedMin, h = this._determinedMax;
  55467. return d != null && (s = d, u = !0), h != null && (l = h, c = !0), {
  55468. min: s,
  55469. max: l,
  55470. minFixed: u,
  55471. maxFixed: c,
  55472. isBlank: f
  55473. };
  55474. }, t.prototype.modifyDataMinMax = function(e, n) {
  55475. process.env.NODE_ENV !== "production" && ke(!this.frozen), this[KNe[e]] = n;
  55476. }, t.prototype.setDeterminedMinMax = function(e, n) {
  55477. var r = qNe[e];
  55478. process.env.NODE_ENV !== "production" && ke(!this.frozen && this[r] == null), this[r] = n;
  55479. }, t.prototype.freeze = function() {
  55480. this.frozen = !0;
  55481. }, t;
  55482. }()
  55483. ), qNe = {
  55484. min: "_determinedMin",
  55485. max: "_determinedMax"
  55486. }, KNe = {
  55487. min: "_dataMin",
  55488. max: "_dataMax"
  55489. };
  55490. function rte(t, e, n) {
  55491. var r = t.rawExtentInfo;
  55492. return r || (r = new YNe(t, e, n), t.rawExtentInfo = r, r);
  55493. }
  55494. function mb(t, e) {
  55495. return e == null ? null : ou(e) ? NaN : t.parse(e);
  55496. }
  55497. function ite(t, e) {
  55498. var n = t.type, r = rte(t, e, t.getExtent()).calculate();
  55499. t.setBlank(r.isBlank);
  55500. var i = r.min, a = r.max, o = e.ecModel;
  55501. if (o && n === "time") {
  55502. var s = Xee("bar", o), l = !1;
  55503. if (k(s, function(f) {
  55504. l = l || f.getBaseAxis() === e.axis;
  55505. }), l) {
  55506. var u = Yee(s), c = JNe(i, a, e, u);
  55507. i = c.min, a = c.max;
  55508. }
  55509. }
  55510. return {
  55511. extent: [i, a],
  55512. // "fix" means "fixed", the value should not be
  55513. // changed in the subsequent steps.
  55514. fixMin: r.minFixed,
  55515. fixMax: r.maxFixed
  55516. };
  55517. }
  55518. function JNe(t, e, n, r) {
  55519. var i = n.axis.getExtent(), a = i[1] - i[0], o = NNe(r, n.axis);
  55520. if (o === void 0)
  55521. return {
  55522. min: t,
  55523. max: e
  55524. };
  55525. var s = 1 / 0;
  55526. k(o, function(h) {
  55527. s = Math.min(h.offset, s);
  55528. });
  55529. var l = -1 / 0;
  55530. k(o, function(h) {
  55531. l = Math.max(h.offset + h.width, l);
  55532. }), s = Math.abs(s), l = Math.abs(l);
  55533. var u = s + l, c = e - t, f = 1 - (s + l) / a, d = c / f - c;
  55534. return e += d * (l / u), t -= d * (s / u), {
  55535. min: t,
  55536. max: e
  55537. };
  55538. }
  55539. function Sf(t, e) {
  55540. var n = e, r = ite(t, n), i = r.extent, a = n.get("splitNumber");
  55541. t instanceof Pk && (t.base = n.get("logBase"));
  55542. var o = t.type, s = n.get("interval"), l = o === "interval" || o === "time";
  55543. t.setExtent(i[0], i[1]), t.calcNiceExtent({
  55544. splitNumber: a,
  55545. fixMin: r.fixMin,
  55546. fixMax: r.fixMax,
  55547. minInterval: l ? n.get("minInterval") : null,
  55548. maxInterval: l ? n.get("maxInterval") : null
  55549. }), s != null && t.setInterval && t.setInterval(s);
  55550. }
  55551. function j0(t, e) {
  55552. if (e = e || t.get("type"), e)
  55553. switch (e) {
  55554. case "category":
  55555. return new gw({
  55556. ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
  55557. extent: [1 / 0, -1 / 0]
  55558. });
  55559. case "time":
  55560. return new Tk({
  55561. locale: t.ecModel.getLocaleModel(),
  55562. useUTC: t.ecModel.get("useUTC")
  55563. });
  55564. default:
  55565. return new (fs.getClass(e) || qs)();
  55566. }
  55567. }
  55568. function e5e(t) {
  55569. var e = t.scale.getExtent(), n = e[0], r = e[1];
  55570. return !(n > 0 && r > 0 || n < 0 && r < 0);
  55571. }
  55572. function Ep(t) {
  55573. var e = t.getLabelModel().get("formatter"), n = t.type === "category" ? t.scale.getExtent()[0] : null;
  55574. return t.scale.type === "time" ? /* @__PURE__ */ function(r) {
  55575. return function(i, a) {
  55576. return t.scale.getFormattedLabel(i, a, r);
  55577. };
  55578. }(e) : Oe(e) ? /* @__PURE__ */ function(r) {
  55579. return function(i) {
  55580. var a = t.scale.getLabel(i), o = r.replace("{value}", a ?? "");
  55581. return o;
  55582. };
  55583. }(e) : Me(e) ? /* @__PURE__ */ function(r) {
  55584. return function(i, a) {
  55585. return n != null && (a = i.value - n), r($k(t, i), a, i.level != null ? {
  55586. level: i.level
  55587. } : null);
  55588. };
  55589. }(e) : function(r) {
  55590. return t.scale.getLabel(r);
  55591. };
  55592. }
  55593. function $k(t, e) {
  55594. return t.type === "category" ? t.scale.getLabel(e) : e.value;
  55595. }
  55596. function t5e(t) {
  55597. var e = t.model, n = t.scale;
  55598. if (!(!e.get(["axisLabel", "show"]) || n.isBlank())) {
  55599. var r, i, a = n.getExtent();
  55600. n instanceof gw ? i = n.count() : (r = n.getTicks(), i = r.length);
  55601. var o = t.getLabelModel(), s = Ep(t), l, u = 1;
  55602. i > 40 && (u = Math.ceil(i / 40));
  55603. for (var c = 0; c < i; c += u) {
  55604. var f = r ? r[c] : {
  55605. value: a[0] + c
  55606. }, d = s(f, c), h = o.getTextRect(d), p = n5e(h, o.get("rotate") || 0);
  55607. l ? l.union(p) : l = p;
  55608. }
  55609. return l;
  55610. }
  55611. }
  55612. function n5e(t, e) {
  55613. 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 Je(t.x, t.y, a, o);
  55614. return s;
  55615. }
  55616. function Ak(t) {
  55617. var e = t.get("interval");
  55618. return e ?? "auto";
  55619. }
  55620. function ate(t) {
  55621. return t.type === "category" && Ak(t.getLabelModel()) === 0;
  55622. }
  55623. function PO(t, e) {
  55624. var n = {};
  55625. return k(t.mapDimensionsAll(e), function(r) {
  55626. n[xk(t, r)] = !0;
  55627. }), st(n);
  55628. }
  55629. function r5e(t, e, n) {
  55630. e && k(PO(e, n), function(r) {
  55631. var i = e.getApproximateExtent(r);
  55632. i[0] < t[0] && (t[0] = i[0]), i[1] > t[1] && (t[1] = i[1]);
  55633. });
  55634. }
  55635. var Mp = (
  55636. /** @class */
  55637. function() {
  55638. function t() {
  55639. }
  55640. return t.prototype.getNeedCrossZero = function() {
  55641. var e = this.option;
  55642. return !e.scale;
  55643. }, t.prototype.getCoordSysModel = function() {
  55644. }, t;
  55645. }()
  55646. );
  55647. function i5e(t) {
  55648. return cs(null, t);
  55649. }
  55650. var a5e = {
  55651. isDimensionStacked: Ys,
  55652. enableDataStack: jee,
  55653. getStackedDimension: xk
  55654. };
  55655. function o5e(t, e) {
  55656. var n = e;
  55657. e instanceof Wt || (n = new Wt(e));
  55658. var r = j0(n);
  55659. return r.setExtent(t[0], t[1]), Sf(r, n), r;
  55660. }
  55661. function s5e(t) {
  55662. xn(t, Mp);
  55663. }
  55664. function l5e(t, e) {
  55665. return e = e || {}, Zt(t, null, null, e.state !== "normal");
  55666. }
  55667. const u5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55668. __proto__: null,
  55669. createDimensions: mNe,
  55670. createList: i5e,
  55671. createScale: o5e,
  55672. createSymbol: $n,
  55673. createTextStyle: l5e,
  55674. dataStack: a5e,
  55675. enableHoverEmphasis: Yl,
  55676. getECData: Fe,
  55677. getLayoutRect: Rn,
  55678. mixinAxisModelCommonMethods: s5e
  55679. }, Symbol.toStringTag, { value: "Module" }));
  55680. var c5e = 1e-8;
  55681. function sV(t, e) {
  55682. return Math.abs(t - e) < c5e;
  55683. }
  55684. function Sc(t, e, n) {
  55685. var r = 0, i = t[0];
  55686. if (!i)
  55687. return !1;
  55688. for (var a = 1; a < t.length; a++) {
  55689. var o = t[a];
  55690. r += Ss(i[0], i[1], o[0], o[1], e, n), i = o;
  55691. }
  55692. var s = t[0];
  55693. return (!sV(i[0], s[0]) || !sV(i[1], s[1])) && (r += Ss(i[0], i[1], s[0], s[1], e, n)), r !== 0;
  55694. }
  55695. var f5e = [];
  55696. function ZT(t, e) {
  55697. for (var n = 0; n < t.length; n++)
  55698. ar(t[n], t[n], e);
  55699. }
  55700. function lV(t, e, n, r) {
  55701. for (var i = 0; i < t.length; i++) {
  55702. var a = t[i];
  55703. r && (a = r.project(a)), a && isFinite(a[0]) && isFinite(a[1]) && ($s(e, e, a), As(n, n, a));
  55704. }
  55705. }
  55706. function d5e(t) {
  55707. 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++) {
  55708. var l = t[s][0], u = t[s][1], c = a * u - l * o;
  55709. e += c, n += (a + l) * c, r += (o + u) * c, a = l, o = u;
  55710. }
  55711. return e ? [n / e / 3, r / e / 3, e] : [t[0][0] || 0, t[0][1] || 0];
  55712. }
  55713. var ote = (
  55714. /** @class */
  55715. function() {
  55716. function t(e) {
  55717. this.name = e;
  55718. }
  55719. return t.prototype.setCenter = function(e) {
  55720. this._center = e;
  55721. }, t.prototype.getCenter = function() {
  55722. var e = this._center;
  55723. return e || (e = this._center = this.calcCenter()), e;
  55724. }, t;
  55725. }()
  55726. ), uV = (
  55727. /** @class */
  55728. /* @__PURE__ */ function() {
  55729. function t(e, n) {
  55730. this.type = "polygon", this.exterior = e, this.interiors = n;
  55731. }
  55732. return t;
  55733. }()
  55734. ), cV = (
  55735. /** @class */
  55736. /* @__PURE__ */ function() {
  55737. function t(e) {
  55738. this.type = "linestring", this.points = e;
  55739. }
  55740. return t;
  55741. }()
  55742. ), ste = (
  55743. /** @class */
  55744. function(t) {
  55745. q(e, t);
  55746. function e(n, r, i) {
  55747. var a = t.call(this, n) || this;
  55748. return a.type = "geoJSON", a.geometries = r, a._center = i && [i[0], i[1]], a;
  55749. }
  55750. return e.prototype.calcCenter = function() {
  55751. for (var n = this.geometries, r, i = 0, a = 0; a < n.length; a++) {
  55752. var o = n[a], s = o.exterior, l = s && s.length;
  55753. l > i && (r = o, i = l);
  55754. }
  55755. if (r)
  55756. return d5e(r.exterior);
  55757. var u = this.getBoundingRect();
  55758. return [u.x + u.width / 2, u.y + u.height / 2];
  55759. }, e.prototype.getBoundingRect = function(n) {
  55760. var r = this._rect;
  55761. if (r && !n)
  55762. return r;
  55763. var i = [1 / 0, 1 / 0], a = [-1 / 0, -1 / 0], o = this.geometries;
  55764. return k(o, function(s) {
  55765. s.type === "polygon" ? lV(s.exterior, i, a, n) : k(s.points, function(l) {
  55766. lV(l, i, a, n);
  55767. });
  55768. }), isFinite(i[0]) && isFinite(i[1]) && isFinite(a[0]) && isFinite(a[1]) || (i[0] = i[1] = a[0] = a[1] = 0), r = new Je(i[0], i[1], a[0] - i[0], a[1] - i[1]), n || (this._rect = r), r;
  55769. }, e.prototype.contain = function(n) {
  55770. var r = this.getBoundingRect(), i = this.geometries;
  55771. if (!r.contain(n[0], n[1]))
  55772. return !1;
  55773. e: for (var a = 0, o = i.length; a < o; a++) {
  55774. var s = i[a];
  55775. if (s.type === "polygon") {
  55776. var l = s.exterior, u = s.interiors;
  55777. if (Sc(l, n[0], n[1])) {
  55778. for (var c = 0; c < (u ? u.length : 0); c++)
  55779. if (Sc(u[c], n[0], n[1]))
  55780. continue e;
  55781. return !0;
  55782. }
  55783. }
  55784. }
  55785. return !1;
  55786. }, e.prototype.transformTo = function(n, r, i, a) {
  55787. var o = this.getBoundingRect(), s = o.width / o.height;
  55788. i ? a || (a = i / s) : i = s * a;
  55789. for (var l = new Je(n, r, i, a), u = o.calculateTransform(l), c = this.geometries, f = 0; f < c.length; f++) {
  55790. var d = c[f];
  55791. d.type === "polygon" ? (ZT(d.exterior, u), k(d.interiors, function(h) {
  55792. ZT(h, u);
  55793. })) : k(d.points, function(h) {
  55794. ZT(h, u);
  55795. });
  55796. }
  55797. o = this._rect, o.copy(l), this._center = [o.x + o.width / 2, o.y + o.height / 2];
  55798. }, e.prototype.cloneShallow = function(n) {
  55799. n == null && (n = this.name);
  55800. var r = new e(n, this.geometries, this._center);
  55801. return r._rect = this._rect, r.transformTo = null, r;
  55802. }, e;
  55803. }(ote)
  55804. ), h5e = (
  55805. /** @class */
  55806. function(t) {
  55807. q(e, t);
  55808. function e(n, r) {
  55809. var i = t.call(this, n) || this;
  55810. return i.type = "geoSVG", i._elOnlyForCalculate = r, i;
  55811. }
  55812. return e.prototype.calcCenter = function() {
  55813. for (var n = this._elOnlyForCalculate, r = n.getBoundingRect(), i = [r.x + r.width / 2, r.y + r.height / 2], a = R0(f5e), o = n; o && !o.isGeoSVGGraphicRoot; )
  55814. Xo(a, o.getLocalTransform(), a), o = o.parent;
  55815. return Lf(a, a), ar(i, i, a), i;
  55816. }, e;
  55817. }(ote)
  55818. );
  55819. function p5e(t) {
  55820. if (!t.UTF8Encoding)
  55821. return t;
  55822. var e = t, n = e.UTF8Scale;
  55823. n == null && (n = 1024);
  55824. var r = e.features;
  55825. return k(r, function(i) {
  55826. var a = i.geometry, o = a.encodeOffsets, s = a.coordinates;
  55827. if (o)
  55828. switch (a.type) {
  55829. case "LineString":
  55830. a.coordinates = lte(s, o, n);
  55831. break;
  55832. case "Polygon":
  55833. UT(s, o, n);
  55834. break;
  55835. case "MultiLineString":
  55836. UT(s, o, n);
  55837. break;
  55838. case "MultiPolygon":
  55839. k(s, function(l, u) {
  55840. return UT(l, o[u], n);
  55841. });
  55842. }
  55843. }), e.UTF8Encoding = !1, e;
  55844. }
  55845. function UT(t, e, n) {
  55846. for (var r = 0; r < t.length; r++)
  55847. t[r] = lte(t[r], e[r], n);
  55848. }
  55849. function lte(t, e, n) {
  55850. for (var r = [], i = e[0], a = e[1], o = 0; o < t.length; o += 2) {
  55851. var s = t.charCodeAt(o) - 64, l = t.charCodeAt(o + 1) - 64;
  55852. s = s >> 1 ^ -(s & 1), l = l >> 1 ^ -(l & 1), s += i, l += a, i = s, a = l, r.push([s / n, l / n]);
  55853. }
  55854. return r;
  55855. }
  55856. function aE(t, e) {
  55857. return t = p5e(t), ce(Nt(t.features, function(n) {
  55858. return n.geometry && n.properties && n.geometry.coordinates.length > 0;
  55859. }), function(n) {
  55860. var r = n.properties, i = n.geometry, a = [];
  55861. switch (i.type) {
  55862. case "Polygon":
  55863. var o = i.coordinates;
  55864. a.push(new uV(o[0], o.slice(1)));
  55865. break;
  55866. case "MultiPolygon":
  55867. k(i.coordinates, function(l) {
  55868. l[0] && a.push(new uV(l[0], l.slice(1)));
  55869. });
  55870. break;
  55871. case "LineString":
  55872. a.push(new cV([i.coordinates]));
  55873. break;
  55874. case "MultiLineString":
  55875. a.push(new cV(i.coordinates));
  55876. }
  55877. var s = new ste(r[e || "name"], a, r.cp);
  55878. return s.properties = r, s;
  55879. });
  55880. }
  55881. const v5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55882. __proto__: null,
  55883. MAX_SAFE_INTEGER: TA,
  55884. asc: Wi,
  55885. getPercentWithPrecision: VDe,
  55886. getPixelPrecision: PR,
  55887. getPrecision: Ya,
  55888. getPrecisionSafe: oO,
  55889. isNumeric: Wx,
  55890. isRadianAroundZero: Fh,
  55891. linearMap: Lt,
  55892. nice: AR,
  55893. numericToNumber: as,
  55894. parseDate: Ki,
  55895. quantile: V_,
  55896. quantity: uK,
  55897. quantityExponent: N0,
  55898. reformIntervals: PA,
  55899. remRadian: $R,
  55900. round: mn
  55901. }, Symbol.toStringTag, { value: "Module" })), g5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55902. __proto__: null,
  55903. format: H0,
  55904. parse: Ki
  55905. }, Symbol.toStringTag, { value: "Module" })), m5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55906. __proto__: null,
  55907. Arc: qx,
  55908. BezierCurve: F0,
  55909. BoundingRect: Je,
  55910. Circle: ul,
  55911. CompoundPath: Kx,
  55912. Ellipse: Yx,
  55913. Group: Ve,
  55914. Image: lr,
  55915. IncrementalDisplayable: aJ,
  55916. Line: Un,
  55917. LinearGradient: yp,
  55918. Polygon: ai,
  55919. Polyline: oi,
  55920. RadialGradient: FR,
  55921. Rect: mt,
  55922. Ring: V0,
  55923. Sector: ii,
  55924. Text: gt,
  55925. clipPointsByRect: GR,
  55926. clipRectByRect: cJ,
  55927. createIcon: _p,
  55928. extendPath: lJ,
  55929. extendShape: sJ,
  55930. getShapeClass: Jx,
  55931. getTransform: ql,
  55932. initProps: Yt,
  55933. makeImage: QR,
  55934. makePath: W0,
  55935. mergePath: Bi,
  55936. registerShape: Na,
  55937. resizePath: HR,
  55938. updateProps: Ct
  55939. }, Symbol.toStringTag, { value: "Module" })), y5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55940. __proto__: null,
  55941. addCommas: JR,
  55942. capitalFirst: bLe,
  55943. encodeHTML: jr,
  55944. formatTime: yLe,
  55945. formatTpl: tk,
  55946. getTextRect: gLe,
  55947. getTooltipMarker: TJ,
  55948. normalizeCssArray: zf,
  55949. toCamelCase: ek,
  55950. truncateText: _K
  55951. }, Symbol.toStringTag, { value: "Module" })), b5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55952. __proto__: null,
  55953. bind: xe,
  55954. clone: Le,
  55955. curry: Ue,
  55956. defaults: Re,
  55957. each: k,
  55958. extend: le,
  55959. filter: Nt,
  55960. indexOf: et,
  55961. inherits: yR,
  55962. isArray: ue,
  55963. isFunction: Me,
  55964. isObject: Ie,
  55965. isString: Oe,
  55966. map: ce,
  55967. merge: qe,
  55968. reduce: Ma
  55969. }, Symbol.toStringTag, { value: "Module" }));
  55970. var km = bt();
  55971. function ute(t, e) {
  55972. var n = ce(e, function(r) {
  55973. return t.scale.parse(r);
  55974. });
  55975. return t.type === "time" && n.length > 0 && (n.sort(), n.unshift(n[0]), n.push(n[n.length - 1])), n;
  55976. }
  55977. function _5e(t) {
  55978. var e = t.getLabelModel().get("customValues");
  55979. if (e) {
  55980. var n = Ep(t);
  55981. return {
  55982. labels: ute(t, e).map(function(r) {
  55983. var i = {
  55984. value: r
  55985. };
  55986. return {
  55987. formattedLabel: n(i),
  55988. rawLabel: t.scale.getLabel(i),
  55989. tickValue: r
  55990. };
  55991. })
  55992. };
  55993. }
  55994. return t.type === "category" ? S5e(t) : w5e(t);
  55995. }
  55996. function O5e(t, e) {
  55997. var n = t.getTickModel().get("customValues");
  55998. return n ? {
  55999. ticks: ute(t, n)
  56000. } : t.type === "category" ? x5e(t, e) : {
  56001. ticks: ce(t.scale.getTicks(), function(r) {
  56002. return r.value;
  56003. })
  56004. };
  56005. }
  56006. function S5e(t) {
  56007. var e = t.getLabelModel(), n = cte(t, e);
  56008. return !e.get("show") || t.scale.isBlank() ? {
  56009. labels: [],
  56010. labelCategoryInterval: n.labelCategoryInterval
  56011. } : n;
  56012. }
  56013. function cte(t, e) {
  56014. var n = fte(t, "labels"), r = Ak(e), i = dte(n, r);
  56015. if (i)
  56016. return i;
  56017. var a, o;
  56018. return Me(r) ? a = vte(t, r) : (o = r === "auto" ? C5e(t) : r, a = pte(t, o)), hte(n, r, {
  56019. labels: a,
  56020. labelCategoryInterval: o
  56021. });
  56022. }
  56023. function x5e(t, e) {
  56024. var n = fte(t, "ticks"), r = Ak(e), i = dte(n, r);
  56025. if (i)
  56026. return i;
  56027. var a, o;
  56028. if ((!e.get("show") || t.scale.isBlank()) && (a = []), Me(r))
  56029. a = vte(t, r, !0);
  56030. else if (r === "auto") {
  56031. var s = cte(t, t.getLabelModel());
  56032. o = s.labelCategoryInterval, a = ce(s.labels, function(l) {
  56033. return l.tickValue;
  56034. });
  56035. } else
  56036. o = r, a = pte(t, o, !0);
  56037. return hte(n, r, {
  56038. ticks: a,
  56039. tickCategoryInterval: o
  56040. });
  56041. }
  56042. function w5e(t) {
  56043. var e = t.scale.getTicks(), n = Ep(t);
  56044. return {
  56045. labels: ce(e, function(r, i) {
  56046. return {
  56047. level: r.level,
  56048. formattedLabel: n(r, i),
  56049. rawLabel: t.scale.getLabel(r),
  56050. tickValue: r.value
  56051. };
  56052. })
  56053. };
  56054. }
  56055. function fte(t, e) {
  56056. return km(t)[e] || (km(t)[e] = []);
  56057. }
  56058. function dte(t, e) {
  56059. for (var n = 0; n < t.length; n++)
  56060. if (t[n].key === e)
  56061. return t[n].value;
  56062. }
  56063. function hte(t, e, n) {
  56064. return t.push({
  56065. key: e,
  56066. value: n
  56067. }), n;
  56068. }
  56069. function C5e(t) {
  56070. var e = km(t).autoInterval;
  56071. return e ?? (km(t).autoInterval = t.calculateCategoryInterval());
  56072. }
  56073. function T5e(t) {
  56074. var e = P5e(t), n = Ep(t), r = (e.axisRotate - e.labelRotate) / 180 * Math.PI, i = t.scale, a = i.getExtent(), o = i.count();
  56075. if (a[1] - a[0] < 1)
  56076. return 0;
  56077. var s = 1;
  56078. o > 40 && (s = Math.max(1, Math.floor(o / 40)));
  56079. 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) {
  56080. var p = 0, v = 0, g = L0(n({
  56081. value: l
  56082. }), e.font, "center", "top");
  56083. p = g.width * 1.3, v = g.height * 1.3, d = Math.max(d, p, 7), h = Math.max(h, v, 7);
  56084. }
  56085. var m = d / c, y = h / f;
  56086. isNaN(m) && (m = 1 / 0), isNaN(y) && (y = 1 / 0);
  56087. var b = Math.max(0, Math.floor(Math.min(m, y))), _ = km(t.model), O = t.getExtent(), S = _.lastAutoInterval, x = _.lastTickCount;
  56088. return S != null && x != null && Math.abs(S - b) <= 1 && Math.abs(x - o) <= 1 && S > b && _.axisExtent0 === O[0] && _.axisExtent1 === O[1] ? b = S : (_.lastTickCount = o, _.lastAutoInterval = b, _.axisExtent0 = O[0], _.axisExtent1 = O[1]), b;
  56089. }
  56090. function P5e(t) {
  56091. var e = t.getLabelModel();
  56092. return {
  56093. axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
  56094. labelRotate: e.get("rotate") || 0,
  56095. font: e.getFont()
  56096. };
  56097. }
  56098. function pte(t, e, n) {
  56099. var r = Ep(t), i = t.scale, a = i.getExtent(), o = t.getLabelModel(), s = [], l = Math.max((e || 0) + 1, 1), u = a[0], c = i.count();
  56100. u !== 0 && l > 1 && c / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  56101. var f = ate(t), d = o.get("showMinLabel") || f, h = o.get("showMaxLabel") || f;
  56102. d && u !== a[0] && v(a[0]);
  56103. for (var p = u; p <= a[1]; p += l)
  56104. v(p);
  56105. h && p - l !== a[1] && v(a[1]);
  56106. function v(g) {
  56107. var m = {
  56108. value: g
  56109. };
  56110. s.push(n ? g : {
  56111. formattedLabel: r(m),
  56112. rawLabel: i.getLabel(m),
  56113. tickValue: g
  56114. });
  56115. }
  56116. return s;
  56117. }
  56118. function vte(t, e, n) {
  56119. var r = t.scale, i = Ep(t), a = [];
  56120. return k(r.getTicks(), function(o) {
  56121. var s = r.getLabel(o), l = o.value;
  56122. e(o.value, s) && a.push(n ? l : {
  56123. formattedLabel: i(o),
  56124. rawLabel: s,
  56125. tickValue: l
  56126. });
  56127. }), a;
  56128. }
  56129. var fV = [0, 1], $5e = (
  56130. /** @class */
  56131. function() {
  56132. function t(e, n, r) {
  56133. this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = n, this._extent = r || [0, 0];
  56134. }
  56135. return t.prototype.contain = function(e) {
  56136. var n = this._extent, r = Math.min(n[0], n[1]), i = Math.max(n[0], n[1]);
  56137. return e >= r && e <= i;
  56138. }, t.prototype.containData = function(e) {
  56139. return this.scale.contain(e);
  56140. }, t.prototype.getExtent = function() {
  56141. return this._extent.slice();
  56142. }, t.prototype.getPixelPrecision = function(e) {
  56143. return PR(e || this.scale.getExtent(), this._extent);
  56144. }, t.prototype.setExtent = function(e, n) {
  56145. var r = this._extent;
  56146. r[0] = e, r[1] = n;
  56147. }, t.prototype.dataToCoord = function(e, n) {
  56148. var r = this._extent, i = this.scale;
  56149. return e = i.normalize(e), this.onBand && i.type === "ordinal" && (r = r.slice(), dV(r, i.count())), Lt(e, fV, r, n);
  56150. }, t.prototype.coordToData = function(e, n) {
  56151. var r = this._extent, i = this.scale;
  56152. this.onBand && i.type === "ordinal" && (r = r.slice(), dV(r, i.count()));
  56153. var a = Lt(e, r, fV, n);
  56154. return this.scale.scale(a);
  56155. }, t.prototype.pointToData = function(e, n) {
  56156. }, t.prototype.getTicksCoords = function(e) {
  56157. e = e || {};
  56158. var n = e.tickModel || this.getTickModel(), r = O5e(this, n), i = r.ticks, a = ce(i, function(s) {
  56159. return {
  56160. coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s),
  56161. tickValue: s
  56162. };
  56163. }, this), o = n.get("alignWithLabel");
  56164. return A5e(this, a, o, e.clamp), a;
  56165. }, t.prototype.getMinorTicksCoords = function() {
  56166. if (this.scale.type === "ordinal")
  56167. return [];
  56168. var e = this.model.getModel("minorTick"), n = e.get("splitNumber");
  56169. n > 0 && n < 100 || (n = 5);
  56170. var r = this.scale.getMinorTicks(n), i = ce(r, function(a) {
  56171. return ce(a, function(o) {
  56172. return {
  56173. coord: this.dataToCoord(o),
  56174. tickValue: o
  56175. };
  56176. }, this);
  56177. }, this);
  56178. return i;
  56179. }, t.prototype.getViewLabels = function() {
  56180. return _5e(this).labels;
  56181. }, t.prototype.getLabelModel = function() {
  56182. return this.model.getModel("axisLabel");
  56183. }, t.prototype.getTickModel = function() {
  56184. return this.model.getModel("axisTick");
  56185. }, t.prototype.getBandWidth = function() {
  56186. var e = this._extent, n = this.scale.getExtent(), r = n[1] - n[0] + (this.onBand ? 1 : 0);
  56187. r === 0 && (r = 1);
  56188. var i = Math.abs(e[1] - e[0]);
  56189. return Math.abs(i) / r;
  56190. }, t.prototype.calculateCategoryInterval = function() {
  56191. return T5e(this);
  56192. }, t;
  56193. }()
  56194. );
  56195. function dV(t, e) {
  56196. var n = t[1] - t[0], r = e, i = n / r / 2;
  56197. t[0] += i, t[1] -= i;
  56198. }
  56199. function A5e(t, e, n, r) {
  56200. var i = e.length;
  56201. if (!t.onBand || n || !i)
  56202. return;
  56203. var a = t.getExtent(), o, s;
  56204. if (i === 1)
  56205. e[0].coord = a[0], o = e[1] = {
  56206. coord: a[1]
  56207. };
  56208. else {
  56209. var l = e[i - 1].tickValue - e[0].tickValue, u = (e[i - 1].coord - e[0].coord) / l;
  56210. k(e, function(h) {
  56211. h.coord -= u / 2;
  56212. });
  56213. var c = t.scale.getExtent();
  56214. s = 1 + c[1] - e[i - 1].tickValue, o = {
  56215. coord: e[i - 1].coord + u * s
  56216. }, e.push(o);
  56217. }
  56218. var f = a[0] > a[1];
  56219. d(e[0].coord, a[0]) && (r ? e[0].coord = a[0] : e.shift()), r && d(a[0], e[0].coord) && e.unshift({
  56220. coord: a[0]
  56221. }), d(a[1], o.coord) && (r ? o.coord = a[1] : e.pop()), r && d(o.coord, a[1]) && e.push({
  56222. coord: a[1]
  56223. });
  56224. function d(h, p) {
  56225. return h = mn(h), p = mn(p), f ? h > p : h < p;
  56226. }
  56227. }
  56228. const Va = $5e;
  56229. function E5e(t) {
  56230. var e = rt.extend(t);
  56231. return rt.registerClass(e), e;
  56232. }
  56233. function M5e(t) {
  56234. var e = Xt.extend(t);
  56235. return Xt.registerClass(e), e;
  56236. }
  56237. function I5e(t) {
  56238. var e = Ht.extend(t);
  56239. return Ht.registerClass(e), e;
  56240. }
  56241. function D5e(t) {
  56242. var e = zt.extend(t);
  56243. return zt.registerClass(e), e;
  56244. }
  56245. var _v = Math.PI * 2, ac = os.CMD, R5e = ["top", "right", "bottom", "left"];
  56246. function k5e(t, e, n, r, i) {
  56247. var a = n.width, o = n.height;
  56248. switch (t) {
  56249. case "top":
  56250. r.set(n.x + a / 2, n.y - e), i.set(0, -1);
  56251. break;
  56252. case "bottom":
  56253. r.set(n.x + a / 2, n.y + o + e), i.set(0, 1);
  56254. break;
  56255. case "left":
  56256. r.set(n.x - e, n.y + o / 2), i.set(-1, 0);
  56257. break;
  56258. case "right":
  56259. r.set(n.x + a + e, n.y + o / 2), i.set(1, 0);
  56260. break;
  56261. }
  56262. }
  56263. function L5e(t, e, n, r, i, a, o, s, l) {
  56264. o -= t, s -= e;
  56265. var u = Math.sqrt(o * o + s * s);
  56266. o /= u, s /= u;
  56267. var c = o * n + t, f = s * n + e;
  56268. if (Math.abs(r - i) % _v < 1e-4)
  56269. return l[0] = c, l[1] = f, u - n;
  56270. if (a) {
  56271. var d = r;
  56272. r = Qi(i), i = Qi(d);
  56273. } else
  56274. r = Qi(r), i = Qi(i);
  56275. r > i && (i += _v);
  56276. var h = Math.atan2(s, o);
  56277. if (h < 0 && (h += _v), h >= r && h <= i || h + _v >= r && h + _v <= i)
  56278. return l[0] = c, l[1] = f, u - n;
  56279. 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), b = (g - o) * (g - o) + (m - s) * (m - s);
  56280. return y < b ? (l[0] = p, l[1] = v, Math.sqrt(y)) : (l[0] = g, l[1] = m, Math.sqrt(b));
  56281. }
  56282. function $O(t, e, n, r, i, a, o, s) {
  56283. var l = i - t, u = a - e, c = n - t, f = r - e, d = Math.sqrt(c * c + f * f);
  56284. c /= d, f /= d;
  56285. var h = l * c + u * f, p = h / d;
  56286. s && (p = Math.min(Math.max(p, 0), 1)), p *= d;
  56287. var v = o[0] = t + p * c, g = o[1] = e + p * f;
  56288. return Math.sqrt((v - i) * (v - i) + (g - a) * (g - a));
  56289. }
  56290. function gte(t, e, n, r, i, a, o) {
  56291. n < 0 && (t = t + n, n = -n), r < 0 && (e = e + r, r = -r);
  56292. 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);
  56293. return Math.sqrt((u - i) * (u - i) + (c - a) * (c - a));
  56294. }
  56295. var Xa = [];
  56296. function N5e(t, e, n) {
  56297. var r = gte(e.x, e.y, e.width, e.height, t.x, t.y, Xa);
  56298. return n.set(Xa[0], Xa[1]), r;
  56299. }
  56300. function B5e(t, e, n) {
  56301. 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; ) {
  56302. var p = c[h++];
  56303. h === 1 && (r = c[h], i = c[h + 1], a = r, o = i);
  56304. var v = u;
  56305. switch (p) {
  56306. case ac.M:
  56307. a = c[h++], o = c[h++], r = a, i = o;
  56308. break;
  56309. case ac.L:
  56310. v = $O(r, i, c[h], c[h + 1], f, d, Xa, !0), r = c[h++], i = c[h++];
  56311. break;
  56312. case ac.C:
  56313. v = Fq(r, i, c[h++], c[h++], c[h++], c[h++], c[h], c[h + 1], f, d, Xa), r = c[h++], i = c[h++];
  56314. break;
  56315. case ac.Q:
  56316. v = Qq(r, i, c[h++], c[h++], c[h], c[h + 1], f, d, Xa), r = c[h++], i = c[h++];
  56317. break;
  56318. case ac.A:
  56319. var g = c[h++], m = c[h++], y = c[h++], b = c[h++], _ = c[h++], O = c[h++];
  56320. h += 1;
  56321. var S = !!(1 - c[h++]);
  56322. s = Math.cos(_) * y + g, l = Math.sin(_) * b + m, h <= 1 && (a = s, o = l);
  56323. var x = (f - g) * b / y + g;
  56324. v = L5e(g, m, b, _, _ + O, S, x, d, Xa), r = Math.cos(_ + O) * y + g, i = Math.sin(_ + O) * b + m;
  56325. break;
  56326. case ac.R:
  56327. a = r = c[h++], o = i = c[h++];
  56328. var C = c[h++], T = c[h++];
  56329. v = gte(a, o, C, T, f, d, Xa);
  56330. break;
  56331. case ac.Z:
  56332. v = $O(r, i, a, o, f, d, Xa, !0), r = a, i = o;
  56333. break;
  56334. }
  56335. v < u && (u = v, n.set(Xa[0], Xa[1]));
  56336. }
  56337. return u;
  56338. }
  56339. var qa = new Ke(), Ut = new Ke(), wn = new Ke(), Qo = new Ke(), No = new Ke();
  56340. function hV(t, e) {
  56341. if (t) {
  56342. var n = t.getTextGuideLine(), r = t.getTextContent();
  56343. if (r && n) {
  56344. var i = t.textGuideLineConfig || {}, a = [[0, 0], [0, 0], [0, 0]], o = i.candidates || R5e, s = r.getBoundingRect().clone();
  56345. s.applyTransform(r.getComputedTransform());
  56346. var l = 1 / 0, u = i.anchor, c = t.getComputedTransform(), f = c && Lf([], c), d = e.get("length2") || 0;
  56347. u && wn.copy(u);
  56348. for (var h = 0; h < o.length; h++) {
  56349. var p = o[h];
  56350. k5e(p, 0, s, qa, Qo), Ke.scaleAndAdd(Ut, qa, Qo, d), Ut.transform(f);
  56351. var v = t.getBoundingRect(), g = u ? u.distance(Ut) : t instanceof ot ? B5e(Ut, t.path, wn) : N5e(Ut, v, wn);
  56352. g < l && (l = g, Ut.transform(c), wn.transform(c), wn.toArray(a[0]), Ut.toArray(a[1]), qa.toArray(a[2]));
  56353. }
  56354. mte(a, e.get("minTurnAngle")), n.setShape({
  56355. points: a
  56356. });
  56357. }
  56358. }
  56359. }
  56360. var AO = [], Gr = new Ke();
  56361. function mte(t, e) {
  56362. if (e <= 180 && e > 0) {
  56363. e = e / 180 * Math.PI, qa.fromArray(t[0]), Ut.fromArray(t[1]), wn.fromArray(t[2]), Ke.sub(Qo, qa, Ut), Ke.sub(No, wn, Ut);
  56364. var n = Qo.len(), r = No.len();
  56365. if (!(n < 1e-3 || r < 1e-3)) {
  56366. Qo.scale(1 / n), No.scale(1 / r);
  56367. var i = Qo.dot(No), a = Math.cos(e);
  56368. if (a < i) {
  56369. var o = $O(Ut.x, Ut.y, wn.x, wn.y, qa.x, qa.y, AO, !1);
  56370. Gr.fromArray(AO), Gr.scaleAndAdd(No, o / Math.tan(Math.PI - e));
  56371. var s = wn.x !== Ut.x ? (Gr.x - Ut.x) / (wn.x - Ut.x) : (Gr.y - Ut.y) / (wn.y - Ut.y);
  56372. if (isNaN(s))
  56373. return;
  56374. s < 0 ? Ke.copy(Gr, Ut) : s > 1 && Ke.copy(Gr, wn), Gr.toArray(t[1]);
  56375. }
  56376. }
  56377. }
  56378. }
  56379. function z5e(t, e, n) {
  56380. if (n <= 180 && n > 0) {
  56381. n = n / 180 * Math.PI, qa.fromArray(t[0]), Ut.fromArray(t[1]), wn.fromArray(t[2]), Ke.sub(Qo, Ut, qa), Ke.sub(No, wn, Ut);
  56382. var r = Qo.len(), i = No.len();
  56383. if (!(r < 1e-3 || i < 1e-3)) {
  56384. Qo.scale(1 / r), No.scale(1 / i);
  56385. var a = Qo.dot(e), o = Math.cos(n);
  56386. if (a < o) {
  56387. var s = $O(Ut.x, Ut.y, wn.x, wn.y, qa.x, qa.y, AO, !1);
  56388. Gr.fromArray(AO);
  56389. var l = Math.PI / 2, u = Math.acos(No.dot(e)), c = l + u - n;
  56390. if (c >= l)
  56391. Ke.copy(Gr, wn);
  56392. else {
  56393. Gr.scaleAndAdd(No, s / Math.tan(Math.PI / 2 - c));
  56394. var f = wn.x !== Ut.x ? (Gr.x - Ut.x) / (wn.x - Ut.x) : (Gr.y - Ut.y) / (wn.y - Ut.y);
  56395. if (isNaN(f))
  56396. return;
  56397. f < 0 ? Ke.copy(Gr, Ut) : f > 1 && Ke.copy(Gr, wn);
  56398. }
  56399. Gr.toArray(t[1]);
  56400. }
  56401. }
  56402. }
  56403. }
  56404. function XT(t, e, n, r) {
  56405. var i = n === "normal", a = i ? t : t.ensureState(n);
  56406. a.ignore = e;
  56407. var o = r.get("smooth");
  56408. o && o === !0 && (o = 0.3), a.shape = a.shape || {}, o > 0 && (a.shape.smooth = o);
  56409. var s = r.getModel("lineStyle").getLineStyle();
  56410. i ? t.useStyle(s) : a.style = s;
  56411. }
  56412. function V5e(t, e) {
  56413. var n = e.smooth, r = e.points;
  56414. if (r)
  56415. if (t.moveTo(r[0][0], r[0][1]), n > 0 && r.length >= 3) {
  56416. var i = Ps(r[0], r[1]), a = Ps(r[1], r[2]);
  56417. if (!i || !a) {
  56418. t.lineTo(r[1][0], r[1][1]), t.lineTo(r[2][0], r[2][1]);
  56419. return;
  56420. }
  56421. var o = Math.min(i, a) * n, s = $g([], r[1], r[0], o / i), l = $g([], r[1], r[2], o / a), u = $g([], s, l, 0.5);
  56422. 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]);
  56423. } else
  56424. for (var c = 1; c < r.length; c++)
  56425. t.lineTo(r[c][0], r[c][1]);
  56426. }
  56427. function Ek(t, e, n) {
  56428. var r = t.getTextGuideLine(), i = t.getTextContent();
  56429. if (!i) {
  56430. r && t.removeTextGuideLine();
  56431. return;
  56432. }
  56433. for (var a = e.normal, o = a.get("show"), s = i.ignore, l = 0; l < Pm.length; l++) {
  56434. var u = Pm[l], c = e[u], f = u === "normal";
  56435. if (c) {
  56436. var d = c.get("show"), h = f ? s : We(i.states[u] && i.states[u].ignore, s);
  56437. if (h || !We(d, o)) {
  56438. var p = f ? r : r && r.states[u];
  56439. p && (p.ignore = !0), r && XT(r, !0, u, c);
  56440. continue;
  56441. }
  56442. r || (r = new oi(), t.setTextGuideLine(r), !f && (s || !o) && XT(r, !0, "normal", e.normal), t.stateProxy && (r.stateProxy = t.stateProxy)), XT(r, !1, u, c);
  56443. }
  56444. }
  56445. if (r) {
  56446. Re(r.style, n), r.style.fill = null;
  56447. var v = a.get("showAbove"), g = t.textGuideLineConfig = t.textGuideLineConfig || {};
  56448. g.showAbove = v || !1, r.buildPath = V5e;
  56449. }
  56450. }
  56451. function Mk(t, e) {
  56452. e = e || "labelLine";
  56453. for (var n = {
  56454. normal: t.getModel(e)
  56455. }, r = 0; r < ri.length; r++) {
  56456. var i = ri[r];
  56457. n[i] = t.getModel([i, e]);
  56458. }
  56459. return n;
  56460. }
  56461. function yte(t) {
  56462. for (var e = [], n = 0; n < t.length; n++) {
  56463. var r = t[n];
  56464. if (!r.defaultAttr.ignore) {
  56465. 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();
  56466. u.applyTransform(a), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
  56467. var c = s ? new uO(o, a) : null;
  56468. e.push({
  56469. label: i,
  56470. labelLine: r.labelLine,
  56471. rect: u,
  56472. localRect: o,
  56473. obb: c,
  56474. priority: r.priority,
  56475. defaultAttr: r.defaultAttr,
  56476. layoutOption: r.computedLayoutOption,
  56477. axisAligned: s,
  56478. transform: a
  56479. });
  56480. }
  56481. }
  56482. return e;
  56483. }
  56484. function bte(t, e, n, r, i, a) {
  56485. var o = t.length;
  56486. if (o < 2)
  56487. return;
  56488. t.sort(function(C, T) {
  56489. return C.rect[e] - T.rect[e];
  56490. });
  56491. for (var s = 0, l, u = !1, c = 0, f = 0; f < o; f++) {
  56492. var d = t[f], h = d.rect;
  56493. l = h[e] - s, l < 0 && (h[e] -= l, d.label[e] -= l, u = !0);
  56494. var p = Math.max(-l, 0);
  56495. c += p, s = h[e] + h[n];
  56496. }
  56497. c > 0 && a && O(-c / o, 0, o);
  56498. var v = t[0], g = t[o - 1], m, y;
  56499. b(), m < 0 && S(-m, 0.8), y < 0 && S(y, 0.8), b(), _(m, y, 1), _(y, m, -1), b(), m < 0 && x(-m), y < 0 && x(y);
  56500. function b() {
  56501. m = v.rect[e] - r, y = i - g.rect[e] - g.rect[n];
  56502. }
  56503. function _(C, T, w) {
  56504. if (C < 0) {
  56505. var P = Math.min(T, -C);
  56506. if (P > 0) {
  56507. O(P * w, 0, o);
  56508. var $ = P + C;
  56509. $ < 0 && S(-$ * w, 1);
  56510. } else
  56511. S(-C * w, 1);
  56512. }
  56513. }
  56514. function O(C, T, w) {
  56515. C !== 0 && (u = !0);
  56516. for (var P = T; P < w; P++) {
  56517. var $ = t[P], A = $.rect;
  56518. A[e] += C, $.label[e] += C;
  56519. }
  56520. }
  56521. function S(C, T) {
  56522. for (var w = [], P = 0, $ = 1; $ < o; $++) {
  56523. var A = t[$ - 1].rect, D = Math.max(t[$].rect[e] - A[e] - A[n], 0);
  56524. w.push(D), P += D;
  56525. }
  56526. if (P) {
  56527. var E = Math.min(Math.abs(C) / P, T);
  56528. if (C > 0)
  56529. for (var $ = 0; $ < o - 1; $++) {
  56530. var R = w[$] * E;
  56531. O(R, 0, $ + 1);
  56532. }
  56533. else
  56534. for (var $ = o - 1; $ > 0; $--) {
  56535. var R = w[$ - 1] * E;
  56536. O(-R, $, o);
  56537. }
  56538. }
  56539. }
  56540. function x(C) {
  56541. var T = C < 0 ? -1 : 1;
  56542. C = Math.abs(C);
  56543. for (var w = Math.ceil(C / (o - 1)), P = 0; P < o - 1; P++)
  56544. if (T > 0 ? O(w, 0, P + 1) : O(-w, o - P - 1, o), C -= w, C <= 0)
  56545. return;
  56546. }
  56547. return u;
  56548. }
  56549. function F5e(t, e, n, r) {
  56550. return bte(t, "x", "width", e, n, r);
  56551. }
  56552. function _te(t, e, n, r) {
  56553. return bte(t, "y", "height", e, n, r);
  56554. }
  56555. function Ote(t) {
  56556. var e = [];
  56557. t.sort(function(v, g) {
  56558. return g.priority - v.priority;
  56559. });
  56560. var n = new Je(0, 0, 0, 0);
  56561. function r(v) {
  56562. if (!v.ignore) {
  56563. var g = v.ensureState("emphasis");
  56564. g.ignore == null && (g.ignore = !1);
  56565. }
  56566. v.ignore = !0;
  56567. }
  56568. for (var i = 0; i < t.length; i++) {
  56569. var a = t[i], o = a.axisAligned, s = a.localRect, l = a.transform, u = a.label, c = a.labelLine;
  56570. n.copy(a.rect), n.width -= 0.1, n.height -= 0.1, n.x += 0.05, n.y += 0.05;
  56571. for (var f = a.obb, d = !1, h = 0; h < e.length; h++) {
  56572. var p = e[h];
  56573. if (n.intersect(p.rect)) {
  56574. if (o && p.axisAligned) {
  56575. d = !0;
  56576. break;
  56577. }
  56578. if (p.obb || (p.obb = new uO(p.localRect, p.transform)), f || (f = new uO(s, l)), f.intersect(p.obb)) {
  56579. d = !0;
  56580. break;
  56581. }
  56582. }
  56583. }
  56584. d ? (r(u), c && r(c)) : (u.attr("ignore", a.defaultAttr.ignore), c && c.attr("ignore", a.defaultAttr.labelGuideIgnore), e.push(a));
  56585. }
  56586. }
  56587. function W5e(t) {
  56588. if (t) {
  56589. for (var e = [], n = 0; n < t.length; n++)
  56590. e.push(t[n].slice());
  56591. return e;
  56592. }
  56593. }
  56594. function Q5e(t, e) {
  56595. var n = t.label, r = e && e.getTextGuideLine();
  56596. return {
  56597. dataIndex: t.dataIndex,
  56598. dataType: t.dataType,
  56599. seriesIndex: t.seriesModel.seriesIndex,
  56600. text: t.label.style.text,
  56601. rect: t.hostRect,
  56602. labelRect: t.rect,
  56603. // x: labelAttr.x,
  56604. // y: labelAttr.y,
  56605. align: n.style.align,
  56606. verticalAlign: n.style.verticalAlign,
  56607. labelLinePoints: W5e(r && r.shape.points)
  56608. };
  56609. }
  56610. var pV = ["align", "verticalAlign", "width", "height", "fontSize"], Fr = new Es(), YT = bt(), H5e = bt();
  56611. function yb(t, e, n) {
  56612. for (var r = 0; r < n.length; r++) {
  56613. var i = n[r];
  56614. e[i] != null && (t[i] = e[i]);
  56615. }
  56616. }
  56617. var bb = ["x", "y", "rotation"], G5e = (
  56618. /** @class */
  56619. function() {
  56620. function t() {
  56621. this._labelList = [], this._chartViewList = [];
  56622. }
  56623. return t.prototype.clearLabels = function() {
  56624. this._labelList = [], this._chartViewList = [];
  56625. }, t.prototype._addLabel = function(e, n, r, i, a) {
  56626. var o = i.style, s = i.__hostTarget, l = s.textConfig || {}, u = i.getComputedTransform(), c = i.getBoundingRect().plain();
  56627. Je.applyTransform(c, c, u), u ? Fr.setLocalTransform(u) : (Fr.x = Fr.y = Fr.rotation = Fr.originX = Fr.originY = 0, Fr.scaleX = Fr.scaleY = 1), Fr.rotation = Qi(Fr.rotation);
  56628. var f = i.__hostTarget, d;
  56629. if (f) {
  56630. d = f.getBoundingRect().plain();
  56631. var h = f.getComputedTransform();
  56632. Je.applyTransform(d, d, h);
  56633. }
  56634. var p = d && f.getTextGuideLine();
  56635. this._labelList.push({
  56636. label: i,
  56637. labelLine: p,
  56638. seriesModel: r,
  56639. dataIndex: e,
  56640. dataType: n,
  56641. layoutOption: a,
  56642. computedLayoutOption: null,
  56643. rect: c,
  56644. hostRect: d,
  56645. // Label with lower priority will be hidden when overlapped
  56646. // Use rect size as default priority
  56647. priority: d ? d.width * d.height : 0,
  56648. // Save default label attributes.
  56649. // For restore if developers want get back to default value in callback.
  56650. defaultAttr: {
  56651. ignore: i.ignore,
  56652. labelGuideIgnore: p && p.ignore,
  56653. x: Fr.x,
  56654. y: Fr.y,
  56655. scaleX: Fr.scaleX,
  56656. scaleY: Fr.scaleY,
  56657. rotation: Fr.rotation,
  56658. style: {
  56659. x: o.x,
  56660. y: o.y,
  56661. align: o.align,
  56662. verticalAlign: o.verticalAlign,
  56663. width: o.width,
  56664. height: o.height,
  56665. fontSize: o.fontSize
  56666. },
  56667. cursor: i.cursor,
  56668. attachedPos: l.position,
  56669. attachedRot: l.rotation
  56670. }
  56671. });
  56672. }, t.prototype.addLabelsOfSeries = function(e) {
  56673. var n = this;
  56674. this._chartViewList.push(e);
  56675. var r = e.__model, i = r.get("labelLayout");
  56676. (Me(i) || st(i).length) && e.group.traverse(function(a) {
  56677. if (a.ignore)
  56678. return !0;
  56679. var o = a.getTextContent(), s = Fe(a);
  56680. o && !o.disableLabelLayout && n._addLabel(s.dataIndex, s.dataType, r, o, i);
  56681. });
  56682. }, t.prototype.updateLayoutConfig = function(e) {
  56683. var n = e.getWidth(), r = e.getHeight();
  56684. function i(b, _) {
  56685. return function() {
  56686. hV(b, _);
  56687. };
  56688. }
  56689. for (var a = 0; a < this._labelList.length; a++) {
  56690. var o = this._labelList[a], s = o.label, l = s.__hostTarget, u = o.defaultAttr, c = void 0;
  56691. Me(o.layoutOption) ? c = o.layoutOption(Q5e(o, l)) : c = o.layoutOption, c = c || {}, o.computedLayoutOption = c;
  56692. var f = Math.PI / 180;
  56693. l && l.setTextConfig({
  56694. // Force to set local false.
  56695. local: !1,
  56696. // Ignore position and rotation config on the host el if x or y is changed.
  56697. position: c.x != null || c.y != null ? null : u.attachedPos,
  56698. // Ignore rotation config on the host el if rotation is changed.
  56699. rotation: c.rotate != null ? c.rotate * f : u.attachedRot,
  56700. offset: [c.dx || 0, c.dy || 0]
  56701. });
  56702. var d = !1;
  56703. if (c.x != null ? (s.x = _e(c.x, n), s.setStyle("x", 0), d = !0) : (s.x = u.x, s.setStyle("x", u.style.x)), c.y != null ? (s.y = _e(c.y, r), s.setStyle("y", 0), d = !0) : (s.y = u.y, s.setStyle("y", u.style.y)), c.labelLinePoints) {
  56704. var h = l.getTextGuideLine();
  56705. h && (h.setShape({
  56706. points: c.labelLinePoints
  56707. }), d = !1);
  56708. }
  56709. var p = YT(s);
  56710. p.needsUpdateLabelLine = d, s.rotation = c.rotate != null ? c.rotate * f : u.rotation, s.scaleX = u.scaleX, s.scaleY = u.scaleY;
  56711. for (var v = 0; v < pV.length; v++) {
  56712. var g = pV[v];
  56713. s.setStyle(g, c[g] != null ? c[g] : u.style[g]);
  56714. }
  56715. if (c.draggable) {
  56716. if (s.draggable = !0, s.cursor = "move", l) {
  56717. var m = o.seriesModel;
  56718. if (o.dataIndex != null) {
  56719. var y = o.seriesModel.getData(o.dataType);
  56720. m = y.getItemModel(o.dataIndex);
  56721. }
  56722. s.on("drag", i(l, m.getModel("labelLine")));
  56723. }
  56724. } else
  56725. s.off("drag"), s.cursor = u.cursor;
  56726. }
  56727. }, t.prototype.layout = function(e) {
  56728. var n = e.getWidth(), r = e.getHeight(), i = yte(this._labelList), a = Nt(i, function(l) {
  56729. return l.layoutOption.moveOverlap === "shiftX";
  56730. }), o = Nt(i, function(l) {
  56731. return l.layoutOption.moveOverlap === "shiftY";
  56732. });
  56733. F5e(a, 0, n), _te(o, 0, r);
  56734. var s = Nt(i, function(l) {
  56735. return l.layoutOption.hideOverlap;
  56736. });
  56737. Ote(s);
  56738. }, t.prototype.processLabelsOverall = function() {
  56739. var e = this;
  56740. k(this._chartViewList, function(n) {
  56741. var r = n.__model, i = n.ignoreLabelLineUpdate, a = r.isAnimationEnabled();
  56742. n.group.traverse(function(o) {
  56743. if (o.ignore && !o.forceLabelAnimation)
  56744. return !0;
  56745. var s = !i, l = o.getTextContent();
  56746. !s && l && (s = YT(l).needsUpdateLabelLine), s && e._updateLabelLine(o, r), a && e._animateLabels(o, r);
  56747. });
  56748. });
  56749. }, t.prototype._updateLabelLine = function(e, n) {
  56750. var r = e.getTextContent(), i = Fe(e), a = i.dataIndex;
  56751. if (r && a != null) {
  56752. var o = n.getData(i.dataType), s = o.getItemModel(a), l = {}, u = o.getItemVisual(a, "style");
  56753. if (u) {
  56754. var c = o.getVisual("drawType");
  56755. l.stroke = u[c];
  56756. }
  56757. var f = s.getModel("labelLine");
  56758. Ek(e, Mk(s), l), hV(e, f);
  56759. }
  56760. }, t.prototype._animateLabels = function(e, n) {
  56761. var r = e.getTextContent(), i = e.getTextGuideLine();
  56762. if (r && (e.forceLabelAnimation || !r.ignore && !r.invisible && !e.disableLabelAnimation && !rh(e))) {
  56763. var a = YT(r), o = a.oldLayout, s = Fe(e), l = s.dataIndex, u = {
  56764. x: r.x,
  56765. y: r.y,
  56766. rotation: r.rotation
  56767. }, c = n.getData(s.dataType);
  56768. if (o) {
  56769. r.attr(o);
  56770. var d = e.prevStates;
  56771. d && (et(d, "select") >= 0 && r.attr(a.oldLayoutSelect), et(d, "emphasis") >= 0 && r.attr(a.oldLayoutEmphasis)), Ct(r, u, n, l);
  56772. } else if (r.attr(u), !Sp(r).valueAnimation) {
  56773. var f = We(r.style.opacity, 1);
  56774. r.style.opacity = 0, Yt(r, {
  56775. style: {
  56776. opacity: f
  56777. }
  56778. }, n, l);
  56779. }
  56780. if (a.oldLayout = u, r.states.select) {
  56781. var h = a.oldLayoutSelect = {};
  56782. yb(h, u, bb), yb(h, r.states.select, bb);
  56783. }
  56784. if (r.states.emphasis) {
  56785. var p = a.oldLayoutEmphasis = {};
  56786. yb(p, u, bb), yb(p, r.states.emphasis, bb);
  56787. }
  56788. pJ(r, l, c, n, n);
  56789. }
  56790. if (i && !i.ignore && !i.invisible) {
  56791. var a = H5e(i), o = a.oldLayout, v = {
  56792. points: i.shape.points
  56793. };
  56794. o ? (i.attr({
  56795. shape: o
  56796. }), Ct(i, {
  56797. shape: v
  56798. }, n)) : (i.setShape(v), i.style.strokePercent = 0, Yt(i, {
  56799. style: {
  56800. strokePercent: 1
  56801. }
  56802. }, n)), a.oldLayout = v;
  56803. }
  56804. }, t;
  56805. }()
  56806. ), qT = bt();
  56807. function j5e(t) {
  56808. t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
  56809. var i = qT(n).labelManager;
  56810. i || (i = qT(n).labelManager = new G5e()), i.clearLabels();
  56811. }), t.registerUpdateLifecycle("series:layoutlabels", function(e, n, r) {
  56812. var i = qT(n).labelManager;
  56813. r.updatedSeries.forEach(function(a) {
  56814. i.addLabelsOfSeries(n.getViewOfSeriesModel(a));
  56815. }), i.updateLayoutConfig(n), i.layout(n), i.processLabelsOverall();
  56816. });
  56817. }
  56818. var KT = Math.sin, JT = Math.cos, Ste = Math.PI, oc = Math.PI * 2, Z5e = 180 / Ste, xte = function() {
  56819. function t() {
  56820. }
  56821. return t.prototype.reset = function(e) {
  56822. this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4);
  56823. }, t.prototype.moveTo = function(e, n) {
  56824. this._add("M", e, n);
  56825. }, t.prototype.lineTo = function(e, n) {
  56826. this._add("L", e, n);
  56827. }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
  56828. this._add("C", e, n, r, i, a, o);
  56829. }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
  56830. this._add("Q", e, n, r, i);
  56831. }, t.prototype.arc = function(e, n, r, i, a, o) {
  56832. this.ellipse(e, n, r, r, 0, i, a, o);
  56833. }, t.prototype.ellipse = function(e, n, r, i, a, o, s, l) {
  56834. var u = s - o, c = !l, f = Math.abs(u), d = Bl(f - oc) || (c ? u >= oc : -u >= oc), h = u > 0 ? u % oc : u % oc + oc, p = !1;
  56835. d ? p = !0 : Bl(f) ? p = !1 : p = h >= Ste == !!c;
  56836. var v = e + r * JT(o), g = n + i * KT(o);
  56837. this._start && this._add("M", v, g);
  56838. var m = Math.round(a * Z5e);
  56839. if (d) {
  56840. var y = 1 / this._p, b = (c ? 1 : -1) * (oc - y);
  56841. this._add("A", r, i, m, 1, +c, e + r * JT(o + b), n + i * KT(o + b)), y > 0.01 && this._add("A", r, i, m, 0, +c, v, g);
  56842. } else {
  56843. var _ = e + r * JT(s), O = n + i * KT(s);
  56844. this._add("A", r, i, m, +p, +c, _, O);
  56845. }
  56846. }, t.prototype.rect = function(e, n, r, i) {
  56847. this._add("M", e, n), this._add("l", r, 0), this._add("l", 0, i), this._add("l", -r, 0), this._add("Z");
  56848. }, t.prototype.closePath = function() {
  56849. this._d.length > 0 && this._add("Z");
  56850. }, t.prototype._add = function(e, n, r, i, a, o, s, l, u) {
  56851. for (var c = [], f = this._p, d = 1; d < arguments.length; d++) {
  56852. var h = arguments[d];
  56853. if (isNaN(h)) {
  56854. this._invalid = !0;
  56855. return;
  56856. }
  56857. c.push(Math.round(h * f) / f);
  56858. }
  56859. this._d.push(e + c.join(" ")), this._start = e === "Z";
  56860. }, t.prototype.generateStr = function() {
  56861. this._str = this._invalid ? "" : this._d.join(""), this._d = [];
  56862. }, t.prototype.getStr = function() {
  56863. return this._str;
  56864. }, t;
  56865. }(), Ik = "none", U5e = Math.round;
  56866. function X5e(t) {
  56867. var e = t.fill;
  56868. return e != null && e !== Ik;
  56869. }
  56870. function Y5e(t) {
  56871. var e = t.stroke;
  56872. return e != null && e !== Ik;
  56873. }
  56874. var oE = ["lineCap", "miterLimit", "lineJoin"], q5e = ce(oE, function(t) {
  56875. return "stroke-" + t.toLowerCase();
  56876. });
  56877. function K5e(t, e, n, r) {
  56878. var i = e.opacity == null ? 1 : e.opacity;
  56879. if (n instanceof lr) {
  56880. t("opacity", i);
  56881. return;
  56882. }
  56883. if (X5e(e)) {
  56884. var a = Tm(e.fill);
  56885. t("fill", a.color);
  56886. var o = e.fillOpacity != null ? e.fillOpacity * a.opacity * i : a.opacity * i;
  56887. o < 1 && t("fill-opacity", o);
  56888. } else
  56889. t("fill", Ik);
  56890. if (Y5e(e)) {
  56891. var s = Tm(e.stroke);
  56892. t("stroke", s.color);
  56893. 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;
  56894. if (u !== 1 && t("stroke-width", u), f && t("paint-order", f ? "stroke" : "fill"), c < 1 && t("stroke-opacity", c), e.lineDash) {
  56895. var d = dk(n), h = d[0], p = d[1];
  56896. h && (p = U5e(p || 0), t("stroke-dasharray", h.join(",")), (p || r) && t("stroke-dashoffset", p));
  56897. }
  56898. for (var v = 0; v < oE.length; v++) {
  56899. var g = oE[v];
  56900. if (e[g] !== sO[g]) {
  56901. var m = e[g] || sO[g];
  56902. m && t(q5e[v], m);
  56903. }
  56904. }
  56905. }
  56906. }
  56907. var wte = "http://www.w3.org/2000/svg", Cte = "http://www.w3.org/1999/xlink", J5e = "http://www.w3.org/2000/xmlns/", e3e = "http://www.w3.org/XML/1998/namespace", vV = "ecmeta_";
  56908. function Tte(t) {
  56909. return document.createElementNS(wte, t);
  56910. }
  56911. function Xn(t, e, n, r, i) {
  56912. return {
  56913. tag: t,
  56914. attrs: n || {},
  56915. children: r,
  56916. text: i,
  56917. key: e
  56918. };
  56919. }
  56920. function t3e(t, e) {
  56921. var n = [];
  56922. if (e)
  56923. for (var r in e) {
  56924. var i = e[r], a = r;
  56925. i !== !1 && (i !== !0 && i != null && (a += '="' + i + '"'), n.push(a));
  56926. }
  56927. return "<" + t + " " + n.join(" ") + ">";
  56928. }
  56929. function n3e(t) {
  56930. return "</" + t + ">";
  56931. }
  56932. function Dk(t, e) {
  56933. e = e || {};
  56934. var n = e.newline ? `
  56935. ` : "";
  56936. function r(i) {
  56937. var a = i.children, o = i.tag, s = i.attrs, l = i.text;
  56938. return t3e(o, s) + (o !== "style" ? jr(l) : l || "") + (a ? "" + n + ce(a, function(u) {
  56939. return r(u);
  56940. }).join(n) + n : "") + n3e(o);
  56941. }
  56942. return r(t);
  56943. }
  56944. function r3e(t, e, n) {
  56945. n = n || {};
  56946. var r = n.newline ? `
  56947. ` : "", i = " {" + r, a = r + "}", o = ce(st(t), function(l) {
  56948. return l + i + ce(st(t[l]), function(u) {
  56949. return u + ":" + t[l][u] + ";";
  56950. }).join(r) + a;
  56951. }).join(r), s = ce(st(e), function(l) {
  56952. return "@keyframes " + l + i + ce(st(e[l]), function(u) {
  56953. return u + i + ce(st(e[l][u]), function(c) {
  56954. var f = e[l][u][c];
  56955. return c === "d" && (f = 'path("' + f + '")'), c + ":" + f + ";";
  56956. }).join(r) + a;
  56957. }).join(r) + a;
  56958. }).join(r);
  56959. return !o && !s ? "" : ["<![CDATA[", o, s, "]]>"].join(r);
  56960. }
  56961. function sE(t) {
  56962. return {
  56963. zrId: t,
  56964. shadowCache: {},
  56965. patternCache: {},
  56966. gradientCache: {},
  56967. clipPathCache: {},
  56968. defs: {},
  56969. cssNodes: {},
  56970. cssAnims: {},
  56971. cssStyleCache: {},
  56972. cssAnimIdx: 0,
  56973. shadowIdx: 0,
  56974. gradientIdx: 0,
  56975. patternIdx: 0,
  56976. clipPathIdx: 0
  56977. };
  56978. }
  56979. function gV(t, e, n, r) {
  56980. return Xn("svg", "root", {
  56981. width: t,
  56982. height: e,
  56983. xmlns: wte,
  56984. "xmlns:xlink": Cte,
  56985. version: "1.1",
  56986. baseProfile: "full",
  56987. viewBox: r ? "0 0 " + t + " " + e : !1
  56988. }, n);
  56989. }
  56990. var i3e = 0;
  56991. function Pte() {
  56992. return i3e++;
  56993. }
  56994. var mV = {
  56995. cubicIn: "0.32,0,0.67,0",
  56996. cubicOut: "0.33,1,0.68,1",
  56997. cubicInOut: "0.65,0,0.35,1",
  56998. quadraticIn: "0.11,0,0.5,0",
  56999. quadraticOut: "0.5,1,0.89,1",
  57000. quadraticInOut: "0.45,0,0.55,1",
  57001. quarticIn: "0.5,0,0.75,0",
  57002. quarticOut: "0.25,1,0.5,1",
  57003. quarticInOut: "0.76,0,0.24,1",
  57004. quinticIn: "0.64,0,0.78,0",
  57005. quinticOut: "0.22,1,0.36,1",
  57006. quinticInOut: "0.83,0,0.17,1",
  57007. sinusoidalIn: "0.12,0,0.39,0",
  57008. sinusoidalOut: "0.61,1,0.88,1",
  57009. sinusoidalInOut: "0.37,0,0.63,1",
  57010. exponentialIn: "0.7,0,0.84,0",
  57011. exponentialOut: "0.16,1,0.3,1",
  57012. exponentialInOut: "0.87,0,0.13,1",
  57013. circularIn: "0.55,0,1,0.45",
  57014. circularOut: "0,0.55,0.45,1",
  57015. circularInOut: "0.85,0,0.15,1"
  57016. }, dc = "transform-origin";
  57017. function a3e(t, e, n) {
  57018. var r = le({}, t.shape);
  57019. le(r, e), t.buildPath(n, r);
  57020. var i = new xte();
  57021. return i.reset(Yq(t)), n.rebuildPath(i, 1), i.generateStr(), i.getStr();
  57022. }
  57023. function o3e(t, e) {
  57024. var n = e.originX, r = e.originY;
  57025. (n || r) && (t[dc] = n + "px " + r + "px");
  57026. }
  57027. var s3e = {
  57028. fill: "fill",
  57029. opacity: "opacity",
  57030. lineWidth: "stroke-width",
  57031. lineDashOffset: "stroke-dashoffset"
  57032. };
  57033. function $te(t, e) {
  57034. var n = e.zrId + "-ani-" + e.cssAnimIdx++;
  57035. return e.cssAnims[n] = t, n;
  57036. }
  57037. function l3e(t, e, n) {
  57038. var r = t.shape.paths, i = {}, a, o;
  57039. if (k(r, function(l) {
  57040. var u = sE(n.zrId);
  57041. u.animation = !0, mw(l, {}, u, !0);
  57042. var c = u.cssAnims, f = u.cssNodes, d = st(c), h = d.length;
  57043. if (h) {
  57044. o = d[h - 1];
  57045. var p = c[o];
  57046. for (var v in p) {
  57047. var g = p[v];
  57048. i[v] = i[v] || { d: "" }, i[v].d += g.d || "";
  57049. }
  57050. for (var m in f) {
  57051. var y = f[m].animation;
  57052. y.indexOf(o) >= 0 && (a = y);
  57053. }
  57054. }
  57055. }), !!a) {
  57056. e.d = !1;
  57057. var s = $te(i, n);
  57058. return a.replace(o, s);
  57059. }
  57060. }
  57061. function yV(t) {
  57062. return Oe(t) ? mV[t] ? "cubic-bezier(" + mV[t] + ")" : xR(t) ? t : "" : "";
  57063. }
  57064. function mw(t, e, n, r) {
  57065. var i = t.animators, a = i.length, o = [];
  57066. if (t instanceof Kx) {
  57067. var s = l3e(t, e, n);
  57068. if (s)
  57069. o.push(s);
  57070. else if (!a)
  57071. return;
  57072. } else if (!a)
  57073. return;
  57074. for (var l = {}, u = 0; u < a; u++) {
  57075. var c = i[u], f = [c.getMaxTime() / 1e3 + "s"], d = yV(c.getClip().easing), h = c.getDelay();
  57076. d ? f.push(d) : f.push("linear"), h && f.push(h / 1e3 + "s"), c.getLoop() && f.push("infinite");
  57077. var p = f.join(" ");
  57078. l[p] = l[p] || [p, []], l[p][1].push(c);
  57079. }
  57080. function v(y) {
  57081. var b = y[1], _ = b.length, O = {}, S = {}, x = {}, C = "animation-timing-function";
  57082. function T(ie, X, H) {
  57083. for (var G = ie.getTracks(), re = ie.getMaxTime(), fe = 0; fe < G.length; fe++) {
  57084. var de = G[fe];
  57085. if (de.needsAnimate()) {
  57086. var Ee = de.keyframes, $e = de.propName;
  57087. if (H && ($e = H($e)), $e)
  57088. for (var Se = 0; Se < Ee.length; Se++) {
  57089. var be = Ee[Se], he = Math.round(be.time / re * 100) + "%", Te = yV(be.easing), ze = be.rawValue;
  57090. (Oe(ze) || St(ze)) && (X[he] = X[he] || {}, X[he][$e] = be.rawValue, Te && (X[he][C] = Te));
  57091. }
  57092. }
  57093. }
  57094. }
  57095. for (var w = 0; w < _; w++) {
  57096. var P = b[w], $ = P.targetName;
  57097. $ ? $ === "shape" && T(P, S) : !r && T(P, O);
  57098. }
  57099. for (var A in O) {
  57100. var D = {};
  57101. tK(D, t), le(D, O[A]);
  57102. var E = qq(D), R = O[A][C];
  57103. x[A] = E ? {
  57104. transform: E
  57105. } : {}, o3e(x[A], D), R && (x[A][C] = R);
  57106. }
  57107. var N, V = !0;
  57108. for (var A in S) {
  57109. x[A] = x[A] || {};
  57110. var B = !N, R = S[A][C];
  57111. B && (N = new os());
  57112. var W = N.len();
  57113. N.reset(), x[A].d = a3e(t, S[A], N);
  57114. var F = N.len();
  57115. if (!B && W !== F) {
  57116. V = !1;
  57117. break;
  57118. }
  57119. R && (x[A][C] = R);
  57120. }
  57121. if (!V)
  57122. for (var A in x)
  57123. delete x[A].d;
  57124. if (!r)
  57125. for (var w = 0; w < _; w++) {
  57126. var P = b[w], $ = P.targetName;
  57127. $ === "style" && T(P, x, function(G) {
  57128. return s3e[G];
  57129. });
  57130. }
  57131. for (var Q = st(x), Z = !0, ne, w = 1; w < Q.length; w++) {
  57132. var ee = Q[w - 1], oe = Q[w];
  57133. if (x[ee][dc] !== x[oe][dc]) {
  57134. Z = !1;
  57135. break;
  57136. }
  57137. ne = x[ee][dc];
  57138. }
  57139. if (Z && ne) {
  57140. for (var A in x)
  57141. x[A][dc] && delete x[A][dc];
  57142. e[dc] = ne;
  57143. }
  57144. if (Nt(Q, function(ie) {
  57145. return st(x[ie]).length > 0;
  57146. }).length) {
  57147. var K = $te(x, n);
  57148. return K + " " + y[0] + " both";
  57149. }
  57150. }
  57151. for (var g in l) {
  57152. var s = v(l[g]);
  57153. s && o.push(s);
  57154. }
  57155. if (o.length) {
  57156. var m = n.zrId + "-cls-" + Pte();
  57157. n.cssNodes["." + m] = {
  57158. animation: o.join(",")
  57159. }, e.class = m;
  57160. }
  57161. }
  57162. function u3e(t, e, n) {
  57163. if (!t.ignore)
  57164. if (t.isSilent()) {
  57165. var r = {
  57166. "pointer-events": "none"
  57167. };
  57168. bV(r, e, n);
  57169. } else {
  57170. var i = t.states.emphasis && t.states.emphasis.style ? t.states.emphasis.style : {}, a = i.fill;
  57171. if (!a) {
  57172. 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;
  57173. l && (a = nO(l));
  57174. }
  57175. var u = i.lineWidth;
  57176. if (u) {
  57177. var c = !i.strokeNoScale && t.transform ? t.transform[0] : 1;
  57178. u = u / c;
  57179. }
  57180. var r = {
  57181. cursor: "pointer"
  57182. };
  57183. a && (r.fill = a), i.stroke && (r.stroke = i.stroke), u && (r["stroke-width"] = u), bV(r, e, n);
  57184. }
  57185. }
  57186. function bV(t, e, n, r) {
  57187. var i = JSON.stringify(t), a = n.cssStyleCache[i];
  57188. a || (a = n.zrId + "-cls-" + Pte(), n.cssStyleCache[i] = a, n.cssNodes["." + a + ":hover"] = t), e.class = e.class ? e.class + " " + a : a;
  57189. }
  57190. var Lm = Math.round;
  57191. function Ate(t) {
  57192. return t && Oe(t.src);
  57193. }
  57194. function Ete(t) {
  57195. return t && Me(t.toDataURL);
  57196. }
  57197. function Rk(t, e, n, r) {
  57198. K5e(function(i, a) {
  57199. var o = i === "fill" || i === "stroke";
  57200. o && Xq(a) ? Ite(e, t, i, r) : o && CR(a) ? Dte(n, t, i, r) : o && a === "none" ? t[i] = "transparent" : t[i] = a;
  57201. }, e, n, !1), g3e(n, t, r);
  57202. }
  57203. function kk(t, e) {
  57204. var n = aK(e);
  57205. n && (n.each(function(r, i) {
  57206. r != null && (t[(vV + i).toLowerCase()] = r + "");
  57207. }), e.isSilent() && (t[vV + "silent"] = "true"));
  57208. }
  57209. function _V(t) {
  57210. return Bl(t[0] - 1) && Bl(t[1]) && Bl(t[2]) && Bl(t[3] - 1);
  57211. }
  57212. function c3e(t) {
  57213. return Bl(t[4]) && Bl(t[5]);
  57214. }
  57215. function Lk(t, e, n) {
  57216. if (e && !(c3e(e) && _V(e))) {
  57217. var r = 1e4;
  57218. t.transform = _V(e) ? "translate(" + Lm(e[4] * r) / r + " " + Lm(e[5] * r) / r + ")" : rDe(e);
  57219. }
  57220. }
  57221. function OV(t, e, n) {
  57222. for (var r = t.points, i = [], a = 0; a < r.length; a++)
  57223. i.push(Lm(r[a][0] * n) / n), i.push(Lm(r[a][1] * n) / n);
  57224. e.points = i.join(" ");
  57225. }
  57226. function SV(t) {
  57227. return !t.smooth;
  57228. }
  57229. function f3e(t) {
  57230. var e = ce(t, function(n) {
  57231. return typeof n == "string" ? [n, n] : n;
  57232. });
  57233. return function(n, r, i) {
  57234. for (var a = 0; a < e.length; a++) {
  57235. var o = e[a], s = n[o[0]];
  57236. s != null && (r[o[1]] = Lm(s * i) / i);
  57237. }
  57238. };
  57239. }
  57240. var d3e = {
  57241. circle: [f3e(["cx", "cy", "r"])],
  57242. polyline: [OV, SV],
  57243. polygon: [OV, SV]
  57244. };
  57245. function h3e(t) {
  57246. for (var e = t.animators, n = 0; n < e.length; n++)
  57247. if (e[n].targetName === "shape")
  57248. return !0;
  57249. return !1;
  57250. }
  57251. function Mte(t, e) {
  57252. var n = t.style, r = t.shape, i = d3e[t.type], a = {}, o = e.animation, s = "path", l = t.style.strokePercent, u = e.compress && Yq(t) || 4;
  57253. if (i && !e.willUpdate && !(i[1] && !i[1](r)) && !(o && h3e(t)) && !(l < 1)) {
  57254. s = t.type;
  57255. var c = Math.pow(10, u);
  57256. i[0](r, a, c);
  57257. } else {
  57258. var f = !t.path || t.shapeChanged();
  57259. t.path || t.createPathProxy();
  57260. var d = t.path;
  57261. f && (d.beginPath(), t.buildPath(d, t.shape), t.pathUpdated());
  57262. var h = d.getVersion(), p = t, v = p.__svgPathBuilder;
  57263. (p.__svgPathVersion !== h || !v || l !== p.__svgPathStrokePercent) && (v || (v = p.__svgPathBuilder = new xte()), v.reset(u), d.rebuildPath(v, l), v.generateStr(), p.__svgPathVersion = h, p.__svgPathStrokePercent = l), a.d = v.getStr();
  57264. }
  57265. return Lk(a, t.transform), Rk(a, n, t, e), kk(a, t), e.animation && mw(t, a, e), e.emphasis && u3e(t, a, e), Xn(s, t.id + "", a);
  57266. }
  57267. function p3e(t, e) {
  57268. var n = t.style, r = n.image;
  57269. if (r && !Oe(r) && (Ate(r) ? r = r.src : Ete(r) && (r = r.toDataURL())), !!r) {
  57270. var i = n.x || 0, a = n.y || 0, o = n.width, s = n.height, l = {
  57271. href: r,
  57272. width: o,
  57273. height: s
  57274. };
  57275. return i && (l.x = i), a && (l.y = a), Lk(l, t.transform), Rk(l, n, t, e), kk(l, t), e.animation && mw(t, l, e), Xn("image", t.id + "", l);
  57276. }
  57277. }
  57278. function v3e(t, e) {
  57279. var n = t.style, r = n.text;
  57280. if (r != null && (r += ""), !(!r || isNaN(n.x) || isNaN(n.y))) {
  57281. var i = n.font || iu, a = n.x || 0, o = aDe(n.y || 0, Vx(i), n.textBaseline), s = iDe[n.textAlign] || n.textAlign, l = {
  57282. "dominant-baseline": "central",
  57283. "text-anchor": s
  57284. };
  57285. if (IK(n)) {
  57286. var u = "", c = n.fontStyle, f = MK(n.fontSize);
  57287. if (!parseFloat(f))
  57288. return;
  57289. var d = n.fontFamily || Oq, h = n.fontWeight;
  57290. u += "font-size:" + f + ";font-family:" + d + ";", c && c !== "normal" && (u += "font-style:" + c + ";"), h && h !== "normal" && (u += "font-weight:" + h + ";"), l.style = u;
  57291. } else
  57292. l.style = "font: " + i;
  57293. return r.match(/\s/) && (l["xml:space"] = "preserve"), a && (l.x = a), o && (l.y = o), Lk(l, t.transform), Rk(l, n, t, e), kk(l, t), e.animation && mw(t, l, e), Xn("text", t.id + "", l, void 0, r);
  57294. }
  57295. }
  57296. function xV(t, e) {
  57297. if (t instanceof ot)
  57298. return Mte(t, e);
  57299. if (t instanceof lr)
  57300. return p3e(t, e);
  57301. if (t instanceof Qh)
  57302. return v3e(t, e);
  57303. }
  57304. function g3e(t, e, n) {
  57305. var r = t.style;
  57306. if (oDe(r)) {
  57307. var i = sDe(t), a = n.shadowCache, o = a[i];
  57308. if (!o) {
  57309. var s = t.getGlobalScale(), l = s[0], u = s[1];
  57310. if (!l || !u)
  57311. return;
  57312. var c = r.shadowOffsetX || 0, f = r.shadowOffsetY || 0, d = r.shadowBlur, h = Tm(r.shadowColor), p = h.opacity, v = h.color, g = d / 2 / l, m = d / 2 / u, y = g + " " + m;
  57313. o = n.zrId + "-s" + n.shadowIdx++, n.defs[o] = Xn("filter", o, {
  57314. id: o,
  57315. x: "-100%",
  57316. y: "-100%",
  57317. width: "300%",
  57318. height: "300%"
  57319. }, [
  57320. Xn("feDropShadow", "", {
  57321. dx: c / l,
  57322. dy: f / u,
  57323. stdDeviation: y,
  57324. "flood-color": v,
  57325. "flood-opacity": p
  57326. })
  57327. ]), a[i] = o;
  57328. }
  57329. e.filter = zx(o);
  57330. }
  57331. }
  57332. function Ite(t, e, n, r) {
  57333. var i = t[n], a, o = {
  57334. gradientUnits: i.global ? "userSpaceOnUse" : "objectBoundingBox"
  57335. };
  57336. if (Zq(i))
  57337. a = "linearGradient", o.x1 = i.x, o.y1 = i.y, o.x2 = i.x2, o.y2 = i.y2;
  57338. else if (Uq(i))
  57339. a = "radialGradient", o.cx = We(i.x, 0.5), o.cy = We(i.y, 0.5), o.r = We(i.r, 0.5);
  57340. else {
  57341. process.env.NODE_ENV !== "production" && xa("Illegal gradient type.");
  57342. return;
  57343. }
  57344. for (var s = i.colorStops, l = [], u = 0, c = s.length; u < c; ++u) {
  57345. var f = vA(s[u].offset) * 100 + "%", d = s[u].color, h = Tm(d), p = h.color, v = h.opacity, g = {
  57346. offset: f
  57347. };
  57348. g["stop-color"] = p, v < 1 && (g["stop-opacity"] = v), l.push(Xn("stop", u + "", g));
  57349. }
  57350. var m = Xn(a, "", o, l), y = Dk(m), b = r.gradientCache, _ = b[y];
  57351. _ || (_ = r.zrId + "-g" + r.gradientIdx++, b[y] = _, o.id = _, r.defs[_] = Xn(a, _, o, l)), e[n] = zx(_);
  57352. }
  57353. function Dte(t, e, n, r) {
  57354. 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;
  57355. if (jq(i)) {
  57356. var d = i.imageWidth, h = i.imageHeight, p = void 0, v = i.image;
  57357. if (Oe(v) ? p = v : Ate(v) ? p = v.src : Ete(v) && (p = v.toDataURL()), typeof Image > "u") {
  57358. var g = "Image width/height must been given explictly in svg-ssr renderer.";
  57359. ke(d, g), ke(h, g);
  57360. } else if (d == null || h == null) {
  57361. var m = function(w, P) {
  57362. if (w) {
  57363. var $ = w.elm, A = d || P.width, D = h || P.height;
  57364. w.tag === "pattern" && (u ? (D = 1, A /= a.width) : c && (A = 1, D /= a.height)), w.attrs.width = A, w.attrs.height = D, $ && ($.setAttribute("width", A), $.setAttribute("height", D));
  57365. }
  57366. }, y = DR(p, null, t, function(w) {
  57367. l || m(S, w), m(f, w);
  57368. });
  57369. y && y.width && y.height && (d = d || y.width, h = h || y.height);
  57370. }
  57371. f = Xn("image", "img", {
  57372. href: p,
  57373. width: d,
  57374. height: h
  57375. }), o.width = d, o.height = h;
  57376. } else i.svgElement && (f = Le(i.svgElement), o.width = i.svgWidth, o.height = i.svgHeight);
  57377. if (f) {
  57378. var b, _;
  57379. l ? b = _ = 1 : u ? (_ = 1, b = o.width / a.width) : c ? (b = 1, _ = o.height / a.height) : o.patternUnits = "userSpaceOnUse", b != null && !isNaN(b) && (o.width = b), _ != null && !isNaN(_) && (o.height = _);
  57380. var O = qq(i);
  57381. O && (o.patternTransform = O);
  57382. var S = Xn("pattern", "", o, [f]), x = Dk(S), C = r.patternCache, T = C[x];
  57383. T || (T = r.zrId + "-p" + r.patternIdx++, C[x] = T, o.id = T, S = r.defs[T] = Xn("pattern", T, o, [f])), e[n] = zx(T);
  57384. }
  57385. }
  57386. function m3e(t, e, n) {
  57387. var r = n.clipPathCache, i = n.defs, a = r[t.id];
  57388. if (!a) {
  57389. a = n.zrId + "-c" + n.clipPathIdx++;
  57390. var o = {
  57391. id: a
  57392. };
  57393. r[t.id] = a, i[a] = Xn("clipPath", a, o, [Mte(t, n)]);
  57394. }
  57395. e["clip-path"] = zx(a);
  57396. }
  57397. function wV(t) {
  57398. return document.createTextNode(t);
  57399. }
  57400. function xc(t, e, n) {
  57401. t.insertBefore(e, n);
  57402. }
  57403. function CV(t, e) {
  57404. t.removeChild(e);
  57405. }
  57406. function TV(t, e) {
  57407. t.appendChild(e);
  57408. }
  57409. function Rte(t) {
  57410. return t.parentNode;
  57411. }
  57412. function kte(t) {
  57413. return t.nextSibling;
  57414. }
  57415. function eP(t, e) {
  57416. t.textContent = e;
  57417. }
  57418. var PV = 58, y3e = 120, b3e = Xn("", "");
  57419. function lE(t) {
  57420. return t === void 0;
  57421. }
  57422. function Ro(t) {
  57423. return t !== void 0;
  57424. }
  57425. function _3e(t, e, n) {
  57426. for (var r = {}, i = e; i <= n; ++i) {
  57427. var a = t[i].key;
  57428. a !== void 0 && (process.env.NODE_ENV !== "production" && r[a] != null && console.error("Duplicate key " + a), r[a] = i);
  57429. }
  57430. return r;
  57431. }
  57432. function Jv(t, e) {
  57433. var n = t.key === e.key, r = t.tag === e.tag;
  57434. return r && n;
  57435. }
  57436. function Nm(t) {
  57437. var e, n = t.children, r = t.tag;
  57438. if (Ro(r)) {
  57439. var i = t.elm = Tte(r);
  57440. if (Nk(b3e, t), ue(n))
  57441. for (e = 0; e < n.length; ++e) {
  57442. var a = n[e];
  57443. a != null && TV(i, Nm(a));
  57444. }
  57445. else Ro(t.text) && !Ie(t.text) && TV(i, wV(t.text));
  57446. } else
  57447. t.elm = wV(t.text);
  57448. return t.elm;
  57449. }
  57450. function Lte(t, e, n, r, i) {
  57451. for (; r <= i; ++r) {
  57452. var a = n[r];
  57453. a != null && xc(t, Nm(a), e);
  57454. }
  57455. }
  57456. function EO(t, e, n, r) {
  57457. for (; n <= r; ++n) {
  57458. var i = e[n];
  57459. if (i != null)
  57460. if (Ro(i.tag)) {
  57461. var a = Rte(i.elm);
  57462. CV(a, i.elm);
  57463. } else
  57464. CV(t, i.elm);
  57465. }
  57466. }
  57467. function Nk(t, e) {
  57468. var n, r = e.elm, i = t && t.attrs || {}, a = e.attrs || {};
  57469. if (i !== a) {
  57470. for (n in a) {
  57471. var o = a[n], s = i[n];
  57472. s !== o && (o === !0 ? r.setAttribute(n, "") : o === !1 ? r.removeAttribute(n) : n === "style" ? r.style.cssText = o : n.charCodeAt(0) !== y3e ? r.setAttribute(n, o) : n === "xmlns:xlink" || n === "xmlns" ? r.setAttributeNS(J5e, n, o) : n.charCodeAt(3) === PV ? r.setAttributeNS(e3e, n, o) : n.charCodeAt(5) === PV ? r.setAttributeNS(Cte, n, o) : r.setAttribute(n, o));
  57473. }
  57474. for (n in i)
  57475. n in a || r.removeAttribute(n);
  57476. }
  57477. }
  57478. function O3e(t, e, n) {
  57479. 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; )
  57480. o == null ? o = e[++r] : s == null ? s = e[--a] : u == null ? u = n[++i] : c == null ? c = n[--l] : Jv(o, u) ? (Md(o, u), o = e[++r], u = n[++i]) : Jv(s, c) ? (Md(s, c), s = e[--a], c = n[--l]) : Jv(o, c) ? (Md(o, c), xc(t, o.elm, kte(s.elm)), o = e[++r], c = n[--l]) : Jv(s, u) ? (Md(s, u), xc(t, s.elm, o.elm), s = e[--a], u = n[++i]) : (lE(f) && (f = _3e(e, r, a)), d = f[u.key], lE(d) ? xc(t, Nm(u), o.elm) : (h = e[d], h.tag !== u.tag ? xc(t, Nm(u), o.elm) : (Md(h, u), e[d] = void 0, xc(t, h.elm, o.elm))), u = n[++i]);
  57481. (r <= a || i <= l) && (r > a ? (p = n[l + 1] == null ? null : n[l + 1].elm, Lte(t, p, n, i, l)) : EO(t, e, r, a));
  57482. }
  57483. function Md(t, e) {
  57484. var n = e.elm = t.elm, r = t.children, i = e.children;
  57485. t !== e && (Nk(t, e), lE(e.text) ? Ro(r) && Ro(i) ? r !== i && O3e(n, r, i) : Ro(i) ? (Ro(t.text) && eP(n, ""), Lte(n, null, i, 0, i.length - 1)) : Ro(r) ? EO(n, r, 0, r.length - 1) : Ro(t.text) && eP(n, "") : t.text !== e.text && (Ro(r) && EO(n, r, 0, r.length - 1), eP(n, e.text)));
  57486. }
  57487. function S3e(t, e) {
  57488. if (Jv(t, e))
  57489. Md(t, e);
  57490. else {
  57491. var n = t.elm, r = Rte(n);
  57492. Nm(e), r !== null && (xc(r, e.elm, kte(n)), EO(r, [t], 0, 0));
  57493. }
  57494. return e;
  57495. }
  57496. var x3e = 0, w3e = function() {
  57497. function t(e, n, r) {
  57498. if (this.type = "svg", this.refreshHover = $V("refreshHover"), this.configLayer = $V("configLayer"), this.storage = n, this._opts = r = le({}, r), this.root = e, this._id = "zr" + x3e++, this._oldVNode = gV(r.width, r.height), e && !r.ssr) {
  57499. var i = this._viewport = document.createElement("div");
  57500. i.style.cssText = "position:relative;overflow:hidden";
  57501. var a = this._svgDom = this._oldVNode.elm = Tte("svg");
  57502. Nk(null, this._oldVNode), i.appendChild(a), e.appendChild(i);
  57503. }
  57504. this.resize(r.width, r.height);
  57505. }
  57506. return t.prototype.getType = function() {
  57507. return this.type;
  57508. }, t.prototype.getViewportRoot = function() {
  57509. return this._viewport;
  57510. }, t.prototype.getViewportRootOffset = function() {
  57511. var e = this.getViewportRoot();
  57512. if (e)
  57513. return {
  57514. offsetLeft: e.offsetLeft || 0,
  57515. offsetTop: e.offsetTop || 0
  57516. };
  57517. }, t.prototype.getSvgDom = function() {
  57518. return this._svgDom;
  57519. }, t.prototype.refresh = function() {
  57520. if (this.root) {
  57521. var e = this.renderToVNode({
  57522. willUpdate: !0
  57523. });
  57524. e.attrs.style = "position:absolute;left:0;top:0;user-select:none", S3e(this._oldVNode, e), this._oldVNode = e;
  57525. }
  57526. }, t.prototype.renderOneToVNode = function(e) {
  57527. return xV(e, sE(this._id));
  57528. }, t.prototype.renderToVNode = function(e) {
  57529. e = e || {};
  57530. var n = this.storage.getDisplayList(!0), r = this._width, i = this._height, a = sE(this._id);
  57531. a.animation = e.animation, a.willUpdate = e.willUpdate, a.compress = e.compress, a.emphasis = e.emphasis;
  57532. var o = [], s = this._bgVNode = C3e(r, i, this._backgroundColor, a);
  57533. s && o.push(s);
  57534. var l = e.compress ? null : this._mainVNode = Xn("g", "main", {}, []);
  57535. this._paintList(n, a, l ? l.children : o), l && o.push(l);
  57536. var u = ce(st(a.defs), function(d) {
  57537. return a.defs[d];
  57538. });
  57539. if (u.length && o.push(Xn("defs", "defs", {}, u)), e.animation) {
  57540. var c = r3e(a.cssNodes, a.cssAnims, { newline: !0 });
  57541. if (c) {
  57542. var f = Xn("style", "stl", {}, [], c);
  57543. o.push(f);
  57544. }
  57545. }
  57546. return gV(r, i, o, e.useViewBox);
  57547. }, t.prototype.renderToString = function(e) {
  57548. return e = e || {}, Dk(this.renderToVNode({
  57549. animation: We(e.cssAnimation, !0),
  57550. emphasis: We(e.cssEmphasis, !0),
  57551. willUpdate: !1,
  57552. compress: !0,
  57553. useViewBox: We(e.useViewBox, !0)
  57554. }), { newline: !0 });
  57555. }, t.prototype.setBackgroundColor = function(e) {
  57556. this._backgroundColor = e;
  57557. }, t.prototype.getSvgRoot = function() {
  57558. return this._mainVNode && this._mainVNode.elm;
  57559. }, t.prototype._paintList = function(e, n, r) {
  57560. for (var i = e.length, a = [], o = 0, s, l, u = 0, c = 0; c < i; c++) {
  57561. var f = e[c];
  57562. if (!f.invisible) {
  57563. var d = f.__clipPaths, h = d && d.length || 0, p = l && l.length || 0, v = void 0;
  57564. for (v = Math.max(h - 1, p - 1); v >= 0 && !(d && l && d[v] === l[v]); v--)
  57565. ;
  57566. for (var g = p - 1; g > v; g--)
  57567. o--, s = a[o - 1];
  57568. for (var m = v + 1; m < h; m++) {
  57569. var y = {};
  57570. m3e(d[m], y, n);
  57571. var b = Xn("g", "clip-g-" + u++, y, []);
  57572. (s ? s.children : r).push(b), a[o++] = b, s = b;
  57573. }
  57574. l = d;
  57575. var _ = xV(f, n);
  57576. _ && (s ? s.children : r).push(_);
  57577. }
  57578. }
  57579. }, t.prototype.resize = function(e, n) {
  57580. var r = this._opts, i = this.root, a = this._viewport;
  57581. if (e != null && (r.width = e), n != null && (r.height = n), i && a && (a.style.display = "none", e = Wd(i, 0, r), n = Wd(i, 1, r), a.style.display = ""), this._width !== e || this._height !== n) {
  57582. if (this._width = e, this._height = n, a) {
  57583. var o = a.style;
  57584. o.width = e + "px", o.height = n + "px";
  57585. }
  57586. if (CR(this._backgroundColor))
  57587. this.refresh();
  57588. else {
  57589. var s = this._svgDom;
  57590. s && (s.setAttribute("width", e), s.setAttribute("height", n));
  57591. var l = this._bgVNode && this._bgVNode.elm;
  57592. l && (l.setAttribute("width", e), l.setAttribute("height", n));
  57593. }
  57594. }
  57595. }, t.prototype.getWidth = function() {
  57596. return this._width;
  57597. }, t.prototype.getHeight = function() {
  57598. return this._height;
  57599. }, t.prototype.dispose = function() {
  57600. this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null;
  57601. }, t.prototype.clear = function() {
  57602. this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null;
  57603. }, t.prototype.toDataURL = function(e) {
  57604. var n = this.renderToString(), r = "data:image/svg+xml;";
  57605. return e ? (n = uDe(n), n && r + "base64," + n) : r + "charset=UTF-8," + encodeURIComponent(n);
  57606. }, t;
  57607. }();
  57608. function $V(t) {
  57609. return function() {
  57610. process.env.NODE_ENV !== "production" && xa('In SVG mode painter not support method "' + t + '"');
  57611. };
  57612. }
  57613. function C3e(t, e, n, r) {
  57614. var i;
  57615. if (n && n !== "none")
  57616. if (i = Xn("rect", "bg", {
  57617. width: t,
  57618. height: e,
  57619. x: "0",
  57620. y: "0"
  57621. }), Xq(n))
  57622. Ite({ fill: n }, i.attrs, "fill", r);
  57623. else if (CR(n))
  57624. Dte({
  57625. style: {
  57626. fill: n
  57627. },
  57628. dirty: On,
  57629. getBoundingRect: function() {
  57630. return { width: t, height: e };
  57631. }
  57632. }, i.attrs, "fill", r);
  57633. else {
  57634. var a = Tm(n), o = a.color, s = a.opacity;
  57635. i.attrs.fill = o, s < 1 && (i.attrs["fill-opacity"] = s);
  57636. }
  57637. return i;
  57638. }
  57639. function T3e(t) {
  57640. t.registerPainter("svg", w3e);
  57641. }
  57642. function AV(t, e, n) {
  57643. var r = oo.createCanvas(), i = e.getWidth(), a = e.getHeight(), o = r.style;
  57644. 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;
  57645. }
  57646. var tP = function(t) {
  57647. q(e, t);
  57648. function e(n, r, i) {
  57649. var a = t.call(this) || this;
  57650. 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;
  57651. var o;
  57652. i = i || iO, typeof n == "string" ? o = AV(n, r, i) : Ie(n) && (o = n, n = o.id), a.id = n, a.dom = o;
  57653. var s = o.style;
  57654. return s && (_R(o), o.onselectstart = function() {
  57655. return !1;
  57656. }, s.padding = "0", s.margin = "0", s.borderWidth = "0"), a.painter = r, a.dpr = i, a;
  57657. }
  57658. return e.prototype.getElementCount = function() {
  57659. return this.__endIndex - this.__startIndex;
  57660. }, e.prototype.afterBrush = function() {
  57661. this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex;
  57662. }, e.prototype.initContext = function() {
  57663. this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
  57664. }, e.prototype.setUnpainted = function() {
  57665. this.__firstTimePaint = !0;
  57666. }, e.prototype.createBackBuffer = function() {
  57667. var n = this.dpr;
  57668. this.domBack = AV("back-" + this.id, this.painter, n), this.ctxBack = this.domBack.getContext("2d"), n !== 1 && this.ctxBack.scale(n, n);
  57669. }, e.prototype.createRepaintRects = function(n, r, i, a) {
  57670. if (this.__firstTimePaint)
  57671. return this.__firstTimePaint = !1, null;
  57672. var o = [], s = this.maxRepaintRectCount, l = !1, u = new Je(0, 0, 0, 0);
  57673. function c(y) {
  57674. if (!(!y.isFinite() || y.isZero()))
  57675. if (o.length === 0) {
  57676. var b = new Je(0, 0, 0, 0);
  57677. b.copy(y), o.push(b);
  57678. } else {
  57679. for (var _ = !1, O = 1 / 0, S = 0, x = 0; x < o.length; ++x) {
  57680. var C = o[x];
  57681. if (C.intersect(y)) {
  57682. var T = new Je(0, 0, 0, 0);
  57683. T.copy(C), T.union(y), o[x] = T, _ = !0;
  57684. break;
  57685. } else if (l) {
  57686. u.copy(y), u.union(C);
  57687. var w = y.width * y.height, P = C.width * C.height, $ = u.width * u.height, A = $ - w - P;
  57688. A < O && (O = A, S = x);
  57689. }
  57690. }
  57691. if (l && (o[S].union(y), _ = !0), !_) {
  57692. var b = new Je(0, 0, 0, 0);
  57693. b.copy(y), o.push(b);
  57694. }
  57695. l || (l = o.length >= s);
  57696. }
  57697. }
  57698. for (var f = this.__startIndex; f < this.__endIndex; ++f) {
  57699. var d = n[f];
  57700. if (d) {
  57701. var h = d.shouldBePainted(i, a, !0, !0), p = d.__isRendered && (d.__dirty & Ni || !h) ? d.getPrevPaintRect() : null;
  57702. p && c(p);
  57703. var v = h && (d.__dirty & Ni || !d.__isRendered) ? d.getPaintRect() : null;
  57704. v && c(v);
  57705. }
  57706. }
  57707. for (var f = this.__prevStartIndex; f < this.__prevEndIndex; ++f) {
  57708. var d = r[f], h = d && d.shouldBePainted(i, a, !0, !0);
  57709. if (d && (!h || !d.__zr) && d.__isRendered) {
  57710. var p = d.getPrevPaintRect();
  57711. p && c(p);
  57712. }
  57713. }
  57714. var g;
  57715. do {
  57716. g = !1;
  57717. for (var f = 0; f < o.length; ) {
  57718. if (o[f].isZero()) {
  57719. o.splice(f, 1);
  57720. continue;
  57721. }
  57722. for (var m = f + 1; m < o.length; )
  57723. o[f].intersect(o[m]) ? (g = !0, o[f].union(o[m]), o.splice(m, 1)) : m++;
  57724. f++;
  57725. }
  57726. } while (g);
  57727. return this._paintRects = o, o;
  57728. }, e.prototype.debugGetPaintRects = function() {
  57729. return (this._paintRects || []).slice();
  57730. }, e.prototype.resize = function(n, r) {
  57731. var i = this.dpr, a = this.dom, o = a.style, s = this.domBack;
  57732. 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));
  57733. }, e.prototype.clear = function(n, r, i) {
  57734. var a = this.dom, o = this.ctx, s = a.width, l = a.height;
  57735. r = r || this.clearColor;
  57736. var u = this.motionBlur && !n, c = this.lastFrameAlpha, f = this.dpr, d = this;
  57737. u && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(a, 0, 0, s / f, l / f));
  57738. var h = this.domBack;
  57739. function p(v, g, m, y) {
  57740. if (o.clearRect(v, g, m, y), r && r !== "transparent") {
  57741. var b = void 0;
  57742. if (I0(r)) {
  57743. var _ = r.global || r.__width === m && r.__height === y;
  57744. b = _ && r.__canvasGradient || qA(o, r, {
  57745. x: 0,
  57746. y: 0,
  57747. width: m,
  57748. height: y
  57749. }), r.__canvasGradient = b, r.__width = m, r.__height = y;
  57750. } else Tq(r) && (r.scaleX = r.scaleX || f, r.scaleY = r.scaleY || f, b = KA(o, r, {
  57751. dirty: function() {
  57752. d.setUnpainted(), d.painter.refresh();
  57753. }
  57754. }));
  57755. o.save(), o.fillStyle = b || r, o.fillRect(v, g, m, y), o.restore();
  57756. }
  57757. u && (o.save(), o.globalAlpha = c, o.drawImage(h, v, g, m, y), o.restore());
  57758. }
  57759. !i || u ? p(0, 0, s, l) : i.length && k(i, function(v) {
  57760. p(v.x * f, v.y * f, v.width * f, v.height * f);
  57761. });
  57762. }, e;
  57763. }(La), EV = 1e5, sc = 314159, _b = 0.01, P3e = 1e-3;
  57764. function $3e(t) {
  57765. return t ? t.__builtin__ ? !0 : !(typeof t.resize != "function" || typeof t.refresh != "function") : !1;
  57766. }
  57767. function A3e(t, e) {
  57768. var n = document.createElement("div");
  57769. return n.style.cssText = [
  57770. "position:relative",
  57771. "width:" + t + "px",
  57772. "height:" + e + "px",
  57773. "padding:0",
  57774. "margin:0",
  57775. "border-width:0"
  57776. ].join(";") + ";", n;
  57777. }
  57778. var E3e = function() {
  57779. function t(e, n, r, i) {
  57780. this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
  57781. var a = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS";
  57782. this._opts = r = le({}, r || {}), this.dpr = r.devicePixelRatio || iO, this._singleCanvas = a, this.root = e;
  57783. var o = e.style;
  57784. o && (_R(e), e.innerHTML = ""), this.storage = n;
  57785. var s = this._zlevelList;
  57786. this._prevDisplayList = [];
  57787. var l = this._layers;
  57788. if (a) {
  57789. var c = e, f = c.width, d = c.height;
  57790. 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;
  57791. var h = new tP(c, this, this.dpr);
  57792. h.__builtin__ = !0, h.initContext(), l[sc] = h, h.zlevel = sc, s.push(sc), this._domRoot = e;
  57793. } else {
  57794. this._width = Wd(e, 0, r), this._height = Wd(e, 1, r);
  57795. var u = this._domRoot = A3e(this._width, this._height);
  57796. e.appendChild(u);
  57797. }
  57798. }
  57799. return t.prototype.getType = function() {
  57800. return "canvas";
  57801. }, t.prototype.isSingleCanvas = function() {
  57802. return this._singleCanvas;
  57803. }, t.prototype.getViewportRoot = function() {
  57804. return this._domRoot;
  57805. }, t.prototype.getViewportRootOffset = function() {
  57806. var e = this.getViewportRoot();
  57807. if (e)
  57808. return {
  57809. offsetLeft: e.offsetLeft || 0,
  57810. offsetTop: e.offsetTop || 0
  57811. };
  57812. }, t.prototype.refresh = function(e) {
  57813. var n = this.storage.getDisplayList(!0), r = this._prevDisplayList, i = this._zlevelList;
  57814. this._redrawId = Math.random(), this._paintList(n, r, e, this._redrawId);
  57815. for (var a = 0; a < i.length; a++) {
  57816. var o = i[a], s = this._layers[o];
  57817. if (!s.__builtin__ && s.refresh) {
  57818. var l = a === 0 ? this._backgroundColor : null;
  57819. s.refresh(l);
  57820. }
  57821. }
  57822. return this._opts.useDirtyRect && (this._prevDisplayList = n.slice()), this;
  57823. }, t.prototype.refreshHover = function() {
  57824. this._paintHoverList(this.storage.getDisplayList(!1));
  57825. }, t.prototype._paintHoverList = function(e) {
  57826. var n = e.length, r = this._hoverlayer;
  57827. if (r && r.clear(), !!n) {
  57828. for (var i = {
  57829. inHover: !0,
  57830. viewWidth: this._width,
  57831. viewHeight: this._height
  57832. }, a, o = 0; o < n; o++) {
  57833. var s = e[o];
  57834. s.__inHover && (r || (r = this._hoverlayer = this.getLayer(EV)), a || (a = r.ctx, a.save()), Vc(a, s, i, o === n - 1));
  57835. }
  57836. a && a.restore();
  57837. }
  57838. }, t.prototype.getHoverLayer = function() {
  57839. return this.getLayer(EV);
  57840. }, t.prototype.paintOne = function(e, n) {
  57841. hk(e, n);
  57842. }, t.prototype._paintList = function(e, n, r, i) {
  57843. if (this._redrawId === i) {
  57844. r = r || !1, this._updateLayerStatus(e);
  57845. var a = this._doPaintList(e, n, r), o = a.finished, s = a.needsRefreshHover;
  57846. if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o)
  57847. this.eachLayer(function(u) {
  57848. u.afterBrush && u.afterBrush();
  57849. });
  57850. else {
  57851. var l = this;
  57852. K1(function() {
  57853. l._paintList(e, n, r, i);
  57854. });
  57855. }
  57856. }
  57857. }, t.prototype._compositeManually = function() {
  57858. var e = this.getLayer(sc).ctx, n = this._domRoot.width, r = this._domRoot.height;
  57859. e.clearRect(0, 0, n, r), this.eachBuiltinLayer(function(i) {
  57860. i.virtual && e.drawImage(i.dom, 0, 0, n, r);
  57861. });
  57862. }, t.prototype._doPaintList = function(e, n, r) {
  57863. for (var i = this, a = [], o = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
  57864. var l = this._zlevelList[s], u = this._layers[l];
  57865. u.__builtin__ && u !== this._hoverlayer && (u.__dirty || r) && a.push(u);
  57866. }
  57867. for (var c = !0, f = !1, d = function(v) {
  57868. var g = a[v], m = g.ctx, y = o && g.createRepaintRects(e, n, h._width, h._height), b = r ? g.__startIndex : g.__drawIndex, _ = !r && g.incremental && Date.now, O = _ && Date.now(), S = g.zlevel === h._zlevelList[0] ? h._backgroundColor : null;
  57869. if (g.__startIndex === g.__endIndex)
  57870. g.clear(!1, S, y);
  57871. else if (b === g.__startIndex) {
  57872. var x = e[b];
  57873. (!x.incremental || !x.notClear || r) && g.clear(!1, S, y);
  57874. }
  57875. b === -1 && (console.error("For some unknown reason. drawIndex is -1"), b = g.__startIndex);
  57876. var C, T = function(A) {
  57877. var D = {
  57878. inHover: !1,
  57879. allClipped: !1,
  57880. prevEl: null,
  57881. viewWidth: i._width,
  57882. viewHeight: i._height
  57883. };
  57884. for (C = b; C < g.__endIndex; C++) {
  57885. var E = e[C];
  57886. if (E.__inHover && (f = !0), i._doPaintEl(E, g, o, A, D, C === g.__endIndex - 1), _) {
  57887. var R = Date.now() - O;
  57888. if (R > 15)
  57889. break;
  57890. }
  57891. }
  57892. D.prevElClipPaths && m.restore();
  57893. };
  57894. if (y)
  57895. if (y.length === 0)
  57896. C = g.__endIndex;
  57897. else
  57898. for (var w = h.dpr, P = 0; P < y.length; ++P) {
  57899. var $ = y[P];
  57900. m.save(), m.beginPath(), m.rect($.x * w, $.y * w, $.width * w, $.height * w), m.clip(), T($), m.restore();
  57901. }
  57902. else
  57903. m.save(), T(), m.restore();
  57904. g.__drawIndex = C, g.__drawIndex < g.__endIndex && (c = !1);
  57905. }, h = this, p = 0; p < a.length; p++)
  57906. d(p);
  57907. return vt.wxa && k(this._layers, function(v) {
  57908. v && v.ctx && v.ctx.draw && v.ctx.draw();
  57909. }), {
  57910. finished: c,
  57911. needsRefreshHover: f
  57912. };
  57913. }, t.prototype._doPaintEl = function(e, n, r, i, a, o) {
  57914. var s = n.ctx;
  57915. if (r) {
  57916. var l = e.getPaintRect();
  57917. (!i || l && l.intersect(i)) && (Vc(s, e, a, o), e.setPrevPaintRect(l));
  57918. } else
  57919. Vc(s, e, a, o);
  57920. }, t.prototype.getLayer = function(e, n) {
  57921. this._singleCanvas && !this._needsManuallyCompositing && (e = sc);
  57922. var r = this._layers[e];
  57923. return r || (r = new tP("zr_" + e, this, this.dpr), r.zlevel = e, r.__builtin__ = !0, this._layerConfig[e] ? qe(r, this._layerConfig[e], !0) : this._layerConfig[e - _b] && qe(r, this._layerConfig[e - _b], !0), n && (r.virtual = n), this.insertLayer(e, r), r.initContext()), r;
  57924. }, t.prototype.insertLayer = function(e, n) {
  57925. var r = this._layers, i = this._zlevelList, a = i.length, o = this._domRoot, s = null, l = -1;
  57926. if (r[e]) {
  57927. process.env.NODE_ENV !== "production" && xa("ZLevel " + e + " has been used already");
  57928. return;
  57929. }
  57930. if (!$3e(n)) {
  57931. process.env.NODE_ENV !== "production" && xa("Layer of zlevel " + e + " is not valid");
  57932. return;
  57933. }
  57934. if (a > 0 && e > i[0]) {
  57935. for (l = 0; l < a - 1 && !(i[l] < e && i[l + 1] > e); l++)
  57936. ;
  57937. s = r[i[l]];
  57938. }
  57939. if (i.splice(l + 1, 0, e), r[e] = n, !n.virtual)
  57940. if (s) {
  57941. var u = s.dom;
  57942. u.nextSibling ? o.insertBefore(n.dom, u.nextSibling) : o.appendChild(n.dom);
  57943. } else
  57944. o.firstChild ? o.insertBefore(n.dom, o.firstChild) : o.appendChild(n.dom);
  57945. n.painter || (n.painter = this);
  57946. }, t.prototype.eachLayer = function(e, n) {
  57947. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57948. var a = r[i];
  57949. e.call(n, this._layers[a], a);
  57950. }
  57951. }, t.prototype.eachBuiltinLayer = function(e, n) {
  57952. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57953. var a = r[i], o = this._layers[a];
  57954. o.__builtin__ && e.call(n, o, a);
  57955. }
  57956. }, t.prototype.eachOtherLayer = function(e, n) {
  57957. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57958. var a = r[i], o = this._layers[a];
  57959. o.__builtin__ || e.call(n, o, a);
  57960. }
  57961. }, t.prototype.getLayers = function() {
  57962. return this._layers;
  57963. }, t.prototype._updateLayerStatus = function(e) {
  57964. this.eachBuiltinLayer(function(f, d) {
  57965. f.__dirty = f.__used = !1;
  57966. });
  57967. function n(f) {
  57968. a && (a.__endIndex !== f && (a.__dirty = !0), a.__endIndex = f);
  57969. }
  57970. if (this._singleCanvas)
  57971. for (var r = 1; r < e.length; r++) {
  57972. var i = e[r];
  57973. if (i.zlevel !== e[r - 1].zlevel || i.incremental) {
  57974. this._needsManuallyCompositing = !0;
  57975. break;
  57976. }
  57977. }
  57978. var a = null, o = 0, s, l;
  57979. for (l = 0; l < e.length; l++) {
  57980. var i = e[l], u = i.zlevel, c = void 0;
  57981. s !== u && (s = u, o = 0), i.incremental ? (c = this.getLayer(u + P3e, this._needsManuallyCompositing), c.incremental = !0, o = 1) : c = this.getLayer(u + (o > 0 ? _b : 0), this._needsManuallyCompositing), c.__builtin__ || xa("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 & Ni && !i.__inHover && (c.__dirty = !0, c.incremental && c.__drawIndex < 0 && (c.__drawIndex = l));
  57982. }
  57983. n(l), this.eachBuiltinLayer(function(f, d) {
  57984. !f.__used && f.getElementCount() > 0 && (f.__dirty = !0, f.__startIndex = f.__endIndex = f.__drawIndex = 0), f.__dirty && f.__drawIndex < 0 && (f.__drawIndex = f.__startIndex);
  57985. });
  57986. }, t.prototype.clear = function() {
  57987. return this.eachBuiltinLayer(this._clearLayer), this;
  57988. }, t.prototype._clearLayer = function(e) {
  57989. e.clear();
  57990. }, t.prototype.setBackgroundColor = function(e) {
  57991. this._backgroundColor = e, k(this._layers, function(n) {
  57992. n.setUnpainted();
  57993. });
  57994. }, t.prototype.configLayer = function(e, n) {
  57995. if (n) {
  57996. var r = this._layerConfig;
  57997. r[e] ? qe(r[e], n, !0) : r[e] = n;
  57998. for (var i = 0; i < this._zlevelList.length; i++) {
  57999. var a = this._zlevelList[i];
  58000. if (a === e || a === e + _b) {
  58001. var o = this._layers[a];
  58002. qe(o, r[e], !0);
  58003. }
  58004. }
  58005. }
  58006. }, t.prototype.delLayer = function(e) {
  58007. var n = this._layers, r = this._zlevelList, i = n[e];
  58008. i && (i.dom.parentNode.removeChild(i.dom), delete n[e], r.splice(et(r, e), 1));
  58009. }, t.prototype.resize = function(e, n) {
  58010. if (this._domRoot.style) {
  58011. var r = this._domRoot;
  58012. r.style.display = "none";
  58013. var i = this._opts, a = this.root;
  58014. if (e != null && (i.width = e), n != null && (i.height = n), e = Wd(a, 0, i), n = Wd(a, 1, i), r.style.display = "", this._width !== e || n !== this._height) {
  58015. r.style.width = e + "px", r.style.height = n + "px";
  58016. for (var o in this._layers)
  58017. this._layers.hasOwnProperty(o) && this._layers[o].resize(e, n);
  58018. this.refresh(!0);
  58019. }
  58020. this._width = e, this._height = n;
  58021. } else {
  58022. if (e == null || n == null)
  58023. return;
  58024. this._width = e, this._height = n, this.getLayer(sc).resize(e, n);
  58025. }
  58026. return this;
  58027. }, t.prototype.clearLayer = function(e) {
  58028. var n = this._layers[e];
  58029. n && n.clear();
  58030. }, t.prototype.dispose = function() {
  58031. this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
  58032. }, t.prototype.getRenderedCanvas = function(e) {
  58033. if (e = e || {}, this._singleCanvas && !this._compositeManually)
  58034. return this._layers[sc].dom;
  58035. var n = new tP("image", this, e.pixelRatio || this.dpr);
  58036. n.initContext(), n.clear(!1, e.backgroundColor || this._backgroundColor);
  58037. var r = n.ctx;
  58038. if (e.pixelRatio <= this.dpr) {
  58039. this.refresh();
  58040. var i = n.dom.width, a = n.dom.height;
  58041. this.eachLayer(function(f) {
  58042. f.__builtin__ ? r.drawImage(f.dom, 0, 0, i, a) : f.renderToCanvas && (r.save(), f.renderToCanvas(r), r.restore());
  58043. });
  58044. } else
  58045. for (var o = {
  58046. inHover: !1,
  58047. viewWidth: this._width,
  58048. viewHeight: this._height
  58049. }, s = this.storage.getDisplayList(!0), l = 0, u = s.length; l < u; l++) {
  58050. var c = s[l];
  58051. Vc(r, c, o, l === u - 1);
  58052. }
  58053. return n.dom;
  58054. }, t.prototype.getWidth = function() {
  58055. return this._width;
  58056. }, t.prototype.getHeight = function() {
  58057. return this._height;
  58058. }, t;
  58059. }();
  58060. function M3e(t) {
  58061. t.registerPainter("canvas", E3e);
  58062. }
  58063. var I3e = (
  58064. /** @class */
  58065. function(t) {
  58066. q(e, t);
  58067. function e() {
  58068. var n = t !== null && t.apply(this, arguments) || this;
  58069. return n.type = e.type, n.hasSymbolVisual = !0, n;
  58070. }
  58071. return e.prototype.getInitialData = function(n) {
  58072. if (process.env.NODE_ENV !== "production") {
  58073. var r = n.coordinateSystem;
  58074. if (r !== "polar" && r !== "cartesian2d")
  58075. throw new Error("Line not support coordinateSystem besides cartesian and polar");
  58076. }
  58077. return cs(null, this, {
  58078. useEncodeDefaulter: !0
  58079. });
  58080. }, e.prototype.getLegendIcon = function(n) {
  58081. var r = new Ve(), i = $n("line", 0, n.itemHeight / 2, n.itemWidth, 0, n.lineStyle.stroke, !1);
  58082. r.add(i), i.setStyle(n.lineStyle);
  58083. var a = this.getData().getVisual("symbol"), o = this.getData().getVisual("symbolRotate"), s = a === "none" ? "circle" : a, l = n.itemHeight * 0.8, u = $n(s, (n.itemWidth - l) / 2, (n.itemHeight - l) / 2, l, l, n.itemStyle.fill);
  58084. r.add(u), u.setStyle(n.itemStyle);
  58085. var c = n.iconRotate === "inherit" ? o : n.iconRotate || 0;
  58086. 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;
  58087. }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
  58088. // zlevel: 0,
  58089. z: 3,
  58090. coordinateSystem: "cartesian2d",
  58091. legendHoverLink: !0,
  58092. clip: !0,
  58093. label: {
  58094. position: "top"
  58095. },
  58096. // itemStyle: {
  58097. // },
  58098. endLabel: {
  58099. show: !1,
  58100. valueAnimation: !0,
  58101. distance: 8
  58102. },
  58103. lineStyle: {
  58104. width: 2,
  58105. type: "solid"
  58106. },
  58107. emphasis: {
  58108. scale: !0
  58109. },
  58110. // areaStyle: {
  58111. // origin of areaStyle. Valid values:
  58112. // `'auto'/null/undefined`: from axisLine to data
  58113. // `'start'`: from min to data
  58114. // `'end'`: from data to max
  58115. // origin: 'auto'
  58116. // },
  58117. // false, 'start', 'end', 'middle'
  58118. step: !1,
  58119. // Disabled if step is true
  58120. smooth: !1,
  58121. smoothMonotone: null,
  58122. symbol: "emptyCircle",
  58123. symbolSize: 4,
  58124. symbolRotate: null,
  58125. showSymbol: !0,
  58126. // `false`: follow the label interval strategy.
  58127. // `true`: show all symbols.
  58128. // `'auto'`: If possible, show all symbols, otherwise
  58129. // follow the label interval strategy.
  58130. showAllSymbol: "auto",
  58131. // Whether to connect break point.
  58132. connectNulls: !1,
  58133. // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.
  58134. sampling: "none",
  58135. animationEasing: "linear",
  58136. // Disable progressive
  58137. progressive: 0,
  58138. hoverLayerThreshold: 1 / 0,
  58139. universalTransition: {
  58140. divideShape: "clone"
  58141. },
  58142. triggerLineEvent: !1
  58143. }, e;
  58144. }(Ht)
  58145. );
  58146. function Zh(t, e) {
  58147. var n = t.mapDimensionsAll("defaultedLabel"), r = n.length;
  58148. if (r === 1) {
  58149. var i = Gh(t, e, n[0]);
  58150. return i != null ? i + "" : null;
  58151. } else if (r) {
  58152. for (var a = [], o = 0; o < n.length; o++)
  58153. a.push(Gh(t, e, n[o]));
  58154. return a.join(" ");
  58155. }
  58156. }
  58157. function Nte(t, e) {
  58158. var n = t.mapDimensionsAll("defaultedLabel");
  58159. if (!ue(e))
  58160. return e + "";
  58161. for (var r = [], i = 0; i < n.length; i++) {
  58162. var a = t.getDimensionIndex(n[i]);
  58163. a >= 0 && r.push(e[a]);
  58164. }
  58165. return r.join(" ");
  58166. }
  58167. var Z0 = (
  58168. /** @class */
  58169. function(t) {
  58170. q(e, t);
  58171. function e(n, r, i, a) {
  58172. var o = t.call(this) || this;
  58173. return o.updateData(n, r, i, a), o;
  58174. }
  58175. return e.prototype._createSymbol = function(n, r, i, a, o) {
  58176. this.removeAll();
  58177. var s = $n(n, -1, -1, 2, 2, null, o);
  58178. s.attr({
  58179. z2: 100,
  58180. culling: !0,
  58181. scaleX: a[0] / 2,
  58182. scaleY: a[1] / 2
  58183. }), s.drift = D3e, this._symbolType = n, this.add(s);
  58184. }, e.prototype.stopSymbolAnimation = function(n) {
  58185. this.childAt(0).stopAnimation(null, n);
  58186. }, e.prototype.getSymbolType = function() {
  58187. return this._symbolType;
  58188. }, e.prototype.getSymbolPath = function() {
  58189. return this.childAt(0);
  58190. }, e.prototype.highlight = function() {
  58191. Zs(this.childAt(0));
  58192. }, e.prototype.downplay = function() {
  58193. Us(this.childAt(0));
  58194. }, e.prototype.setZ = function(n, r) {
  58195. var i = this.childAt(0);
  58196. i.zlevel = n, i.z = r;
  58197. }, e.prototype.setDraggable = function(n, r) {
  58198. var i = this.childAt(0);
  58199. i.draggable = n, i.cursor = !r && n ? "move" : i.cursor;
  58200. }, e.prototype.updateData = function(n, r, i, a) {
  58201. this.silent = !1;
  58202. var o = n.getItemVisual(r, "symbol") || "circle", s = n.hostModel, l = e.getSymbolSize(n, r), u = o !== this._symbolType, c = a && a.disableAnimation;
  58203. if (u) {
  58204. var f = n.getItemVisual(r, "symbolKeepAspect");
  58205. this._createSymbol(o, n, r, l, f);
  58206. } else {
  58207. var d = this.childAt(0);
  58208. d.silent = !1;
  58209. var h = {
  58210. scaleX: l[0] / 2,
  58211. scaleY: l[1] / 2
  58212. };
  58213. c ? d.attr(h) : Ct(d, h, s, r), uo(d);
  58214. }
  58215. if (this._updateCommon(n, r, l, i, a), u) {
  58216. var d = this.childAt(0);
  58217. if (!c) {
  58218. var h = {
  58219. scaleX: this._sizeX,
  58220. scaleY: this._sizeY,
  58221. style: {
  58222. // Always fadeIn. Because it has fadeOut animation when symbol is removed..
  58223. opacity: d.style.opacity
  58224. }
  58225. };
  58226. d.scaleX = d.scaleY = 0, d.style.opacity = 0, Yt(d, h, s, r);
  58227. }
  58228. }
  58229. c && this.childAt(0).stopAnimation("leave");
  58230. }, e.prototype._updateCommon = function(n, r, i, a, o) {
  58231. var s = this.childAt(0), l = n.hostModel, u, c, f, d, h, p, v, g, m;
  58232. 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) {
  58233. var y = a && a.itemModel ? a.itemModel : n.getItemModel(r), b = y.getModel("emphasis");
  58234. u = b.getModel("itemStyle").getItemStyle(), f = y.getModel(["select", "itemStyle"]).getItemStyle(), c = y.getModel(["blur", "itemStyle"]).getItemStyle(), d = b.get("focus"), h = b.get("blurScope"), p = b.get("disabled"), v = er(y), g = b.getShallow("scale"), m = y.getShallow("cursor");
  58235. }
  58236. var _ = n.getItemVisual(r, "symbolRotate");
  58237. s.attr("rotation", (_ || 0) * Math.PI / 180 || 0);
  58238. var O = Ff(n.getItemVisual(r, "symbolOffset"), i);
  58239. O && (s.x = O[0], s.y = O[1]), m && s.attr("cursor", m);
  58240. var S = n.getItemVisual(r, "style"), x = S.fill;
  58241. if (s instanceof lr) {
  58242. var C = s.style;
  58243. s.useStyle(le({
  58244. // TODO other properties like x, y ?
  58245. image: C.image,
  58246. x: C.x,
  58247. y: C.y,
  58248. width: C.width,
  58249. height: C.height
  58250. }, S));
  58251. } else
  58252. s.__isEmptyBrush ? s.useStyle(le({}, S)) : s.useStyle(S), s.style.decal = null, s.setColor(x, o && o.symbolInnerColor), s.style.strokeNoScale = !0;
  58253. var T = n.getItemVisual(r, "liftZ"), w = this._z2;
  58254. T != null ? w == null && (this._z2 = s.z2, s.z2 += T) : w != null && (s.z2 = w, this._z2 = null);
  58255. var P = o && o.useNameLabel;
  58256. Pr(s, v, {
  58257. labelFetcher: l,
  58258. labelDataIndex: r,
  58259. defaultText: $,
  58260. inheritColor: x,
  58261. defaultOpacity: S.opacity
  58262. });
  58263. function $(E) {
  58264. return P ? n.getName(E) : Zh(n, E);
  58265. }
  58266. this._sizeX = i[0] / 2, this._sizeY = i[1] / 2;
  58267. var A = s.ensureState("emphasis");
  58268. A.style = u, s.ensureState("select").style = f, s.ensureState("blur").style = c;
  58269. var D = g == null || g === !0 ? Math.max(1.1, 3 / this._sizeY) : isFinite(g) && g > 0 ? +g : 1;
  58270. A.scaleX = this._sizeX * D, A.scaleY = this._sizeY * D, this.setSymbolScale(1), bn(this, d, h, p);
  58271. }, e.prototype.setSymbolScale = function(n) {
  58272. this.scaleX = this.scaleY = n;
  58273. }, e.prototype.fadeOut = function(n, r, i) {
  58274. var a = this.childAt(0), o = Fe(this).dataIndex, s = i && i.animation;
  58275. if (this.silent = a.silent = !0, i && i.fadeLabel) {
  58276. var l = a.getTextContent();
  58277. l && uu(l, {
  58278. style: {
  58279. opacity: 0
  58280. }
  58281. }, r, {
  58282. dataIndex: o,
  58283. removeOpt: s,
  58284. cb: function() {
  58285. a.removeTextContent();
  58286. }
  58287. });
  58288. } else
  58289. a.removeTextContent();
  58290. uu(a, {
  58291. style: {
  58292. opacity: 0
  58293. },
  58294. scaleX: 0,
  58295. scaleY: 0
  58296. }, r, {
  58297. dataIndex: o,
  58298. cb: n,
  58299. removeOpt: s
  58300. });
  58301. }, e.getSymbolSize = function(n, r) {
  58302. return $p(n.getItemVisual(r, "symbolSize"));
  58303. }, e;
  58304. }(Ve)
  58305. );
  58306. function D3e(t, e) {
  58307. this.parent.drift(t, e);
  58308. }
  58309. function nP(t, e, n, r) {
  58310. 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";
  58311. }
  58312. function MV(t) {
  58313. return t != null && !Ie(t) && (t = {
  58314. isIgnore: t
  58315. }), t || {};
  58316. }
  58317. function IV(t) {
  58318. var e = t.hostModel, n = e.getModel("emphasis");
  58319. return {
  58320. emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
  58321. blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
  58322. selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
  58323. focus: n.get("focus"),
  58324. blurScope: n.get("blurScope"),
  58325. emphasisDisabled: n.get("disabled"),
  58326. hoverScale: n.get("scale"),
  58327. labelStatesModels: er(e),
  58328. cursorStyle: e.get("cursor")
  58329. };
  58330. }
  58331. var U0 = (
  58332. /** @class */
  58333. function() {
  58334. function t(e) {
  58335. this.group = new Ve(), this._SymbolCtor = e || Z0;
  58336. }
  58337. return t.prototype.updateData = function(e, n) {
  58338. this._progressiveEls = null, n = MV(n);
  58339. var r = this.group, i = e.hostModel, a = this._data, o = this._SymbolCtor, s = n.disableAnimation, l = IV(e), u = {
  58340. disableAnimation: s
  58341. }, c = n.getSymbolPoint || function(f) {
  58342. return e.getItemLayout(f);
  58343. };
  58344. a || r.removeAll(), e.diff(a).add(function(f) {
  58345. var d = c(f);
  58346. if (nP(e, d, f, n)) {
  58347. var h = new o(e, f, l, u);
  58348. h.setPosition(d), e.setItemGraphicEl(f, h), r.add(h);
  58349. }
  58350. }).update(function(f, d) {
  58351. var h = a.getItemGraphicEl(d), p = c(f);
  58352. if (!nP(e, p, f, n)) {
  58353. r.remove(h);
  58354. return;
  58355. }
  58356. var v = e.getItemVisual(f, "symbol") || "circle", g = h && h.getSymbolType && h.getSymbolType();
  58357. if (!h || g && g !== v)
  58358. r.remove(h), h = new o(e, f, l, u), h.setPosition(p);
  58359. else {
  58360. h.updateData(e, f, l, u);
  58361. var m = {
  58362. x: p[0],
  58363. y: p[1]
  58364. };
  58365. s ? h.attr(m) : Ct(h, m, i);
  58366. }
  58367. r.add(h), e.setItemGraphicEl(f, h);
  58368. }).remove(function(f) {
  58369. var d = a.getItemGraphicEl(f);
  58370. d && d.fadeOut(function() {
  58371. r.remove(d);
  58372. }, i);
  58373. }).execute(), this._getSymbolPoint = c, this._data = e;
  58374. }, t.prototype.updateLayout = function() {
  58375. var e = this, n = this._data;
  58376. n && n.eachItemGraphicEl(function(r, i) {
  58377. var a = e._getSymbolPoint(i);
  58378. r.setPosition(a), r.markRedraw();
  58379. });
  58380. }, t.prototype.incrementalPrepareUpdate = function(e) {
  58381. this._seriesScope = IV(e), this._data = null, this.group.removeAll();
  58382. }, t.prototype.incrementalUpdate = function(e, n, r) {
  58383. this._progressiveEls = [], r = MV(r);
  58384. function i(l) {
  58385. l.isGroup || (l.incremental = !0, l.ensureState("emphasis").hoverLayer = !0);
  58386. }
  58387. for (var a = e.start; a < e.end; a++) {
  58388. var o = n.getItemLayout(a);
  58389. if (nP(n, o, a, r)) {
  58390. var s = new this._SymbolCtor(n, a, this._seriesScope);
  58391. s.traverse(i), s.setPosition(o), this.group.add(s), n.setItemGraphicEl(a, s), this._progressiveEls.push(s);
  58392. }
  58393. }
  58394. }, t.prototype.eachRendered = function(e) {
  58395. Tu(this._progressiveEls || this.group, e);
  58396. }, t.prototype.remove = function(e) {
  58397. var n = this.group, r = this._data;
  58398. r && e ? r.eachItemGraphicEl(function(i) {
  58399. i.fadeOut(function() {
  58400. n.remove(i);
  58401. }, r.hostModel);
  58402. }) : n.removeAll();
  58403. }, t;
  58404. }()
  58405. );
  58406. function Bte(t, e, n) {
  58407. var r = t.getBaseAxis(), i = t.getOtherAxis(r), a = R3e(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) {
  58408. return e.mapDimension(p);
  58409. }), d = !1, h = e.getCalculationInfo("stackResultDimension");
  58410. return Ys(
  58411. e,
  58412. f[0]
  58413. /* , dims[1] */
  58414. ) && (d = !0, f[0] = h), Ys(
  58415. e,
  58416. f[1]
  58417. /* , dims[0] */
  58418. ) && (d = !0, f[1] = h), {
  58419. dataDimsForPoint: f,
  58420. valueStart: a,
  58421. valueAxisDim: s,
  58422. baseAxisDim: o,
  58423. stacked: !!d,
  58424. valueDim: l,
  58425. baseDim: u,
  58426. baseDataOffset: c,
  58427. stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  58428. };
  58429. }
  58430. function R3e(t, e) {
  58431. var n = 0, r = t.scale.getExtent();
  58432. return e === "start" ? n = r[0] : e === "end" ? n = r[1] : St(e) && !isNaN(e) ? n = e : r[0] > 0 ? n = r[0] : r[1] < 0 && (n = r[1]), n;
  58433. }
  58434. function zte(t, e, n, r) {
  58435. var i = NaN;
  58436. t.stacked && (i = n.get(n.getCalculationInfo("stackedOverDimension"), r)), isNaN(i) && (i = t.valueStart);
  58437. var a = t.baseDataOffset, o = [];
  58438. return o[a] = n.get(t.baseDim, r), o[1 - a] = i, e.dataToPoint(o);
  58439. }
  58440. function k3e(t, e) {
  58441. var n = [];
  58442. return e.diff(t).add(function(r) {
  58443. n.push({
  58444. cmd: "+",
  58445. idx: r
  58446. });
  58447. }).update(function(r, i) {
  58448. n.push({
  58449. cmd: "=",
  58450. idx: i,
  58451. idx1: r
  58452. });
  58453. }).remove(function(r) {
  58454. n.push({
  58455. cmd: "-",
  58456. idx: r
  58457. });
  58458. }).execute(), n;
  58459. }
  58460. function L3e(t, e, n, r, i, a, o, s) {
  58461. for (var l = k3e(t, e), u = [], c = [], f = [], d = [], h = [], p = [], v = [], g = Bte(i, e, o), m = t.getLayout("points") || [], y = e.getLayout("points") || [], b = 0; b < l.length; b++) {
  58462. var _ = l[b], O = !0, S = void 0, x = void 0;
  58463. switch (_.cmd) {
  58464. case "=":
  58465. S = _.idx * 2, x = _.idx1 * 2;
  58466. var C = m[S], T = m[S + 1], w = y[x], P = y[x + 1];
  58467. (isNaN(C) || isNaN(T)) && (C = w, T = P), u.push(C, T), c.push(w, P), f.push(n[S], n[S + 1]), d.push(r[x], r[x + 1]), v.push(e.getRawIndex(_.idx1));
  58468. break;
  58469. case "+":
  58470. var $ = _.idx, A = g.dataDimsForPoint, D = i.dataToPoint([e.get(A[0], $), e.get(A[1], $)]);
  58471. x = $ * 2, u.push(D[0], D[1]), c.push(y[x], y[x + 1]);
  58472. var E = zte(g, i, e, $);
  58473. f.push(E[0], E[1]), d.push(r[x], r[x + 1]), v.push(e.getRawIndex($));
  58474. break;
  58475. case "-":
  58476. O = !1;
  58477. }
  58478. O && (h.push(_), p.push(p.length));
  58479. }
  58480. p.sort(function(ee, oe) {
  58481. return v[ee] - v[oe];
  58482. });
  58483. for (var R = u.length, N = Wo(R), V = Wo(R), B = Wo(R), W = Wo(R), F = [], b = 0; b < p.length; b++) {
  58484. var Q = p[b], Z = b * 2, ne = Q * 2;
  58485. N[Z] = u[ne], N[Z + 1] = u[ne + 1], V[Z] = c[ne], V[Z + 1] = c[ne + 1], B[Z] = f[ne], B[Z + 1] = f[ne + 1], W[Z] = d[ne], W[Z + 1] = d[ne + 1], F[b] = h[Q];
  58486. }
  58487. return {
  58488. current: N,
  58489. next: V,
  58490. stackedOnCurrent: B,
  58491. stackedOnNext: W,
  58492. status: F
  58493. };
  58494. }
  58495. var ml = Math.min, yl = Math.max;
  58496. function rf(t, e) {
  58497. return isNaN(t) || isNaN(e);
  58498. }
  58499. function uE(t, e, n, r, i, a, o, s, l) {
  58500. for (var u, c, f, d, h, p, v = n, g = 0; g < r; g++) {
  58501. var m = e[v * 2], y = e[v * 2 + 1];
  58502. if (v >= i || v < 0)
  58503. break;
  58504. if (rf(m, y)) {
  58505. if (l) {
  58506. v += a;
  58507. continue;
  58508. }
  58509. break;
  58510. }
  58511. if (v === n)
  58512. t[a > 0 ? "moveTo" : "lineTo"](m, y), f = m, d = y;
  58513. else {
  58514. var b = m - u, _ = y - c;
  58515. if (b * b + _ * _ < 0.5) {
  58516. v += a;
  58517. continue;
  58518. }
  58519. if (o > 0) {
  58520. for (var O = v + a, S = e[O * 2], x = e[O * 2 + 1]; S === m && x === y && g < r; )
  58521. g++, O += a, v += a, S = e[O * 2], x = e[O * 2 + 1], m = e[v * 2], y = e[v * 2 + 1], b = m - u, _ = y - c;
  58522. var C = g + 1;
  58523. if (l)
  58524. for (; rf(S, x) && C < r; )
  58525. C++, O += a, S = e[O * 2], x = e[O * 2 + 1];
  58526. var T = 0.5, w = 0, P = 0, $ = void 0, A = void 0;
  58527. if (C >= r || rf(S, x))
  58528. h = m, p = y;
  58529. else {
  58530. w = S - u, P = x - c;
  58531. var D = m - u, E = S - m, R = y - c, N = x - y, V = void 0, B = void 0;
  58532. if (s === "x") {
  58533. V = Math.abs(D), B = Math.abs(E);
  58534. var W = w > 0 ? 1 : -1;
  58535. h = m - W * V * o, p = y, $ = m + W * B * o, A = y;
  58536. } else if (s === "y") {
  58537. V = Math.abs(R), B = Math.abs(N);
  58538. var F = P > 0 ? 1 : -1;
  58539. h = m, p = y - F * V * o, $ = m, A = y + F * B * o;
  58540. } else
  58541. V = Math.sqrt(D * D + R * R), B = Math.sqrt(E * E + N * N), T = B / (B + V), h = m - w * o * (1 - T), p = y - P * o * (1 - T), $ = m + w * o * T, A = y + P * o * T, $ = ml($, yl(S, m)), A = ml(A, yl(x, y)), $ = yl($, ml(S, m)), A = yl(A, ml(x, y)), w = $ - m, P = A - y, h = m - w * V / B, p = y - P * V / B, h = ml(h, yl(u, m)), p = ml(p, yl(c, y)), h = yl(h, ml(u, m)), p = yl(p, ml(c, y)), w = m - h, P = y - p, $ = m + w * B / V, A = y + P * B / V;
  58542. }
  58543. t.bezierCurveTo(f, d, h, p, m, y), f = $, d = A;
  58544. } else
  58545. t.lineTo(m, y);
  58546. }
  58547. u = m, c = y, v += a;
  58548. }
  58549. return g;
  58550. }
  58551. var Vte = (
  58552. /** @class */
  58553. /* @__PURE__ */ function() {
  58554. function t() {
  58555. this.smooth = 0, this.smoothConstraint = !0;
  58556. }
  58557. return t;
  58558. }()
  58559. ), N3e = (
  58560. /** @class */
  58561. function(t) {
  58562. q(e, t);
  58563. function e(n) {
  58564. var r = t.call(this, n) || this;
  58565. return r.type = "ec-polyline", r;
  58566. }
  58567. return e.prototype.getDefaultStyle = function() {
  58568. return {
  58569. stroke: "#000",
  58570. fill: null
  58571. };
  58572. }, e.prototype.getDefaultShape = function() {
  58573. return new Vte();
  58574. }, e.prototype.buildPath = function(n, r) {
  58575. var i = r.points, a = 0, o = i.length / 2;
  58576. if (r.connectNulls) {
  58577. for (; o > 0 && rf(i[o * 2 - 2], i[o * 2 - 1]); o--)
  58578. ;
  58579. for (; a < o && rf(i[a * 2], i[a * 2 + 1]); a++)
  58580. ;
  58581. }
  58582. for (; a < o; )
  58583. a += uE(n, i, a, o, o, 1, r.smooth, r.smoothMonotone, r.connectNulls) + 1;
  58584. }, e.prototype.getPointOn = function(n, r) {
  58585. this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
  58586. for (var i = this.path, a = i.data, o = os.CMD, s, l, u = r === "x", c = [], f = 0; f < a.length; ) {
  58587. var d = a[f++], h = void 0, p = void 0, v = void 0, g = void 0, m = void 0, y = void 0, b = void 0;
  58588. switch (d) {
  58589. case o.M:
  58590. s = a[f++], l = a[f++];
  58591. break;
  58592. case o.L:
  58593. if (h = a[f++], p = a[f++], b = u ? (n - s) / (h - s) : (n - l) / (p - l), b <= 1 && b >= 0) {
  58594. var _ = u ? (p - l) * b + l : (h - s) * b + s;
  58595. return u ? [n, _] : [_, n];
  58596. }
  58597. s = h, l = p;
  58598. break;
  58599. case o.C:
  58600. h = a[f++], p = a[f++], v = a[f++], g = a[f++], m = a[f++], y = a[f++];
  58601. var O = u ? eO(s, h, v, m, n, c) : eO(l, p, g, y, n, c);
  58602. if (O > 0)
  58603. for (var S = 0; S < O; S++) {
  58604. var x = c[S];
  58605. if (x <= 1 && x >= 0) {
  58606. var _ = u ? Gn(l, p, g, y, x) : Gn(s, h, v, m, x);
  58607. return u ? [n, _] : [_, n];
  58608. }
  58609. }
  58610. s = m, l = y;
  58611. break;
  58612. }
  58613. }
  58614. }, e;
  58615. }(ot)
  58616. ), B3e = (
  58617. /** @class */
  58618. function(t) {
  58619. q(e, t);
  58620. function e() {
  58621. return t !== null && t.apply(this, arguments) || this;
  58622. }
  58623. return e;
  58624. }(Vte)
  58625. ), Fte = (
  58626. /** @class */
  58627. function(t) {
  58628. q(e, t);
  58629. function e(n) {
  58630. var r = t.call(this, n) || this;
  58631. return r.type = "ec-polygon", r;
  58632. }
  58633. return e.prototype.getDefaultShape = function() {
  58634. return new B3e();
  58635. }, e.prototype.buildPath = function(n, r) {
  58636. var i = r.points, a = r.stackedOnPoints, o = 0, s = i.length / 2, l = r.smoothMonotone;
  58637. if (r.connectNulls) {
  58638. for (; s > 0 && rf(i[s * 2 - 2], i[s * 2 - 1]); s--)
  58639. ;
  58640. for (; o < s && rf(i[o * 2], i[o * 2 + 1]); o++)
  58641. ;
  58642. }
  58643. for (; o < s; ) {
  58644. var u = uE(n, i, o, s, s, 1, r.smooth, l, r.connectNulls);
  58645. uE(n, a, o + u - 1, u, s, -1, r.stackedOnSmooth, l, r.connectNulls), o += u + 1, n.closePath();
  58646. }
  58647. }, e;
  58648. }(ot)
  58649. );
  58650. function Wte(t, e, n, r, i) {
  58651. var a = t.getArea(), o = a.x, s = a.y, l = a.width, u = a.height, c = n.get(["lineStyle", "width"]) || 2;
  58652. o -= c / 2, s -= c / 2, l += c, u += c, l = Math.ceil(l), o !== Math.floor(o) && (o = Math.floor(o), l++);
  58653. var f = new mt({
  58654. shape: {
  58655. x: o,
  58656. y: s,
  58657. width: l,
  58658. height: u
  58659. }
  58660. });
  58661. if (e) {
  58662. var d = t.getBaseAxis(), h = d.isHorizontal(), p = d.inverse;
  58663. h ? (p && (f.shape.x += l), f.shape.width = 0) : (p || (f.shape.y += u), f.shape.height = 0);
  58664. var v = Me(i) ? function(g) {
  58665. i(g, f);
  58666. } : null;
  58667. Yt(f, {
  58668. shape: {
  58669. width: l,
  58670. height: u,
  58671. x: o,
  58672. y: s
  58673. }
  58674. }, n, null, r, v);
  58675. }
  58676. return f;
  58677. }
  58678. function Qte(t, e, n) {
  58679. var r = t.getArea(), i = mn(r.r0, 1), a = mn(r.r, 1), o = new ii({
  58680. shape: {
  58681. cx: mn(t.cx, 1),
  58682. cy: mn(t.cy, 1),
  58683. r0: i,
  58684. r: a,
  58685. startAngle: r.startAngle,
  58686. endAngle: r.endAngle,
  58687. clockwise: r.clockwise
  58688. }
  58689. });
  58690. if (e) {
  58691. var s = t.getBaseAxis().dim === "angle";
  58692. s ? o.shape.endAngle = r.startAngle : o.shape.r = i, Yt(o, {
  58693. shape: {
  58694. endAngle: r.endAngle,
  58695. r: a
  58696. }
  58697. }, n);
  58698. }
  58699. return o;
  58700. }
  58701. function X0(t, e, n, r, i) {
  58702. if (t) {
  58703. if (t.type === "polar")
  58704. return Qte(t, e, n);
  58705. if (t.type === "cartesian2d")
  58706. return Wte(t, e, n, r, i);
  58707. } else return null;
  58708. return null;
  58709. }
  58710. function Wf(t, e) {
  58711. return t.type === e;
  58712. }
  58713. function DV(t, e) {
  58714. if (t.length === e.length) {
  58715. for (var n = 0; n < t.length; n++)
  58716. if (t[n] !== e[n])
  58717. return;
  58718. return !0;
  58719. }
  58720. }
  58721. function RV(t) {
  58722. for (var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = 0; a < t.length; ) {
  58723. var o = t[a++], s = t[a++];
  58724. isNaN(o) || (e = Math.min(o, e), r = Math.max(o, r)), isNaN(s) || (n = Math.min(s, n), i = Math.max(s, i));
  58725. }
  58726. return [[e, n], [r, i]];
  58727. }
  58728. function kV(t, e) {
  58729. var n = RV(t), r = n[0], i = n[1], a = RV(e), o = a[0], s = a[1];
  58730. 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]));
  58731. }
  58732. function LV(t) {
  58733. return St(t) ? t : t ? 0.5 : 0;
  58734. }
  58735. function z3e(t, e, n) {
  58736. if (!n.valueDim)
  58737. return [];
  58738. for (var r = e.count(), i = Wo(r * 2), a = 0; a < r; a++) {
  58739. var o = zte(n, t, e, a);
  58740. i[a * 2] = o[0], i[a * 2 + 1] = o[1];
  58741. }
  58742. return i;
  58743. }
  58744. function bl(t, e, n, r) {
  58745. var i = e.getBaseAxis(), a = i.dim === "x" || i.dim === "radius" ? 0 : 1, o = [], s = 0, l = [], u = [], c = [], f = [];
  58746. if (r) {
  58747. for (s = 0; s < t.length; s += 2)
  58748. !isNaN(t[s]) && !isNaN(t[s + 1]) && f.push(t[s], t[s + 1]);
  58749. t = f;
  58750. }
  58751. for (s = 0; s < t.length - 2; s += 2)
  58752. 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) {
  58753. case "end":
  58754. l[a] = c[a], l[1 - a] = u[1 - a], o.push(l[0], l[1]);
  58755. break;
  58756. case "middle":
  58757. var d = (u[a] + c[a]) / 2, h = [];
  58758. 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]);
  58759. break;
  58760. default:
  58761. l[a] = u[a], l[1 - a] = c[1 - a], o.push(l[0], l[1]);
  58762. }
  58763. return o.push(t[s++], t[s++]), o;
  58764. }
  58765. function V3e(t, e) {
  58766. var n = [], r = t.length, i, a;
  58767. function o(c, f, d) {
  58768. var h = c.coord, p = (d - h) / (f.coord - h), v = wR(p, [c.color, f.color]);
  58769. return {
  58770. coord: d,
  58771. color: v
  58772. };
  58773. }
  58774. for (var s = 0; s < r; s++) {
  58775. var l = t[s], u = l.coord;
  58776. if (u < 0)
  58777. i = l;
  58778. else if (u > e) {
  58779. a ? n.push(o(a, l, e)) : i && n.push(o(i, l, 0), o(i, l, e));
  58780. break;
  58781. } else
  58782. i && (n.push(o(i, l, 0)), i = null), n.push(l), a = l;
  58783. }
  58784. return n;
  58785. }
  58786. function F3e(t, e, n) {
  58787. var r = t.getVisual("visualMeta");
  58788. if (!(!r || !r.length || !t.count())) {
  58789. if (e.type !== "cartesian2d") {
  58790. process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
  58791. return;
  58792. }
  58793. for (var i, a, o = r.length - 1; o >= 0; o--) {
  58794. var s = t.getDimensionInfo(r[o].dimension);
  58795. if (i = s && s.coordDim, i === "x" || i === "y") {
  58796. a = r[o];
  58797. break;
  58798. }
  58799. }
  58800. if (!a) {
  58801. process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
  58802. return;
  58803. }
  58804. var l = e.getAxis(i), u = ce(a.stops, function(b) {
  58805. return {
  58806. coord: l.toGlobalCoord(l.dataToCoord(b.value)),
  58807. color: b.color
  58808. };
  58809. }), c = u.length, f = a.outerColors.slice();
  58810. c && u[0].coord > u[c - 1].coord && (u.reverse(), f.reverse());
  58811. var d = V3e(u, i === "x" ? n.getWidth() : n.getHeight()), h = d.length;
  58812. if (!h && c)
  58813. return u[0].coord < 0 ? f[1] ? f[1] : u[c - 1].color : f[0] ? f[0] : u[0].color;
  58814. var p = 10, v = d[0].coord - p, g = d[h - 1].coord + p, m = g - v;
  58815. if (m < 1e-3)
  58816. return "transparent";
  58817. k(d, function(b) {
  58818. b.offset = (b.coord - v) / m;
  58819. }), d.push({
  58820. // NOTE: inRangeStopLen may still be 0 if stoplen is zero.
  58821. offset: h ? d[h - 1].offset : 0.5,
  58822. color: f[1] || "transparent"
  58823. }), d.unshift({
  58824. offset: h ? d[0].offset : 0.5,
  58825. color: f[0] || "transparent"
  58826. });
  58827. var y = new yp(0, 0, 0, 0, d, !0);
  58828. return y[i] = v, y[i + "2"] = g, y;
  58829. }
  58830. }
  58831. function W3e(t, e, n) {
  58832. var r = t.get("showAllSymbol"), i = r === "auto";
  58833. if (!(r && !i)) {
  58834. var a = n.getAxesByScale("ordinal")[0];
  58835. if (a && !(i && Q3e(a, e))) {
  58836. var o = e.mapDimension(a.dim), s = {};
  58837. return k(a.getViewLabels(), function(l) {
  58838. var u = a.scale.getRawOrdinalNumber(l.tickValue);
  58839. s[u] = 1;
  58840. }), function(l) {
  58841. return !s.hasOwnProperty(e.get(o, l));
  58842. };
  58843. }
  58844. }
  58845. }
  58846. function Q3e(t, e) {
  58847. var n = t.getExtent(), r = Math.abs(n[1] - n[0]) / t.scale.count();
  58848. isNaN(r) && (r = 0);
  58849. for (var i = e.count(), a = Math.max(1, Math.round(i / 5)), o = 0; o < i; o += a)
  58850. if (Z0.getSymbolSize(
  58851. e,
  58852. o
  58853. // Only for cartesian, where `isHorizontal` exists.
  58854. )[t.isHorizontal() ? 1 : 0] * 1.5 > r)
  58855. return !1;
  58856. return !0;
  58857. }
  58858. function H3e(t, e) {
  58859. return isNaN(t) || isNaN(e);
  58860. }
  58861. function G3e(t) {
  58862. for (var e = t.length / 2; e > 0 && H3e(t[e * 2 - 2], t[e * 2 - 1]); e--)
  58863. ;
  58864. return e - 1;
  58865. }
  58866. function NV(t, e) {
  58867. return [t[e * 2], t[e * 2 + 1]];
  58868. }
  58869. function j3e(t, e, n) {
  58870. for (var r = t.length / 2, i = n === "x" ? 0 : 1, a, o, s = 0, l = -1, u = 0; u < r; u++)
  58871. if (o = t[u * 2 + i], !(isNaN(o) || isNaN(t[u * 2 + 1 - i]))) {
  58872. if (u === 0) {
  58873. a = o;
  58874. continue;
  58875. }
  58876. if (a <= e && o >= e || a >= e && o <= e) {
  58877. l = u;
  58878. break;
  58879. }
  58880. s = u, a = o;
  58881. }
  58882. return {
  58883. range: [s, l],
  58884. t: (e - a) / (o - a)
  58885. };
  58886. }
  58887. function Hte(t) {
  58888. if (t.get(["endLabel", "show"]))
  58889. return !0;
  58890. for (var e = 0; e < ri.length; e++)
  58891. if (t.get([ri[e], "endLabel", "show"]))
  58892. return !0;
  58893. return !1;
  58894. }
  58895. function rP(t, e, n, r) {
  58896. if (Wf(e, "cartesian2d")) {
  58897. var i = r.getModel("endLabel"), a = i.get("valueAnimation"), o = r.getData(), s = {
  58898. lastFrameIndex: 0
  58899. }, l = Hte(r) ? function(h, p) {
  58900. t._endLabelOnDuring(h, p, o, s, a, i, e);
  58901. } : null, u = e.getBaseAxis().isHorizontal(), c = Wte(e, n, r, function() {
  58902. var h = t._endLabel;
  58903. h && n && s.originalX != null && h.attr({
  58904. x: s.originalX,
  58905. y: s.originalY
  58906. });
  58907. }, l);
  58908. if (!r.get("clip", !0)) {
  58909. var f = c.shape, d = Math.max(f.width, f.height);
  58910. u ? (f.y -= d, f.height += d * 2) : (f.x -= d, f.width += d * 2);
  58911. }
  58912. return l && l(1, c), c;
  58913. } else
  58914. return process.env.NODE_ENV !== "production" && r.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), Qte(e, n, r);
  58915. }
  58916. function Z3e(t, e) {
  58917. var n = e.getBaseAxis(), r = n.isHorizontal(), i = n.inverse, a = r ? i ? "right" : "left" : "center", o = r ? "middle" : i ? "top" : "bottom";
  58918. return {
  58919. normal: {
  58920. align: t.get("align") || a,
  58921. verticalAlign: t.get("verticalAlign") || o
  58922. }
  58923. };
  58924. }
  58925. var U3e = (
  58926. /** @class */
  58927. function(t) {
  58928. q(e, t);
  58929. function e() {
  58930. return t !== null && t.apply(this, arguments) || this;
  58931. }
  58932. return e.prototype.init = function() {
  58933. var n = new Ve(), r = new U0();
  58934. this.group.add(r.group), this._symbolDraw = r, this._lineGroup = n;
  58935. }, e.prototype.render = function(n, r, i) {
  58936. 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"), b = !c.isEmpty(), _ = c.get("origin"), O = Bte(o, l, _), S = b && z3e(o, l, O), x = n.get("showSymbol"), C = n.get("connectNulls"), T = x && !d && W3e(n, l, o), w = this._data;
  58937. w && w.eachItemGraphicEl(function(oe, K) {
  58938. oe.__temp && (s.remove(oe), w.setItemGraphicEl(K, null));
  58939. }), x || p.remove(), s.add(m);
  58940. var P = d ? !1 : n.get("step"), $;
  58941. o && o.getArea && n.get("clip", !0) && ($ = o.getArea(), $.width != null ? ($.x -= 0.1, $.y -= 0.1, $.width += 0.2, $.height += 0.2) : $.r0 && ($.r0 -= 0.5, $.r += 0.5)), this._clipShapeForSymbol = $;
  58942. var A = F3e(l, o, i) || l.getVisual("style")[l.getVisual("drawType")];
  58943. if (!(v && h.type === o.type && P === this._step))
  58944. x && p.updateData(l, {
  58945. isIgnore: T,
  58946. clipShape: $,
  58947. disableAnimation: !0,
  58948. getSymbolPoint: function(oe) {
  58949. return [f[oe * 2], f[oe * 2 + 1]];
  58950. }
  58951. }), y && this._initSymbolLabelAnimation(l, o, $), P && (f = bl(f, o, P, C), S && (S = bl(S, o, P, C))), v = this._newPolyline(f), b ? g = this._newPolygon(f, S) : g && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, Of(A)), m.setClipPath(rP(this, o, !0, n));
  58952. else {
  58953. b && !g ? g = this._newPolygon(f, S) : g && !b && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, Of(A));
  58954. var D = m.getClipPath();
  58955. if (D) {
  58956. var E = rP(this, o, !1, n);
  58957. Yt(D, {
  58958. shape: E.shape
  58959. }, n);
  58960. } else
  58961. m.setClipPath(rP(this, o, !0, n));
  58962. x && p.updateData(l, {
  58963. isIgnore: T,
  58964. clipShape: $,
  58965. disableAnimation: !0,
  58966. getSymbolPoint: function(oe) {
  58967. return [f[oe * 2], f[oe * 2 + 1]];
  58968. }
  58969. }), (!DV(this._stackedOnPoints, S) || !DV(this._points, f)) && (y ? this._doUpdateAnimation(l, S, o, i, P, _, C) : (P && (f = bl(f, o, P, C), S && (S = bl(S, o, P, C))), v.setShape({
  58970. points: f
  58971. }), g && g.setShape({
  58972. points: f,
  58973. stackedOnPoints: S
  58974. })));
  58975. }
  58976. var R = n.getModel("emphasis"), N = R.get("focus"), V = R.get("blurScope"), B = R.get("disabled");
  58977. if (v.useStyle(Re(
  58978. // Use color in lineStyle first
  58979. u.getLineStyle(),
  58980. {
  58981. fill: "none",
  58982. stroke: A,
  58983. lineJoin: "bevel"
  58984. }
  58985. )), Tr(v, n, "lineStyle"), v.style.lineWidth > 0 && n.get(["emphasis", "lineStyle", "width"]) === "bolder") {
  58986. var W = v.getState("emphasis").style;
  58987. W.lineWidth = +v.style.lineWidth + 1;
  58988. }
  58989. Fe(v).seriesIndex = n.seriesIndex, bn(v, N, V, B);
  58990. var F = LV(n.get("smooth")), Q = n.get("smoothMonotone");
  58991. if (v.setShape({
  58992. smooth: F,
  58993. smoothMonotone: Q,
  58994. connectNulls: C
  58995. }), g) {
  58996. var Z = l.getCalculationInfo("stackedOnSeries"), ne = 0;
  58997. g.useStyle(Re(c.getAreaStyle(), {
  58998. fill: A,
  58999. opacity: 0.7,
  59000. lineJoin: "bevel",
  59001. decal: l.getVisual("style").decal
  59002. })), Z && (ne = LV(Z.get("smooth"))), g.setShape({
  59003. smooth: F,
  59004. stackedOnSmooth: ne,
  59005. smoothMonotone: Q,
  59006. connectNulls: C
  59007. }), Tr(g, n, "areaStyle"), Fe(g).seriesIndex = n.seriesIndex, bn(g, N, V, B);
  59008. }
  59009. var ee = function(oe) {
  59010. a._changePolyState(oe);
  59011. };
  59012. l.eachItemGraphicEl(function(oe) {
  59013. oe && (oe.onHoverStateChange = ee);
  59014. }), this._polyline.onHoverStateChange = ee, this._data = l, this._coordSys = o, this._stackedOnPoints = S, this._points = f, this._step = P, this._valueOrigin = _, n.get("triggerLineEvent") && (this.packEventData(n, v), g && this.packEventData(n, g));
  59015. }, e.prototype.packEventData = function(n, r) {
  59016. Fe(r).eventData = {
  59017. componentType: "series",
  59018. componentSubType: "line",
  59019. componentIndex: n.componentIndex,
  59020. seriesIndex: n.seriesIndex,
  59021. seriesName: n.name,
  59022. seriesType: "line"
  59023. };
  59024. }, e.prototype.highlight = function(n, r, i, a) {
  59025. var o = n.getData(), s = yf(o, a);
  59026. if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) {
  59027. var l = o.getLayout("points"), u = o.getItemGraphicEl(s);
  59028. if (!u) {
  59029. var c = l[s * 2], f = l[s * 2 + 1];
  59030. if (isNaN(c) || isNaN(f) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(c, f))
  59031. return;
  59032. var d = n.get("zlevel") || 0, h = n.get("z") || 0;
  59033. u = new Z0(o, s), u.x = c, u.y = f, u.setZ(d, h);
  59034. var p = u.getSymbolPath().getTextContent();
  59035. 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);
  59036. }
  59037. u.highlight();
  59038. } else
  59039. zt.prototype.highlight.call(this, n, r, i, a);
  59040. }, e.prototype.downplay = function(n, r, i, a) {
  59041. var o = n.getData(), s = yf(o, a);
  59042. if (this._changePolyState("normal"), s != null && s >= 0) {
  59043. var l = o.getItemGraphicEl(s);
  59044. l && (l.__temp ? (o.setItemGraphicEl(s, null), this.group.remove(l)) : l.downplay());
  59045. } else
  59046. zt.prototype.downplay.call(this, n, r, i, a);
  59047. }, e.prototype._changePolyState = function(n) {
  59048. var r = this._polygon;
  59049. lO(this._polyline, n), r && lO(r, n);
  59050. }, e.prototype._newPolyline = function(n) {
  59051. var r = this._polyline;
  59052. return r && this._lineGroup.remove(r), r = new N3e({
  59053. shape: {
  59054. points: n
  59055. },
  59056. segmentIgnoreThreshold: 2,
  59057. z2: 10
  59058. }), this._lineGroup.add(r), this._polyline = r, r;
  59059. }, e.prototype._newPolygon = function(n, r) {
  59060. var i = this._polygon;
  59061. return i && this._lineGroup.remove(i), i = new Fte({
  59062. shape: {
  59063. points: n,
  59064. stackedOnPoints: r
  59065. },
  59066. segmentIgnoreThreshold: 2
  59067. }), this._lineGroup.add(i), this._polygon = i, i;
  59068. }, e.prototype._initSymbolLabelAnimation = function(n, r, i) {
  59069. var a, o, s = r.getBaseAxis(), l = s.inverse;
  59070. r.type === "cartesian2d" ? (a = s.isHorizontal(), o = !1) : r.type === "polar" && (a = s.dim === "angle", o = !0);
  59071. var u = n.hostModel, c = u.get("animationDuration");
  59072. Me(c) && (c = c(null));
  59073. var f = u.get("animationDelay") || 0, d = Me(f) ? f(null) : f;
  59074. n.eachItemGraphicEl(function(h, p) {
  59075. var v = h;
  59076. if (v) {
  59077. var g = [h.x, h.y], m = void 0, y = void 0, b = void 0;
  59078. if (i)
  59079. if (o) {
  59080. var _ = i, O = r.pointToCoord(g);
  59081. a ? (m = _.startAngle, y = _.endAngle, b = -O[1] / 180 * Math.PI) : (m = _.r0, y = _.r, b = O[0]);
  59082. } else {
  59083. var S = i;
  59084. a ? (m = S.x, y = S.x + S.width, b = h.x) : (m = S.y + S.height, y = S.y, b = h.y);
  59085. }
  59086. var x = y === m ? 0 : (b - m) / (y - m);
  59087. l && (x = 1 - x);
  59088. var C = Me(f) ? f(p) : c * x + d, T = v.getSymbolPath(), w = T.getTextContent();
  59089. v.attr({
  59090. scaleX: 0,
  59091. scaleY: 0
  59092. }), v.animateTo({
  59093. scaleX: 1,
  59094. scaleY: 1
  59095. }, {
  59096. duration: 200,
  59097. setToFinal: !0,
  59098. delay: C
  59099. }), w && w.animateFrom({
  59100. style: {
  59101. opacity: 0
  59102. }
  59103. }, {
  59104. duration: 300,
  59105. delay: C
  59106. }), T.disableLabelAnimation = !0;
  59107. }
  59108. });
  59109. }, e.prototype._initOrUpdateEndLabel = function(n, r, i) {
  59110. var a = n.getModel("endLabel");
  59111. if (Hte(n)) {
  59112. var o = n.getData(), s = this._polyline, l = o.getLayout("points");
  59113. if (!l) {
  59114. s.removeTextContent(), this._endLabel = null;
  59115. return;
  59116. }
  59117. var u = this._endLabel;
  59118. u || (u = this._endLabel = new gt({
  59119. z2: 200
  59120. // should be higher than item symbol
  59121. }), u.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0);
  59122. var c = G3e(l);
  59123. c >= 0 && (Pr(s, er(n, "endLabel"), {
  59124. inheritColor: i,
  59125. labelFetcher: n,
  59126. labelDataIndex: c,
  59127. defaultText: function(f, d, h) {
  59128. return h != null ? Nte(o, h) : Zh(o, f);
  59129. },
  59130. enableTextSetter: !0
  59131. }, Z3e(a, r)), s.textConfig.position = null);
  59132. } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null);
  59133. }, e.prototype._endLabelOnDuring = function(n, r, i, a, o, s, l) {
  59134. var u = this._endLabel, c = this._polyline;
  59135. if (u) {
  59136. n < 1 && a.originalX == null && (a.originalX = u.x, a.originalY = u.y);
  59137. 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, b = r.shape, _ = y ? m ? b.x : b.y + b.height : m ? b.x + b.width : b.y, O = (m ? v : 0) * (y ? -1 : 1), S = (m ? 0 : -v) * (y ? -1 : 1), x = m ? "x" : "y", C = j3e(f, _, x), T = C.range, w = T[1] - T[0], P = void 0;
  59138. if (w >= 1) {
  59139. if (w > 1 && !h) {
  59140. var $ = NV(f, T[0]);
  59141. u.attr({
  59142. x: $[0] + O,
  59143. y: $[1] + S
  59144. }), o && (P = d.getRawValue(T[0]));
  59145. } else {
  59146. var $ = c.getPointOn(_, x);
  59147. $ && u.attr({
  59148. x: $[0] + O,
  59149. y: $[1] + S
  59150. });
  59151. var A = d.getRawValue(T[0]), D = d.getRawValue(T[1]);
  59152. o && (P = mK(i, p, A, D, C.t));
  59153. }
  59154. a.lastFrameIndex = T[0];
  59155. } else {
  59156. var E = n === 1 || a.lastFrameIndex > 0 ? T[0] : 0, $ = NV(f, E);
  59157. o && (P = d.getRawValue(E)), u.attr({
  59158. x: $[0] + O,
  59159. y: $[1] + S
  59160. });
  59161. }
  59162. if (o) {
  59163. var R = Sp(u);
  59164. typeof R.setLabelText == "function" && R.setLabelText(P);
  59165. }
  59166. }
  59167. }, e.prototype._doUpdateAnimation = function(n, r, i, a, o, s, l) {
  59168. var u = this._polyline, c = this._polygon, f = n.hostModel, d = L3e(this._data, n, this._stackedOnPoints, r, this._coordSys, i, this._valueOrigin), h = d.current, p = d.stackedOnCurrent, v = d.next, g = d.stackedOnNext;
  59169. if (o && (h = bl(d.current, i, o, l), p = bl(d.stackedOnCurrent, i, o, l), v = bl(d.next, i, o, l), g = bl(d.stackedOnNext, i, o, l)), kV(h, v) > 3e3 || c && kV(p, g) > 3e3) {
  59170. u.stopAnimation(), u.setShape({
  59171. points: v
  59172. }), c && (c.stopAnimation(), c.setShape({
  59173. points: v,
  59174. stackedOnPoints: g
  59175. }));
  59176. return;
  59177. }
  59178. u.shape.__points = d.current, u.shape.points = h;
  59179. var m = {
  59180. shape: {
  59181. points: v
  59182. }
  59183. };
  59184. d.current !== h && (m.shape.__points = d.next), u.stopAnimation(), Ct(u, m, f), c && (c.setShape({
  59185. // Reuse the points with polyline.
  59186. points: h,
  59187. stackedOnPoints: p
  59188. }), c.stopAnimation(), Ct(c, {
  59189. shape: {
  59190. stackedOnPoints: g
  59191. }
  59192. }, f), u.shape.points !== c.shape.points && (c.shape.points = u.shape.points));
  59193. for (var y = [], b = d.status, _ = 0; _ < b.length; _++) {
  59194. var O = b[_].cmd;
  59195. if (O === "=") {
  59196. var S = n.getItemGraphicEl(b[_].idx1);
  59197. S && y.push({
  59198. el: S,
  59199. ptIdx: _
  59200. // Index of points
  59201. });
  59202. }
  59203. }
  59204. u.animators && u.animators.length && u.animators[0].during(function() {
  59205. c && c.dirtyShape();
  59206. for (var x = u.shape.__points, C = 0; C < y.length; C++) {
  59207. var T = y[C].el, w = y[C].ptIdx * 2;
  59208. T.x = x[w], T.y = x[w + 1], T.markRedraw();
  59209. }
  59210. });
  59211. }, e.prototype.remove = function(n) {
  59212. var r = this.group, i = this._data;
  59213. this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function(a, o) {
  59214. a.__temp && (r.remove(a), i.setItemGraphicEl(o, null));
  59215. }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
  59216. }, e.type = "line", e;
  59217. }(zt)
  59218. );
  59219. function Y0(t, e) {
  59220. return {
  59221. seriesType: t,
  59222. plan: Tp(),
  59223. reset: function(n) {
  59224. var r = n.getData(), i = n.coordinateSystem, a = n.pipelineContext, o = e || a.large;
  59225. if (i) {
  59226. var s = ce(i.dimensions, function(h) {
  59227. return r.mapDimension(h);
  59228. }).slice(0, 2), l = s.length, u = r.getCalculationInfo("stackResultDimension");
  59229. Ys(r, s[0]) && (s[0] = u), Ys(r, s[1]) && (s[1] = u);
  59230. var c = r.getStore(), f = r.getDimensionIndex(s[0]), d = r.getDimensionIndex(s[1]);
  59231. return l && {
  59232. progress: function(h, p) {
  59233. for (var v = h.end - h.start, g = o && Wo(v * l), m = [], y = [], b = h.start, _ = 0; b < h.end; b++) {
  59234. var O = void 0;
  59235. if (l === 1) {
  59236. var S = c.get(f, b);
  59237. O = i.dataToPoint(S, null, y);
  59238. } else
  59239. m[0] = c.get(f, b), m[1] = c.get(d, b), O = i.dataToPoint(m, null, y);
  59240. o ? (g[_++] = O[0], g[_++] = O[1]) : p.setItemLayout(b, O.slice());
  59241. }
  59242. o && p.setLayout("points", g);
  59243. }
  59244. };
  59245. }
  59246. }
  59247. };
  59248. }
  59249. var X3e = {
  59250. average: function(t) {
  59251. for (var e = 0, n = 0, r = 0; r < t.length; r++)
  59252. isNaN(t[r]) || (e += t[r], n++);
  59253. return n === 0 ? NaN : e / n;
  59254. },
  59255. sum: function(t) {
  59256. for (var e = 0, n = 0; n < t.length; n++)
  59257. e += t[n] || 0;
  59258. return e;
  59259. },
  59260. max: function(t) {
  59261. for (var e = -1 / 0, n = 0; n < t.length; n++)
  59262. t[n] > e && (e = t[n]);
  59263. return isFinite(e) ? e : NaN;
  59264. },
  59265. min: function(t) {
  59266. for (var e = 1 / 0, n = 0; n < t.length; n++)
  59267. t[n] < e && (e = t[n]);
  59268. return isFinite(e) ? e : NaN;
  59269. },
  59270. minmax: function(t) {
  59271. for (var e = -1 / 0, n = -1 / 0, r = 0; r < t.length; r++) {
  59272. var i = t[r], a = Math.abs(i);
  59273. a > e && (e = a, n = i);
  59274. }
  59275. return isFinite(n) ? n : NaN;
  59276. },
  59277. // TODO
  59278. // Median
  59279. nearest: function(t) {
  59280. return t[0];
  59281. }
  59282. }, Y3e = function(t) {
  59283. return Math.round(t.length / 2);
  59284. };
  59285. function Gte(t) {
  59286. return {
  59287. seriesType: t,
  59288. // FIXME:TS never used, so comment it
  59289. // modifyOutputEnd: true,
  59290. reset: function(e, n, r) {
  59291. var i = e.getData(), a = e.get("sampling"), o = e.coordinateSystem, s = i.count();
  59292. if (s > 10 && o.type === "cartesian2d" && a) {
  59293. 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);
  59294. if (isFinite(h) && h > 1) {
  59295. a === "lttb" && e.setData(i.lttbDownSample(i.mapDimension(u.dim), 1 / h));
  59296. var p = void 0;
  59297. Oe(a) ? p = X3e[a] : Me(a) && (p = a), p && e.setData(i.downSample(i.mapDimension(u.dim), 1 / h, p, Y3e));
  59298. }
  59299. }
  59300. }
  59301. };
  59302. }
  59303. function q3e(t) {
  59304. t.registerChartView(U3e), t.registerSeriesModel(I3e), t.registerLayout(Y0("line", !0)), t.registerVisual({
  59305. seriesType: "line",
  59306. reset: function(e) {
  59307. var n = e.getData(), r = e.getModel("lineStyle").getLineStyle();
  59308. r && !r.stroke && (r.stroke = n.getVisual("style").fill), n.setVisual("legendLineStyle", r);
  59309. }
  59310. }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, Gte("line"));
  59311. }
  59312. var Bm = (
  59313. /** @class */
  59314. function(t) {
  59315. q(e, t);
  59316. function e() {
  59317. var n = t !== null && t.apply(this, arguments) || this;
  59318. return n.type = e.type, n;
  59319. }
  59320. return e.prototype.getInitialData = function(n, r) {
  59321. return cs(null, this, {
  59322. useEncodeDefaulter: !0
  59323. });
  59324. }, e.prototype.getMarkerPosition = function(n, r, i) {
  59325. var a = this.coordinateSystem;
  59326. if (a && a.clampData) {
  59327. var o = a.clampData(n), s = a.dataToPoint(o);
  59328. if (i)
  59329. k(a.getAxes(), function(d, h) {
  59330. if (d.type === "category" && r != null) {
  59331. var p = d.getTicksCoords(), v = d.getTickModel().get("alignWithLabel"), g = o[h], m = r[h] === "x1" || r[h] === "y1";
  59332. if (m && !v && (g += 1), p.length < 2)
  59333. return;
  59334. if (p.length === 2) {
  59335. s[h] = d.toGlobalCoord(d.getExtent()[m ? 1 : 0]);
  59336. return;
  59337. }
  59338. for (var y = void 0, b = void 0, _ = 1, O = 0; O < p.length; O++) {
  59339. var S = p[O].coord, x = O === p.length - 1 ? p[O - 1].tickValue + _ : p[O].tickValue;
  59340. if (x === g) {
  59341. b = S;
  59342. break;
  59343. } else if (x < g)
  59344. y = S;
  59345. else if (y != null && x > g) {
  59346. b = (S + y) / 2;
  59347. break;
  59348. }
  59349. O === 1 && (_ = x - p[0].tickValue);
  59350. }
  59351. b == null && (y ? y && (b = p[p.length - 1].coord) : b = p[0].coord), s[h] = d.toGlobalCoord(b);
  59352. }
  59353. });
  59354. else {
  59355. var l = this.getData(), u = l.getLayout("offset"), c = l.getLayout("size"), f = a.getBaseAxis().isHorizontal() ? 0 : 1;
  59356. s[f] += u + c / 2;
  59357. }
  59358. return s;
  59359. }
  59360. return [NaN, NaN];
  59361. }, e.type = "series.__base_bar__", e.defaultOption = {
  59362. // zlevel: 0,
  59363. z: 2,
  59364. coordinateSystem: "cartesian2d",
  59365. legendHoverLink: !0,
  59366. // stack: null
  59367. // Cartesian coordinate system
  59368. // xAxisIndex: 0,
  59369. // yAxisIndex: 0,
  59370. barMinHeight: 0,
  59371. barMinAngle: 0,
  59372. // cursor: null,
  59373. large: !1,
  59374. largeThreshold: 400,
  59375. progressive: 3e3,
  59376. progressiveChunkMode: "mod"
  59377. }, e;
  59378. }(Ht)
  59379. );
  59380. Ht.registerClass(Bm);
  59381. var K3e = (
  59382. /** @class */
  59383. function(t) {
  59384. q(e, t);
  59385. function e() {
  59386. var n = t !== null && t.apply(this, arguments) || this;
  59387. return n.type = e.type, n;
  59388. }
  59389. return e.prototype.getInitialData = function() {
  59390. return cs(null, this, {
  59391. useEncodeDefaulter: !0,
  59392. createInvertedIndices: !!this.get("realtimeSort", !0) || null
  59393. });
  59394. }, e.prototype.getProgressive = function() {
  59395. return this.get("large") ? this.get("progressive") : !1;
  59396. }, e.prototype.getProgressiveThreshold = function() {
  59397. var n = this.get("progressiveThreshold"), r = this.get("largeThreshold");
  59398. return r > n && (n = r), n;
  59399. }, e.prototype.brushSelector = function(n, r, i) {
  59400. return i.rect(r.getItemLayout(n));
  59401. }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = Pu(Bm.defaultOption, {
  59402. // If clipped
  59403. // Only available on cartesian2d
  59404. clip: !0,
  59405. roundCap: !1,
  59406. showBackground: !1,
  59407. backgroundStyle: {
  59408. color: "rgba(180, 180, 180, 0.2)",
  59409. borderColor: null,
  59410. borderWidth: 0,
  59411. borderType: "solid",
  59412. borderRadius: 0,
  59413. shadowBlur: 0,
  59414. shadowColor: null,
  59415. shadowOffsetX: 0,
  59416. shadowOffsetY: 0,
  59417. opacity: 1
  59418. },
  59419. select: {
  59420. itemStyle: {
  59421. borderColor: "#212121"
  59422. }
  59423. },
  59424. realtimeSort: !1
  59425. }), e;
  59426. }(Bm)
  59427. ), J3e = (
  59428. /** @class */
  59429. /* @__PURE__ */ function() {
  59430. function t() {
  59431. this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  59432. }
  59433. return t;
  59434. }()
  59435. ), MO = (
  59436. /** @class */
  59437. function(t) {
  59438. q(e, t);
  59439. function e(n) {
  59440. var r = t.call(this, n) || this;
  59441. return r.type = "sausage", r;
  59442. }
  59443. return e.prototype.getDefaultShape = function() {
  59444. return new J3e();
  59445. }, e.prototype.buildPath = function(n, r) {
  59446. 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;
  59447. p || (c = f - (d ? h : -h));
  59448. var v = Math.cos(c), g = Math.sin(c), m = Math.cos(f), y = Math.sin(f);
  59449. 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);
  59450. }, e;
  59451. }(ot)
  59452. );
  59453. function e6e(t, e) {
  59454. e = e || {};
  59455. var n = e.isRoundCap;
  59456. return function(r, i, a) {
  59457. var o = i.position;
  59458. if (!o || o instanceof Array)
  59459. return aO(r, i, a);
  59460. 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, b = Math.cos, _ = Math.sin, O = c + d * b(v), S = f + d * _(v), x = "left", C = "top";
  59461. switch (s) {
  59462. case "startArc":
  59463. O = c + (h - l) * b(m), S = f + (h - l) * _(m), x = "center", C = "top";
  59464. break;
  59465. case "insideStartArc":
  59466. O = c + (h + l) * b(m), S = f + (h + l) * _(m), x = "center", C = "bottom";
  59467. break;
  59468. case "startAngle":
  59469. O = c + p * b(v) + Ob(v, l + y, !1), S = f + p * _(v) + Sb(v, l + y, !1), x = "right", C = "middle";
  59470. break;
  59471. case "insideStartAngle":
  59472. O = c + p * b(v) + Ob(v, -l + y, !1), S = f + p * _(v) + Sb(v, -l + y, !1), x = "left", C = "middle";
  59473. break;
  59474. case "middle":
  59475. O = c + p * b(m), S = f + p * _(m), x = "center", C = "middle";
  59476. break;
  59477. case "endArc":
  59478. O = c + (d + l) * b(m), S = f + (d + l) * _(m), x = "center", C = "bottom";
  59479. break;
  59480. case "insideEndArc":
  59481. O = c + (d - l) * b(m), S = f + (d - l) * _(m), x = "center", C = "top";
  59482. break;
  59483. case "endAngle":
  59484. O = c + p * b(g) + Ob(g, l + y, !0), S = f + p * _(g) + Sb(g, l + y, !0), x = "left", C = "middle";
  59485. break;
  59486. case "insideEndAngle":
  59487. O = c + p * b(g) + Ob(g, -l + y, !0), S = f + p * _(g) + Sb(g, -l + y, !0), x = "right", C = "middle";
  59488. break;
  59489. default:
  59490. return aO(r, i, a);
  59491. }
  59492. return r = r || {}, r.x = O, r.y = S, r.align = x, r.verticalAlign = C, r;
  59493. };
  59494. }
  59495. function t6e(t, e, n, r) {
  59496. if (St(r)) {
  59497. t.setTextConfig({
  59498. rotation: r
  59499. });
  59500. return;
  59501. } else if (ue(e)) {
  59502. t.setTextConfig({
  59503. rotation: 0
  59504. });
  59505. return;
  59506. }
  59507. 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);
  59508. switch (u) {
  59509. case "startArc":
  59510. case "insideStartArc":
  59511. case "middle":
  59512. case "insideEndArc":
  59513. case "endArc":
  59514. l = s;
  59515. break;
  59516. case "startAngle":
  59517. case "insideStartAngle":
  59518. l = a;
  59519. break;
  59520. case "endAngle":
  59521. case "insideEndAngle":
  59522. l = o;
  59523. break;
  59524. default:
  59525. t.setTextConfig({
  59526. rotation: 0
  59527. });
  59528. return;
  59529. }
  59530. var c = Math.PI * 1.5 - l;
  59531. u === "middle" && c > Math.PI / 2 && c < Math.PI * 1.5 && (c -= Math.PI), t.setTextConfig({
  59532. rotation: c
  59533. });
  59534. }
  59535. function Ob(t, e, n) {
  59536. return e * Math.sin(t) * (n ? -1 : 1);
  59537. }
  59538. function Sb(t, e, n) {
  59539. return e * Math.cos(t) * (n ? 1 : -1);
  59540. }
  59541. function Fc(t, e, n) {
  59542. var r = t.get("borderRadius");
  59543. if (r == null)
  59544. return n ? {
  59545. cornerRadius: 0
  59546. } : null;
  59547. ue(r) || (r = [r, r, r, r]);
  59548. var i = Math.abs(e.r || 0 - e.r0 || 0);
  59549. return {
  59550. cornerRadius: ce(r, function(a) {
  59551. return lo(a, i);
  59552. })
  59553. };
  59554. }
  59555. var iP = Math.max, aP = Math.min;
  59556. function n6e(t, e) {
  59557. var n = t.getArea && t.getArea();
  59558. if (Wf(t, "cartesian2d")) {
  59559. var r = t.getBaseAxis();
  59560. if (r.type !== "category" || !r.onBand) {
  59561. var i = e.getLayout("bandWidth");
  59562. r.isHorizontal() ? (n.x -= i, n.width += i * 2) : (n.y -= i, n.height += i * 2);
  59563. }
  59564. }
  59565. return n;
  59566. }
  59567. var r6e = (
  59568. /** @class */
  59569. function(t) {
  59570. q(e, t);
  59571. function e() {
  59572. var n = t.call(this) || this;
  59573. return n.type = e.type, n._isFirstFrame = !0, n;
  59574. }
  59575. return e.prototype.render = function(n, r, i, a) {
  59576. this._model = n, this._removeOnRenderedListener(i), this._updateDrawMode(n);
  59577. var o = n.get("coordinateSystem");
  59578. 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" && dn("Only cartesian2d and polar supported for bar.");
  59579. }, e.prototype.incrementalPrepareRender = function(n) {
  59580. this._clear(), this._updateDrawMode(n), this._updateLargeClip(n);
  59581. }, e.prototype.incrementalRender = function(n, r) {
  59582. this._progressiveEls = [], this._incrementalRenderLarge(n, r);
  59583. }, e.prototype.eachRendered = function(n) {
  59584. Tu(this._progressiveEls || this.group, n);
  59585. }, e.prototype._updateDrawMode = function(n) {
  59586. var r = n.pipelineContext.large;
  59587. (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
  59588. }, e.prototype._renderNormal = function(n, r, i, a) {
  59589. var o = this.group, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.getBaseAxis(), f;
  59590. u.type === "cartesian2d" ? f = c.isHorizontal() : u.type === "polar" && (f = c.dim === "angle");
  59591. var d = n.isAnimationEnabled() ? n : null, h = i6e(n, u);
  59592. h && this._enableRealtimeSort(h, s, i);
  59593. var p = n.get("clip", !0) || h, v = n6e(u, s);
  59594. o.removeClipPath();
  59595. var g = n.get("roundCap", !0), m = n.get("showBackground", !0), y = n.getModel("backgroundStyle"), b = y.get("borderRadius") || 0, _ = [], O = this._backgroundEls, S = a && a.isInitSort, x = a && a.type === "changeAxisOrder";
  59596. function C(P) {
  59597. var $ = xb[u.type](s, P), A = f6e(u, f, $);
  59598. return A.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? A.setShape("r", b) : A.setShape("cornerRadius", b), _[P] = A, A;
  59599. }
  59600. s.diff(l).add(function(P) {
  59601. var $ = s.getItemModel(P), A = xb[u.type](s, P, $);
  59602. if (m && C(P), !(!s.hasValue(P) || !WV[u.type](A))) {
  59603. var D = !1;
  59604. p && (D = BV[u.type](v, A));
  59605. var E = zV[u.type](n, s, P, A, f, d, c.model, !1, g);
  59606. h && (E.forceLabelAnimation = !0), QV(E, s, P, $, A, n, f, u.type === "polar"), S ? E.attr({
  59607. shape: A
  59608. }) : h ? VV(h, d, E, A, P, f, !1, !1) : Yt(E, {
  59609. shape: A
  59610. }, n, P), s.setItemGraphicEl(P, E), o.add(E), E.ignore = D;
  59611. }
  59612. }).update(function(P, $) {
  59613. var A = s.getItemModel(P), D = xb[u.type](s, P, A);
  59614. if (m) {
  59615. var E = void 0;
  59616. O.length === 0 ? E = C($) : (E = O[$], E.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? E.setShape("r", b) : E.setShape("cornerRadius", b), _[P] = E);
  59617. var R = xb[u.type](s, P), N = Zte(f, R, u);
  59618. Ct(E, {
  59619. shape: N
  59620. }, d, P);
  59621. }
  59622. var V = l.getItemGraphicEl($);
  59623. if (!s.hasValue(P) || !WV[u.type](D)) {
  59624. o.remove(V);
  59625. return;
  59626. }
  59627. var B = !1;
  59628. if (p && (B = BV[u.type](v, D), B && o.remove(V)), V ? uo(V) : V = zV[u.type](n, s, P, D, f, d, c.model, !!V, g), h && (V.forceLabelAnimation = !0), x) {
  59629. var W = V.getTextContent();
  59630. if (W) {
  59631. var F = Sp(W);
  59632. F.prevValue != null && (F.prevValue = F.value);
  59633. }
  59634. } else
  59635. QV(V, s, P, A, D, n, f, u.type === "polar");
  59636. S ? V.attr({
  59637. shape: D
  59638. }) : h ? VV(h, d, V, D, P, f, !0, x) : Ct(V, {
  59639. shape: D
  59640. }, n, P, null), s.setItemGraphicEl(P, V), V.ignore = B, o.add(V);
  59641. }).remove(function(P) {
  59642. var $ = l.getItemGraphicEl(P);
  59643. $ && $m($, n, P);
  59644. }).execute();
  59645. var T = this._backgroundGroup || (this._backgroundGroup = new Ve());
  59646. T.removeAll();
  59647. for (var w = 0; w < _.length; ++w)
  59648. T.add(_[w]);
  59649. o.add(T), this._backgroundEls = _, this._data = s;
  59650. }, e.prototype._renderLarge = function(n, r, i) {
  59651. this._clear(), GV(n, this.group), this._updateLargeClip(n);
  59652. }, e.prototype._incrementalRenderLarge = function(n, r) {
  59653. this._removeBackground(), GV(r, this.group, this._progressiveEls, !0);
  59654. }, e.prototype._updateLargeClip = function(n) {
  59655. var r = n.get("clip", !0) && X0(n.coordinateSystem, !1, n), i = this.group;
  59656. r ? i.setClipPath(r) : i.removeClipPath();
  59657. }, e.prototype._enableRealtimeSort = function(n, r, i) {
  59658. var a = this;
  59659. if (r.count()) {
  59660. var o = n.baseAxis;
  59661. if (this._isFirstFrame)
  59662. this._dispatchInitSort(r, n, i), this._isFirstFrame = !1;
  59663. else {
  59664. var s = function(l) {
  59665. var u = r.getItemGraphicEl(l), c = u && u.shape;
  59666. return c && // The result should be consistent with the initial sort by data value.
  59667. // Do not support the case that both positive and negative exist.
  59668. Math.abs(o.isHorizontal() ? c.height : c.width) || 0;
  59669. };
  59670. this._onRendered = function() {
  59671. a._updateSortWithinSameData(r, s, o, i);
  59672. }, i.getZr().on("rendered", this._onRendered);
  59673. }
  59674. }
  59675. }, e.prototype._dataSort = function(n, r, i) {
  59676. var a = [];
  59677. return n.each(n.mapDimension(r.dim), function(o, s) {
  59678. var l = i(s);
  59679. l = l ?? NaN, a.push({
  59680. dataIndex: s,
  59681. mappedValue: l,
  59682. ordinalNumber: o
  59683. });
  59684. }), a.sort(function(o, s) {
  59685. return s.mappedValue - o.mappedValue;
  59686. }), {
  59687. ordinalNumbers: ce(a, function(o) {
  59688. return o.ordinalNumber;
  59689. })
  59690. };
  59691. }, e.prototype._isOrderChangedWithinSameData = function(n, r, i) {
  59692. for (var a = i.scale, o = n.mapDimension(i.dim), s = Number.MAX_VALUE, l = 0, u = a.getOrdinalMeta().categories.length; l < u; ++l) {
  59693. var c = n.rawIndexOf(o, a.getRawOrdinalNumber(l)), f = c < 0 ? Number.MIN_VALUE : r(n.indexOfRawIndex(c));
  59694. if (f > s)
  59695. return !0;
  59696. s = f;
  59697. }
  59698. return !1;
  59699. }, e.prototype._isOrderDifferentInView = function(n, r) {
  59700. 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)
  59701. if (n.ordinalNumbers[o] !== i.getRawOrdinalNumber(o))
  59702. return !0;
  59703. }, e.prototype._updateSortWithinSameData = function(n, r, i, a) {
  59704. if (this._isOrderChangedWithinSameData(n, r, i)) {
  59705. var o = this._dataSort(n, i, r);
  59706. this._isOrderDifferentInView(o, i) && (this._removeOnRenderedListener(a), a.dispatchAction({
  59707. type: "changeAxisOrder",
  59708. componentType: i.dim + "Axis",
  59709. axisId: i.index,
  59710. sortInfo: o
  59711. }));
  59712. }
  59713. }, e.prototype._dispatchInitSort = function(n, r, i) {
  59714. var a = r.baseAxis, o = this._dataSort(n, a, function(s) {
  59715. return n.get(n.mapDimension(r.otherAxis.dim), s);
  59716. });
  59717. i.dispatchAction({
  59718. type: "changeAxisOrder",
  59719. componentType: a.dim + "Axis",
  59720. isInitSort: !0,
  59721. axisId: a.index,
  59722. sortInfo: o
  59723. });
  59724. }, e.prototype.remove = function(n, r) {
  59725. this._clear(this._model), this._removeOnRenderedListener(r);
  59726. }, e.prototype.dispose = function(n, r) {
  59727. this._removeOnRenderedListener(r);
  59728. }, e.prototype._removeOnRenderedListener = function(n) {
  59729. this._onRendered && (n.getZr().off("rendered", this._onRendered), this._onRendered = null);
  59730. }, e.prototype._clear = function(n) {
  59731. var r = this.group, i = this._data;
  59732. n && n.isAnimationEnabled() && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function(a) {
  59733. $m(a, n, Fe(a).dataIndex);
  59734. })) : r.removeAll(), this._data = null, this._isFirstFrame = !0;
  59735. }, e.prototype._removeBackground = function() {
  59736. this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
  59737. }, e.type = "bar", e;
  59738. }(zt)
  59739. ), BV = {
  59740. cartesian2d: function(t, e) {
  59741. var n = e.width < 0 ? -1 : 1, r = e.height < 0 ? -1 : 1;
  59742. n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height);
  59743. var i = t.x + t.width, a = t.y + t.height, o = iP(e.x, t.x), s = aP(e.x + e.width, i), l = iP(e.y, t.y), u = aP(e.y + e.height, a), c = s < o, f = u < l;
  59744. 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;
  59745. },
  59746. polar: function(t, e) {
  59747. var n = e.r0 <= e.r ? 1 : -1;
  59748. if (n < 0) {
  59749. var r = e.r;
  59750. e.r = e.r0, e.r0 = r;
  59751. }
  59752. var i = aP(e.r, t.r), a = iP(e.r0, t.r0);
  59753. e.r = i, e.r0 = a;
  59754. var o = i - a < 0;
  59755. if (n < 0) {
  59756. var r = e.r;
  59757. e.r = e.r0, e.r0 = r;
  59758. }
  59759. return o;
  59760. }
  59761. }, zV = {
  59762. cartesian2d: function(t, e, n, r, i, a, o, s, l) {
  59763. var u = new mt({
  59764. shape: le({}, r),
  59765. z2: 1
  59766. });
  59767. if (u.__dataIndex = n, u.name = "item", a) {
  59768. var c = u.shape, f = i ? "height" : "width";
  59769. c[f] = 0;
  59770. }
  59771. return u;
  59772. },
  59773. polar: function(t, e, n, r, i, a, o, s, l) {
  59774. var u = !i && l ? MO : ii, c = new u({
  59775. shape: r,
  59776. z2: 1
  59777. });
  59778. c.name = "item";
  59779. var f = jte(i);
  59780. if (c.calculateTextPosition = e6e(f, {
  59781. isRoundCap: u === MO
  59782. }), a) {
  59783. var d = c.shape, h = i ? "r" : "endAngle", p = {};
  59784. d[h] = i ? r.r0 : r.startAngle, p[h] = r[h], (s ? Ct : Yt)(c, {
  59785. shape: p
  59786. // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue
  59787. }, a);
  59788. }
  59789. return c;
  59790. }
  59791. };
  59792. function i6e(t, e) {
  59793. var n = t.get("realtimeSort", !0), r = e.getBaseAxis();
  59794. if (process.env.NODE_ENV !== "production" && n && (r.type !== "category" && dn("`realtimeSort` will not work because this bar series is not based on a category axis."), e.type !== "cartesian2d" && dn("`realtimeSort` will not work because this bar series is not on cartesian2d.")), n && r.type === "category" && e.type === "cartesian2d")
  59795. return {
  59796. baseAxis: r,
  59797. otherAxis: e.getOtherAxis(r)
  59798. };
  59799. }
  59800. function VV(t, e, n, r, i, a, o, s) {
  59801. var l, u;
  59802. a ? (u = {
  59803. x: r.x,
  59804. width: r.width
  59805. }, l = {
  59806. y: r.y,
  59807. height: r.height
  59808. }) : (u = {
  59809. y: r.y,
  59810. height: r.height
  59811. }, l = {
  59812. x: r.x,
  59813. width: r.width
  59814. }), s || (o ? Ct : Yt)(n, {
  59815. shape: l
  59816. }, e, i, null);
  59817. var c = e ? t.baseAxis.model : null;
  59818. (o ? Ct : Yt)(n, {
  59819. shape: u
  59820. }, c, i);
  59821. }
  59822. function FV(t, e) {
  59823. for (var n = 0; n < e.length; n++)
  59824. if (!isFinite(t[e[n]]))
  59825. return !0;
  59826. return !1;
  59827. }
  59828. var a6e = ["x", "y", "width", "height"], o6e = ["cx", "cy", "r", "startAngle", "endAngle"], WV = {
  59829. cartesian2d: function(t) {
  59830. return !FV(t, a6e);
  59831. },
  59832. polar: function(t) {
  59833. return !FV(t, o6e);
  59834. }
  59835. }, xb = {
  59836. // itemModel is only used to get borderWidth, which is not needed
  59837. // when calculating bar background layout.
  59838. cartesian2d: function(t, e, n) {
  59839. var r = t.getItemLayout(e), i = n ? l6e(n, r) : 0, a = r.width > 0 ? 1 : -1, o = r.height > 0 ? 1 : -1;
  59840. return {
  59841. x: r.x + a * i / 2,
  59842. y: r.y + o * i / 2,
  59843. width: r.width - a * i,
  59844. height: r.height - o * i
  59845. };
  59846. },
  59847. polar: function(t, e, n) {
  59848. var r = t.getItemLayout(e);
  59849. return {
  59850. cx: r.cx,
  59851. cy: r.cy,
  59852. r0: r.r0,
  59853. r: r.r,
  59854. startAngle: r.startAngle,
  59855. endAngle: r.endAngle,
  59856. clockwise: r.clockwise
  59857. };
  59858. }
  59859. };
  59860. function s6e(t) {
  59861. return t.startAngle != null && t.endAngle != null && t.startAngle === t.endAngle;
  59862. }
  59863. function jte(t) {
  59864. return /* @__PURE__ */ function(e) {
  59865. var n = e ? "Arc" : "Angle";
  59866. return function(r) {
  59867. switch (r) {
  59868. case "start":
  59869. case "insideStart":
  59870. case "end":
  59871. case "insideEnd":
  59872. return r + n;
  59873. default:
  59874. return r;
  59875. }
  59876. };
  59877. }(t);
  59878. }
  59879. function QV(t, e, n, r, i, a, o, s) {
  59880. var l = e.getItemVisual(n, "style");
  59881. if (s) {
  59882. if (!a.get("roundCap")) {
  59883. var c = t.shape, f = Fc(r.getModel("itemStyle"), c, !0);
  59884. le(c, f), t.setShape(c);
  59885. }
  59886. } else {
  59887. var u = r.get(["itemStyle", "borderRadius"]) || 0;
  59888. t.setShape("r", u);
  59889. }
  59890. t.useStyle(l);
  59891. var d = r.getShallow("cursor");
  59892. d && t.attr("cursor", d);
  59893. 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 = er(r);
  59894. Pr(t, p, {
  59895. labelFetcher: a,
  59896. labelDataIndex: n,
  59897. defaultText: Zh(a.getData(), n),
  59898. inheritColor: l.fill,
  59899. defaultOpacity: l.opacity,
  59900. defaultOutsidePosition: h
  59901. });
  59902. var v = t.getTextContent();
  59903. if (s && v) {
  59904. var g = r.get(["label", "position"]);
  59905. t.textConfig.inside = g === "middle" ? !0 : null, t6e(t, g === "outside" ? h : g, jte(o), r.get(["label", "rotate"]));
  59906. }
  59907. hJ(v, p, a.getRawValue(n), function(y) {
  59908. return Nte(e, y);
  59909. });
  59910. var m = r.getModel(["emphasis"]);
  59911. bn(t, m.get("focus"), m.get("blurScope"), m.get("disabled")), Tr(t, r), s6e(i) && (t.style.fill = "none", t.style.stroke = "none", k(t.states, function(y) {
  59912. y.style && (y.style.fill = y.style.stroke = "none");
  59913. }));
  59914. }
  59915. function l6e(t, e) {
  59916. var n = t.get(["itemStyle", "borderColor"]);
  59917. if (!n || n === "none")
  59918. return 0;
  59919. 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);
  59920. return Math.min(r, i, a);
  59921. }
  59922. var u6e = (
  59923. /** @class */
  59924. /* @__PURE__ */ function() {
  59925. function t() {
  59926. }
  59927. return t;
  59928. }()
  59929. ), HV = (
  59930. /** @class */
  59931. function(t) {
  59932. q(e, t);
  59933. function e(n) {
  59934. var r = t.call(this, n) || this;
  59935. return r.type = "largeBar", r;
  59936. }
  59937. return e.prototype.getDefaultShape = function() {
  59938. return new u6e();
  59939. }, e.prototype.buildPath = function(n, r) {
  59940. for (var i = r.points, a = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], l = [], u = this.barWidth, c = 0; c < i.length; c += 3)
  59941. 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]);
  59942. }, e;
  59943. }(ot)
  59944. );
  59945. function GV(t, e, n, r) {
  59946. 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");
  59947. if (u) {
  59948. var c = new HV({
  59949. shape: {
  59950. points: u
  59951. },
  59952. incremental: !!r,
  59953. silent: !0,
  59954. z2: 0
  59955. });
  59956. c.baseDimIdx = a, c.largeDataIndices = o, c.barWidth = s, c.useStyle(l.getItemStyle()), e.add(c), n && n.push(c);
  59957. }
  59958. var f = new HV({
  59959. shape: {
  59960. points: i.getLayout("largePoints")
  59961. },
  59962. incremental: !!r,
  59963. ignoreCoarsePointer: !0,
  59964. z2: 1
  59965. });
  59966. f.baseDimIdx = a, f.largeDataIndices = o, f.barWidth = s, e.add(f), f.useStyle(i.getVisual("style")), Fe(f).seriesIndex = t.seriesIndex, t.get("silent") || (f.on("mousedown", jV), f.on("mousemove", jV)), n && n.push(f);
  59967. }
  59968. var jV = cw(function(t) {
  59969. var e = this, n = c6e(e, t.offsetX, t.offsetY);
  59970. Fe(e).dataIndex = n >= 0 ? n : null;
  59971. }, 30, !1);
  59972. function c6e(t, e, n) {
  59973. 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++) {
  59974. var d = c * 3;
  59975. 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])
  59976. return o[c];
  59977. }
  59978. return -1;
  59979. }
  59980. function Zte(t, e, n) {
  59981. if (Wf(n, "cartesian2d")) {
  59982. var r = e, i = n.getArea();
  59983. return {
  59984. x: t ? r.x : i.x,
  59985. y: t ? i.y : r.y,
  59986. width: t ? r.width : i.width,
  59987. height: t ? i.height : r.height
  59988. };
  59989. } else {
  59990. var i = n.getArea(), a = e;
  59991. return {
  59992. cx: i.cx,
  59993. cy: i.cy,
  59994. r0: t ? i.r0 : a.r0,
  59995. r: t ? i.r : a.r,
  59996. startAngle: t ? a.startAngle : 0,
  59997. endAngle: t ? a.endAngle : Math.PI * 2
  59998. };
  59999. }
  60000. }
  60001. function f6e(t, e, n) {
  60002. var r = t.type === "polar" ? ii : mt;
  60003. return new r({
  60004. shape: Zte(e, n, t),
  60005. silent: !0,
  60006. z2: 0
  60007. });
  60008. }
  60009. function d6e(t) {
  60010. t.registerChartView(r6e), t.registerSeriesModel(K3e), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, Ue(Kee, "bar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Jee("bar")), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, Gte("bar")), t.registerAction({
  60011. type: "changeAxisOrder",
  60012. event: "changeAxisOrder",
  60013. update: "update"
  60014. }, function(e, n) {
  60015. var r = e.componentType || "series";
  60016. n.eachComponent({
  60017. mainType: r,
  60018. query: e
  60019. }, function(i) {
  60020. e.sortInfo && i.axis.setCategorySortInfo(e.sortInfo);
  60021. });
  60022. });
  60023. }
  60024. var ZV = Math.PI * 2, wb = Math.PI / 180;
  60025. function Ute(t, e) {
  60026. return Rn(t.getBoxLayoutParams(), {
  60027. width: e.getWidth(),
  60028. height: e.getHeight()
  60029. });
  60030. }
  60031. function Xte(t, e) {
  60032. var n = Ute(t, e), r = t.get("center"), i = t.get("radius");
  60033. ue(i) || (i = [0, i]);
  60034. var a = _e(n.width, e.getWidth()), o = _e(n.height, e.getHeight()), s = Math.min(a, o), l = _e(i[0], s / 2), u = _e(i[1], s / 2), c, f, d = t.coordinateSystem;
  60035. if (d) {
  60036. var h = d.dataToPoint(r);
  60037. c = h[0] || 0, f = h[1] || 0;
  60038. } else
  60039. ue(r) || (r = [r, r]), c = _e(r[0], a) + n.x, f = _e(r[1], o) + n.y;
  60040. return {
  60041. cx: c,
  60042. cy: f,
  60043. r0: l,
  60044. r: u
  60045. };
  60046. }
  60047. function h6e(t, e, n) {
  60048. e.eachSeriesByType(t, function(r) {
  60049. var i = r.getData(), a = i.mapDimension("value"), o = Ute(r, n), s = Xte(r, n), l = s.cx, u = s.cy, c = s.r, f = s.r0, d = -r.get("startAngle") * wb, h = r.get("endAngle"), p = r.get("padAngle") * wb;
  60050. h = h === "auto" ? d - ZV : -h * wb;
  60051. var v = r.get("minAngle") * wb, g = v + p, m = 0;
  60052. i.each(a, function(N) {
  60053. !isNaN(N) && m++;
  60054. });
  60055. var y = i.getSum(a), b = Math.PI / (y || m) * 2, _ = r.get("clockwise"), O = r.get("roseType"), S = r.get("stillShowZeroSum"), x = i.getDataExtent(a);
  60056. x[0] = 0;
  60057. var C = _ ? 1 : -1, T = [d, h], w = C * p / 2;
  60058. RR(T, !_), d = T[0], h = T[1];
  60059. var P = Yte(r);
  60060. P.startAngle = d, P.endAngle = h, P.clockwise = _;
  60061. var $ = Math.abs(h - d), A = $, D = 0, E = d;
  60062. if (i.setLayout({
  60063. viewRect: o,
  60064. r: c
  60065. }), i.each(a, function(N, V) {
  60066. var B;
  60067. if (isNaN(N)) {
  60068. i.setItemLayout(V, {
  60069. angle: NaN,
  60070. startAngle: NaN,
  60071. endAngle: NaN,
  60072. clockwise: _,
  60073. cx: l,
  60074. cy: u,
  60075. r0: f,
  60076. r: O ? NaN : c
  60077. });
  60078. return;
  60079. }
  60080. O !== "area" ? B = y === 0 && S ? b : N * b : B = $ / m, B < g ? (B = g, A -= g) : D += N;
  60081. var W = E + C * B, F = 0, Q = 0;
  60082. p > B ? (F = E + C * B / 2, Q = F) : (F = E + w, Q = W - w), i.setItemLayout(V, {
  60083. angle: B,
  60084. startAngle: F,
  60085. endAngle: Q,
  60086. clockwise: _,
  60087. cx: l,
  60088. cy: u,
  60089. r0: f,
  60090. r: O ? Lt(N, x, [f, c]) : c
  60091. }), E = W;
  60092. }), A < ZV && m)
  60093. if (A <= 1e-3) {
  60094. var R = $ / m;
  60095. i.each(a, function(N, V) {
  60096. if (!isNaN(N)) {
  60097. var B = i.getItemLayout(V);
  60098. B.angle = R;
  60099. var W = 0, F = 0;
  60100. R < p ? (W = d + C * (V + 1 / 2) * R, F = W) : (W = d + C * V * R + w, F = d + C * (V + 1) * R - w), B.startAngle = W, B.endAngle = F;
  60101. }
  60102. });
  60103. } else
  60104. b = A / D, E = d, i.each(a, function(N, V) {
  60105. if (!isNaN(N)) {
  60106. var B = i.getItemLayout(V), W = B.angle === g ? g : N * b, F = 0, Q = 0;
  60107. W < p ? (F = E + C * W / 2, Q = F) : (F = E + w, Q = E + C * W - w), B.startAngle = F, B.endAngle = Q, E += C * W;
  60108. }
  60109. });
  60110. });
  60111. }
  60112. var Yte = bt();
  60113. function q0(t) {
  60114. return {
  60115. seriesType: t,
  60116. reset: function(e, n) {
  60117. var r = n.findComponents({
  60118. mainType: "legend"
  60119. });
  60120. if (!(!r || !r.length)) {
  60121. var i = e.getData();
  60122. i.filterSelf(function(a) {
  60123. for (var o = i.getName(a), s = 0; s < r.length; s++)
  60124. if (!r[s].isSelected(o))
  60125. return !1;
  60126. return !0;
  60127. });
  60128. }
  60129. }
  60130. };
  60131. }
  60132. var p6e = Math.PI / 180;
  60133. function UV(t, e, n, r, i, a, o, s, l, u) {
  60134. if (t.length < 2)
  60135. return;
  60136. function c(v) {
  60137. for (var g = v.rB, m = g * g, y = 0; y < v.list.length; y++) {
  60138. var b = v.list[y], _ = Math.abs(b.label.y - n), O = r + b.len, S = O * O, x = Math.sqrt((1 - Math.abs(_ * _ / m)) * S), C = e + (x + b.len2) * i, T = C - b.label.x, w = b.targetTextWidth - T * i;
  60139. qte(b, w, !0), b.label.x = C;
  60140. }
  60141. }
  60142. function f(v) {
  60143. for (var g = {
  60144. list: [],
  60145. maxY: 0
  60146. }, m = {
  60147. list: [],
  60148. maxY: 0
  60149. }, y = 0; y < v.length; y++)
  60150. if (v[y].labelAlignTo === "none") {
  60151. var b = v[y], _ = b.label.y > n ? m : g, O = Math.abs(b.label.y - n);
  60152. if (O >= _.maxY) {
  60153. var S = b.label.x - e - b.len2 * i, x = r + b.len, C = Math.abs(S) < x ? Math.sqrt(O * O / (1 - S * S / x / x)) : x;
  60154. _.rB = C, _.maxY = O;
  60155. }
  60156. _.list.push(b);
  60157. }
  60158. c(g), c(m);
  60159. }
  60160. for (var d = t.length, h = 0; h < d; h++)
  60161. if (t[h].position === "outer" && t[h].labelAlignTo === "labelLine") {
  60162. var p = t[h].label.x - u;
  60163. t[h].linePoints[1][0] += p, t[h].label.x = u;
  60164. }
  60165. _te(t, l, l + o) && f(t);
  60166. }
  60167. function v6e(t, e, n, r, i, a, o, s) {
  60168. for (var l = [], u = [], c = Number.MAX_VALUE, f = -Number.MAX_VALUE, d = 0; d < t.length; d++) {
  60169. var h = t[d].label;
  60170. oP(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])));
  60171. }
  60172. for (var d = 0; d < t.length; d++) {
  60173. var p = t[d];
  60174. if (!oP(p) && p.linePoints) {
  60175. if (p.labelStyleWidth != null)
  60176. continue;
  60177. var h = p.label, v = p.linePoints, g = void 0;
  60178. 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, qte(p, g);
  60179. }
  60180. }
  60181. UV(u, e, n, r, 1, i, a, o, s, f), UV(l, e, n, r, -1, i, a, o, s, c);
  60182. for (var d = 0; d < t.length; d++) {
  60183. var p = t[d];
  60184. if (!oP(p) && p.linePoints) {
  60185. var h = p.label, v = p.linePoints, m = p.labelAlignTo === "edge", y = h.style.padding, b = y ? y[1] + y[3] : 0, _ = h.style.backgroundColor ? 0 : b, O = p.rect.width + _, S = v[1][0] - v[2][0];
  60186. m ? h.x < e ? v[2][0] = o + p.edgeDistance + O + p.labelDistance : v[2][0] = o + i - p.edgeDistance - O - 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] + S), v[1][1] = v[2][1] = h.y;
  60187. }
  60188. }
  60189. }
  60190. function qte(t, e, n) {
  60191. if (n === void 0 && (n = !1), t.labelStyleWidth == null) {
  60192. 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);
  60193. if (e < c || n) {
  60194. var f = a.height;
  60195. if (u && u.match("break")) {
  60196. r.setStyle("backgroundColor", null), r.setStyle("width", e - l);
  60197. var d = r.getBoundingRect();
  60198. r.setStyle("width", Math.ceil(d.width)), r.setStyle("backgroundColor", o);
  60199. } else {
  60200. var h = e - l, p = e < c ? h : (
  60201. // Current available width is enough, but the text may have
  60202. // already been wrapped with a smaller available width.
  60203. n ? h > t.unconstrainedWidth ? null : h : null
  60204. );
  60205. r.setStyle("width", p);
  60206. }
  60207. var v = r.getBoundingRect();
  60208. a.width = v.width;
  60209. var g = (r.style.margin || 0) + 2.1;
  60210. a.height = v.height + g, a.y -= (a.height - f) / 2;
  60211. }
  60212. }
  60213. }
  60214. function oP(t) {
  60215. return t.position === "center";
  60216. }
  60217. function g6e(t) {
  60218. var e = t.getData(), n = [], r, i, a = !1, o = (t.get("minShowLabelAngle") || 0) * p6e, s = e.getLayout("viewRect"), l = e.getLayout("r"), u = s.width, c = s.x, f = s.y, d = s.height;
  60219. function h(S) {
  60220. S.ignore = !0;
  60221. }
  60222. function p(S) {
  60223. if (!S.ignore)
  60224. return !0;
  60225. for (var x in S.states)
  60226. if (S.states[x].ignore === !1)
  60227. return !0;
  60228. return !1;
  60229. }
  60230. e.each(function(S) {
  60231. var x = e.getItemGraphicEl(S), C = x.shape, T = x.getTextContent(), w = x.getTextGuideLine(), P = e.getItemModel(S), $ = P.getModel("label"), A = $.get("position") || P.get(["emphasis", "label", "position"]), D = $.get("distanceToLabelLine"), E = $.get("alignTo"), R = _e($.get("edgeDistance"), u), N = $.get("bleedMargin"), V = P.getModel("labelLine"), B = V.get("length");
  60232. B = _e(B, u);
  60233. var W = V.get("length2");
  60234. if (W = _e(W, u), Math.abs(C.endAngle - C.startAngle) < o) {
  60235. k(T.states, h), T.ignore = !0, w && (k(w.states, h), w.ignore = !0);
  60236. return;
  60237. }
  60238. if (p(T)) {
  60239. var F = (C.startAngle + C.endAngle) / 2, Q = Math.cos(F), Z = Math.sin(F), ne, ee, oe, K;
  60240. r = C.cx, i = C.cy;
  60241. var ie = A === "inside" || A === "inner";
  60242. if (A === "center")
  60243. ne = C.cx, ee = C.cy, K = "center";
  60244. else {
  60245. var X = (ie ? (C.r + C.r0) / 2 * Q : C.r * Q) + r, H = (ie ? (C.r + C.r0) / 2 * Z : C.r * Z) + i;
  60246. if (ne = X + Q * 3, ee = H + Z * 3, !ie) {
  60247. var G = X + Q * (B + l - C.r), re = H + Z * (B + l - C.r), fe = G + (Q < 0 ? -1 : 1) * W, de = re;
  60248. E === "edge" ? ne = Q < 0 ? c + R : c + u - R : ne = fe + (Q < 0 ? -D : D), ee = de, oe = [[X, H], [G, re], [fe, de]];
  60249. }
  60250. K = ie ? "center" : E === "edge" ? Q > 0 ? "right" : "left" : Q > 0 ? "left" : "right";
  60251. }
  60252. var Ee = Math.PI, $e = 0, Se = $.get("rotate");
  60253. if (St(Se))
  60254. $e = Se * (Ee / 180);
  60255. else if (A === "center")
  60256. $e = 0;
  60257. else if (Se === "radial" || Se === !0) {
  60258. var be = Q < 0 ? -F + Ee : -F;
  60259. $e = be;
  60260. } else if (Se === "tangential" && A !== "outside" && A !== "outer") {
  60261. var he = Math.atan2(Q, Z);
  60262. he < 0 && (he = Ee * 2 + he);
  60263. var Te = Z > 0;
  60264. Te && (he = Ee + he), $e = he - Ee;
  60265. }
  60266. if (a = !!$e, T.x = ne, T.y = ee, T.rotation = $e, T.setStyle({
  60267. verticalAlign: "middle"
  60268. }), ie) {
  60269. T.setStyle({
  60270. align: K
  60271. });
  60272. var ct = T.states.select;
  60273. ct && (ct.x += T.x, ct.y += T.y);
  60274. } else {
  60275. var ze = T.getBoundingRect().clone();
  60276. ze.applyTransform(T.getComputedTransform());
  60277. var ut = (T.style.margin || 0) + 2.1;
  60278. ze.y -= ut / 2, ze.height += ut, n.push({
  60279. label: T,
  60280. labelLine: w,
  60281. position: A,
  60282. len: B,
  60283. len2: W,
  60284. minTurnAngle: V.get("minTurnAngle"),
  60285. maxSurfaceAngle: V.get("maxSurfaceAngle"),
  60286. surfaceNormal: new Ke(Q, Z),
  60287. linePoints: oe,
  60288. textAlign: K,
  60289. labelDistance: D,
  60290. labelAlignTo: E,
  60291. edgeDistance: R,
  60292. bleedMargin: N,
  60293. rect: ze,
  60294. unconstrainedWidth: ze.width,
  60295. labelStyleWidth: T.style.width
  60296. });
  60297. }
  60298. x.setTextConfig({
  60299. inside: ie
  60300. });
  60301. }
  60302. }), !a && t.get("avoidLabelOverlap") && v6e(n, r, i, l, u, d, c, f);
  60303. for (var v = 0; v < n.length; v++) {
  60304. var g = n[v], m = g.label, y = g.labelLine, b = isNaN(m.x) || isNaN(m.y);
  60305. if (m) {
  60306. m.setStyle({
  60307. align: g.textAlign
  60308. }), b && (k(m.states, h), m.ignore = !0);
  60309. var _ = m.states.select;
  60310. _ && (_.x += m.x, _.y += m.y);
  60311. }
  60312. if (y) {
  60313. var O = g.linePoints;
  60314. b || !O ? (k(y.states, h), y.ignore = !0) : (mte(O, g.minTurnAngle), z5e(O, g.surfaceNormal, g.maxSurfaceAngle), y.setShape({
  60315. points: O
  60316. }), m.__hostTarget.textGuideLineConfig = {
  60317. anchor: new Ke(O[0][0], O[0][1])
  60318. });
  60319. }
  60320. }
  60321. }
  60322. var m6e = (
  60323. /** @class */
  60324. function(t) {
  60325. q(e, t);
  60326. function e(n, r, i) {
  60327. var a = t.call(this) || this;
  60328. a.z2 = 2;
  60329. var o = new gt();
  60330. return a.setTextContent(o), a.updateData(n, r, i, !0), a;
  60331. }
  60332. return e.prototype.updateData = function(n, r, i, a) {
  60333. var o = this, s = n.hostModel, l = n.getItemModel(r), u = l.getModel("emphasis"), c = n.getItemLayout(r), f = le(Fc(l.getModel("itemStyle"), c, !0), c);
  60334. if (isNaN(f.startAngle)) {
  60335. o.setShape(f);
  60336. return;
  60337. }
  60338. if (a) {
  60339. o.setShape(f);
  60340. var d = s.getShallow("animationType");
  60341. s.ecModel.ssr ? (Yt(o, {
  60342. scaleX: 0,
  60343. scaleY: 0
  60344. }, s, {
  60345. dataIndex: r,
  60346. isFrom: !0
  60347. }), o.originX = f.cx, o.originY = f.cy) : d === "scale" ? (o.shape.r = c.r0, Yt(o, {
  60348. shape: {
  60349. r: c.r
  60350. }
  60351. }, s, r)) : i != null ? (o.setShape({
  60352. startAngle: i,
  60353. endAngle: i
  60354. }), Yt(o, {
  60355. shape: {
  60356. startAngle: c.startAngle,
  60357. endAngle: c.endAngle
  60358. }
  60359. }, s, r)) : (o.shape.endAngle = c.startAngle, Ct(o, {
  60360. shape: {
  60361. endAngle: c.endAngle
  60362. }
  60363. }, s, r));
  60364. } else
  60365. uo(o), Ct(o, {
  60366. shape: f
  60367. }, s, r);
  60368. o.useStyle(n.getItemVisual(r, "style")), Tr(o, l);
  60369. 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");
  60370. m && o.attr("cursor", m), this._updateLabel(s, n, r), o.ensureState("emphasis").shape = le({
  60371. r: c.r + (u.get("scale") && u.get("scaleSize") || 0)
  60372. }, Fc(u.getModel("itemStyle"), c)), le(o.ensureState("select"), {
  60373. x: v,
  60374. y: g,
  60375. shape: Fc(l.getModel(["select", "itemStyle"]), c)
  60376. }), le(o.ensureState("blur"), {
  60377. shape: Fc(l.getModel(["blur", "itemStyle"]), c)
  60378. });
  60379. var y = o.getTextGuideLine(), b = o.getTextContent();
  60380. y && le(y.ensureState("select"), {
  60381. x: v,
  60382. y: g
  60383. }), le(b.ensureState("select"), {
  60384. x: v,
  60385. y: g
  60386. }), bn(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
  60387. }, e.prototype._updateLabel = function(n, r, i) {
  60388. var a = this, o = r.getItemModel(i), s = o.getModel("labelLine"), l = r.getItemVisual(i, "style"), u = l && l.fill, c = l && l.opacity;
  60389. Pr(a, er(o), {
  60390. labelFetcher: r.hostModel,
  60391. labelDataIndex: i,
  60392. inheritColor: u,
  60393. defaultOpacity: c,
  60394. defaultText: n.getFormattedLabel(i, "normal") || r.getName(i)
  60395. });
  60396. var f = a.getTextContent();
  60397. a.setTextConfig({
  60398. // reset position, rotation
  60399. position: null,
  60400. rotation: null
  60401. }), f.attr({
  60402. z2: 10
  60403. });
  60404. var d = n.get(["label", "position"]);
  60405. if (d !== "outside" && d !== "outer")
  60406. a.removeTextGuideLine();
  60407. else {
  60408. var h = this.getTextGuideLine();
  60409. h || (h = new oi(), this.setTextGuideLine(h)), Ek(this, Mk(o), {
  60410. stroke: u,
  60411. opacity: Ui(s.get(["lineStyle", "opacity"]), c, 1)
  60412. });
  60413. }
  60414. }, e;
  60415. }(ii)
  60416. ), y6e = (
  60417. /** @class */
  60418. function(t) {
  60419. q(e, t);
  60420. function e() {
  60421. var n = t !== null && t.apply(this, arguments) || this;
  60422. return n.ignoreLabelLineUpdate = !0, n;
  60423. }
  60424. return e.prototype.render = function(n, r, i, a) {
  60425. var o = n.getData(), s = this._data, l = this.group, u;
  60426. if (!s && o.count() > 0) {
  60427. for (var c = o.getItemLayout(0), f = 1; isNaN(c && c.startAngle) && f < o.count(); ++f)
  60428. c = o.getItemLayout(f);
  60429. c && (u = c.startAngle);
  60430. }
  60431. if (this._emptyCircleSector && l.remove(this._emptyCircleSector), o.count() === 0 && n.get("showEmptyCircle")) {
  60432. var d = Yte(n), h = new ii({
  60433. shape: le(Xte(n, i), d)
  60434. });
  60435. h.useStyle(n.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, l.add(h);
  60436. }
  60437. o.diff(s).add(function(p) {
  60438. var v = new m6e(o, p, u);
  60439. o.setItemGraphicEl(p, v), l.add(v);
  60440. }).update(function(p, v) {
  60441. var g = s.getItemGraphicEl(v);
  60442. g.updateData(o, p, u), g.off("click"), l.add(g), o.setItemGraphicEl(p, g);
  60443. }).remove(function(p) {
  60444. var v = s.getItemGraphicEl(p);
  60445. $m(v, n, p);
  60446. }).execute(), g6e(n), n.get("animationTypeUpdate") !== "expansion" && (this._data = o);
  60447. }, e.prototype.dispose = function() {
  60448. }, e.prototype.containPoint = function(n, r) {
  60449. var i = r.getData(), a = i.getItemLayout(0);
  60450. if (a) {
  60451. var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
  60452. return l <= a.r && l >= a.r0;
  60453. }
  60454. }, e.type = "pie", e;
  60455. }(zt)
  60456. );
  60457. function Ip(t, e, n) {
  60458. e = ue(e) && {
  60459. coordDimensions: e
  60460. } || le({
  60461. encodeDefine: t.getEncode()
  60462. }, e);
  60463. var r = t.getSource(), i = Ap(r, e).dimensions, a = new Nr(i, t);
  60464. return a.initData(r, n), a;
  60465. }
  60466. var K0 = (
  60467. /** @class */
  60468. function() {
  60469. function t(e, n) {
  60470. this._getDataWithEncodedVisual = e, this._getRawData = n;
  60471. }
  60472. return t.prototype.getAllNames = function() {
  60473. var e = this._getRawData();
  60474. return e.mapArray(e.getName);
  60475. }, t.prototype.containName = function(e) {
  60476. var n = this._getRawData();
  60477. return n.indexOfName(e) >= 0;
  60478. }, t.prototype.indexOfName = function(e) {
  60479. var n = this._getDataWithEncodedVisual();
  60480. return n.indexOfName(e);
  60481. }, t.prototype.getItemVisual = function(e, n) {
  60482. var r = this._getDataWithEncodedVisual();
  60483. return r.getItemVisual(e, n);
  60484. }, t;
  60485. }()
  60486. ), b6e = bt(), _6e = (
  60487. /** @class */
  60488. function(t) {
  60489. q(e, t);
  60490. function e() {
  60491. return t !== null && t.apply(this, arguments) || this;
  60492. }
  60493. return e.prototype.init = function(n) {
  60494. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new K0(xe(this.getData, this), xe(this.getRawData, this)), this._defaultLabelLine(n);
  60495. }, e.prototype.mergeOption = function() {
  60496. t.prototype.mergeOption.apply(this, arguments);
  60497. }, e.prototype.getInitialData = function() {
  60498. return Ip(this, {
  60499. coordDimensions: ["value"],
  60500. encodeDefaulter: Ue(rk, this)
  60501. });
  60502. }, e.prototype.getDataParams = function(n) {
  60503. var r = this.getData(), i = b6e(r), a = i.seats;
  60504. if (!a) {
  60505. var o = [];
  60506. r.each(r.mapDimension("value"), function(l) {
  60507. o.push(l);
  60508. }), a = i.seats = lK(o, r.hostModel.get("percentPrecision"));
  60509. }
  60510. var s = t.prototype.getDataParams.call(this, n);
  60511. return s.percent = a[n] || 0, s.$vars.push("percent"), s;
  60512. }, e.prototype._defaultLabelLine = function(n) {
  60513. mf(n, "labelLine", ["show"]);
  60514. var r = n.labelLine, i = n.emphasis.labelLine;
  60515. r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
  60516. }, e.type = "series.pie", e.defaultOption = {
  60517. // zlevel: 0,
  60518. z: 2,
  60519. legendHoverLink: !0,
  60520. colorBy: "data",
  60521. // 默认全局居中
  60522. center: ["50%", "50%"],
  60523. radius: [0, "75%"],
  60524. // 默认顺时针
  60525. clockwise: !0,
  60526. startAngle: 90,
  60527. endAngle: "auto",
  60528. padAngle: 0,
  60529. // 最小角度改为0
  60530. minAngle: 0,
  60531. // If the angle of a sector less than `minShowLabelAngle`,
  60532. // the label will not be displayed.
  60533. minShowLabelAngle: 0,
  60534. // 选中时扇区偏移量
  60535. selectedOffset: 10,
  60536. // 选择模式,默认关闭,可选single,multiple
  60537. // selectedMode: false,
  60538. // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)
  60539. // roseType: null,
  60540. percentPrecision: 2,
  60541. // If still show when all data zero.
  60542. stillShowZeroSum: !0,
  60543. // cursor: null,
  60544. left: 0,
  60545. top: 0,
  60546. right: 0,
  60547. bottom: 0,
  60548. width: null,
  60549. height: null,
  60550. label: {
  60551. // color: 'inherit',
  60552. // If rotate around circle
  60553. rotate: 0,
  60554. show: !0,
  60555. overflow: "truncate",
  60556. // 'outer', 'inside', 'center'
  60557. position: "outer",
  60558. // 'none', 'labelLine', 'edge'. Works only when position is 'outer'
  60559. alignTo: "none",
  60560. // Closest distance between label and chart edge.
  60561. // Works only position is 'outer' and alignTo is 'edge'.
  60562. edgeDistance: "25%",
  60563. // Works only position is 'outer' and alignTo is not 'edge'.
  60564. bleedMargin: 10,
  60565. // Distance between text and label line.
  60566. distanceToLabelLine: 5
  60567. // formatter: 标签文本格式器,同 tooltip.formatter,不支持异步回调
  60568. // 默认使用全局文本样式,详见 textStyle
  60569. // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数
  60570. },
  60571. // Enabled when label.normal.position is 'outer'
  60572. labelLine: {
  60573. show: !0,
  60574. // 引导线两段中的第一段长度
  60575. length: 15,
  60576. // 引导线两段中的第二段长度
  60577. length2: 15,
  60578. smooth: !1,
  60579. minTurnAngle: 90,
  60580. maxSurfaceAngle: 90,
  60581. lineStyle: {
  60582. // color: 各异,
  60583. width: 1,
  60584. type: "solid"
  60585. }
  60586. },
  60587. itemStyle: {
  60588. borderWidth: 1,
  60589. borderJoin: "round"
  60590. },
  60591. showEmptyCircle: !0,
  60592. emptyCircleStyle: {
  60593. color: "lightgray",
  60594. opacity: 1
  60595. },
  60596. labelLayout: {
  60597. // Hide the overlapped label.
  60598. hideOverlap: !0
  60599. },
  60600. emphasis: {
  60601. scale: !0,
  60602. scaleSize: 5
  60603. },
  60604. // If use strategy to avoid label overlapping
  60605. avoidLabelOverlap: !0,
  60606. // Animation type. Valid values: expansion, scale
  60607. animationType: "expansion",
  60608. animationDuration: 1e3,
  60609. // Animation type when update. Valid values: transition, expansion
  60610. animationTypeUpdate: "transition",
  60611. animationEasingUpdate: "cubicInOut",
  60612. animationDurationUpdate: 500,
  60613. animationEasing: "cubicInOut"
  60614. }, e;
  60615. }(Ht)
  60616. );
  60617. function O6e(t) {
  60618. return {
  60619. seriesType: t,
  60620. reset: function(e, n) {
  60621. var r = e.getData();
  60622. r.filterSelf(function(i) {
  60623. var a = r.mapDimension("value"), o = r.get(a, i);
  60624. return !(St(o) && !isNaN(o) && o < 0);
  60625. });
  60626. }
  60627. };
  60628. }
  60629. function S6e(t) {
  60630. t.registerChartView(y6e), t.registerSeriesModel(_6e), vee("pie", t.registerAction), t.registerLayout(Ue(h6e, "pie")), t.registerProcessor(q0("pie")), t.registerProcessor(O6e("pie"));
  60631. }
  60632. var x6e = (
  60633. /** @class */
  60634. function(t) {
  60635. q(e, t);
  60636. function e() {
  60637. var n = t !== null && t.apply(this, arguments) || this;
  60638. return n.type = e.type, n.hasSymbolVisual = !0, n;
  60639. }
  60640. return e.prototype.getInitialData = function(n, r) {
  60641. return cs(null, this, {
  60642. useEncodeDefaulter: !0
  60643. });
  60644. }, e.prototype.getProgressive = function() {
  60645. var n = this.option.progressive;
  60646. return n ?? (this.option.large ? 5e3 : this.get("progressive"));
  60647. }, e.prototype.getProgressiveThreshold = function() {
  60648. var n = this.option.progressiveThreshold;
  60649. return n ?? (this.option.large ? 1e4 : this.get("progressiveThreshold"));
  60650. }, e.prototype.brushSelector = function(n, r, i) {
  60651. return i.point(r.getItemLayout(n));
  60652. }, e.prototype.getZLevelKey = function() {
  60653. return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
  60654. }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  60655. coordinateSystem: "cartesian2d",
  60656. // zlevel: 0,
  60657. z: 2,
  60658. legendHoverLink: !0,
  60659. symbolSize: 10,
  60660. // symbolRotate: null, // 图形旋转控制
  60661. large: !1,
  60662. // Available when large is true
  60663. largeThreshold: 2e3,
  60664. // cursor: null,
  60665. itemStyle: {
  60666. opacity: 0.8
  60667. // color: 各异
  60668. },
  60669. emphasis: {
  60670. scale: !0
  60671. },
  60672. // If clip the overflow graphics
  60673. // Works on cartesian / polar series
  60674. clip: !0,
  60675. select: {
  60676. itemStyle: {
  60677. borderColor: "#212121"
  60678. }
  60679. },
  60680. universalTransition: {
  60681. divideShape: "clone"
  60682. }
  60683. // progressive: null
  60684. }, e;
  60685. }(Ht)
  60686. ), Kte = 4, w6e = (
  60687. /** @class */
  60688. /* @__PURE__ */ function() {
  60689. function t() {
  60690. }
  60691. return t;
  60692. }()
  60693. ), C6e = (
  60694. /** @class */
  60695. function(t) {
  60696. q(e, t);
  60697. function e(n) {
  60698. var r = t.call(this, n) || this;
  60699. return r._off = 0, r.hoverDataIdx = -1, r;
  60700. }
  60701. return e.prototype.getDefaultShape = function() {
  60702. return new w6e();
  60703. }, e.prototype.reset = function() {
  60704. this.notClear = !1, this._off = 0;
  60705. }, e.prototype.buildPath = function(n, r) {
  60706. var i = r.points, a = r.size, o = this.symbolProxy, s = o.shape, l = n.getContext ? n.getContext() : n, u = l && a[0] < Kte, c = this.softClipShape, f;
  60707. if (u) {
  60708. this._ctx = l;
  60709. return;
  60710. }
  60711. for (this._ctx = null, f = this._off; f < i.length; ) {
  60712. var d = i[f++], h = i[f++];
  60713. 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));
  60714. }
  60715. this.incremental && (this._off = f, this.notClear = !0);
  60716. }, e.prototype.afterBrush = function() {
  60717. var n = this.shape, r = n.points, i = n.size, a = this._ctx, o = this.softClipShape, s;
  60718. if (a) {
  60719. for (s = this._off; s < r.length; ) {
  60720. var l = r[s++], u = r[s++];
  60721. isNaN(l) || isNaN(u) || o && !o.contain(l, u) || a.fillRect(l - i[0] / 2, u - i[1] / 2, i[0], i[1]);
  60722. }
  60723. this.incremental && (this._off = s, this.notClear = !0);
  60724. }
  60725. }, e.prototype.findDataIndex = function(n, r) {
  60726. 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--) {
  60727. var c = u * 2, f = a[c] - s / 2, d = a[c + 1] - l / 2;
  60728. if (n >= f && r >= d && n <= f + s && r <= d + l)
  60729. return u;
  60730. }
  60731. return -1;
  60732. }, e.prototype.contain = function(n, r) {
  60733. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  60734. if (n = i[0], r = i[1], a.contain(n, r)) {
  60735. var o = this.hoverDataIdx = this.findDataIndex(n, r);
  60736. return o >= 0;
  60737. }
  60738. return this.hoverDataIdx = -1, !1;
  60739. }, e.prototype.getBoundingRect = function() {
  60740. var n = this._rect;
  60741. if (!n) {
  60742. 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; ) {
  60743. var h = i[d++], p = i[d++];
  60744. l = Math.min(h, l), c = Math.max(h, c), u = Math.min(p, u), f = Math.max(p, f);
  60745. }
  60746. n = this._rect = new Je(l - o / 2, u - s / 2, c - l + o, f - u + s);
  60747. }
  60748. return n;
  60749. }, e;
  60750. }(ot)
  60751. ), T6e = (
  60752. /** @class */
  60753. function() {
  60754. function t() {
  60755. this.group = new Ve();
  60756. }
  60757. return t.prototype.updateData = function(e, n) {
  60758. this._clear();
  60759. var r = this._create();
  60760. r.setShape({
  60761. points: e.getLayout("points")
  60762. }), this._setCommon(r, e, n);
  60763. }, t.prototype.updateLayout = function(e) {
  60764. var n = e.getLayout("points");
  60765. this.group.eachChild(function(r) {
  60766. if (r.startIndex != null) {
  60767. var i = (r.endIndex - r.startIndex) * 2, a = r.startIndex * 4 * 2;
  60768. n = new Float32Array(n.buffer, a, i);
  60769. }
  60770. r.setShape("points", n), r.reset();
  60771. });
  60772. }, t.prototype.incrementalPrepareUpdate = function(e) {
  60773. this._clear();
  60774. }, t.prototype.incrementalUpdate = function(e, n, r) {
  60775. var i = this._newAdded[0], a = n.getLayout("points"), o = i && i.shape.points;
  60776. if (o && o.length < 2e4) {
  60777. var s = o.length, l = new Float32Array(s + a.length);
  60778. l.set(o), l.set(a, s), i.endIndex = e.end, i.setShape({
  60779. points: l
  60780. });
  60781. } else {
  60782. this._newAdded = [];
  60783. var u = this._create();
  60784. u.startIndex = e.start, u.endIndex = e.end, u.incremental = !0, u.setShape({
  60785. points: a
  60786. }), this._setCommon(u, n, r);
  60787. }
  60788. }, t.prototype.eachRendered = function(e) {
  60789. this._newAdded[0] && e(this._newAdded[0]);
  60790. }, t.prototype._create = function() {
  60791. var e = new C6e({
  60792. cursor: "default"
  60793. });
  60794. return e.ignoreCoarsePointer = !0, this.group.add(e), this._newAdded.push(e), e;
  60795. }, t.prototype._setCommon = function(e, n, r) {
  60796. var i = n.hostModel;
  60797. r = r || {};
  60798. var a = n.getVisual("symbolSize");
  60799. e.setShape("size", a instanceof Array ? a : [a, a]), e.softClipShape = r.clipShape || null, e.symbolProxy = $n(n.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
  60800. var o = e.shape.size[0] < Kte;
  60801. e.useStyle(
  60802. // Draw shadow when doing fillRect is extremely slow.
  60803. i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"])
  60804. );
  60805. var s = n.getVisual("style"), l = s && s.fill;
  60806. l && e.setColor(l);
  60807. var u = Fe(e);
  60808. u.seriesIndex = i.seriesIndex, e.on("mousemove", function(c) {
  60809. u.dataIndex = null;
  60810. var f = e.hoverDataIdx;
  60811. f >= 0 && (u.dataIndex = f + (e.startIndex || 0));
  60812. });
  60813. }, t.prototype.remove = function() {
  60814. this._clear();
  60815. }, t.prototype._clear = function() {
  60816. this._newAdded = [], this.group.removeAll();
  60817. }, t;
  60818. }()
  60819. ), P6e = (
  60820. /** @class */
  60821. function(t) {
  60822. q(e, t);
  60823. function e() {
  60824. var n = t !== null && t.apply(this, arguments) || this;
  60825. return n.type = e.type, n;
  60826. }
  60827. return e.prototype.render = function(n, r, i) {
  60828. var a = n.getData(), o = this._updateSymbolDraw(a, n);
  60829. o.updateData(a, {
  60830. // TODO
  60831. // If this parameter should be a shape or a bounding volume
  60832. // shape will be more general.
  60833. // But bounding volume like bounding rect will be much faster in the contain calculation
  60834. clipShape: this._getClipShape(n)
  60835. }), this._finished = !0;
  60836. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  60837. var a = n.getData(), o = this._updateSymbolDraw(a, n);
  60838. o.incrementalPrepareUpdate(a), this._finished = !1;
  60839. }, e.prototype.incrementalRender = function(n, r, i) {
  60840. this._symbolDraw.incrementalUpdate(n, r.getData(), {
  60841. clipShape: this._getClipShape(r)
  60842. }), this._finished = n.end === r.getData().count();
  60843. }, e.prototype.updateTransform = function(n, r, i) {
  60844. var a = n.getData();
  60845. if (this.group.dirty(), !this._finished || a.count() > 1e4)
  60846. return {
  60847. update: !0
  60848. };
  60849. var o = Y0("").reset(n, r, i);
  60850. o.progress && o.progress({
  60851. start: 0,
  60852. end: a.count(),
  60853. count: a.count()
  60854. }, a), this._symbolDraw.updateLayout(a);
  60855. }, e.prototype.eachRendered = function(n) {
  60856. this._symbolDraw && this._symbolDraw.eachRendered(n);
  60857. }, e.prototype._getClipShape = function(n) {
  60858. if (n.get("clip", !0)) {
  60859. var r = n.coordinateSystem;
  60860. return r && r.getArea && r.getArea(0.1);
  60861. }
  60862. }, e.prototype._updateSymbolDraw = function(n, r) {
  60863. var i = this._symbolDraw, a = r.pipelineContext, o = a.large;
  60864. return (!i || o !== this._isLargeDraw) && (i && i.remove(), i = this._symbolDraw = o ? new T6e() : new U0(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(i.group), i;
  60865. }, e.prototype.remove = function(n, r) {
  60866. this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null;
  60867. }, e.prototype.dispose = function() {
  60868. }, e.type = "scatter", e;
  60869. }(zt)
  60870. ), $6e = (
  60871. /** @class */
  60872. function(t) {
  60873. q(e, t);
  60874. function e() {
  60875. return t !== null && t.apply(this, arguments) || this;
  60876. }
  60877. return e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
  60878. show: !1,
  60879. // zlevel: 0,
  60880. z: 0,
  60881. left: "10%",
  60882. top: 60,
  60883. right: "10%",
  60884. bottom: 70,
  60885. // If grid size contain label
  60886. containLabel: !1,
  60887. // width: {totalWidth} - left - right,
  60888. // height: {totalHeight} - top - bottom,
  60889. backgroundColor: "rgba(0,0,0,0)",
  60890. borderWidth: 1,
  60891. borderColor: "#ccc"
  60892. }, e;
  60893. }(rt)
  60894. ), cE = (
  60895. /** @class */
  60896. function(t) {
  60897. q(e, t);
  60898. function e() {
  60899. return t !== null && t.apply(this, arguments) || this;
  60900. }
  60901. return e.prototype.getCoordSysModel = function() {
  60902. return this.getReferringComponents("grid", Dn).models[0];
  60903. }, e.type = "cartesian2dAxis", e;
  60904. }(rt)
  60905. );
  60906. xn(cE, Mp);
  60907. var Jte = {
  60908. show: !0,
  60909. // zlevel: 0,
  60910. z: 0,
  60911. // Inverse the axis.
  60912. inverse: !1,
  60913. // Axis name displayed.
  60914. name: "",
  60915. // 'start' | 'middle' | 'end'
  60916. nameLocation: "end",
  60917. // By degree. By default auto rotate by nameLocation.
  60918. nameRotate: null,
  60919. nameTruncate: {
  60920. maxWidth: null,
  60921. ellipsis: "...",
  60922. placeholder: "."
  60923. },
  60924. // Use global text style by default.
  60925. nameTextStyle: {},
  60926. // The gap between axisName and axisLine.
  60927. nameGap: 15,
  60928. // Default `false` to support tooltip.
  60929. silent: !1,
  60930. // Default `false` to avoid legacy user event listener fail.
  60931. triggerEvent: !1,
  60932. tooltip: {
  60933. show: !1
  60934. },
  60935. axisPointer: {},
  60936. axisLine: {
  60937. show: !0,
  60938. onZero: !0,
  60939. onZeroAxisIndex: null,
  60940. lineStyle: {
  60941. color: "#6E7079",
  60942. width: 1,
  60943. type: "solid"
  60944. },
  60945. // The arrow at both ends the the axis.
  60946. symbol: ["none", "none"],
  60947. symbolSize: [10, 15]
  60948. },
  60949. axisTick: {
  60950. show: !0,
  60951. // Whether axisTick is inside the grid or outside the grid.
  60952. inside: !1,
  60953. // The length of axisTick.
  60954. length: 5,
  60955. lineStyle: {
  60956. width: 1
  60957. }
  60958. },
  60959. axisLabel: {
  60960. show: !0,
  60961. // Whether axisLabel is inside the grid or outside the grid.
  60962. inside: !1,
  60963. rotate: 0,
  60964. // true | false | null/undefined (auto)
  60965. showMinLabel: null,
  60966. // true | false | null/undefined (auto)
  60967. showMaxLabel: null,
  60968. margin: 8,
  60969. // formatter: null,
  60970. fontSize: 12
  60971. },
  60972. splitLine: {
  60973. show: !0,
  60974. lineStyle: {
  60975. color: ["#E0E6F1"],
  60976. width: 1,
  60977. type: "solid"
  60978. }
  60979. },
  60980. splitArea: {
  60981. show: !1,
  60982. areaStyle: {
  60983. color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
  60984. }
  60985. }
  60986. }, A6e = qe({
  60987. // The gap at both ends of the axis. For categoryAxis, boolean.
  60988. boundaryGap: !0,
  60989. // Set false to faster category collection.
  60990. deduplication: null,
  60991. // splitArea: {
  60992. // show: false
  60993. // },
  60994. splitLine: {
  60995. show: !1
  60996. },
  60997. axisTick: {
  60998. // If tick is align with label when boundaryGap is true
  60999. alignWithLabel: !1,
  61000. interval: "auto"
  61001. },
  61002. axisLabel: {
  61003. interval: "auto"
  61004. }
  61005. }, Jte), Bk = qe({
  61006. boundaryGap: [0, 0],
  61007. axisLine: {
  61008. // Not shown when other axis is categoryAxis in cartesian
  61009. show: "auto"
  61010. },
  61011. axisTick: {
  61012. // Not shown when other axis is categoryAxis in cartesian
  61013. show: "auto"
  61014. },
  61015. // TODO
  61016. // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]
  61017. splitNumber: 5,
  61018. minorTick: {
  61019. // Minor tick, not available for cateogry axis.
  61020. show: !1,
  61021. // Split number of minor ticks. The value should be in range of (0, 100)
  61022. splitNumber: 5,
  61023. // Length of minor tick
  61024. length: 3,
  61025. // Line style
  61026. lineStyle: {
  61027. // Default to be same with axisTick
  61028. }
  61029. },
  61030. minorSplitLine: {
  61031. show: !1,
  61032. lineStyle: {
  61033. color: "#F4F7FD",
  61034. width: 1
  61035. }
  61036. }
  61037. }, Jte), E6e = qe({
  61038. splitNumber: 6,
  61039. axisLabel: {
  61040. // To eliminate labels that are not nice
  61041. showMinLabel: !1,
  61042. showMaxLabel: !1,
  61043. rich: {
  61044. primary: {
  61045. fontWeight: "bold"
  61046. }
  61047. }
  61048. },
  61049. splitLine: {
  61050. show: !1
  61051. }
  61052. }, Bk), M6e = Re({
  61053. logBase: 10
  61054. }, Bk);
  61055. const ene = {
  61056. category: A6e,
  61057. value: Bk,
  61058. time: E6e,
  61059. log: M6e
  61060. };
  61061. var I6e = {
  61062. value: 1,
  61063. category: 1,
  61064. time: 1,
  61065. log: 1
  61066. };
  61067. function Uh(t, e, n, r) {
  61068. k(I6e, function(i, a) {
  61069. var o = qe(qe({}, ene[a], !0), r, !0), s = (
  61070. /** @class */
  61071. function(l) {
  61072. q(u, l);
  61073. function u() {
  61074. var c = l !== null && l.apply(this, arguments) || this;
  61075. return c.type = e + "Axis." + a, c;
  61076. }
  61077. return u.prototype.mergeDefaultAndTheme = function(c, f) {
  61078. var d = Em(this), h = d ? wp(c) : {}, p = f.getTheme();
  61079. qe(c, p.get(a + "Axis")), qe(c, this.getDefaultOption()), c.type = XV(c), d && cu(c, h, d);
  61080. }, u.prototype.optionUpdated = function() {
  61081. var c = this.option;
  61082. c.type === "category" && (this.__ordinalMeta = nE.createByAxisModel(this));
  61083. }, u.prototype.getCategories = function(c) {
  61084. var f = this.option;
  61085. if (f.type === "category")
  61086. return c ? f.data : this.__ordinalMeta.categories;
  61087. }, u.prototype.getOrdinalMeta = function() {
  61088. return this.__ordinalMeta;
  61089. }, u.type = e + "Axis." + a, u.defaultOption = o, u;
  61090. }(n)
  61091. );
  61092. t.registerComponentModel(s);
  61093. }), t.registerSubTypeDefaulter(e + "Axis", XV);
  61094. }
  61095. function XV(t) {
  61096. return t.type || (t.data ? "category" : "value");
  61097. }
  61098. var D6e = (
  61099. /** @class */
  61100. function() {
  61101. function t(e) {
  61102. this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || "";
  61103. }
  61104. return t.prototype.getAxis = function(e) {
  61105. return this._axes[e];
  61106. }, t.prototype.getAxes = function() {
  61107. return ce(this._dimList, function(e) {
  61108. return this._axes[e];
  61109. }, this);
  61110. }, t.prototype.getAxesByScale = function(e) {
  61111. return e = e.toLowerCase(), Nt(this.getAxes(), function(n) {
  61112. return n.scale.type === e;
  61113. });
  61114. }, t.prototype.addAxis = function(e) {
  61115. var n = e.dim;
  61116. this._axes[n] = e, this._dimList.push(n);
  61117. }, t;
  61118. }()
  61119. ), fE = ["x", "y"];
  61120. function YV(t) {
  61121. return t.type === "interval" || t.type === "time";
  61122. }
  61123. var R6e = (
  61124. /** @class */
  61125. function(t) {
  61126. q(e, t);
  61127. function e() {
  61128. var n = t !== null && t.apply(this, arguments) || this;
  61129. return n.type = "cartesian2d", n.dimensions = fE, n;
  61130. }
  61131. return e.prototype.calcAffineTransform = function() {
  61132. this._transform = this._invTransform = null;
  61133. var n = this.getAxis("x").scale, r = this.getAxis("y").scale;
  61134. if (!(!YV(n) || !YV(r))) {
  61135. 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];
  61136. if (!(!l || !u)) {
  61137. 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];
  61138. this._invTransform = Lf([], p);
  61139. }
  61140. }
  61141. }, e.prototype.getBaseAxis = function() {
  61142. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
  61143. }, e.prototype.containPoint = function(n) {
  61144. var r = this.getAxis("x"), i = this.getAxis("y");
  61145. return r.contain(r.toLocalCoord(n[0])) && i.contain(i.toLocalCoord(n[1]));
  61146. }, e.prototype.containData = function(n) {
  61147. return this.getAxis("x").containData(n[0]) && this.getAxis("y").containData(n[1]);
  61148. }, e.prototype.containZone = function(n, r) {
  61149. var i = this.dataToPoint(n), a = this.dataToPoint(r), o = this.getArea(), s = new Je(i[0], i[1], a[0] - i[0], a[1] - i[1]);
  61150. return o.intersect(s);
  61151. }, e.prototype.dataToPoint = function(n, r, i) {
  61152. i = i || [];
  61153. var a = n[0], o = n[1];
  61154. if (this._transform && a != null && isFinite(a) && o != null && isFinite(o))
  61155. return ar(i, n, this._transform);
  61156. var s = this.getAxis("x"), l = this.getAxis("y");
  61157. return i[0] = s.toGlobalCoord(s.dataToCoord(a, r)), i[1] = l.toGlobalCoord(l.dataToCoord(o, r)), i;
  61158. }, e.prototype.clampData = function(n, r) {
  61159. 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]);
  61160. 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;
  61161. }, e.prototype.pointToData = function(n, r) {
  61162. var i = [];
  61163. if (this._invTransform)
  61164. return ar(i, n, this._invTransform);
  61165. var a = this.getAxis("x"), o = this.getAxis("y");
  61166. return i[0] = a.coordToData(a.toLocalCoord(n[0]), r), i[1] = o.coordToData(o.toLocalCoord(n[1]), r), i;
  61167. }, e.prototype.getOtherAxis = function(n) {
  61168. return this.getAxis(n.dim === "x" ? "y" : "x");
  61169. }, e.prototype.getArea = function(n) {
  61170. n = n || 0;
  61171. 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;
  61172. return new Je(a, o, s, l);
  61173. }, e;
  61174. }(D6e)
  61175. ), k6e = (
  61176. /** @class */
  61177. function(t) {
  61178. q(e, t);
  61179. function e(n, r, i, a, o) {
  61180. var s = t.call(this, n, r, i) || this;
  61181. return s.index = 0, s.type = a || "value", s.position = o || "bottom", s;
  61182. }
  61183. return e.prototype.isHorizontal = function() {
  61184. var n = this.position;
  61185. return n === "top" || n === "bottom";
  61186. }, e.prototype.getGlobalExtent = function(n) {
  61187. var r = this.getExtent();
  61188. return r[0] = this.toGlobalCoord(r[0]), r[1] = this.toGlobalCoord(r[1]), n && r[0] > r[1] && r.reverse(), r;
  61189. }, e.prototype.pointToData = function(n, r) {
  61190. return this.coordToData(this.toLocalCoord(n[this.dim === "x" ? 0 : 1]), r);
  61191. }, e.prototype.setCategorySortInfo = function(n) {
  61192. if (this.type !== "category")
  61193. return !1;
  61194. this.model.option.categorySortInfo = n, this.scale.setSortInfo(n);
  61195. }, e;
  61196. }(Va)
  61197. );
  61198. function dE(t, e, n) {
  61199. n = n || {};
  61200. 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 = {
  61201. left: 0,
  61202. right: 1,
  61203. top: 0,
  61204. bottom: 1,
  61205. onZero: 2
  61206. }, h = e.get("offset") || 0, p = u === "x" ? [f[2] - h, f[3] + h] : [f[0] - h, f[1] + h];
  61207. if (o) {
  61208. var v = o.toGlobalCoord(o.dataToCoord(0));
  61209. p[d.onZero] = Math.max(Math.min(v, p[1]), p[0]);
  61210. }
  61211. 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);
  61212. var g = {
  61213. top: -1,
  61214. bottom: 1,
  61215. left: -1,
  61216. right: 1
  61217. };
  61218. 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), Tn(n.labelInside, e.get(["axisLabel", "inside"])) && (a.labelDirection = -a.labelDirection);
  61219. var m = e.get(["axisLabel", "rotate"]);
  61220. return a.labelRotate = l === "top" ? -m : m, a.z2 = 1, a;
  61221. }
  61222. function qV(t) {
  61223. return t.get("coordinateSystem") === "cartesian2d";
  61224. }
  61225. function KV(t) {
  61226. var e = {
  61227. xAxisModel: null,
  61228. yAxisModel: null
  61229. };
  61230. return k(e, function(n, r) {
  61231. var i = r.replace(/Model$/, ""), a = t.getReferringComponents(i, Dn).models[0];
  61232. if (process.env.NODE_ENV !== "production" && !a)
  61233. throw new Error(i + ' "' + Ui(t.get(i + "Index"), t.get(i + "Id"), 0) + '" not found');
  61234. e[r] = a;
  61235. }), e;
  61236. }
  61237. var sP = Math.log;
  61238. function tne(t, e, n) {
  61239. var r = qs.prototype, i = r.getTicks.call(n), a = r.getTicks.call(n, !0), o = i.length - 1, s = r.getInterval.call(n), l = ite(t, e), u = l.extent, c = l.fixMin, f = l.fixMax;
  61240. if (t.type === "log") {
  61241. var d = sP(t.base);
  61242. u = [sP(u[0]) / d, sP(u[1]) / d];
  61243. }
  61244. t.setExtent(u[0], u[1]), t.calcNiceExtent({
  61245. splitNumber: o,
  61246. fixMin: c,
  61247. fixMax: f
  61248. });
  61249. var h = r.getExtent.call(t);
  61250. c && (u[0] = h[0]), f && (u[1] = h[1]);
  61251. var p = r.getInterval.call(t), v = u[0], g = u[1];
  61252. if (c && f)
  61253. p = (g - v) / o;
  61254. else if (c)
  61255. for (g = u[0] + p * o; g < u[1] && isFinite(g) && isFinite(u[1]); )
  61256. p = jT(p), g = u[0] + p * o;
  61257. else if (f)
  61258. for (v = u[1] - p * o; v > u[0] && isFinite(v) && isFinite(u[0]); )
  61259. p = jT(p), v = u[1] - p * o;
  61260. else {
  61261. var m = t.getTicks().length - 1;
  61262. m > o && (p = jT(p));
  61263. var y = p * o;
  61264. g = Math.ceil(u[1] / p) * p, v = mn(g - y), v < 0 && u[0] >= 0 ? (v = 0, g = mn(y)) : g > 0 && u[1] <= 0 && (g = 0, v = -mn(y));
  61265. }
  61266. var b = (i[0].value - a[0].value) / s, _ = (i[o].value - a[o].value) / s;
  61267. if (r.setExtent.call(t, v + p * b, g + p * _), r.setInterval.call(t, p), (b || _) && r.setNiceExtent.call(t, v + p, g - p), process.env.NODE_ENV !== "production") {
  61268. var O = r.getTicks.call(t);
  61269. O[1] && (!MNe(p) || oO(O[1].value) > oO(p)) && dn(
  61270. // eslint-disable-next-line
  61271. "The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true"
  61272. );
  61273. }
  61274. }
  61275. var L6e = (
  61276. /** @class */
  61277. function() {
  61278. function t(e, n, r) {
  61279. this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = fE, this._initCartesian(e, n, r), this.model = e;
  61280. }
  61281. return t.prototype.getRect = function() {
  61282. return this._rect;
  61283. }, t.prototype.update = function(e, n) {
  61284. var r = this._axesMap;
  61285. this._updateScale(e, this.model);
  61286. function i(o) {
  61287. var s, l = st(o), u = l.length;
  61288. if (u) {
  61289. for (var c = [], f = u - 1; f >= 0; f--) {
  61290. var d = +l[f], h = o[d], p = h.model, v = h.scale;
  61291. // Only value and log axis without interval support alignTicks.
  61292. rE(v) && p.get("alignTicks") && p.get("interval") == null ? c.push(h) : (Sf(v, p), rE(v) && (s = h));
  61293. }
  61294. c.length && (s || (s = c.pop(), Sf(s.scale, s.model)), k(c, function(g) {
  61295. tne(g.scale, g.model, s.scale);
  61296. }));
  61297. }
  61298. }
  61299. i(r.x), i(r.y);
  61300. var a = {};
  61301. k(r.x, function(o) {
  61302. JV(r, "y", o, a);
  61303. }), k(r.y, function(o) {
  61304. JV(r, "x", o, a);
  61305. }), this.resize(this.model, n);
  61306. }, t.prototype.resize = function(e, n, r) {
  61307. var i = e.getBoxLayoutParams(), a = !r && e.get("containLabel"), o = Rn(i, {
  61308. width: n.getWidth(),
  61309. height: n.getHeight()
  61310. });
  61311. this._rect = o;
  61312. var s = this._axesList;
  61313. l(), a && (k(s, function(u) {
  61314. if (!u.model.get(["axisLabel", "inside"])) {
  61315. var c = t5e(u);
  61316. if (c) {
  61317. var f = u.isHorizontal() ? "height" : "width", d = u.model.get(["axisLabel", "margin"]);
  61318. o[f] -= c[f] + d, u.position === "top" ? o.y += c.height + d : u.position === "left" && (o.x += c.width + d);
  61319. }
  61320. }
  61321. }), l()), k(this._coordsList, function(u) {
  61322. u.calcAffineTransform();
  61323. });
  61324. function l() {
  61325. k(s, function(u) {
  61326. var c = u.isHorizontal(), f = c ? [0, o.width] : [0, o.height], d = u.inverse ? 1 : 0;
  61327. u.setExtent(f[d], f[1 - d]), N6e(u, c ? o.x : o.y);
  61328. });
  61329. }
  61330. }, t.prototype.getAxis = function(e, n) {
  61331. var r = this._axesMap[e];
  61332. if (r != null)
  61333. return r[n || 0];
  61334. }, t.prototype.getAxes = function() {
  61335. return this._axesList.slice();
  61336. }, t.prototype.getCartesian = function(e, n) {
  61337. if (e != null && n != null) {
  61338. var r = "x" + e + "y" + n;
  61339. return this._coordsMap[r];
  61340. }
  61341. Ie(e) && (n = e.yAxisIndex, e = e.xAxisIndex);
  61342. for (var i = 0, a = this._coordsList; i < a.length; i++)
  61343. if (a[i].getAxis("x").index === e || a[i].getAxis("y").index === n)
  61344. return a[i];
  61345. }, t.prototype.getCartesians = function() {
  61346. return this._coordsList.slice();
  61347. }, t.prototype.convertToPixel = function(e, n, r) {
  61348. var i = this._findConvertTarget(n);
  61349. return i.cartesian ? i.cartesian.dataToPoint(r) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(r)) : null;
  61350. }, t.prototype.convertFromPixel = function(e, n, r) {
  61351. var i = this._findConvertTarget(n);
  61352. return i.cartesian ? i.cartesian.pointToData(r) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(r)) : null;
  61353. }, t.prototype._findConvertTarget = function(e) {
  61354. var n = e.seriesModel, r = e.xAxisModel || n && n.getReferringComponents("xAxis", Dn).models[0], i = e.yAxisModel || n && n.getReferringComponents("yAxis", Dn).models[0], a = e.gridModel, o = this._coordsList, s, l;
  61355. if (n)
  61356. s = n.coordinateSystem, et(o, s) < 0 && (s = null);
  61357. else if (r && i)
  61358. s = this.getCartesian(r.componentIndex, i.componentIndex);
  61359. else if (r)
  61360. l = this.getAxis("x", r.componentIndex);
  61361. else if (i)
  61362. l = this.getAxis("y", i.componentIndex);
  61363. else if (a) {
  61364. var u = a.coordinateSystem;
  61365. u === this && (s = this._coordsList[0]);
  61366. }
  61367. return {
  61368. cartesian: s,
  61369. axis: l
  61370. };
  61371. }, t.prototype.containPoint = function(e) {
  61372. var n = this._coordsList[0];
  61373. if (n)
  61374. return n.containPoint(e);
  61375. }, t.prototype._initCartesian = function(e, n, r) {
  61376. var i = this, a = this, o = {
  61377. left: !1,
  61378. right: !1,
  61379. top: !1,
  61380. bottom: !1
  61381. }, s = {
  61382. x: {},
  61383. y: {}
  61384. }, l = {
  61385. x: 0,
  61386. y: 0
  61387. };
  61388. if (n.eachComponent("xAxis", u("x"), this), n.eachComponent("yAxis", u("y"), this), !l.x || !l.y) {
  61389. this._axesMap = {}, this._axesList = [];
  61390. return;
  61391. }
  61392. this._axesMap = s, k(s.x, function(c, f) {
  61393. k(s.y, function(d, h) {
  61394. var p = "x" + f + "y" + h, v = new R6e(p);
  61395. v.master = i, v.model = e, i._coordsMap[p] = v, i._coordsList.push(v), v.addAxis(c), v.addAxis(d);
  61396. });
  61397. });
  61398. function u(c) {
  61399. return function(f, d) {
  61400. if (lP(f, e)) {
  61401. var h = f.get("position");
  61402. c === "x" ? h !== "top" && h !== "bottom" && (h = o.bottom ? "top" : "bottom") : h !== "left" && h !== "right" && (h = o.left ? "right" : "left"), o[h] = !0;
  61403. var p = new k6e(c, j0(f), [0, 0], f.get("type"), h), v = p.type === "category";
  61404. 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]++;
  61405. }
  61406. };
  61407. }
  61408. }, t.prototype._updateScale = function(e, n) {
  61409. k(this._axesList, function(i) {
  61410. if (i.scale.setExtent(1 / 0, -1 / 0), i.type === "category") {
  61411. var a = i.model.get("categorySortInfo");
  61412. i.scale.setSortInfo(a);
  61413. }
  61414. }), e.eachSeries(function(i) {
  61415. if (qV(i)) {
  61416. var a = KV(i), o = a.xAxisModel, s = a.yAxisModel;
  61417. if (!lP(o, n) || !lP(s, n))
  61418. return;
  61419. var l = this.getCartesian(o.componentIndex, s.componentIndex), u = i.getData(), c = l.getAxis("x"), f = l.getAxis("y");
  61420. r(u, c), r(u, f);
  61421. }
  61422. }, this);
  61423. function r(i, a) {
  61424. k(PO(i, a.dim), function(o) {
  61425. a.scale.unionExtentFromData(i, o);
  61426. });
  61427. }
  61428. }, t.prototype.getTooltipAxes = function(e) {
  61429. var n = [], r = [];
  61430. return k(this.getCartesians(), function(i) {
  61431. var a = e != null && e !== "auto" ? i.getAxis(e) : i.getBaseAxis(), o = i.getOtherAxis(a);
  61432. et(n, a) < 0 && n.push(a), et(r, o) < 0 && r.push(o);
  61433. }), {
  61434. baseAxes: n,
  61435. otherAxes: r
  61436. };
  61437. }, t.create = function(e, n) {
  61438. var r = [];
  61439. return e.eachComponent("grid", function(i, a) {
  61440. var o = new t(i, e, n);
  61441. o.name = "grid_" + a, o.resize(i, n, !0), i.coordinateSystem = o, r.push(o);
  61442. }), e.eachSeries(function(i) {
  61443. if (qV(i)) {
  61444. var a = KV(i), o = a.xAxisModel, s = a.yAxisModel, l = o.getCoordSysModel();
  61445. if (process.env.NODE_ENV !== "production") {
  61446. if (!l)
  61447. throw new Error('Grid "' + Ui(o.get("gridIndex"), o.get("gridId"), 0) + '" not found');
  61448. if (o.getCoordSysModel() !== s.getCoordSysModel())
  61449. throw new Error("xAxis and yAxis must use the same grid");
  61450. }
  61451. var u = l.coordinateSystem;
  61452. i.coordinateSystem = u.getCartesian(o.componentIndex, s.componentIndex);
  61453. }
  61454. }), r;
  61455. }, t.dimensions = fE, t;
  61456. }()
  61457. );
  61458. function lP(t, e) {
  61459. return t.getCoordSysModel() === e;
  61460. }
  61461. function JV(t, e, n, r) {
  61462. n.getAxesOnZeroOf = function() {
  61463. return a ? [a] : [];
  61464. };
  61465. var i = t[e], a, o = n.model, s = o.get(["axisLine", "onZero"]), l = o.get(["axisLine", "onZeroAxisIndex"]);
  61466. if (!s)
  61467. return;
  61468. if (l != null)
  61469. eF(i[l]) && (a = i[l]);
  61470. else
  61471. for (var u in i)
  61472. if (i.hasOwnProperty(u) && eF(i[u]) && !r[c(i[u])]) {
  61473. a = i[u];
  61474. break;
  61475. }
  61476. a && (r[c(a)] = !0);
  61477. function c(f) {
  61478. return f.dim + "_" + f.index;
  61479. }
  61480. }
  61481. function eF(t) {
  61482. return t && t.type !== "category" && t.type !== "time" && e5e(t);
  61483. }
  61484. function N6e(t, e) {
  61485. var n = t.getExtent(), r = n[0] + n[1];
  61486. t.toGlobalCoord = t.dim === "x" ? function(i) {
  61487. return i + e;
  61488. } : function(i) {
  61489. return r - i + e;
  61490. }, t.toLocalCoord = t.dim === "x" ? function(i) {
  61491. return i - e;
  61492. } : function(i) {
  61493. return r - i + e;
  61494. };
  61495. }
  61496. var zl = Math.PI, Jr = (
  61497. /** @class */
  61498. function() {
  61499. function t(e, n) {
  61500. this.group = new Ve(), this.opt = n, this.axisModel = e, Re(n, {
  61501. labelOffset: 0,
  61502. nameDirection: 1,
  61503. tickDirection: 1,
  61504. labelDirection: 1,
  61505. silent: !0,
  61506. handleAutoShown: function() {
  61507. return !0;
  61508. }
  61509. });
  61510. var r = new Ve({
  61511. x: n.position[0],
  61512. y: n.position[1],
  61513. rotation: n.rotation
  61514. });
  61515. r.updateTransform(), this._transformGroup = r;
  61516. }
  61517. return t.prototype.hasBuilder = function(e) {
  61518. return !!tF[e];
  61519. }, t.prototype.add = function(e) {
  61520. tF[e](this.opt, this.axisModel, this.group, this._transformGroup);
  61521. }, t.prototype.getGroup = function() {
  61522. return this.group;
  61523. }, t.innerTextLayout = function(e, n, r) {
  61524. var i = $R(n - e), a, o;
  61525. return Fh(i) ? (o = r > 0 ? "top" : "bottom", a = "center") : Fh(i - zl) ? (o = r > 0 ? "bottom" : "top", a = "center") : (o = "middle", i > 0 && i < zl ? a = r > 0 ? "right" : "left" : a = r > 0 ? "left" : "right"), {
  61526. rotation: i,
  61527. textAlign: a,
  61528. textVerticalAlign: o
  61529. };
  61530. }, t.makeAxisEventDataBase = function(e) {
  61531. var n = {
  61532. componentType: e.mainType,
  61533. componentIndex: e.componentIndex
  61534. };
  61535. return n[e.mainType + "Index"] = e.componentIndex, n;
  61536. }, t.isLabelSilent = function(e) {
  61537. var n = e.get("tooltip");
  61538. return e.get("silent") || !(e.get("triggerEvent") || n && n.show);
  61539. }, t;
  61540. }()
  61541. ), tF = {
  61542. axisLine: function(t, e, n, r) {
  61543. var i = e.get(["axisLine", "show"]);
  61544. if (i === "auto" && t.handleAutoShown && (i = t.handleAutoShown("axisLine")), !!i) {
  61545. var a = e.axis.getExtent(), o = r.transform, s = [a[0], 0], l = [a[1], 0], u = s[0] > l[0];
  61546. o && (ar(s, s, o), ar(l, l, o));
  61547. var c = le({
  61548. lineCap: "round"
  61549. }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), f = new Un({
  61550. shape: {
  61551. x1: s[0],
  61552. y1: s[1],
  61553. x2: l[0],
  61554. y2: l[1]
  61555. },
  61556. style: c,
  61557. strokeContainThreshold: t.strokeContainThreshold || 5,
  61558. silent: !0,
  61559. z2: 1
  61560. });
  61561. Hh(f.shape, f.style.lineWidth), f.anid = "line", n.add(f);
  61562. var d = e.get(["axisLine", "symbol"]);
  61563. if (d != null) {
  61564. var h = e.get(["axisLine", "symbolSize"]);
  61565. Oe(d) && (d = [d, d]), (Oe(h) || St(h)) && (h = [h, h]);
  61566. var p = Ff(e.get(["axisLine", "symbolOffset"]) || 0, h), v = h[0], g = h[1];
  61567. k([{
  61568. rotate: t.rotation + Math.PI / 2,
  61569. offset: p[0],
  61570. r: 0
  61571. }, {
  61572. rotate: t.rotation - Math.PI / 2,
  61573. offset: p[1],
  61574. r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
  61575. }], function(m, y) {
  61576. if (d[y] !== "none" && d[y] != null) {
  61577. var b = $n(d[y], -v / 2, -g / 2, v, g, c.stroke, !0), _ = m.r + m.offset, O = u ? l : s;
  61578. b.attr({
  61579. rotation: m.rotate,
  61580. x: O[0] + _ * Math.cos(t.rotation),
  61581. y: O[1] - _ * Math.sin(t.rotation),
  61582. silent: !0,
  61583. z2: 11
  61584. }), n.add(b);
  61585. }
  61586. });
  61587. }
  61588. }
  61589. },
  61590. axisTickLabel: function(t, e, n, r) {
  61591. var i = V6e(n, r, e, t), a = W6e(n, r, e, t);
  61592. if (z6e(e, a, i), F6e(n, r, e, t.tickDirection), e.get(["axisLabel", "hideOverlap"])) {
  61593. var o = yte(ce(a, function(s) {
  61594. return {
  61595. label: s,
  61596. priority: s.z2,
  61597. defaultAttr: {
  61598. ignore: s.ignore
  61599. }
  61600. };
  61601. }));
  61602. Ote(o);
  61603. }
  61604. },
  61605. axisName: function(t, e, n, r) {
  61606. var i = Tn(t.axisName, e.get("name"));
  61607. if (i) {
  61608. 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 = [
  61609. a === "start" ? u[0] - c * l : a === "end" ? u[1] + c * l : (u[0] + u[1]) / 2,
  61610. // Reuse labelOffset.
  61611. rF(a) ? t.labelOffset + o * l : 0
  61612. ], d, h = e.get("nameRotate");
  61613. h != null && (h = h * zl / 180);
  61614. var p;
  61615. rF(a) ? d = Jr.innerTextLayout(
  61616. t.rotation,
  61617. h ?? t.rotation,
  61618. // Adapt to axis.
  61619. o
  61620. ) : (d = B6e(t.rotation, a, h || 0, u), p = t.axisNameAvailableWidth, p != null && (p = Math.abs(p / Math.sin(d.rotation)), !isFinite(p) && (p = null)));
  61621. var v = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, y = Tn(t.nameTruncateMaxWidth, g.maxWidth, p), b = new gt({
  61622. x: f[0],
  61623. y: f[1],
  61624. rotation: d.rotation,
  61625. silent: Jr.isLabelSilent(e),
  61626. style: Zt(s, {
  61627. text: i,
  61628. font: v,
  61629. overflow: "truncate",
  61630. width: y,
  61631. ellipsis: m,
  61632. fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  61633. align: s.get("align") || d.textAlign,
  61634. verticalAlign: s.get("verticalAlign") || d.textVerticalAlign
  61635. }),
  61636. z2: 1
  61637. });
  61638. if (Op({
  61639. el: b,
  61640. componentModel: e,
  61641. itemName: i
  61642. }), b.__fullText = i, b.anid = "name", e.get("triggerEvent")) {
  61643. var _ = Jr.makeAxisEventDataBase(e);
  61644. _.targetType = "axisName", _.name = i, Fe(b).eventData = _;
  61645. }
  61646. r.add(b), b.updateTransform(), n.add(b), b.decomposeTransform();
  61647. }
  61648. }
  61649. };
  61650. function B6e(t, e, n, r) {
  61651. var i = $R(n - t), a, o, s = r[0] > r[1], l = e === "start" && !s || e !== "start" && s;
  61652. return Fh(i - zl / 2) ? (o = l ? "bottom" : "top", a = "center") : Fh(i - zl * 1.5) ? (o = l ? "top" : "bottom", a = "center") : (o = "middle", i < zl * 1.5 && i > zl / 2 ? a = l ? "left" : "right" : a = l ? "right" : "left"), {
  61653. rotation: i,
  61654. textAlign: a,
  61655. textVerticalAlign: o
  61656. };
  61657. }
  61658. function z6e(t, e, n) {
  61659. if (!ate(t.axis)) {
  61660. var r = t.get(["axisLabel", "showMinLabel"]), i = t.get(["axisLabel", "showMaxLabel"]);
  61661. e = e || [], n = n || [];
  61662. 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];
  61663. r === !1 ? (ia(a), ia(u)) : nF(a, o) && (r ? (ia(o), ia(c)) : (ia(a), ia(u))), i === !1 ? (ia(s), ia(f)) : nF(l, s) && (i ? (ia(l), ia(d)) : (ia(s), ia(f)));
  61664. }
  61665. }
  61666. function ia(t) {
  61667. t && (t.ignore = !0);
  61668. }
  61669. function nF(t, e) {
  61670. var n = t && t.getBoundingRect().clone(), r = e && e.getBoundingRect().clone();
  61671. if (!(!n || !r)) {
  61672. var i = R0([]);
  61673. return Cu(i, i, -t.rotation), n.applyTransform(Xo([], i, t.getLocalTransform())), r.applyTransform(Xo([], i, e.getLocalTransform())), n.intersect(r);
  61674. }
  61675. }
  61676. function rF(t) {
  61677. return t === "middle" || t === "center";
  61678. }
  61679. function nne(t, e, n, r, i) {
  61680. for (var a = [], o = [], s = [], l = 0; l < t.length; l++) {
  61681. var u = t[l].coord;
  61682. o[0] = u, o[1] = 0, s[0] = u, s[1] = n, e && (ar(o, o, e), ar(s, s, e));
  61683. var c = new Un({
  61684. shape: {
  61685. x1: o[0],
  61686. y1: o[1],
  61687. x2: s[0],
  61688. y2: s[1]
  61689. },
  61690. style: r,
  61691. z2: 2,
  61692. autoBatch: !0,
  61693. silent: !0
  61694. });
  61695. Hh(c.shape, c.style.lineWidth), c.anid = i + "_" + t[l].tickValue, a.push(c);
  61696. }
  61697. return a;
  61698. }
  61699. function V6e(t, e, n, r) {
  61700. var i = n.axis, a = n.getModel("axisTick"), o = a.get("show");
  61701. if (o === "auto" && r.handleAutoShown && (o = r.handleAutoShown("axisTick")), !(!o || i.scale.isBlank())) {
  61702. for (var s = a.getModel("lineStyle"), l = r.tickDirection * a.get("length"), u = i.getTicksCoords(), c = nne(u, e.transform, l, Re(s.getLineStyle(), {
  61703. stroke: n.get(["axisLine", "lineStyle", "color"])
  61704. }), "ticks"), f = 0; f < c.length; f++)
  61705. t.add(c[f]);
  61706. return c;
  61707. }
  61708. }
  61709. function F6e(t, e, n, r) {
  61710. var i = n.axis, a = n.getModel("minorTick");
  61711. if (!(!a.get("show") || i.scale.isBlank())) {
  61712. var o = i.getMinorTicksCoords();
  61713. if (o.length)
  61714. for (var s = a.getModel("lineStyle"), l = r * a.get("length"), u = Re(s.getLineStyle(), Re(n.getModel("axisTick").getLineStyle(), {
  61715. stroke: n.get(["axisLine", "lineStyle", "color"])
  61716. })), c = 0; c < o.length; c++)
  61717. for (var f = nne(o[c], e.transform, l, u, "minorticks_" + c), d = 0; d < f.length; d++)
  61718. t.add(f[d]);
  61719. }
  61720. }
  61721. function W6e(t, e, n, r) {
  61722. var i = n.axis, a = Tn(r.axisLabelShow, n.get(["axisLabel", "show"]));
  61723. if (!(!a || i.scale.isBlank())) {
  61724. var o = n.getModel("axisLabel"), s = o.get("margin"), l = i.getViewLabels(), u = (Tn(r.labelRotate, o.get("rotate")) || 0) * zl / 180, c = Jr.innerTextLayout(r.rotation, u, r.labelDirection), f = n.getCategories && n.getCategories(!0), d = [], h = Jr.isLabelSilent(n), p = n.get("triggerEvent");
  61725. return k(l, function(v, g) {
  61726. var m = i.scale.type === "ordinal" ? i.scale.getRawOrdinalNumber(v.tickValue) : v.tickValue, y = v.formattedLabel, b = v.rawLabel, _ = o;
  61727. if (f && f[m]) {
  61728. var O = f[m];
  61729. Ie(O) && O.textStyle && (_ = new Wt(O.textStyle, o, n.ecModel));
  61730. }
  61731. var S = _.getTextColor() || n.get(["axisLine", "lineStyle", "color"]), x = i.dataToCoord(m), C = _.getShallow("align", !0) || c.textAlign, T = We(_.getShallow("alignMinLabel", !0), C), w = We(_.getShallow("alignMaxLabel", !0), C), P = _.getShallow("verticalAlign", !0) || _.getShallow("baseline", !0) || c.textVerticalAlign, $ = We(_.getShallow("verticalAlignMinLabel", !0), P), A = We(_.getShallow("verticalAlignMaxLabel", !0), P), D = new gt({
  61732. x,
  61733. y: r.labelOffset + r.labelDirection * s,
  61734. rotation: c.rotation,
  61735. silent: h,
  61736. z2: 10 + (v.level || 0),
  61737. style: Zt(_, {
  61738. text: y,
  61739. align: g === 0 ? T : g === l.length - 1 ? w : C,
  61740. verticalAlign: g === 0 ? $ : g === l.length - 1 ? A : P,
  61741. fill: Me(S) ? S(
  61742. // (1) In category axis with data zoom, tick is not the original
  61743. // index of axis.data. So tick should not be exposed to user
  61744. // in category axis.
  61745. // (2) Compatible with previous version, which always use formatted label as
  61746. // input. But in interval scale the formatted label is like '223,445', which
  61747. // maked user replace ','. So we modify it to return original val but remain
  61748. // it as 'string' to avoid error in replacing.
  61749. i.type === "category" ? b : i.type === "value" ? m + "" : m,
  61750. g
  61751. ) : S
  61752. })
  61753. });
  61754. if (D.anid = "label_" + m, p) {
  61755. var E = Jr.makeAxisEventDataBase(n);
  61756. E.targetType = "axisLabel", E.value = b, E.tickIndex = g, i.type === "category" && (E.dataIndex = m), Fe(D).eventData = E;
  61757. }
  61758. e.add(D), D.updateTransform(), d.push(D), t.add(D), D.decomposeTransform();
  61759. }), d;
  61760. }
  61761. }
  61762. function Q6e(t, e) {
  61763. var n = {
  61764. /**
  61765. * key: makeKey(axis.model)
  61766. * value: {
  61767. * axis,
  61768. * coordSys,
  61769. * axisPointerModel,
  61770. * triggerTooltip,
  61771. * triggerEmphasis,
  61772. * involveSeries,
  61773. * snap,
  61774. * seriesModels,
  61775. * seriesDataCount
  61776. * }
  61777. */
  61778. axesInfo: {},
  61779. seriesInvolved: !1,
  61780. /**
  61781. * key: makeKey(coordSys.model)
  61782. * value: Object: key makeKey(axis.model), value: axisInfo
  61783. */
  61784. coordSysAxesInfo: {},
  61785. coordSysMap: {}
  61786. };
  61787. return H6e(n, t, e), n.seriesInvolved && j6e(n, t), n;
  61788. }
  61789. function H6e(t, e, n) {
  61790. var r = e.getComponent("tooltip"), i = e.getComponent("axisPointer"), a = i.get("link", !0) || [], o = [];
  61791. k(n.getCoordinateSystems(), function(s) {
  61792. if (!s.axisPointerEnabled)
  61793. return;
  61794. var l = zm(s.model), u = t.coordSysAxesInfo[l] = {};
  61795. t.coordSysMap[l] = s;
  61796. var c = s.model, f = c.getModel("tooltip", r);
  61797. if (k(s.getAxes(), Ue(v, !1, null)), s.getTooltipAxes && r && f.get("show")) {
  61798. var d = f.get("trigger") === "axis", h = f.get(["axisPointer", "type"]) === "cross", p = s.getTooltipAxes(f.get(["axisPointer", "axis"]));
  61799. (d || h) && k(p.baseAxes, Ue(v, h ? "cross" : !0, d)), h && k(p.otherAxes, Ue(v, "cross", !1));
  61800. }
  61801. function v(g, m, y) {
  61802. var b = y.model.getModel("axisPointer", i), _ = b.get("show");
  61803. if (!(!_ || _ === "auto" && !g && !hE(b))) {
  61804. m == null && (m = b.get("triggerTooltip")), b = g ? G6e(y, f, i, e, g, m) : b;
  61805. var O = b.get("snap"), S = b.get("triggerEmphasis"), x = zm(y.model), C = m || O || y.type === "category", T = t.axesInfo[x] = {
  61806. key: x,
  61807. axis: y,
  61808. coordSys: s,
  61809. axisPointerModel: b,
  61810. triggerTooltip: m,
  61811. triggerEmphasis: S,
  61812. involveSeries: C,
  61813. snap: O,
  61814. useHandle: hE(b),
  61815. seriesModels: [],
  61816. linkGroup: null
  61817. };
  61818. u[x] = T, t.seriesInvolved = t.seriesInvolved || C;
  61819. var w = Z6e(a, y);
  61820. if (w != null) {
  61821. var P = o[w] || (o[w] = {
  61822. axesInfo: {}
  61823. });
  61824. P.axesInfo[x] = T, P.mapper = a[w].mapper, T.linkGroup = P;
  61825. }
  61826. }
  61827. }
  61828. });
  61829. }
  61830. function G6e(t, e, n, r, i, a) {
  61831. var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], l = {};
  61832. k(s, function(d) {
  61833. l[d] = Le(o.get(d));
  61834. }), l.snap = t.type !== "category" && !!a, o.get("type") === "cross" && (l.type = "line");
  61835. var u = l.label || (l.label = {});
  61836. if (u.show == null && (u.show = !1), i === "cross") {
  61837. var c = o.get(["label", "show"]);
  61838. if (u.show = c ?? !0, !a) {
  61839. var f = l.lineStyle = o.get("crossStyle");
  61840. f && Re(u, f.textStyle);
  61841. }
  61842. }
  61843. return t.model.getModel("axisPointer", new Wt(l, n, r));
  61844. }
  61845. function j6e(t, e) {
  61846. e.eachSeries(function(n) {
  61847. var r = n.coordinateSystem, i = n.get(["tooltip", "trigger"], !0), a = n.get(["tooltip", "show"], !0);
  61848. !r || i === "none" || i === !1 || i === "item" || a === !1 || n.get(["axisPointer", "show"], !0) === !1 || k(t.coordSysAxesInfo[zm(r.model)], function(o) {
  61849. var s = o.axis;
  61850. r.getAxis(s.dim) === s && (o.seriesModels.push(n), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += n.getData().count());
  61851. });
  61852. });
  61853. }
  61854. function Z6e(t, e) {
  61855. for (var n = e.model, r = e.dim, i = 0; i < t.length; i++) {
  61856. var a = t[i] || {};
  61857. if (uP(a[r + "AxisId"], n.id) || uP(a[r + "AxisIndex"], n.componentIndex) || uP(a[r + "AxisName"], n.name))
  61858. return i;
  61859. }
  61860. }
  61861. function uP(t, e) {
  61862. return t === "all" || ue(t) && et(t, e) >= 0 || t === e;
  61863. }
  61864. function U6e(t) {
  61865. var e = zk(t);
  61866. if (e) {
  61867. var n = e.axisPointerModel, r = e.axis.scale, i = n.option, a = n.get("status"), o = n.get("value");
  61868. o != null && (o = r.parse(o));
  61869. var s = hE(n);
  61870. a == null && (i.status = s ? "show" : "hide");
  61871. var l = r.getExtent().slice();
  61872. l[0] > l[1] && l.reverse(), // Pick a value on axis when initializing.
  61873. (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");
  61874. }
  61875. }
  61876. function zk(t) {
  61877. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  61878. return e && e.axesInfo[zm(t)];
  61879. }
  61880. function X6e(t) {
  61881. var e = zk(t);
  61882. return e && e.axisPointerModel;
  61883. }
  61884. function hE(t) {
  61885. return !!t.get(["handle", "show"]);
  61886. }
  61887. function zm(t) {
  61888. return t.type + "||" + t.id;
  61889. }
  61890. var cP = {}, Qf = (
  61891. /** @class */
  61892. function(t) {
  61893. q(e, t);
  61894. function e() {
  61895. var n = t !== null && t.apply(this, arguments) || this;
  61896. return n.type = e.type, n;
  61897. }
  61898. return e.prototype.render = function(n, r, i, a) {
  61899. this.axisPointerClass && U6e(n), t.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(n, i, !0);
  61900. }, e.prototype.updateAxisPointer = function(n, r, i, a) {
  61901. this._doUpdateAxisPointerClass(n, i, !1);
  61902. }, e.prototype.remove = function(n, r) {
  61903. var i = this._axisPointer;
  61904. i && i.remove(r);
  61905. }, e.prototype.dispose = function(n, r) {
  61906. this._disposeAxisPointer(r), t.prototype.dispose.apply(this, arguments);
  61907. }, e.prototype._doUpdateAxisPointerClass = function(n, r, i) {
  61908. var a = e.getAxisPointerClass(this.axisPointerClass);
  61909. if (a) {
  61910. var o = X6e(n);
  61911. o ? (this._axisPointer || (this._axisPointer = new a())).render(n, o, r, i) : this._disposeAxisPointer(r);
  61912. }
  61913. }, e.prototype._disposeAxisPointer = function(n) {
  61914. this._axisPointer && this._axisPointer.dispose(n), this._axisPointer = null;
  61915. }, e.registerAxisPointerClass = function(n, r) {
  61916. if (process.env.NODE_ENV !== "production" && cP[n])
  61917. throw new Error("axisPointer " + n + " exists");
  61918. cP[n] = r;
  61919. }, e.getAxisPointerClass = function(n) {
  61920. return n && cP[n];
  61921. }, e.type = "axis", e;
  61922. }(Xt)
  61923. ), pE = bt();
  61924. function rne(t, e, n, r) {
  61925. var i = n.axis;
  61926. if (!i.scale.isBlank()) {
  61927. var a = n.getModel("splitArea"), o = a.getModel("areaStyle"), s = o.get("color"), l = r.coordinateSystem.getRect(), u = i.getTicksCoords({
  61928. tickModel: a,
  61929. clamp: !0
  61930. });
  61931. if (u.length) {
  61932. var c = s.length, f = pE(t).splitAreaColors, d = Pe(), h = 0;
  61933. if (f)
  61934. for (var p = 0; p < u.length; p++) {
  61935. var v = f.get(u[p].tickValue);
  61936. if (v != null) {
  61937. h = (v + (c - 1) * p) % c;
  61938. break;
  61939. }
  61940. }
  61941. var g = i.toGlobalCoord(u[0].coord), m = o.getAreaStyle();
  61942. s = ue(s) ? s : [s];
  61943. for (var p = 1; p < u.length; p++) {
  61944. var y = i.toGlobalCoord(u[p].coord), b = void 0, _ = void 0, O = void 0, S = void 0;
  61945. i.isHorizontal() ? (b = g, _ = l.y, O = y - b, S = l.height, g = b + O) : (b = l.x, _ = g, O = l.width, S = y - _, g = _ + S);
  61946. var x = u[p - 1].tickValue;
  61947. x != null && d.set(x, h), e.add(new mt({
  61948. anid: x != null ? "area_" + x : null,
  61949. shape: {
  61950. x: b,
  61951. y: _,
  61952. width: O,
  61953. height: S
  61954. },
  61955. style: Re({
  61956. fill: s[h]
  61957. }, m),
  61958. autoBatch: !0,
  61959. silent: !0
  61960. })), h = (h + 1) % c;
  61961. }
  61962. pE(t).splitAreaColors = d;
  61963. }
  61964. }
  61965. }
  61966. function ine(t) {
  61967. pE(t).splitAreaColors = null;
  61968. }
  61969. var Y6e = ["axisLine", "axisTickLabel", "axisName"], q6e = ["splitArea", "splitLine", "minorSplitLine"], ane = (
  61970. /** @class */
  61971. function(t) {
  61972. q(e, t);
  61973. function e() {
  61974. var n = t !== null && t.apply(this, arguments) || this;
  61975. return n.type = e.type, n.axisPointerClass = "CartesianAxisPointer", n;
  61976. }
  61977. return e.prototype.render = function(n, r, i, a) {
  61978. this.group.removeAll();
  61979. var o = this._axisGroup;
  61980. if (this._axisGroup = new Ve(), this.group.add(this._axisGroup), !!n.get("show")) {
  61981. var s = n.getCoordSysModel(), l = dE(s, n), u = new Jr(n, le({
  61982. handleAutoShown: function(f) {
  61983. for (var d = s.coordinateSystem.getCartesians(), h = 0; h < d.length; h++)
  61984. if (rE(d[h].getOtherAxis(n.axis).scale))
  61985. return !0;
  61986. return !1;
  61987. }
  61988. }, l));
  61989. k(Y6e, u.add, u), this._axisGroup.add(u.getGroup()), k(q6e, function(f) {
  61990. n.get([f, "show"]) && K6e[f](this, this._axisGroup, n, s);
  61991. }, this);
  61992. var c = a && a.type === "changeAxisOrder" && a.isInitSort;
  61993. c || Q0(o, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
  61994. }
  61995. }, e.prototype.remove = function() {
  61996. ine(this);
  61997. }, e.type = "cartesianAxis", e;
  61998. }(Qf)
  61999. ), K6e = {
  62000. splitLine: function(t, e, n, r) {
  62001. var i = n.axis;
  62002. if (!i.scale.isBlank()) {
  62003. var a = n.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
  62004. s = ue(s) ? s : [s];
  62005. for (var l = r.coordinateSystem.getRect(), u = i.isHorizontal(), c = 0, f = i.getTicksCoords({
  62006. tickModel: a
  62007. }), d = [], h = [], p = o.getLineStyle(), v = 0; v < f.length; v++) {
  62008. var g = i.toGlobalCoord(f[v].coord);
  62009. 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);
  62010. var m = c++ % s.length, y = f[v].tickValue, b = new Un({
  62011. anid: y != null ? "line_" + f[v].tickValue : null,
  62012. autoBatch: !0,
  62013. shape: {
  62014. x1: d[0],
  62015. y1: d[1],
  62016. x2: h[0],
  62017. y2: h[1]
  62018. },
  62019. style: Re({
  62020. stroke: s[m]
  62021. }, p),
  62022. silent: !0
  62023. });
  62024. Hh(b.shape, p.lineWidth), e.add(b);
  62025. }
  62026. }
  62027. },
  62028. minorSplitLine: function(t, e, n, r) {
  62029. var i = n.axis, a = n.getModel("minorSplitLine"), o = a.getModel("lineStyle"), s = r.coordinateSystem.getRect(), l = i.isHorizontal(), u = i.getMinorTicksCoords();
  62030. if (u.length)
  62031. for (var c = [], f = [], d = o.getLineStyle(), h = 0; h < u.length; h++)
  62032. for (var p = 0; p < u[h].length; p++) {
  62033. var v = i.toGlobalCoord(u[h][p].coord);
  62034. 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);
  62035. var g = new Un({
  62036. anid: "minor_line_" + u[h][p].tickValue,
  62037. autoBatch: !0,
  62038. shape: {
  62039. x1: c[0],
  62040. y1: c[1],
  62041. x2: f[0],
  62042. y2: f[1]
  62043. },
  62044. style: d,
  62045. silent: !0
  62046. });
  62047. Hh(g.shape, d.lineWidth), e.add(g);
  62048. }
  62049. },
  62050. splitArea: function(t, e, n, r) {
  62051. rne(t, e, n, r);
  62052. }
  62053. }, one = (
  62054. /** @class */
  62055. function(t) {
  62056. q(e, t);
  62057. function e() {
  62058. var n = t !== null && t.apply(this, arguments) || this;
  62059. return n.type = e.type, n;
  62060. }
  62061. return e.type = "xAxis", e;
  62062. }(ane)
  62063. ), J6e = (
  62064. /** @class */
  62065. function(t) {
  62066. q(e, t);
  62067. function e() {
  62068. var n = t !== null && t.apply(this, arguments) || this;
  62069. return n.type = one.type, n;
  62070. }
  62071. return e.type = "yAxis", e;
  62072. }(ane)
  62073. ), eBe = (
  62074. /** @class */
  62075. function(t) {
  62076. q(e, t);
  62077. function e() {
  62078. var n = t !== null && t.apply(this, arguments) || this;
  62079. return n.type = "grid", n;
  62080. }
  62081. return e.prototype.render = function(n, r) {
  62082. this.group.removeAll(), n.get("show") && this.group.add(new mt({
  62083. shape: n.coordinateSystem.getRect(),
  62084. style: Re({
  62085. fill: n.get("backgroundColor")
  62086. }, n.getItemStyle()),
  62087. silent: !0,
  62088. z2: -1
  62089. }));
  62090. }, e.type = "grid", e;
  62091. }(Xt)
  62092. ), iF = {
  62093. // gridIndex: 0,
  62094. // gridId: '',
  62095. offset: 0
  62096. };
  62097. function sne(t) {
  62098. t.registerComponentView(eBe), t.registerComponentModel($6e), t.registerCoordinateSystem("cartesian2d", L6e), Uh(t, "x", cE, iF), Uh(t, "y", cE, iF), t.registerComponentView(one), t.registerComponentView(J6e), t.registerPreprocessor(function(e) {
  62099. e.xAxis && e.yAxis && !e.grid && (e.grid = {});
  62100. });
  62101. }
  62102. function tBe(t) {
  62103. at(sne), t.registerSeriesModel(x6e), t.registerChartView(P6e), t.registerLayout(Y0("scatter"));
  62104. }
  62105. function nBe(t) {
  62106. t.eachSeriesByType("radar", function(e) {
  62107. var n = e.getData(), r = [], i = e.coordinateSystem;
  62108. if (i) {
  62109. var a = i.getIndicatorAxes();
  62110. k(a, function(o, s) {
  62111. n.each(n.mapDimension(a[s].dim), function(l, u) {
  62112. r[u] = r[u] || [];
  62113. var c = i.dataToPoint(l, s);
  62114. r[u][s] = aF(c) ? c : oF(i);
  62115. });
  62116. }), n.each(function(o) {
  62117. var s = Cq(r[o], function(l) {
  62118. return aF(l);
  62119. }) || oF(i);
  62120. r[o].push(s.slice()), n.setItemLayout(o, r[o]);
  62121. });
  62122. }
  62123. });
  62124. }
  62125. function aF(t) {
  62126. return !isNaN(t[0]) && !isNaN(t[1]);
  62127. }
  62128. function oF(t) {
  62129. return [t.cx, t.cy];
  62130. }
  62131. function rBe(t) {
  62132. var e = t.polar;
  62133. if (e) {
  62134. ue(e) || (e = [e]);
  62135. var n = [];
  62136. k(e, function(r, i) {
  62137. r.indicator ? (r.type && !r.shape && (r.shape = r.type), t.radar = t.radar || [], ue(t.radar) || (t.radar = [t.radar]), t.radar.push(r)) : n.push(r);
  62138. }), t.polar = n;
  62139. }
  62140. k(t.series, function(r) {
  62141. r && r.type === "radar" && r.polarIndex && (r.radarIndex = r.polarIndex);
  62142. });
  62143. }
  62144. var iBe = (
  62145. /** @class */
  62146. function(t) {
  62147. q(e, t);
  62148. function e() {
  62149. var n = t !== null && t.apply(this, arguments) || this;
  62150. return n.type = e.type, n;
  62151. }
  62152. return e.prototype.render = function(n, r, i) {
  62153. var a = n.coordinateSystem, o = this.group, s = n.getData(), l = this._data;
  62154. function u(d, h) {
  62155. var p = d.getItemVisual(h, "symbol") || "circle";
  62156. if (p !== "none") {
  62157. var v = $p(d.getItemVisual(h, "symbolSize")), g = $n(p, -1, -1, 2, 2), m = d.getItemVisual(h, "symbolRotate") || 0;
  62158. return g.attr({
  62159. style: {
  62160. strokeNoScale: !0
  62161. },
  62162. z2: 100,
  62163. scaleX: v[0] / 2,
  62164. scaleY: v[1] / 2,
  62165. rotation: m * Math.PI / 180 || 0
  62166. }), g;
  62167. }
  62168. }
  62169. function c(d, h, p, v, g, m) {
  62170. p.removeAll();
  62171. for (var y = 0; y < h.length - 1; y++) {
  62172. var b = u(v, g);
  62173. b && (b.__dimIdx = y, d[y] ? (b.setPosition(d[y]), Nf[m ? "initProps" : "updateProps"](b, {
  62174. x: h[y][0],
  62175. y: h[y][1]
  62176. }, n, g)) : b.setPosition(h[y]), p.add(b));
  62177. }
  62178. }
  62179. function f(d) {
  62180. return ce(d, function(h) {
  62181. return [a.cx, a.cy];
  62182. });
  62183. }
  62184. s.diff(l).add(function(d) {
  62185. var h = s.getItemLayout(d);
  62186. if (h) {
  62187. var p = new ai(), v = new oi(), g = {
  62188. shape: {
  62189. points: h
  62190. }
  62191. };
  62192. p.shape.points = f(h), v.shape.points = f(h), Yt(p, g, n, d), Yt(v, g, n, d);
  62193. var m = new Ve(), y = new Ve();
  62194. m.add(v), m.add(p), m.add(y), c(v.shape.points, h, y, s, d, !0), s.setItemGraphicEl(d, m);
  62195. }
  62196. }).update(function(d, h) {
  62197. var p = l.getItemGraphicEl(h), v = p.childAt(0), g = p.childAt(1), m = p.childAt(2), y = {
  62198. shape: {
  62199. points: s.getItemLayout(d)
  62200. }
  62201. };
  62202. y.shape.points && (c(v.shape.points, y.shape.points, m, s, d, !1), uo(g), uo(v), Ct(v, y, n), Ct(g, y, n), s.setItemGraphicEl(d, p));
  62203. }).remove(function(d) {
  62204. o.remove(l.getItemGraphicEl(d));
  62205. }).execute(), s.eachItemGraphicEl(function(d, h) {
  62206. var p = s.getItemModel(h), v = d.childAt(0), g = d.childAt(1), m = d.childAt(2), y = s.getItemVisual(h, "style"), b = y.fill;
  62207. o.add(d), v.useStyle(Re(p.getModel("lineStyle").getLineStyle(), {
  62208. fill: "none",
  62209. stroke: b
  62210. })), Tr(v, p, "lineStyle"), Tr(g, p, "areaStyle");
  62211. var _ = p.getModel("areaStyle"), O = _.isEmpty() && _.parentModel.isEmpty();
  62212. g.ignore = O, k(["emphasis", "select", "blur"], function(C) {
  62213. var T = p.getModel([C, "areaStyle"]), w = T.isEmpty() && T.parentModel.isEmpty();
  62214. g.ensureState(C).ignore = w && O;
  62215. }), g.useStyle(Re(_.getAreaStyle(), {
  62216. fill: b,
  62217. opacity: 0.7,
  62218. decal: y.decal
  62219. }));
  62220. var S = p.getModel("emphasis"), x = S.getModel("itemStyle").getItemStyle();
  62221. m.eachChild(function(C) {
  62222. if (C instanceof lr) {
  62223. var T = C.style;
  62224. C.useStyle(le({
  62225. // TODO other properties like x, y ?
  62226. image: T.image,
  62227. x: T.x,
  62228. y: T.y,
  62229. width: T.width,
  62230. height: T.height
  62231. }, y));
  62232. } else
  62233. C.useStyle(y), C.setColor(b), C.style.strokeNoScale = !0;
  62234. var w = C.ensureState("emphasis");
  62235. w.style = Le(x);
  62236. var P = s.getStore().get(s.getDimensionIndex(C.__dimIdx), h);
  62237. (P == null || isNaN(P)) && (P = ""), Pr(C, er(p), {
  62238. labelFetcher: s.hostModel,
  62239. labelDataIndex: h,
  62240. labelDimIndex: C.__dimIdx,
  62241. defaultText: P,
  62242. inheritColor: b,
  62243. defaultOpacity: y.opacity
  62244. });
  62245. }), bn(d, S.get("focus"), S.get("blurScope"), S.get("disabled"));
  62246. }), this._data = s;
  62247. }, e.prototype.remove = function() {
  62248. this.group.removeAll(), this._data = null;
  62249. }, e.type = "radar", e;
  62250. }(zt)
  62251. ), aBe = (
  62252. /** @class */
  62253. function(t) {
  62254. q(e, t);
  62255. function e() {
  62256. var n = t !== null && t.apply(this, arguments) || this;
  62257. return n.type = e.type, n.hasSymbolVisual = !0, n;
  62258. }
  62259. return e.prototype.init = function(n) {
  62260. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new K0(xe(this.getData, this), xe(this.getRawData, this));
  62261. }, e.prototype.getInitialData = function(n, r) {
  62262. return Ip(this, {
  62263. generateCoord: "indicator_",
  62264. generateCoordCount: 1 / 0
  62265. });
  62266. }, e.prototype.formatTooltip = function(n, r, i) {
  62267. var a = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), l = this.getData().getName(n), u = l === "" ? this.name : l, c = ree(this, n);
  62268. return tr("section", {
  62269. header: u,
  62270. sortBlocks: !0,
  62271. blocks: ce(s, function(f) {
  62272. var d = a.get(a.mapDimension(f.dim), n);
  62273. return tr("nameValue", {
  62274. markerType: "subItem",
  62275. markerColor: c,
  62276. name: f.name,
  62277. value: d,
  62278. sortParam: d
  62279. });
  62280. })
  62281. });
  62282. }, e.prototype.getTooltipPosition = function(n) {
  62283. if (n != null) {
  62284. for (var r = this.getData(), i = this.coordinateSystem, a = r.getValues(ce(i.dimensions, function(u) {
  62285. return r.mapDimension(u);
  62286. }), n), o = 0, s = a.length; o < s; o++)
  62287. if (!isNaN(a[o])) {
  62288. var l = i.getIndicatorAxes();
  62289. return i.coordToPoint(l[o].dataToCoord(a[o]), o);
  62290. }
  62291. }
  62292. }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
  62293. // zlevel: 0,
  62294. z: 2,
  62295. colorBy: "data",
  62296. coordinateSystem: "radar",
  62297. legendHoverLink: !0,
  62298. radarIndex: 0,
  62299. lineStyle: {
  62300. width: 2,
  62301. type: "solid",
  62302. join: "round"
  62303. },
  62304. label: {
  62305. position: "top"
  62306. },
  62307. // areaStyle: {
  62308. // },
  62309. // itemStyle: {}
  62310. symbolSize: 8
  62311. // symbolRotate: null
  62312. }, e;
  62313. }(Ht)
  62314. ), Ov = ene.value;
  62315. function Cb(t, e) {
  62316. return Re({
  62317. show: e
  62318. }, t);
  62319. }
  62320. var oBe = (
  62321. /** @class */
  62322. function(t) {
  62323. q(e, t);
  62324. function e() {
  62325. var n = t !== null && t.apply(this, arguments) || this;
  62326. return n.type = e.type, n;
  62327. }
  62328. return e.prototype.optionUpdated = function() {
  62329. 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) {
  62330. p.max != null && p.max > 0 && !p.min ? p.min = 0 : p.min != null && p.min < 0 && !p.max && (p.max = 0);
  62331. var v = l;
  62332. p.color != null && (v = Re({
  62333. color: p.color
  62334. }, l));
  62335. var g = qe(Le(p), {
  62336. boundaryGap: n,
  62337. splitNumber: r,
  62338. scale: i,
  62339. axisLine: a,
  62340. axisTick: o,
  62341. // axisType: axisType,
  62342. axisLabel: s,
  62343. // Compatible with 2 and use text
  62344. name: p.text,
  62345. showName: u,
  62346. nameLocation: "end",
  62347. nameGap: f,
  62348. // min: 0,
  62349. nameTextStyle: v,
  62350. triggerEvent: d
  62351. }, !1);
  62352. if (Oe(c)) {
  62353. var m = g.name;
  62354. g.name = c.replace("{value}", m ?? "");
  62355. } else Me(c) && (g.name = c(g.name, g));
  62356. var y = new Wt(g, null, this.ecModel);
  62357. return xn(y, Mp.prototype), y.mainType = "radar", y.componentIndex = this.componentIndex, y;
  62358. }, this);
  62359. this._indicatorModels = h;
  62360. }, e.prototype.getIndicatorModels = function() {
  62361. return this._indicatorModels;
  62362. }, e.type = "radar", e.defaultOption = {
  62363. // zlevel: 0,
  62364. z: 0,
  62365. center: ["50%", "50%"],
  62366. radius: "75%",
  62367. startAngle: 90,
  62368. axisName: {
  62369. show: !0
  62370. // formatter: null
  62371. // textStyle: {}
  62372. },
  62373. boundaryGap: [0, 0],
  62374. splitNumber: 5,
  62375. axisNameGap: 15,
  62376. scale: !1,
  62377. // Polygon or circle
  62378. shape: "polygon",
  62379. axisLine: qe({
  62380. lineStyle: {
  62381. color: "#bbb"
  62382. }
  62383. }, Ov.axisLine),
  62384. axisLabel: Cb(Ov.axisLabel, !1),
  62385. axisTick: Cb(Ov.axisTick, !1),
  62386. // axisType: 'value',
  62387. splitLine: Cb(Ov.splitLine, !0),
  62388. splitArea: Cb(Ov.splitArea, !0),
  62389. // {text, min, max}
  62390. indicator: []
  62391. }, e;
  62392. }(rt)
  62393. ), sBe = ["axisLine", "axisTickLabel", "axisName"], lBe = (
  62394. /** @class */
  62395. function(t) {
  62396. q(e, t);
  62397. function e() {
  62398. var n = t !== null && t.apply(this, arguments) || this;
  62399. return n.type = e.type, n;
  62400. }
  62401. return e.prototype.render = function(n, r, i) {
  62402. var a = this.group;
  62403. a.removeAll(), this._buildAxes(n), this._buildSplitLineAndArea(n);
  62404. }, e.prototype._buildAxes = function(n) {
  62405. var r = n.coordinateSystem, i = r.getIndicatorAxes(), a = ce(i, function(o) {
  62406. var s = o.model.get("showName") ? o.name : "", l = new Jr(o.model, {
  62407. axisName: s,
  62408. position: [r.cx, r.cy],
  62409. rotation: o.angle,
  62410. labelDirection: -1,
  62411. tickDirection: -1,
  62412. nameDirection: 1
  62413. });
  62414. return l;
  62415. });
  62416. k(a, function(o) {
  62417. k(sBe, o.add, o), this.group.add(o.getGroup());
  62418. }, this);
  62419. }, e.prototype._buildSplitLineAndArea = function(n) {
  62420. var r = n.coordinateSystem, i = r.getIndicatorAxes();
  62421. if (!i.length)
  62422. return;
  62423. 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 = ue(d) ? d : [d], v = ue(h) ? h : [h], g = [], m = [];
  62424. function y(E, R, N) {
  62425. var V = N % R.length;
  62426. return E[V] = E[V] || [], V;
  62427. }
  62428. if (a === "circle")
  62429. for (var b = i[0].getTicksCoords(), _ = r.cx, O = r.cy, S = 0; S < b.length; S++) {
  62430. if (c) {
  62431. var x = y(g, p, S);
  62432. g[x].push(new ul({
  62433. shape: {
  62434. cx: _,
  62435. cy: O,
  62436. r: b[S].coord
  62437. }
  62438. }));
  62439. }
  62440. if (f && S < b.length - 1) {
  62441. var x = y(m, v, S);
  62442. m[x].push(new V0({
  62443. shape: {
  62444. cx: _,
  62445. cy: O,
  62446. r0: b[S].coord,
  62447. r: b[S + 1].coord
  62448. }
  62449. }));
  62450. }
  62451. }
  62452. else
  62453. for (var C, T = ce(i, function(E, R) {
  62454. var N = E.getTicksCoords();
  62455. return C = C == null ? N.length - 1 : Math.min(N.length - 1, C), ce(N, function(V) {
  62456. return r.coordToPoint(V.coord, R);
  62457. });
  62458. }), w = [], S = 0; S <= C; S++) {
  62459. for (var P = [], $ = 0; $ < i.length; $++)
  62460. P.push(T[$][S]);
  62461. if (P[0] ? P.push(P[0].slice()) : process.env.NODE_ENV !== "production" && console.error("Can't draw value axis " + S), c) {
  62462. var x = y(g, p, S);
  62463. g[x].push(new oi({
  62464. shape: {
  62465. points: P
  62466. }
  62467. }));
  62468. }
  62469. if (f && w) {
  62470. var x = y(m, v, S - 1);
  62471. m[x].push(new ai({
  62472. shape: {
  62473. points: P.concat(w)
  62474. }
  62475. }));
  62476. }
  62477. w = P.slice().reverse();
  62478. }
  62479. var A = l.getLineStyle(), D = u.getAreaStyle();
  62480. k(m, function(E, R) {
  62481. this.group.add(Bi(E, {
  62482. style: Re({
  62483. stroke: "none",
  62484. fill: v[R % v.length]
  62485. }, D),
  62486. silent: !0
  62487. }));
  62488. }, this), k(g, function(E, R) {
  62489. this.group.add(Bi(E, {
  62490. style: Re({
  62491. fill: "none",
  62492. stroke: p[R % p.length]
  62493. }, A),
  62494. silent: !0
  62495. }));
  62496. }, this);
  62497. }, e.type = "radar", e;
  62498. }(Xt)
  62499. ), uBe = (
  62500. /** @class */
  62501. function(t) {
  62502. q(e, t);
  62503. function e(n, r, i) {
  62504. var a = t.call(this, n, r, i) || this;
  62505. return a.type = "value", a.angle = 0, a.name = "", a;
  62506. }
  62507. return e;
  62508. }(Va)
  62509. ), cBe = (
  62510. /** @class */
  62511. function() {
  62512. function t(e, n, r) {
  62513. this.dimensions = [], this._model = e, this._indicatorAxes = ce(e.getIndicatorModels(), function(i, a) {
  62514. var o = "indicator_" + a, s = new uBe(
  62515. o,
  62516. new qs()
  62517. // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()
  62518. );
  62519. return s.name = i.get("name"), s.model = i, i.axis = s, this.dimensions.push(o), s;
  62520. }, this), this.resize(e, r);
  62521. }
  62522. return t.prototype.getIndicatorAxes = function() {
  62523. return this._indicatorAxes;
  62524. }, t.prototype.dataToPoint = function(e, n) {
  62525. var r = this._indicatorAxes[n];
  62526. return this.coordToPoint(r.dataToCoord(e), n);
  62527. }, t.prototype.coordToPoint = function(e, n) {
  62528. var r = this._indicatorAxes[n], i = r.angle, a = this.cx + e * Math.cos(i), o = this.cy - e * Math.sin(i);
  62529. return [a, o];
  62530. }, t.prototype.pointToData = function(e) {
  62531. var n = e[0] - this.cx, r = e[1] - this.cy, i = Math.sqrt(n * n + r * r);
  62532. n /= i, r /= i;
  62533. for (var a = Math.atan2(-r, n), o = 1 / 0, s, l = -1, u = 0; u < this._indicatorAxes.length; u++) {
  62534. var c = this._indicatorAxes[u], f = Math.abs(a - c.angle);
  62535. f < o && (s = c, l = u, o = f);
  62536. }
  62537. return [l, +(s && s.coordToData(i))];
  62538. }, t.prototype.resize = function(e, n) {
  62539. var r = e.get("center"), i = n.getWidth(), a = n.getHeight(), o = Math.min(i, a) / 2;
  62540. this.cx = _e(r[0], i), this.cy = _e(r[1], a), this.startAngle = e.get("startAngle") * Math.PI / 180;
  62541. var s = e.get("radius");
  62542. (Oe(s) || St(s)) && (s = [0, s]), this.r0 = _e(s[0], o), this.r = _e(s[1], o), k(this._indicatorAxes, function(l, u) {
  62543. l.setExtent(this.r0, this.r);
  62544. var c = this.startAngle + u * Math.PI * 2 / this._indicatorAxes.length;
  62545. c = Math.atan2(Math.sin(c), Math.cos(c)), l.angle = c;
  62546. }, this);
  62547. }, t.prototype.update = function(e, n) {
  62548. var r = this._indicatorAxes, i = this._model;
  62549. k(r, function(s) {
  62550. s.scale.setExtent(1 / 0, -1 / 0);
  62551. }), e.eachSeriesByType("radar", function(s, l) {
  62552. if (!(s.get("coordinateSystem") !== "radar" || e.getComponent("radar", s.get("radarIndex")) !== i)) {
  62553. var u = s.getData();
  62554. k(r, function(c) {
  62555. c.scale.unionExtentFromData(u, u.mapDimension(c.dim));
  62556. });
  62557. }
  62558. }, this);
  62559. var a = i.get("splitNumber"), o = new qs();
  62560. o.setExtent(0, a), o.setInterval(1), k(r, function(s, l) {
  62561. tne(s.scale, s.model, o);
  62562. });
  62563. }, t.prototype.convertToPixel = function(e, n, r) {
  62564. return console.warn("Not implemented."), null;
  62565. }, t.prototype.convertFromPixel = function(e, n, r) {
  62566. return console.warn("Not implemented."), null;
  62567. }, t.prototype.containPoint = function(e) {
  62568. return console.warn("Not implemented."), !1;
  62569. }, t.create = function(e, n) {
  62570. var r = [];
  62571. return e.eachComponent("radar", function(i) {
  62572. var a = new t(i, e, n);
  62573. r.push(a), i.coordinateSystem = a;
  62574. }), e.eachSeriesByType("radar", function(i) {
  62575. i.get("coordinateSystem") === "radar" && (i.coordinateSystem = r[i.get("radarIndex") || 0]);
  62576. }), r;
  62577. }, t.dimensions = [], t;
  62578. }()
  62579. );
  62580. function fBe(t) {
  62581. t.registerCoordinateSystem("radar", cBe), t.registerComponentModel(oBe), t.registerComponentView(lBe), t.registerVisual({
  62582. seriesType: "radar",
  62583. reset: function(e) {
  62584. var n = e.getData();
  62585. n.each(function(r) {
  62586. n.setItemVisual(r, "legendIcon", "roundRect");
  62587. }), n.setVisual("legendIcon", "roundRect");
  62588. }
  62589. });
  62590. }
  62591. function dBe(t) {
  62592. at(fBe), t.registerChartView(iBe), t.registerSeriesModel(aBe), t.registerLayout(nBe), t.registerProcessor(q0("radar")), t.registerPreprocessor(rBe);
  62593. }
  62594. var sF = "\0_ec_interaction_mutex";
  62595. function hBe(t, e, n) {
  62596. var r = Vk(t);
  62597. r[e] = n;
  62598. }
  62599. function pBe(t, e, n) {
  62600. var r = Vk(t), i = r[e];
  62601. i === n && (r[e] = null);
  62602. }
  62603. function lF(t, e) {
  62604. return !!Vk(t)[e];
  62605. }
  62606. function Vk(t) {
  62607. return t[sF] || (t[sF] = {});
  62608. }
  62609. go({
  62610. type: "takeGlobalCursor",
  62611. event: "globalCursorTaken",
  62612. update: "update"
  62613. }, On);
  62614. var J0 = (
  62615. /** @class */
  62616. function(t) {
  62617. q(e, t);
  62618. function e(n) {
  62619. var r = t.call(this) || this;
  62620. r._zr = n;
  62621. var i = xe(r._mousedownHandler, r), a = xe(r._mousemoveHandler, r), o = xe(r._mouseupHandler, r), s = xe(r._mousewheelHandler, r), l = xe(r._pinchHandler, r);
  62622. return r.enable = function(u, c) {
  62623. this.disable(), this._opt = Re(Le(c) || {}, {
  62624. zoomOnMouseWheel: !0,
  62625. moveOnMouseMove: !0,
  62626. // By default, wheel do not trigger move.
  62627. moveOnMouseWheel: !1,
  62628. preventDefaultMouseMove: !0
  62629. }), 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));
  62630. }, r.disable = function() {
  62631. n.off("mousedown", i), n.off("mousemove", a), n.off("mouseup", o), n.off("mousewheel", s), n.off("pinch", l);
  62632. }, r;
  62633. }
  62634. return e.prototype.isDragging = function() {
  62635. return this._dragging;
  62636. }, e.prototype.isPinching = function() {
  62637. return this._pinching;
  62638. }, e.prototype.setPointerChecker = function(n) {
  62639. this.pointerChecker = n;
  62640. }, e.prototype.dispose = function() {
  62641. this.disable();
  62642. }, e.prototype._mousedownHandler = function(n) {
  62643. if (!L6(n)) {
  62644. for (var r = n.target; r; ) {
  62645. if (r.draggable)
  62646. return;
  62647. r = r.__hostTarget || r.parent;
  62648. }
  62649. var i = n.offsetX, a = n.offsetY;
  62650. this.pointerChecker && this.pointerChecker(n, i, a) && (this._x = i, this._y = a, this._dragging = !0);
  62651. }
  62652. }, e.prototype._mousemoveHandler = function(n) {
  62653. if (!(!this._dragging || !U_("moveOnMouseMove", n, this._opt) || n.gestureEvent === "pinch" || lF(this._zr, "globalPan"))) {
  62654. var r = n.offsetX, i = n.offsetY, a = this._x, o = this._y, s = r - a, l = i - o;
  62655. this._x = r, this._y = i, this._opt.preventDefaultMouseMove && js(n.event), lne(this, "pan", "moveOnMouseMove", n, {
  62656. dx: s,
  62657. dy: l,
  62658. oldX: a,
  62659. oldY: o,
  62660. newX: r,
  62661. newY: i,
  62662. isAvailableBehavior: null
  62663. });
  62664. }
  62665. }, e.prototype._mouseupHandler = function(n) {
  62666. L6(n) || (this._dragging = !1);
  62667. }, e.prototype._mousewheelHandler = function(n) {
  62668. var r = U_("zoomOnMouseWheel", n, this._opt), i = U_("moveOnMouseWheel", n, this._opt), a = n.wheelDelta, o = Math.abs(a), s = n.offsetX, l = n.offsetY;
  62669. if (!(a === 0 || !r && !i)) {
  62670. if (r) {
  62671. var u = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, c = a > 0 ? u : 1 / u;
  62672. fP(this, "zoom", "zoomOnMouseWheel", n, {
  62673. scale: c,
  62674. originX: s,
  62675. originY: l,
  62676. isAvailableBehavior: null
  62677. });
  62678. }
  62679. if (i) {
  62680. var f = Math.abs(a), d = (a > 0 ? 1 : -1) * (f > 3 ? 0.4 : f > 1 ? 0.15 : 0.05);
  62681. fP(this, "scrollMove", "moveOnMouseWheel", n, {
  62682. scrollDelta: d,
  62683. originX: s,
  62684. originY: l,
  62685. isAvailableBehavior: null
  62686. });
  62687. }
  62688. }
  62689. }, e.prototype._pinchHandler = function(n) {
  62690. if (!lF(this._zr, "globalPan")) {
  62691. var r = n.pinchScale > 1 ? 1.1 : 1 / 1.1;
  62692. fP(this, "zoom", null, n, {
  62693. scale: r,
  62694. originX: n.pinchX,
  62695. originY: n.pinchY,
  62696. isAvailableBehavior: null
  62697. });
  62698. }
  62699. }, e;
  62700. }(La)
  62701. );
  62702. function fP(t, e, n, r, i) {
  62703. t.pointerChecker && t.pointerChecker(r, i.originX, i.originY) && (js(r.event), lne(t, e, n, r, i));
  62704. }
  62705. function lne(t, e, n, r, i) {
  62706. i.isAvailableBehavior = xe(U_, null, n, r), t.trigger(e, i);
  62707. }
  62708. function U_(t, e, n) {
  62709. var r = n[t];
  62710. return !t || r && (!Oe(r) || e.event[r + "Key"]);
  62711. }
  62712. function Fk(t, e, n) {
  62713. var r = t.target;
  62714. r.x += e, r.y += n, r.dirty();
  62715. }
  62716. function Wk(t, e, n, r) {
  62717. var i = t.target, a = t.zoomLimit, o = t.zoom = t.zoom || 1;
  62718. if (o *= e, a) {
  62719. var s = a.min || 0, l = a.max || 1 / 0;
  62720. o = Math.max(Math.min(l, o), s);
  62721. }
  62722. var u = o / t.zoom;
  62723. 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();
  62724. }
  62725. var vBe = {
  62726. axisPointer: 1,
  62727. tooltip: 1,
  62728. brush: 1
  62729. };
  62730. function yw(t, e, n) {
  62731. var r = e.getComponentByElement(t.topTarget), i = r && r.coordinateSystem;
  62732. return r && r !== n && !vBe.hasOwnProperty(r.mainType) && i && i.model !== n;
  62733. }
  62734. function une(t) {
  62735. if (Oe(t)) {
  62736. var e = new DOMParser();
  62737. t = e.parseFromString(t, "text/xml");
  62738. }
  62739. var n = t;
  62740. for (n.nodeType === 9 && (n = n.firstChild); n.nodeName.toLowerCase() !== "svg" || n.nodeType !== 1; )
  62741. n = n.nextSibling;
  62742. return n;
  62743. }
  62744. var dP, IO = {
  62745. fill: "fill",
  62746. stroke: "stroke",
  62747. "stroke-width": "lineWidth",
  62748. opacity: "opacity",
  62749. "fill-opacity": "fillOpacity",
  62750. "stroke-opacity": "strokeOpacity",
  62751. "stroke-dasharray": "lineDash",
  62752. "stroke-dashoffset": "lineDashOffset",
  62753. "stroke-linecap": "lineCap",
  62754. "stroke-linejoin": "lineJoin",
  62755. "stroke-miterlimit": "miterLimit",
  62756. "font-family": "fontFamily",
  62757. "font-size": "fontSize",
  62758. "font-style": "fontStyle",
  62759. "font-weight": "fontWeight",
  62760. "text-anchor": "textAlign",
  62761. visibility: "visibility",
  62762. display: "display"
  62763. }, uF = st(IO), DO = {
  62764. "alignment-baseline": "textBaseline",
  62765. "stop-color": "stopColor"
  62766. }, cF = st(DO), gBe = function() {
  62767. function t() {
  62768. this._defs = {}, this._root = null;
  62769. }
  62770. return t.prototype.parse = function(e, n) {
  62771. n = n || {};
  62772. var r = une(e);
  62773. if (process.env.NODE_ENV !== "production" && !r)
  62774. throw new Error("Illegal svg");
  62775. this._defsUsePending = [];
  62776. var i = new Ve();
  62777. this._root = i;
  62778. var a = [], o = r.getAttribute("viewBox") || "", s = parseFloat(r.getAttribute("width") || n.width), l = parseFloat(r.getAttribute("height") || n.height);
  62779. isNaN(s) && (s = null), isNaN(l) && (l = null), Ei(r, i, null, !0, !1);
  62780. for (var u = r.firstChild; u; )
  62781. this._parseNode(u, i, a, null, !1, !1), u = u.nextSibling;
  62782. bBe(this._defs, this._defsUsePending), this._defsUsePending = [];
  62783. var c, f;
  62784. if (o) {
  62785. var d = bw(o);
  62786. d.length >= 4 && (c = {
  62787. x: parseFloat(d[0] || 0),
  62788. y: parseFloat(d[1] || 0),
  62789. width: parseFloat(d[2]),
  62790. height: parseFloat(d[3])
  62791. });
  62792. }
  62793. if (c && s != null && l != null && (f = fne(c, { x: 0, y: 0, width: s, height: l }), !n.ignoreViewBox)) {
  62794. var h = i;
  62795. i = new Ve(), i.add(h), h.scaleX = h.scaleY = f.scale, h.x = f.x, h.y = f.y;
  62796. }
  62797. return !n.ignoreRootClip && s != null && l != null && i.setClipPath(new mt({
  62798. shape: { x: 0, y: 0, width: s, height: l }
  62799. })), {
  62800. root: i,
  62801. width: s,
  62802. height: l,
  62803. viewBoxRect: c,
  62804. viewBoxTransform: f,
  62805. named: a
  62806. };
  62807. }, t.prototype._parseNode = function(e, n, r, i, a, o) {
  62808. var s = e.nodeName.toLowerCase(), l, u = i;
  62809. if (s === "defs" && (a = !0), s === "text" && (o = !0), s === "defs" || s === "switch")
  62810. l = n;
  62811. else {
  62812. if (!a) {
  62813. var c = dP[s];
  62814. if (c && Ce(dP, s)) {
  62815. l = c.call(this, e, n);
  62816. var f = e.getAttribute("name");
  62817. if (f) {
  62818. var d = {
  62819. name: f,
  62820. namedFrom: null,
  62821. svgNodeTagLower: s,
  62822. el: l
  62823. };
  62824. r.push(d), s === "g" && (u = d);
  62825. } else i && r.push({
  62826. name: i.name,
  62827. namedFrom: i,
  62828. svgNodeTagLower: s,
  62829. el: l
  62830. });
  62831. n.add(l);
  62832. }
  62833. }
  62834. var h = fF[s];
  62835. if (h && Ce(fF, s)) {
  62836. var p = h.call(this, e), v = e.getAttribute("id");
  62837. v && (this._defs[v] = p);
  62838. }
  62839. }
  62840. if (l && l.isGroup)
  62841. for (var g = e.firstChild; g; )
  62842. g.nodeType === 1 ? this._parseNode(g, l, r, u, a, o) : g.nodeType === 3 && o && this._parseText(g, l), g = g.nextSibling;
  62843. }, t.prototype._parseText = function(e, n) {
  62844. var r = new Qh({
  62845. style: {
  62846. text: e.textContent
  62847. },
  62848. silent: !0,
  62849. x: this._textX || 0,
  62850. y: this._textY || 0
  62851. });
  62852. aa(n, r), Ei(e, r, this._defsUsePending, !1, !1), mBe(r, n);
  62853. var i = r.style, a = i.fontSize;
  62854. a && a < 9 && (i.fontSize = 9, r.scaleX *= a / 9, r.scaleY *= a / 9);
  62855. var o = (i.fontSize || i.fontFamily) && [
  62856. i.fontStyle,
  62857. i.fontWeight,
  62858. (i.fontSize || 12) + "px",
  62859. i.fontFamily || "sans-serif"
  62860. ].join(" ");
  62861. i.font = o;
  62862. var s = r.getBoundingRect();
  62863. return this._textX += s.width, n.add(r), r;
  62864. }, t.internalField = function() {
  62865. dP = {
  62866. g: function(e, n) {
  62867. var r = new Ve();
  62868. return aa(n, r), Ei(e, r, this._defsUsePending, !1, !1), r;
  62869. },
  62870. rect: function(e, n) {
  62871. var r = new mt();
  62872. return aa(n, r), Ei(e, r, this._defsUsePending, !1, !1), r.setShape({
  62873. x: parseFloat(e.getAttribute("x") || "0"),
  62874. y: parseFloat(e.getAttribute("y") || "0"),
  62875. width: parseFloat(e.getAttribute("width") || "0"),
  62876. height: parseFloat(e.getAttribute("height") || "0")
  62877. }), r.silent = !0, r;
  62878. },
  62879. circle: function(e, n) {
  62880. var r = new ul();
  62881. return aa(n, r), Ei(e, r, this._defsUsePending, !1, !1), r.setShape({
  62882. cx: parseFloat(e.getAttribute("cx") || "0"),
  62883. cy: parseFloat(e.getAttribute("cy") || "0"),
  62884. r: parseFloat(e.getAttribute("r") || "0")
  62885. }), r.silent = !0, r;
  62886. },
  62887. line: function(e, n) {
  62888. var r = new Un();
  62889. return aa(n, r), Ei(e, r, this._defsUsePending, !1, !1), r.setShape({
  62890. x1: parseFloat(e.getAttribute("x1") || "0"),
  62891. y1: parseFloat(e.getAttribute("y1") || "0"),
  62892. x2: parseFloat(e.getAttribute("x2") || "0"),
  62893. y2: parseFloat(e.getAttribute("y2") || "0")
  62894. }), r.silent = !0, r;
  62895. },
  62896. ellipse: function(e, n) {
  62897. var r = new Yx();
  62898. return aa(n, r), Ei(e, r, this._defsUsePending, !1, !1), r.setShape({
  62899. cx: parseFloat(e.getAttribute("cx") || "0"),
  62900. cy: parseFloat(e.getAttribute("cy") || "0"),
  62901. rx: parseFloat(e.getAttribute("rx") || "0"),
  62902. ry: parseFloat(e.getAttribute("ry") || "0")
  62903. }), r.silent = !0, r;
  62904. },
  62905. polygon: function(e, n) {
  62906. var r = e.getAttribute("points"), i;
  62907. r && (i = pF(r));
  62908. var a = new ai({
  62909. shape: {
  62910. points: i || []
  62911. },
  62912. silent: !0
  62913. });
  62914. return aa(n, a), Ei(e, a, this._defsUsePending, !1, !1), a;
  62915. },
  62916. polyline: function(e, n) {
  62917. var r = e.getAttribute("points"), i;
  62918. r && (i = pF(r));
  62919. var a = new oi({
  62920. shape: {
  62921. points: i || []
  62922. },
  62923. silent: !0
  62924. });
  62925. return aa(n, a), Ei(e, a, this._defsUsePending, !1, !1), a;
  62926. },
  62927. image: function(e, n) {
  62928. var r = new lr();
  62929. return aa(n, r), Ei(e, r, this._defsUsePending, !1, !1), r.setStyle({
  62930. image: e.getAttribute("xlink:href") || e.getAttribute("href"),
  62931. x: +e.getAttribute("x"),
  62932. y: +e.getAttribute("y"),
  62933. width: +e.getAttribute("width"),
  62934. height: +e.getAttribute("height")
  62935. }), r.silent = !0, r;
  62936. },
  62937. text: function(e, n) {
  62938. var r = e.getAttribute("x") || "0", i = e.getAttribute("y") || "0", a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0";
  62939. this._textX = parseFloat(r) + parseFloat(a), this._textY = parseFloat(i) + parseFloat(o);
  62940. var s = new Ve();
  62941. return aa(n, s), Ei(e, s, this._defsUsePending, !1, !0), s;
  62942. },
  62943. tspan: function(e, n) {
  62944. var r = e.getAttribute("x"), i = e.getAttribute("y");
  62945. r != null && (this._textX = parseFloat(r)), i != null && (this._textY = parseFloat(i));
  62946. var a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new Ve();
  62947. return aa(n, s), Ei(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(a), this._textY += parseFloat(o), s;
  62948. },
  62949. path: function(e, n) {
  62950. var r = e.getAttribute("d") || "", i = jK(r);
  62951. return aa(n, i), Ei(e, i, this._defsUsePending, !1, !1), i.silent = !0, i;
  62952. }
  62953. };
  62954. }(), t;
  62955. }(), fF = {
  62956. lineargradient: function(t) {
  62957. 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 yp(e, n, r, i);
  62958. return dF(t, a), hF(t, a), a;
  62959. },
  62960. radialgradient: function(t) {
  62961. var e = parseInt(t.getAttribute("cx") || "0", 10), n = parseInt(t.getAttribute("cy") || "0", 10), r = parseInt(t.getAttribute("r") || "0", 10), i = new FR(e, n, r);
  62962. return dF(t, i), hF(t, i), i;
  62963. }
  62964. };
  62965. function dF(t, e) {
  62966. var n = t.getAttribute("gradientUnits");
  62967. n === "userSpaceOnUse" && (e.global = !0);
  62968. }
  62969. function hF(t, e) {
  62970. for (var n = t.firstChild; n; ) {
  62971. if (n.nodeType === 1 && n.nodeName.toLocaleLowerCase() === "stop") {
  62972. var r = n.getAttribute("offset"), i = void 0;
  62973. r && r.indexOf("%") > 0 ? i = parseInt(r, 10) / 100 : r ? i = parseFloat(r) : i = 0;
  62974. var a = {};
  62975. cne(n, a, a);
  62976. var o = a.stopColor || n.getAttribute("stop-color") || "#000000";
  62977. e.colorStops.push({
  62978. offset: i,
  62979. color: o
  62980. });
  62981. }
  62982. n = n.nextSibling;
  62983. }
  62984. }
  62985. function aa(t, e) {
  62986. t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), Re(e.__inheritedStyle, t.__inheritedStyle));
  62987. }
  62988. function pF(t) {
  62989. for (var e = bw(t), n = [], r = 0; r < e.length; r += 2) {
  62990. var i = parseFloat(e[r]), a = parseFloat(e[r + 1]);
  62991. n.push([i, a]);
  62992. }
  62993. return n;
  62994. }
  62995. function Ei(t, e, n, r, i) {
  62996. var a = e, o = a.__inheritedStyle = a.__inheritedStyle || {}, s = {};
  62997. t.nodeType === 1 && (SBe(t, e), cne(t, o, s), r || xBe(t, o, s)), a.style = a.style || {}, o.fill != null && (a.style.fill = vF(a, "fill", o.fill, n)), o.stroke != null && (a.style.stroke = vF(a, "stroke", o.stroke, n)), k([
  62998. "lineWidth",
  62999. "opacity",
  63000. "fillOpacity",
  63001. "strokeOpacity",
  63002. "miterLimit",
  63003. "fontSize"
  63004. ], function(l) {
  63005. o[l] != null && (a.style[l] = parseFloat(o[l]));
  63006. }), k([
  63007. "lineDashOffset",
  63008. "lineCap",
  63009. "lineJoin",
  63010. "fontWeight",
  63011. "fontFamily",
  63012. "fontStyle",
  63013. "textAlign"
  63014. ], function(l) {
  63015. o[l] != null && (a.style[l] = o[l]);
  63016. }), i && (a.__selfStyle = s), o.lineDash && (a.style.lineDash = ce(bw(o.lineDash), function(l) {
  63017. return parseFloat(l);
  63018. })), (o.visibility === "hidden" || o.visibility === "collapse") && (a.invisible = !0), o.display === "none" && (a.ignore = !0);
  63019. }
  63020. function mBe(t, e) {
  63021. var n = e.__selfStyle;
  63022. if (n) {
  63023. var r = n.textBaseline, i = r;
  63024. !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;
  63025. }
  63026. var a = e.__inheritedStyle;
  63027. if (a) {
  63028. var o = a.textAlign, s = o;
  63029. o && (o === "middle" && (s = "center"), t.style.textAlign = s);
  63030. }
  63031. }
  63032. var yBe = /^url\(\s*#(.*?)\)/;
  63033. function vF(t, e, n, r) {
  63034. var i = n && n.match(yBe);
  63035. if (i) {
  63036. var a = ba(i[1]);
  63037. r.push([t, e, a]);
  63038. return;
  63039. }
  63040. return n === "none" && (n = null), n;
  63041. }
  63042. function bBe(t, e) {
  63043. for (var n = 0; n < e.length; n++) {
  63044. var r = e[n];
  63045. r[0].style[r[1]] = t[r[2]];
  63046. }
  63047. }
  63048. var _Be = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  63049. function bw(t) {
  63050. return t.match(_Be) || [];
  63051. }
  63052. var OBe = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, hP = Math.PI / 180;
  63053. function SBe(t, e) {
  63054. var n = t.getAttribute("transform");
  63055. if (n) {
  63056. n = n.replace(/,/g, " ");
  63057. var r = [], i = null;
  63058. n.replace(OBe, function(f, d, h) {
  63059. return r.push(d, h), "";
  63060. });
  63061. for (var a = r.length - 1; a > 0; a -= 2) {
  63062. var o = r[a], s = r[a - 1], l = bw(o);
  63063. switch (i = i || wi(), s) {
  63064. case "translate":
  63065. so(i, i, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
  63066. break;
  63067. case "scale":
  63068. Bx(i, i, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
  63069. break;
  63070. case "rotate":
  63071. Cu(i, i, -parseFloat(l[0]) * hP, [
  63072. parseFloat(l[1] || "0"),
  63073. parseFloat(l[2] || "0")
  63074. ]);
  63075. break;
  63076. case "skewX":
  63077. var u = Math.tan(parseFloat(l[0]) * hP);
  63078. Xo(i, [1, 0, u, 1, 0, 0], i);
  63079. break;
  63080. case "skewY":
  63081. var c = Math.tan(parseFloat(l[0]) * hP);
  63082. Xo(i, [1, c, 0, 1, 0, 0], i);
  63083. break;
  63084. case "matrix":
  63085. 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]);
  63086. break;
  63087. }
  63088. }
  63089. e.setLocalTransform(i);
  63090. }
  63091. }
  63092. var gF = /([^\s:;]+)\s*:\s*([^:;]+)/g;
  63093. function cne(t, e, n) {
  63094. var r = t.getAttribute("style");
  63095. if (r) {
  63096. gF.lastIndex = 0;
  63097. for (var i; (i = gF.exec(r)) != null; ) {
  63098. var a = i[1], o = Ce(IO, a) ? IO[a] : null;
  63099. o && (e[o] = i[2]);
  63100. var s = Ce(DO, a) ? DO[a] : null;
  63101. s && (n[s] = i[2]);
  63102. }
  63103. }
  63104. }
  63105. function xBe(t, e, n) {
  63106. for (var r = 0; r < uF.length; r++) {
  63107. var i = uF[r], a = t.getAttribute(i);
  63108. a != null && (e[IO[i]] = a);
  63109. }
  63110. for (var r = 0; r < cF.length; r++) {
  63111. var i = cF[r], a = t.getAttribute(i);
  63112. a != null && (n[DO[i]] = a);
  63113. }
  63114. }
  63115. function fne(t, e) {
  63116. var n = e.width / t.width, r = e.height / t.height, i = Math.min(n, r);
  63117. return {
  63118. scale: i,
  63119. x: -(t.x + t.width / 2) * i + (e.x + e.width / 2),
  63120. y: -(t.y + t.height / 2) * i + (e.y + e.height / 2)
  63121. };
  63122. }
  63123. function wBe(t, e) {
  63124. var n = new gBe();
  63125. return n.parse(t, e);
  63126. }
  63127. var CBe = Pe([
  63128. "rect",
  63129. "circle",
  63130. "line",
  63131. "ellipse",
  63132. "polygon",
  63133. "polyline",
  63134. "path",
  63135. // <text> <tspan> are also enabled because some SVG might paint text itself,
  63136. // but still need to trigger events or tooltip.
  63137. "text",
  63138. "tspan",
  63139. // <g> is also enabled because this case: if multiple tags share one name
  63140. // and need label displayed, every tags will display the name, which is not
  63141. // expected. So we can put them into a <g name="xxx">. Thereby only one label
  63142. // displayed and located based on the bounding rect of the <g>.
  63143. "g"
  63144. ]), TBe = (
  63145. /** @class */
  63146. function() {
  63147. function t(e, n) {
  63148. this.type = "geoSVG", this._usedGraphicMap = Pe(), this._freedGraphics = [], this._mapName = e, this._parsedXML = une(n);
  63149. }
  63150. return t.prototype.load = function() {
  63151. var e = this._firstGraphic;
  63152. if (!e) {
  63153. e = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(e), this._boundingRect = this._firstGraphic.boundingRect.clone();
  63154. var n = $Be(e.named), r = n.regions, i = n.regionsMap;
  63155. this._regions = r, this._regionsMap = i;
  63156. }
  63157. return {
  63158. boundingRect: this._boundingRect,
  63159. regions: this._regions,
  63160. regionsMap: this._regionsMap
  63161. };
  63162. }, t.prototype._buildGraphic = function(e) {
  63163. var n, r;
  63164. try {
  63165. n = e && wBe(e, {
  63166. ignoreViewBox: !0,
  63167. ignoreRootClip: !0
  63168. }) || {}, r = n.root, ke(r != null);
  63169. } catch (g) {
  63170. throw new Error(`Invalid svg format
  63171. ` + g.message);
  63172. }
  63173. var i = new Ve();
  63174. i.add(r), i.isGeoSVGGraphicRoot = !0;
  63175. var a = n.width, o = n.height, s = n.viewBoxRect, l = this._boundingRect;
  63176. if (!l) {
  63177. var u = void 0, c = void 0, f = void 0, d = void 0;
  63178. 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) {
  63179. var h = r.getBoundingRect();
  63180. u == null && (u = h.x, f = h.width), c == null && (c = h.y, d = h.height);
  63181. }
  63182. l = this._boundingRect = new Je(u, c, f, d);
  63183. }
  63184. if (s) {
  63185. var p = fne(s, l);
  63186. r.scaleX = r.scaleY = p.scale, r.x = p.x, r.y = p.y;
  63187. }
  63188. i.setClipPath(new mt({
  63189. shape: l.plain()
  63190. }));
  63191. var v = [];
  63192. return k(n.named, function(g) {
  63193. CBe.get(g.svgNodeTagLower) != null && (v.push(g), PBe(g.el));
  63194. }), {
  63195. root: i,
  63196. boundingRect: l,
  63197. named: v
  63198. };
  63199. }, t.prototype.useGraphic = function(e) {
  63200. var n = this._usedGraphicMap, r = n.get(e);
  63201. return r || (r = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), n.set(e, r), r);
  63202. }, t.prototype.freeGraphic = function(e) {
  63203. var n = this._usedGraphicMap, r = n.get(e);
  63204. r && (n.removeKey(e), this._freedGraphics.push(r));
  63205. }, t;
  63206. }()
  63207. );
  63208. function PBe(t) {
  63209. t.silent = !1, t.isGroup && t.traverse(function(e) {
  63210. e.silent = !1;
  63211. });
  63212. }
  63213. function $Be(t) {
  63214. var e = [], n = Pe();
  63215. return k(t, function(r) {
  63216. if (r.namedFrom == null) {
  63217. var i = new h5e(r.name, r.el);
  63218. e.push(i), n.set(r.name, i);
  63219. }
  63220. }), {
  63221. regions: e,
  63222. regionsMap: n
  63223. };
  63224. }
  63225. var vE = [126, 25], mF = "南海诸岛", hc = [[[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]]];
  63226. for (var lc = 0; lc < hc.length; lc++)
  63227. for (var pd = 0; pd < hc[lc].length; pd++)
  63228. hc[lc][pd][0] /= 10.5, hc[lc][pd][1] /= -10.5 / 0.75, hc[lc][pd][0] += vE[0], hc[lc][pd][1] += vE[1];
  63229. function ABe(t, e) {
  63230. if (t === "china") {
  63231. for (var n = 0; n < e.length; n++)
  63232. if (e[n].name === mF)
  63233. return;
  63234. e.push(new ste(mF, ce(hc, function(r) {
  63235. return {
  63236. type: "polygon",
  63237. exterior: r
  63238. };
  63239. }), vE));
  63240. }
  63241. }
  63242. var EBe = {
  63243. 南海诸岛: [32, 80],
  63244. // 全国
  63245. 广东: [0, -10],
  63246. 香港: [10, 5],
  63247. 澳门: [-10, 10],
  63248. // '北京': [-10, 0],
  63249. 天津: [5, 5]
  63250. };
  63251. function MBe(t, e) {
  63252. if (t === "china") {
  63253. var n = EBe[e.name];
  63254. if (n) {
  63255. var r = e.getCenter();
  63256. r[0] += n[0] / 10.5, r[1] += -n[1] / (10.5 / 0.75), e.setCenter(r);
  63257. }
  63258. }
  63259. }
  63260. var IBe = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
  63261. function DBe(t, e) {
  63262. t === "china" && e.name === "台湾" && e.geometries.push({
  63263. type: "polygon",
  63264. exterior: IBe[0]
  63265. });
  63266. }
  63267. var RBe = "name", kBe = (
  63268. /** @class */
  63269. function() {
  63270. function t(e, n, r) {
  63271. this.type = "geoJSON", this._parsedMap = Pe(), this._mapName = e, this._specialAreas = r, this._geoJSON = NBe(n);
  63272. }
  63273. return t.prototype.load = function(e, n) {
  63274. n = n || RBe;
  63275. var r = this._parsedMap.get(n);
  63276. if (!r) {
  63277. var i = this._parseToRegions(n);
  63278. r = this._parsedMap.set(n, {
  63279. regions: i,
  63280. boundingRect: LBe(i)
  63281. });
  63282. }
  63283. var a = Pe(), o = [];
  63284. return k(r.regions, function(s) {
  63285. var l = s.name;
  63286. e && Ce(e, l) && (s = s.cloneShallow(l = e[l])), o.push(s), a.set(l, s);
  63287. }), {
  63288. regions: o,
  63289. boundingRect: r.boundingRect || new Je(0, 0, 0, 0),
  63290. regionsMap: a
  63291. };
  63292. }, t.prototype._parseToRegions = function(e) {
  63293. var n = this._mapName, r = this._geoJSON, i;
  63294. try {
  63295. i = r ? aE(r, e) : [];
  63296. } catch (a) {
  63297. throw new Error(`Invalid geoJson format
  63298. ` + a.message);
  63299. }
  63300. return ABe(n, i), k(i, function(a) {
  63301. var o = a.name;
  63302. MBe(n, a), DBe(n, a);
  63303. var s = this._specialAreas && this._specialAreas[o];
  63304. s && a.transformTo(s.left, s.top, s.width, s.height);
  63305. }, this), i;
  63306. }, t.prototype.getMapForUser = function() {
  63307. return {
  63308. // For backward compatibility, use geoJson
  63309. // PENDING: it has been returning them without clone.
  63310. // do we need to avoid outsite modification?
  63311. geoJson: this._geoJSON,
  63312. geoJSON: this._geoJSON,
  63313. specialAreas: this._specialAreas
  63314. };
  63315. }, t;
  63316. }()
  63317. );
  63318. function LBe(t) {
  63319. for (var e, n = 0; n < t.length; n++) {
  63320. var r = t[n].getBoundingRect();
  63321. e = e || r.clone(), e.union(r);
  63322. }
  63323. return e;
  63324. }
  63325. function NBe(t) {
  63326. return Oe(t) ? typeof JSON < "u" && JSON.parse ? JSON.parse(t) : new Function("return (" + t + ");")() : t;
  63327. }
  63328. var Sv = Pe();
  63329. const Ks = {
  63330. /**
  63331. * Compatible with previous `echarts.registerMap`.
  63332. *
  63333. * @usage
  63334. * ```js
  63335. *
  63336. * echarts.registerMap('USA', geoJson, specialAreas);
  63337. *
  63338. * echarts.registerMap('USA', {
  63339. * geoJson: geoJson,
  63340. * specialAreas: {...}
  63341. * });
  63342. * echarts.registerMap('USA', {
  63343. * geoJSON: geoJson,
  63344. * specialAreas: {...}
  63345. * });
  63346. *
  63347. * echarts.registerMap('airport', {
  63348. * svg: svg
  63349. * }
  63350. * ```
  63351. *
  63352. * Note:
  63353. * Do not support that register multiple geoJSON or SVG
  63354. * one map name. Because different geoJSON and SVG have
  63355. * different unit. It's not easy to make sure how those
  63356. * units are mapping/normalize.
  63357. * If intending to use multiple geoJSON or SVG, we can
  63358. * use multiple geo coordinate system.
  63359. */
  63360. registerMap: function(t, e, n) {
  63361. if (e.svg) {
  63362. var r = new TBe(t, e.svg);
  63363. Sv.set(t, r);
  63364. } else {
  63365. var i = e.geoJson || e.geoJSON;
  63366. i && !e.features ? n = e.specialAreas : i = e;
  63367. var r = new kBe(t, i, n);
  63368. Sv.set(t, r);
  63369. }
  63370. },
  63371. getGeoResource: function(t) {
  63372. return Sv.get(t);
  63373. },
  63374. /**
  63375. * Only for exporting to users.
  63376. * **MUST NOT** used internally.
  63377. */
  63378. getMapForUser: function(t) {
  63379. var e = Sv.get(t);
  63380. return e && e.type === "geoJSON" && e.getMapForUser();
  63381. },
  63382. load: function(t, e, n) {
  63383. var r = Sv.get(t);
  63384. if (!r) {
  63385. process.env.NODE_ENV !== "production" && console.error("Map " + t + " not exists. The GeoJSON of the map must be provided.");
  63386. return;
  63387. }
  63388. return r.load(e, n);
  63389. }
  63390. };
  63391. var Qk = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], BBe = Pe(Qk), zBe = Pe(Qk.concat(["g"])), VBe = Pe(Qk.concat(["g"])), dne = bt();
  63392. function Tb(t) {
  63393. var e = t.getItemStyle(), n = t.get("areaColor");
  63394. return n != null && (e.fill = n), e;
  63395. }
  63396. function yF(t) {
  63397. var e = t.style;
  63398. e && (e.stroke = e.stroke || e.fill, e.fill = null);
  63399. }
  63400. var hne = (
  63401. /** @class */
  63402. function() {
  63403. function t(e) {
  63404. var n = new Ve();
  63405. this.uid = xp("ec_map_draw"), this._controller = new J0(e.getZr()), this._controllerHost = {
  63406. target: n
  63407. }, this.group = n, n.add(this._regionsGroup = new Ve()), n.add(this._svgGroup = new Ve());
  63408. }
  63409. return t.prototype.draw = function(e, n, r, i, a) {
  63410. var o = e.mainType === "geo", s = e.getData && e.getData();
  63411. o && n.eachComponent({
  63412. mainType: "series",
  63413. subType: "map"
  63414. }, function(m) {
  63415. !s && m.getHostGeoModel() === e && (s = m.getData());
  63416. });
  63417. var l = e.coordinateSystem, u = this._regionsGroup, c = this.group, f = l.getTransformInfo(), d = f.raw, h = f.roam, p = !u.childAt(0) || a;
  63418. p ? (c.x = h.x, c.y = h.y, c.scaleX = h.scaleX, c.scaleY = h.scaleY, c.dirty()) : Ct(c, h, e);
  63419. var v = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = {
  63420. api: r,
  63421. geo: l,
  63422. mapOrGeoModel: e,
  63423. data: s,
  63424. isVisualEncodedByVisualMap: v,
  63425. isGeo: o,
  63426. transformInfoRaw: d
  63427. };
  63428. l.resourceType === "geoJSON" ? this._buildGeoJSON(g) : l.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, n, r), this._updateMapSelectHandler(e, u, r, i);
  63429. }, t.prototype._buildGeoJSON = function(e) {
  63430. var n = this._regionsGroupByName = Pe(), r = Pe(), i = this._regionsGroup, a = e.transformInfoRaw, o = e.mapOrGeoModel, s = e.data, l = e.geo.projection, u = l && l.stream;
  63431. function c(h, p) {
  63432. return p && (h = p(h)), h && [h[0] * a.scaleX + a.x, h[1] * a.scaleY + a.y];
  63433. }
  63434. function f(h) {
  63435. for (var p = [], v = !u && l && l.project, g = 0; g < h.length; ++g) {
  63436. var m = c(h[g], v);
  63437. m && p.push(m);
  63438. }
  63439. return p;
  63440. }
  63441. function d(h) {
  63442. return {
  63443. shape: {
  63444. points: f(h)
  63445. }
  63446. };
  63447. }
  63448. i.removeAll(), k(e.geo.regions, function(h) {
  63449. var p = h.name, v = n.get(p), g = r.get(p) || {}, m = g.dataIdx, y = g.regionModel;
  63450. v || (v = n.set(p, new Ve()), i.add(v), m = s ? s.indexOfName(p) : null, y = e.isGeo ? o.getRegionModel(p) : s ? s.getItemModel(m) : null, r.set(p, {
  63451. dataIdx: m,
  63452. regionModel: y
  63453. }));
  63454. var b = [], _ = [];
  63455. k(h.geometries, function(x) {
  63456. if (x.type === "polygon") {
  63457. var C = [x.exterior].concat(x.interiors || []);
  63458. u && (C = wF(C, u)), k(C, function(w) {
  63459. b.push(new ai(d(w)));
  63460. });
  63461. } else {
  63462. var T = x.points;
  63463. u && (T = wF(T, u, !0)), k(T, function(w) {
  63464. _.push(new oi(d(w)));
  63465. });
  63466. }
  63467. });
  63468. var O = c(h.getCenter(), l && l.project);
  63469. function S(x, C) {
  63470. if (x.length) {
  63471. var T = new Kx({
  63472. culling: !0,
  63473. segmentIgnoreThreshold: 1,
  63474. shape: {
  63475. paths: x
  63476. }
  63477. });
  63478. v.add(T), bF(e, T, m, y), _F(e, T, p, y, o, m, O), C && (yF(T), k(T.states, yF));
  63479. }
  63480. }
  63481. S(b), S(_, !0);
  63482. }), n.each(function(h, p) {
  63483. var v = r.get(p), g = v.dataIdx, m = v.regionModel;
  63484. OF(e, h, p, m, o, g), SF(e, h, p, m, o), xF(e, h, p, m, o);
  63485. }, this);
  63486. }, t.prototype._buildSVG = function(e) {
  63487. var n = e.geo.map, r = e.transformInfoRaw;
  63488. 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));
  63489. var i = this._svgDispatcherMap = Pe(), a = !1;
  63490. k(this._svgGraphicRecord.named, function(o) {
  63491. 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);
  63492. if (BBe.get(c) != null && f instanceof Da && bF(e, f, d, h), f instanceof Da && (f.culling = !0), f.z2EmphasisLift = 0, !o.namedFrom && (VBe.get(c) != null && _F(e, f, s, h, l, d, null), OF(e, f, s, h, l, d), SF(e, f, s, h, l), zBe.get(c) != null)) {
  63493. var p = xF(e, f, s, h, l);
  63494. p === "self" && (a = !0);
  63495. var v = i.get(s) || i.set(s, []);
  63496. v.push(f);
  63497. }
  63498. }, this), this._enableBlurEntireSVG(a, e);
  63499. }, t.prototype._enableBlurEntireSVG = function(e, n) {
  63500. if (e && n.isGeo) {
  63501. var r = n.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), i = r.opacity;
  63502. this._svgGraphicRecord.root.traverse(function(a) {
  63503. if (!a.isGroup) {
  63504. _f(a);
  63505. var o = a.ensureState("blur").style || {};
  63506. o.opacity == null && i != null && (o.opacity = i), a.ensureState("emphasis");
  63507. }
  63508. });
  63509. }
  63510. }, t.prototype.remove = function() {
  63511. this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null;
  63512. }, t.prototype.findHighDownDispatchers = function(e, n) {
  63513. if (e == null)
  63514. return [];
  63515. var r = n.coordinateSystem;
  63516. if (r.resourceType === "geoJSON") {
  63517. var i = this._regionsGroupByName;
  63518. if (i) {
  63519. var a = i.get(e);
  63520. return a ? [a] : [];
  63521. }
  63522. } else if (r.resourceType === "geoSVG")
  63523. return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || [];
  63524. }, t.prototype._svgResourceChanged = function(e) {
  63525. return this._svgMapName !== e;
  63526. }, t.prototype._useSVG = function(e) {
  63527. var n = Ks.getGeoResource(e);
  63528. if (n && n.type === "geoSVG") {
  63529. var r = n.useGraphic(this.uid);
  63530. this._svgGroup.add(r.root), this._svgGraphicRecord = r, this._svgMapName = e;
  63531. }
  63532. }, t.prototype._freeSVG = function() {
  63533. var e = this._svgMapName;
  63534. if (e != null) {
  63535. var n = Ks.getGeoResource(e);
  63536. n && n.type === "geoSVG" && n.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null;
  63537. }
  63538. }, t.prototype._updateController = function(e, n, r) {
  63539. var i = e.coordinateSystem, a = this._controller, o = this._controllerHost;
  63540. o.zoomLimit = e.get("scaleLimit"), o.zoom = i.getZoom(), a.enable(e.get("roam") || !1);
  63541. var s = e.mainType;
  63542. function l() {
  63543. var u = {
  63544. type: "geoRoam",
  63545. componentType: s
  63546. };
  63547. return u[s + "Id"] = e.id, u;
  63548. }
  63549. a.off("pan").on("pan", function(u) {
  63550. this._mouseDownFlag = !1, Fk(o, u.dx, u.dy), r.dispatchAction(le(l(), {
  63551. dx: u.dx,
  63552. dy: u.dy,
  63553. animation: {
  63554. duration: 0
  63555. }
  63556. }));
  63557. }, this), a.off("zoom").on("zoom", function(u) {
  63558. this._mouseDownFlag = !1, Wk(o, u.scale, u.originX, u.originY), r.dispatchAction(le(l(), {
  63559. totalZoom: o.zoom,
  63560. zoom: u.scale,
  63561. originX: u.originX,
  63562. originY: u.originY,
  63563. animation: {
  63564. duration: 0
  63565. }
  63566. }));
  63567. }, this), a.setPointerChecker(function(u, c, f) {
  63568. return i.containPoint([c, f]) && !yw(u, r, e);
  63569. });
  63570. }, t.prototype.resetForLabelLayout = function() {
  63571. this.group.traverse(function(e) {
  63572. var n = e.getTextContent();
  63573. n && (n.ignore = dne(n).ignore);
  63574. });
  63575. }, t.prototype._updateMapSelectHandler = function(e, n, r, i) {
  63576. var a = this;
  63577. n.off("mousedown"), n.off("click"), e.get("selectedMode") && (n.on("mousedown", function() {
  63578. a._mouseDownFlag = !0;
  63579. }), n.on("click", function(o) {
  63580. a._mouseDownFlag && (a._mouseDownFlag = !1);
  63581. }));
  63582. }, t;
  63583. }()
  63584. );
  63585. function bF(t, e, n, r) {
  63586. var i = r.getModel("itemStyle"), a = r.getModel(["emphasis", "itemStyle"]), o = r.getModel(["blur", "itemStyle"]), s = r.getModel(["select", "itemStyle"]), l = Tb(i), u = Tb(a), c = Tb(s), f = Tb(o), d = t.data;
  63587. if (d) {
  63588. var h = d.getItemVisual(n, "style"), p = d.getItemVisual(n, "decal");
  63589. t.isVisualEncodedByVisualMap && h.fill && (l.fill = h.fill), p && (l.decal = jh(p, t.api));
  63590. }
  63591. e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = c, e.ensureState("blur").style = f, _f(e);
  63592. }
  63593. function _F(t, e, n, r, i, a, o) {
  63594. var s = t.data, l = t.isGeo, u = s && isNaN(s.get(s.mapDimension("value"), a)), c = s && s.getItemLayout(a);
  63595. if (l || u || c && c.showLabel) {
  63596. var f = l ? n : a, d = void 0;
  63597. (!s || a >= 0) && (d = i);
  63598. var h = o ? {
  63599. normal: {
  63600. align: "center",
  63601. verticalAlign: "middle"
  63602. }
  63603. } : null;
  63604. Pr(e, er(r), {
  63605. labelFetcher: d,
  63606. labelDataIndex: f,
  63607. defaultText: n
  63608. }, h);
  63609. var p = e.getTextContent();
  63610. if (p && (dne(p).ignore = p.ignore, e.textConfig && o)) {
  63611. var v = e.getBoundingRect().clone();
  63612. e.textConfig.layoutRect = v, e.textConfig.position = [(o[0] - v.x) / v.width * 100 + "%", (o[1] - v.y) / v.height * 100 + "%"];
  63613. }
  63614. e.disableLabelAnimation = !0;
  63615. } else
  63616. e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null;
  63617. }
  63618. function OF(t, e, n, r, i, a) {
  63619. t.data ? t.data.setItemGraphicEl(a, e) : Fe(e).eventData = {
  63620. componentType: "geo",
  63621. componentIndex: i.componentIndex,
  63622. geoIndex: i.componentIndex,
  63623. name: n,
  63624. region: r && r.option || {}
  63625. };
  63626. }
  63627. function SF(t, e, n, r, i) {
  63628. t.data || Op({
  63629. el: e,
  63630. componentModel: i,
  63631. itemName: n,
  63632. // @ts-ignore FIXME:TS fix the "compatible with each other"?
  63633. itemTooltipOption: r.get("tooltip")
  63634. });
  63635. }
  63636. function xF(t, e, n, r, i) {
  63637. e.highDownSilentOnTouch = !!i.get("selectedMode");
  63638. var a = r.getModel("emphasis"), o = a.get("focus");
  63639. return bn(e, o, a.get("blurScope"), a.get("disabled")), t.isGeo && vke(e, i, n), o;
  63640. }
  63641. function wF(t, e, n) {
  63642. var r = [], i;
  63643. function a() {
  63644. i = [];
  63645. }
  63646. function o() {
  63647. i.length && (r.push(i), i = []);
  63648. }
  63649. var s = e({
  63650. polygonStart: a,
  63651. polygonEnd: o,
  63652. lineStart: a,
  63653. lineEnd: o,
  63654. point: function(l, u) {
  63655. isFinite(l) && isFinite(u) && i.push([l, u]);
  63656. },
  63657. sphere: function() {
  63658. }
  63659. });
  63660. return !n && s.polygonStart(), k(t, function(l) {
  63661. s.lineStart();
  63662. for (var u = 0; u < l.length; u++)
  63663. s.point(l[u][0], l[u][1]);
  63664. s.lineEnd();
  63665. }), !n && s.polygonEnd(), r;
  63666. }
  63667. var FBe = (
  63668. /** @class */
  63669. function(t) {
  63670. q(e, t);
  63671. function e() {
  63672. var n = t !== null && t.apply(this, arguments) || this;
  63673. return n.type = e.type, n;
  63674. }
  63675. return e.prototype.render = function(n, r, i, a) {
  63676. if (!(a && a.type === "mapToggleSelect" && a.from === this.uid)) {
  63677. var o = this.group;
  63678. if (o.removeAll(), !n.getHostGeoModel()) {
  63679. if (this._mapDraw && a && a.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), a && a.type === "geoRoam" && a.componentType === "series" && a.seriesId === n.id) {
  63680. var s = this._mapDraw;
  63681. s && o.add(s.group);
  63682. } else if (n.needsDrawMap) {
  63683. var s = this._mapDraw || new hne(i);
  63684. o.add(s.group), s.draw(n, r, i, this, a), this._mapDraw = s;
  63685. } else
  63686. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  63687. n.get("showLegendSymbol") && r.getComponent("legend") && this._renderSymbols(n, r, i);
  63688. }
  63689. }
  63690. }, e.prototype.remove = function() {
  63691. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
  63692. }, e.prototype.dispose = function() {
  63693. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  63694. }, e.prototype._renderSymbols = function(n, r, i) {
  63695. var a = n.originalData, o = this.group;
  63696. a.each(a.mapDimension("value"), function(s, l) {
  63697. if (!isNaN(s)) {
  63698. var u = a.getItemLayout(l);
  63699. if (!(!u || !u.point)) {
  63700. var c = u.point, f = u.offset, d = new ul({
  63701. style: {
  63702. // Because the special of map draw.
  63703. // Which needs statistic of multiple series and draw on one map.
  63704. // And each series also need a symbol with legend color
  63705. //
  63706. // Layout and visual are put one the different data
  63707. // TODO
  63708. fill: n.getData().getVisual("style").fill
  63709. },
  63710. shape: {
  63711. cx: c[0] + f * 9,
  63712. cy: c[1],
  63713. r: 3
  63714. },
  63715. silent: !0,
  63716. // Do not overlap the first series, on which labels are displayed.
  63717. z2: 8 + (f ? 0 : mp + 1)
  63718. });
  63719. if (!f) {
  63720. 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);
  63721. Pr(d, er(g), {
  63722. labelFetcher: {
  63723. getFormattedLabel: function(b, _) {
  63724. return n.getFormattedLabel(v, _);
  63725. }
  63726. },
  63727. defaultText: p
  63728. }), d.disableLabelAnimation = !0, m.get("position") || d.setTextConfig({
  63729. position: "bottom"
  63730. }), y.onHoverStateChange = function(b) {
  63731. lO(d, b);
  63732. };
  63733. }
  63734. o.add(d);
  63735. }
  63736. }
  63737. });
  63738. }, e.type = "map", e;
  63739. }(zt)
  63740. ), WBe = (
  63741. /** @class */
  63742. function(t) {
  63743. q(e, t);
  63744. function e() {
  63745. var n = t !== null && t.apply(this, arguments) || this;
  63746. return n.type = e.type, n.needsDrawMap = !1, n.seriesGroup = [], n.getTooltipPosition = function(r) {
  63747. if (r != null) {
  63748. var i = this.getData().getName(r), a = this.coordinateSystem, o = a.getRegion(i);
  63749. return o && a.dataToPoint(o.getCenter());
  63750. }
  63751. }, n;
  63752. }
  63753. return e.prototype.getInitialData = function(n) {
  63754. for (var r = Ip(this, {
  63755. coordDimensions: ["value"],
  63756. encodeDefaulter: Ue(rk, this)
  63757. }), i = Pe(), a = [], o = 0, s = r.count(); o < s; o++) {
  63758. var l = r.getName(o);
  63759. i.set(l, !0);
  63760. }
  63761. var u = Ks.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
  63762. return k(u.regions, function(c) {
  63763. var f = c.name;
  63764. i.get(f) || a.push(f);
  63765. }), r.appendValues([], a), r;
  63766. }, e.prototype.getHostGeoModel = function() {
  63767. var n = this.option.geoIndex;
  63768. return n != null ? this.ecModel.getComponent("geo", n) : null;
  63769. }, e.prototype.getMapType = function() {
  63770. return (this.getHostGeoModel() || this).option.map;
  63771. }, e.prototype.getRawValue = function(n) {
  63772. var r = this.getData();
  63773. return r.get(r.mapDimension("value"), n);
  63774. }, e.prototype.getRegionModel = function(n) {
  63775. var r = this.getData();
  63776. return r.getItemModel(r.indexOfName(n));
  63777. }, e.prototype.formatTooltip = function(n, r, i) {
  63778. for (var a = this.getData(), o = this.getRawValue(n), s = a.getName(n), l = this.seriesGroup, u = [], c = 0; c < l.length; c++) {
  63779. var f = l[c].originalData.indexOfName(s), d = a.mapDimension("value");
  63780. isNaN(l[c].originalData.get(d, f)) || u.push(l[c].name);
  63781. }
  63782. return tr("section", {
  63783. header: u.join(", "),
  63784. noHeader: !u.length,
  63785. blocks: [tr("nameValue", {
  63786. name: s,
  63787. value: o
  63788. })]
  63789. });
  63790. }, e.prototype.setZoom = function(n) {
  63791. this.option.zoom = n;
  63792. }, e.prototype.setCenter = function(n) {
  63793. this.option.center = n;
  63794. }, e.prototype.getLegendIcon = function(n) {
  63795. var r = n.icon || "roundRect", i = $n(r, 0, 0, n.itemWidth, n.itemHeight, n.itemStyle.fill);
  63796. 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;
  63797. }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
  63798. // 一级层叠
  63799. // zlevel: 0,
  63800. // 二级层叠
  63801. z: 2,
  63802. coordinateSystem: "geo",
  63803. // map should be explicitly specified since ec3.
  63804. map: "",
  63805. // If `geoIndex` is not specified, a exclusive geo will be
  63806. // created. Otherwise use the specified geo component, and
  63807. // `map` and `mapType` are ignored.
  63808. // geoIndex: 0,
  63809. // 'center' | 'left' | 'right' | 'x%' | {number}
  63810. left: "center",
  63811. // 'center' | 'top' | 'bottom' | 'x%' | {number}
  63812. top: "center",
  63813. // right
  63814. // bottom
  63815. // width:
  63816. // height
  63817. // Aspect is width / height. Inited to be geoJson bbox aspect
  63818. // This parameter is used for scale this aspect
  63819. // Default value:
  63820. // for geoSVG source: 1,
  63821. // for geoJSON source: 0.75.
  63822. aspectScale: null,
  63823. // Layout with center and size
  63824. // If you want to put map in a fixed size box with right aspect ratio
  63825. // This two properties may be more convenient.
  63826. // layoutCenter: [50%, 50%]
  63827. // layoutSize: 100
  63828. showLegendSymbol: !0,
  63829. // Define left-top, right-bottom coords to control view
  63830. // For example, [ [180, 90], [-180, -90] ],
  63831. // higher priority than center and zoom
  63832. boundingCoords: null,
  63833. // Default on center of map
  63834. center: null,
  63835. zoom: 1,
  63836. scaleLimit: null,
  63837. selectedMode: !0,
  63838. label: {
  63839. show: !1,
  63840. color: "#000"
  63841. },
  63842. // scaleLimit: null,
  63843. itemStyle: {
  63844. borderWidth: 0.5,
  63845. borderColor: "#444",
  63846. areaColor: "#eee"
  63847. },
  63848. emphasis: {
  63849. label: {
  63850. show: !0,
  63851. color: "rgb(100,0,0)"
  63852. },
  63853. itemStyle: {
  63854. areaColor: "rgba(255,215,0,0.8)"
  63855. }
  63856. },
  63857. select: {
  63858. label: {
  63859. show: !0,
  63860. color: "rgb(100,0,0)"
  63861. },
  63862. itemStyle: {
  63863. color: "rgba(255,215,0,0.8)"
  63864. }
  63865. },
  63866. nameProperty: "name"
  63867. }, e;
  63868. }(Ht)
  63869. );
  63870. function QBe(t, e) {
  63871. var n = {};
  63872. return k(t, function(r) {
  63873. r.each(r.mapDimension("value"), function(i, a) {
  63874. var o = "ec-" + r.getName(a);
  63875. n[o] = n[o] || [], isNaN(i) || n[o].push(i);
  63876. });
  63877. }), t[0].map(t[0].mapDimension("value"), function(r, i) {
  63878. 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++)
  63879. s = Math.min(s, n[a][c]), l = Math.max(l, n[a][c]), o += n[a][c];
  63880. var f;
  63881. return e === "min" ? f = s : e === "max" ? f = l : e === "average" ? f = o / u : f = o, u === 0 ? NaN : f;
  63882. });
  63883. }
  63884. function HBe(t) {
  63885. var e = {};
  63886. t.eachSeriesByType("map", function(n) {
  63887. var r = n.getHostGeoModel(), i = r ? "o" + r.id : "i" + n.getMapType();
  63888. (e[i] = e[i] || []).push(n);
  63889. }), k(e, function(n, r) {
  63890. for (var i = QBe(ce(n, function(o) {
  63891. return o.getData();
  63892. }), n[0].get("mapValueCalculation")), a = 0; a < n.length; a++)
  63893. n[a].originalData = n[a].getData();
  63894. for (var a = 0; a < n.length; a++)
  63895. n[a].seriesGroup = n, n[a].needsDrawMap = a === 0 && !n[a].getHostGeoModel(), n[a].setData(i.cloneShallow()), n[a].mainSeries = n[0];
  63896. });
  63897. }
  63898. function GBe(t) {
  63899. var e = {};
  63900. t.eachSeriesByType("map", function(n) {
  63901. var r = n.getMapType();
  63902. if (!(n.getHostGeoModel() || e[r])) {
  63903. var i = {};
  63904. k(n.seriesGroup, function(o) {
  63905. var s = o.coordinateSystem, l = o.originalData;
  63906. o.get("showLegendSymbol") && t.getComponent("legend") && l.each(l.mapDimension("value"), function(u, c) {
  63907. var f = l.getName(c), d = s.getRegion(f);
  63908. if (!(!d || isNaN(u))) {
  63909. var h = i[f] || 0, p = s.dataToPoint(d.getCenter());
  63910. i[f] = h + 1, l.setItemLayout(c, {
  63911. point: p,
  63912. offset: h
  63913. });
  63914. }
  63915. });
  63916. });
  63917. var a = n.getData();
  63918. a.each(function(o) {
  63919. var s = a.getName(o), l = a.getItemLayout(o) || {};
  63920. l.showLabel = !i[s], a.setItemLayout(o, l);
  63921. }), e[r] = !0;
  63922. }
  63923. });
  63924. }
  63925. var CF = ar, ey = (
  63926. /** @class */
  63927. function(t) {
  63928. q(e, t);
  63929. function e(n) {
  63930. var r = t.call(this) || this;
  63931. return r.type = "view", r.dimensions = ["x", "y"], r._roamTransformable = new Es(), r._rawTransformable = new Es(), r.name = n, r;
  63932. }
  63933. return e.prototype.setBoundingRect = function(n, r, i, a) {
  63934. return this._rect = new Je(n, r, i, a), this._rect;
  63935. }, e.prototype.getBoundingRect = function() {
  63936. return this._rect;
  63937. }, e.prototype.setViewRect = function(n, r, i, a) {
  63938. this._transformTo(n, r, i, a), this._viewRect = new Je(n, r, i, a);
  63939. }, e.prototype._transformTo = function(n, r, i, a) {
  63940. var o = this.getBoundingRect(), s = this._rawTransformable;
  63941. s.transform = o.calculateTransform(new Je(n, r, i, a));
  63942. var l = s.parent;
  63943. s.parent = null, s.decomposeTransform(), s.parent = l, this._updateTransform();
  63944. }, e.prototype.setCenter = function(n, r) {
  63945. n && (this._center = [_e(n[0], r.getWidth()), _e(n[1], r.getHeight())], this._updateCenterAndZoom());
  63946. }, e.prototype.setZoom = function(n) {
  63947. n = n || 1;
  63948. var r = this.zoomLimit;
  63949. r && (r.max != null && (n = Math.min(r.max, n)), r.min != null && (n = Math.max(r.min, n))), this._zoom = n, this._updateCenterAndZoom();
  63950. }, e.prototype.getDefaultCenter = function() {
  63951. var n = this.getBoundingRect(), r = n.x + n.width / 2, i = n.y + n.height / 2;
  63952. return [r, i];
  63953. }, e.prototype.getCenter = function() {
  63954. return this._center || this.getDefaultCenter();
  63955. }, e.prototype.getZoom = function() {
  63956. return this._zoom || 1;
  63957. }, e.prototype.getRoamTransform = function() {
  63958. return this._roamTransformable.getLocalTransform();
  63959. }, e.prototype._updateCenterAndZoom = function() {
  63960. var n = this._rawTransformable.getLocalTransform(), r = this._roamTransformable, i = this.getDefaultCenter(), a = this.getCenter(), o = this.getZoom();
  63961. a = ar([], a, n), i = ar([], 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();
  63962. }, e.prototype._updateTransform = function() {
  63963. var n = this._roamTransformable, r = this._rawTransformable;
  63964. r.parent = n, n.updateTransform(), r.updateTransform(), Nx(this.transform || (this.transform = []), r.transform || wi()), this._rawTransform = r.getLocalTransform(), this.invTransform = this.invTransform || [], Lf(this.invTransform, this.transform), this.decomposeTransform();
  63965. }, e.prototype.getTransformInfo = function() {
  63966. var n = this._rawTransformable, r = this._roamTransformable, i = new Es();
  63967. return i.transform = r.transform, i.decomposeTransform(), {
  63968. roam: {
  63969. x: i.x,
  63970. y: i.y,
  63971. scaleX: i.scaleX,
  63972. scaleY: i.scaleY
  63973. },
  63974. raw: {
  63975. x: n.x,
  63976. y: n.y,
  63977. scaleX: n.scaleX,
  63978. scaleY: n.scaleY
  63979. }
  63980. };
  63981. }, e.prototype.getViewRect = function() {
  63982. return this._viewRect;
  63983. }, e.prototype.getViewRectAfterRoam = function() {
  63984. var n = this.getBoundingRect().clone();
  63985. return n.applyTransform(this.transform), n;
  63986. }, e.prototype.dataToPoint = function(n, r, i) {
  63987. var a = r ? this._rawTransform : this.transform;
  63988. return i = i || [], a ? CF(i, n, a) : Ir(i, n);
  63989. }, e.prototype.pointToData = function(n) {
  63990. var r = this.invTransform;
  63991. return r ? CF([], n, r) : [n[0], n[1]];
  63992. }, e.prototype.convertToPixel = function(n, r, i) {
  63993. var a = TF(r);
  63994. return a === this ? a.dataToPoint(i) : null;
  63995. }, e.prototype.convertFromPixel = function(n, r, i) {
  63996. var a = TF(r);
  63997. return a === this ? a.pointToData(i) : null;
  63998. }, e.prototype.containPoint = function(n) {
  63999. return this.getViewRectAfterRoam().contain(n[0], n[1]);
  64000. }, e.dimensions = ["x", "y"], e;
  64001. }(Es)
  64002. );
  64003. function TF(t) {
  64004. var e = t.seriesModel;
  64005. return e ? e.coordinateSystem : null;
  64006. }
  64007. var jBe = {
  64008. geoJSON: {
  64009. aspectScale: 0.75,
  64010. invertLongitute: !0
  64011. },
  64012. geoSVG: {
  64013. aspectScale: 1,
  64014. invertLongitute: !1
  64015. }
  64016. }, pne = ["lng", "lat"], vne = (
  64017. /** @class */
  64018. function(t) {
  64019. q(e, t);
  64020. function e(n, r, i) {
  64021. var a = t.call(this, n) || this;
  64022. a.dimensions = pne, a.type = "geo", a._nameCoordMap = Pe(), a.map = r;
  64023. var o = i.projection, s = Ks.load(r, i.nameMap, i.nameProperty), l = Ks.getGeoResource(r), u = a.resourceType = l ? l.type : null, c = a.regions = s.regions, f = jBe[l.type];
  64024. a._regionsMap = s.regionsMap, a.regions = s.regions, process.env.NODE_ENV !== "production" && o && (u === "geoSVG" && (process.env.NODE_ENV !== "production" && dn("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" && dn("project and unproject must be both provided in the projeciton."), o = null)), a.projection = o;
  64025. var d;
  64026. if (o)
  64027. for (var h = 0; h < c.length; h++) {
  64028. var p = c[h].getBoundingRect(o);
  64029. d = d || p.clone(), d.union(p);
  64030. }
  64031. else
  64032. d = s.boundingRect;
  64033. return a.setBoundingRect(d.x, d.y, d.width, d.height), a.aspectScale = o ? 1 : We(i.aspectScale, f.aspectScale), a._invertLongitute = o ? !1 : f.invertLongitute, a;
  64034. }
  64035. return e.prototype._transformTo = function(n, r, i, a) {
  64036. var o = this.getBoundingRect(), s = this._invertLongitute;
  64037. o = o.clone(), s && (o.y = -o.y - o.height);
  64038. var l = this._rawTransformable;
  64039. l.transform = o.calculateTransform(new Je(n, r, i, a));
  64040. var u = l.parent;
  64041. l.parent = null, l.decomposeTransform(), l.parent = u, s && (l.scaleY = -l.scaleY), this._updateTransform();
  64042. }, e.prototype.getRegion = function(n) {
  64043. return this._regionsMap.get(n);
  64044. }, e.prototype.getRegionByCoord = function(n) {
  64045. for (var r = this.regions, i = 0; i < r.length; i++) {
  64046. var a = r[i];
  64047. if (a.type === "geoJSON" && a.contain(n))
  64048. return r[i];
  64049. }
  64050. }, e.prototype.addGeoCoord = function(n, r) {
  64051. this._nameCoordMap.set(n, r);
  64052. }, e.prototype.getGeoCoord = function(n) {
  64053. var r = this._regionsMap.get(n);
  64054. return this._nameCoordMap.get(n) || r && r.getCenter();
  64055. }, e.prototype.dataToPoint = function(n, r, i) {
  64056. if (Oe(n) && (n = this.getGeoCoord(n)), n) {
  64057. var a = this.projection;
  64058. return a && (n = a.project(n)), n && this.projectedToPoint(n, r, i);
  64059. }
  64060. }, e.prototype.pointToData = function(n) {
  64061. var r = this.projection;
  64062. return r && (n = r.unproject(n)), n && this.pointToProjected(n);
  64063. }, e.prototype.pointToProjected = function(n) {
  64064. return t.prototype.pointToData.call(this, n);
  64065. }, e.prototype.projectedToPoint = function(n, r, i) {
  64066. return t.prototype.dataToPoint.call(this, n, r, i);
  64067. }, e.prototype.convertToPixel = function(n, r, i) {
  64068. var a = PF(r);
  64069. return a === this ? a.dataToPoint(i) : null;
  64070. }, e.prototype.convertFromPixel = function(n, r, i) {
  64071. var a = PF(r);
  64072. return a === this ? a.pointToData(i) : null;
  64073. }, e;
  64074. }(ey)
  64075. );
  64076. xn(vne, ey);
  64077. function PF(t) {
  64078. var e = t.geoModel, n = t.seriesModel;
  64079. return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", Dn).models[0] || {}).coordinateSystem : null;
  64080. }
  64081. const $F = vne;
  64082. function AF(t, e) {
  64083. var n = t.get("boundingCoords");
  64084. if (n != null) {
  64085. var r = n[0], i = n[1];
  64086. if (!(isFinite(r[0]) && isFinite(r[1]) && isFinite(i[0]) && isFinite(i[1])))
  64087. process.env.NODE_ENV !== "production" && console.error("Invalid boundingCoords");
  64088. else {
  64089. var a = this.projection;
  64090. if (a) {
  64091. var o = r[0], s = r[1], l = i[0], u = i[1];
  64092. r = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0];
  64093. var c = function(S, x, C, T) {
  64094. for (var w = C - S, P = T - x, $ = 0; $ <= 100; $++) {
  64095. var A = $ / 100, D = a.project([S + w * A, x + P * A]);
  64096. $s(r, r, D), As(i, i, D);
  64097. }
  64098. };
  64099. c(o, s, l, s), c(l, s, l, u), c(l, u, o, u), c(o, u, l, s);
  64100. }
  64101. this.setBoundingRect(r[0], r[1], i[0] - r[0], i[1] - r[1]);
  64102. }
  64103. }
  64104. 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, b;
  64105. d && h && (y = [_e(d[0], p), _e(d[1], v)], b = _e(h, Math.min(p, v)), !isNaN(y[0]) && !isNaN(y[1]) && !isNaN(b) ? m = !0 : process.env.NODE_ENV !== "production" && console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));
  64106. var _;
  64107. if (m)
  64108. _ = {}, g > 1 ? (_.width = b, _.height = b / g) : (_.height = b, _.width = b * g), _.y = y[1] - _.height / 2, _.x = y[0] - _.width / 2;
  64109. else {
  64110. var O = t.getBoxLayoutParams();
  64111. O.aspect = g, _ = Rn(O, {
  64112. width: p,
  64113. height: v
  64114. });
  64115. }
  64116. this.setViewRect(_.x, _.y, _.width, _.height), this.setCenter(t.get("center"), e), this.setZoom(t.get("zoom"));
  64117. }
  64118. function ZBe(t, e) {
  64119. k(e.get("geoCoord"), function(n, r) {
  64120. t.addGeoCoord(r, n);
  64121. });
  64122. }
  64123. var UBe = (
  64124. /** @class */
  64125. function() {
  64126. function t() {
  64127. this.dimensions = pne;
  64128. }
  64129. return t.prototype.create = function(e, n) {
  64130. var r = [];
  64131. function i(o) {
  64132. return {
  64133. nameProperty: o.get("nameProperty"),
  64134. aspectScale: o.get("aspectScale"),
  64135. projection: o.get("projection")
  64136. };
  64137. }
  64138. e.eachComponent("geo", function(o, s) {
  64139. var l = o.get("map"), u = new $F(l + s, l, le({
  64140. nameMap: o.get("nameMap")
  64141. }, i(o)));
  64142. u.zoomLimit = o.get("scaleLimit"), r.push(u), o.coordinateSystem = u, u.model = o, u.resize = AF, u.resize(o, n);
  64143. }), e.eachSeries(function(o) {
  64144. var s = o.get("coordinateSystem");
  64145. if (s === "geo") {
  64146. var l = o.get("geoIndex") || 0;
  64147. o.coordinateSystem = r[l];
  64148. }
  64149. });
  64150. var a = {};
  64151. return e.eachSeriesByType("map", function(o) {
  64152. if (!o.getHostGeoModel()) {
  64153. var s = o.getMapType();
  64154. a[s] = a[s] || [], a[s].push(o);
  64155. }
  64156. }), k(a, function(o, s) {
  64157. var l = ce(o, function(c) {
  64158. return c.get("nameMap");
  64159. }), u = new $F(s, s, le({
  64160. nameMap: Rx(l)
  64161. }, i(o[0])));
  64162. u.zoomLimit = Tn.apply(null, ce(o, function(c) {
  64163. return c.get("scaleLimit");
  64164. })), r.push(u), u.resize = AF, u.resize(o[0], n), k(o, function(c) {
  64165. c.coordinateSystem = u, ZBe(u, c);
  64166. });
  64167. }), r;
  64168. }, t.prototype.getFilledRegions = function(e, n, r, i) {
  64169. for (var a = (e || []).slice(), o = Pe(), s = 0; s < a.length; s++)
  64170. o.set(a[s].name, a[s]);
  64171. var l = Ks.load(n, r, i);
  64172. return k(l.regions, function(u) {
  64173. var c = u.name;
  64174. !o.get(c) && a.push({
  64175. name: c
  64176. });
  64177. }), a;
  64178. }, t;
  64179. }()
  64180. ), gne = new UBe(), XBe = (
  64181. /** @class */
  64182. function(t) {
  64183. q(e, t);
  64184. function e() {
  64185. var n = t !== null && t.apply(this, arguments) || this;
  64186. return n.type = e.type, n;
  64187. }
  64188. return e.prototype.init = function(n, r, i) {
  64189. var a = Ks.getGeoResource(n.map);
  64190. if (a && a.type === "geoJSON") {
  64191. var o = n.itemStyle = n.itemStyle || {};
  64192. "color" in o || (o.color = "#eee");
  64193. }
  64194. this.mergeDefaultAndTheme(n, i), mf(n, "label", ["show"]);
  64195. }, e.prototype.optionUpdated = function() {
  64196. var n = this, r = this.option;
  64197. r.regions = gne.getFilledRegions(r.regions, r.map, r.nameMap, r.nameProperty);
  64198. var i = {};
  64199. this._optionModelMap = Ma(r.regions || [], function(a, o) {
  64200. var s = o.name;
  64201. return s && (a.set(s, new Wt(o, n, n.ecModel)), o.selected && (i[s] = !0)), a;
  64202. }, Pe()), r.selectedMap || (r.selectedMap = i);
  64203. }, e.prototype.getRegionModel = function(n) {
  64204. return this._optionModelMap.get(n) || new Wt(null, this, this.ecModel);
  64205. }, e.prototype.getFormattedLabel = function(n, r) {
  64206. var i = this.getRegionModel(n), a = r === "normal" ? i.get(["label", "formatter"]) : i.get(["emphasis", "label", "formatter"]), o = {
  64207. name: n
  64208. };
  64209. if (Me(a))
  64210. return o.status = r, a(o);
  64211. if (Oe(a))
  64212. return a.replace("{a}", n ?? "");
  64213. }, e.prototype.setZoom = function(n) {
  64214. this.option.zoom = n;
  64215. }, e.prototype.setCenter = function(n) {
  64216. this.option.center = n;
  64217. }, e.prototype.select = function(n) {
  64218. var r = this.option, i = r.selectedMode;
  64219. if (i) {
  64220. i !== "multiple" && (r.selectedMap = null);
  64221. var a = r.selectedMap || (r.selectedMap = {});
  64222. a[n] = !0;
  64223. }
  64224. }, e.prototype.unSelect = function(n) {
  64225. var r = this.option.selectedMap;
  64226. r && (r[n] = !1);
  64227. }, e.prototype.toggleSelected = function(n) {
  64228. this[this.isSelected(n) ? "unSelect" : "select"](n);
  64229. }, e.prototype.isSelected = function(n) {
  64230. var r = this.option.selectedMap;
  64231. return !!(r && r[n]);
  64232. }, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
  64233. // zlevel: 0,
  64234. z: 0,
  64235. show: !0,
  64236. left: "center",
  64237. top: "center",
  64238. // Default value:
  64239. // for geoSVG source: 1,
  64240. // for geoJSON source: 0.75.
  64241. aspectScale: null,
  64242. // /// Layout with center and size
  64243. // If you want to put map in a fixed size box with right aspect ratio
  64244. // This two properties may be more convenient
  64245. // layoutCenter: [50%, 50%]
  64246. // layoutSize: 100
  64247. silent: !1,
  64248. // Map type
  64249. map: "",
  64250. // Define left-top, right-bottom coords to control view
  64251. // For example, [ [180, 90], [-180, -90] ]
  64252. boundingCoords: null,
  64253. // Default on center of map
  64254. center: null,
  64255. zoom: 1,
  64256. scaleLimit: null,
  64257. // selectedMode: false
  64258. label: {
  64259. show: !1,
  64260. color: "#000"
  64261. },
  64262. itemStyle: {
  64263. borderWidth: 0.5,
  64264. borderColor: "#444"
  64265. // Default color:
  64266. // + geoJSON: #eee
  64267. // + geoSVG: null (use SVG original `fill`)
  64268. // color: '#eee'
  64269. },
  64270. emphasis: {
  64271. label: {
  64272. show: !0,
  64273. color: "rgb(100,0,0)"
  64274. },
  64275. itemStyle: {
  64276. color: "rgba(255,215,0,0.8)"
  64277. }
  64278. },
  64279. select: {
  64280. label: {
  64281. show: !0,
  64282. color: "rgb(100,0,0)"
  64283. },
  64284. itemStyle: {
  64285. color: "rgba(255,215,0,0.8)"
  64286. }
  64287. },
  64288. regions: []
  64289. // tooltip: {
  64290. // show: false
  64291. // }
  64292. }, e;
  64293. }(rt)
  64294. );
  64295. function EF(t, e) {
  64296. return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e);
  64297. }
  64298. function Hk(t, e, n, r) {
  64299. var i = t.getZoom(), a = t.getCenter(), o = e.zoom, s = t.projectedToPoint ? t.projectedToPoint(a) : t.dataToPoint(a);
  64300. if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, t.setCenter(EF(t, s), r)), o != null) {
  64301. if (n) {
  64302. var l = n.min || 0, u = n.max || 1 / 0;
  64303. o = Math.max(Math.min(i * o, u), l) / i;
  64304. }
  64305. t.scaleX *= o, t.scaleY *= o;
  64306. var c = (e.originX - t.x) * (o - 1), f = (e.originY - t.y) * (o - 1);
  64307. t.x -= c, t.y -= f, t.updateTransform(), t.setCenter(EF(t, s), r), t.setZoom(o * i);
  64308. }
  64309. return {
  64310. center: t.getCenter(),
  64311. zoom: t.getZoom()
  64312. };
  64313. }
  64314. var YBe = (
  64315. /** @class */
  64316. function(t) {
  64317. q(e, t);
  64318. function e() {
  64319. var n = t !== null && t.apply(this, arguments) || this;
  64320. return n.type = e.type, n.focusBlurEnabled = !0, n;
  64321. }
  64322. return e.prototype.init = function(n, r) {
  64323. this._api = r;
  64324. }, e.prototype.render = function(n, r, i, a) {
  64325. if (this._model = n, !n.get("show")) {
  64326. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  64327. return;
  64328. }
  64329. this._mapDraw || (this._mapDraw = new hne(i));
  64330. var o = this._mapDraw;
  64331. 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);
  64332. }, e.prototype._handleRegionClick = function(n) {
  64333. var r;
  64334. Bc(n.target, function(i) {
  64335. return (r = Fe(i).eventData) != null;
  64336. }, !0), r && this._api.dispatchAction({
  64337. type: "geoToggleSelect",
  64338. geoId: this._model.id,
  64339. name: r.name
  64340. });
  64341. }, e.prototype.updateSelectStatus = function(n, r, i) {
  64342. var a = this;
  64343. this._mapDraw.group.traverse(function(o) {
  64344. var s = Fe(o).eventData;
  64345. if (s)
  64346. return a._model.isSelected(s.name) ? i.enterSelect(o) : i.leaveSelect(o), !0;
  64347. });
  64348. }, e.prototype.findHighDownDispatchers = function(n) {
  64349. return this._mapDraw && this._mapDraw.findHighDownDispatchers(n, this._model);
  64350. }, e.prototype.dispose = function() {
  64351. this._mapDraw && this._mapDraw.remove();
  64352. }, e.type = "geo", e;
  64353. }(Xt)
  64354. );
  64355. function qBe(t, e, n) {
  64356. Ks.registerMap(t, e, n);
  64357. }
  64358. function mne(t) {
  64359. t.registerCoordinateSystem("geo", gne), t.registerComponentModel(XBe), t.registerComponentView(YBe), t.registerImpl("registerMap", qBe), t.registerImpl("getMap", function(n) {
  64360. return Ks.getMapForUser(n);
  64361. });
  64362. function e(n, r) {
  64363. r.update = "geo:updateSelectStatus", t.registerAction(r, function(i, a) {
  64364. var o = {}, s = [];
  64365. return a.eachComponent({
  64366. mainType: "geo",
  64367. query: i
  64368. }, function(l) {
  64369. l[n](i.name);
  64370. var u = l.coordinateSystem;
  64371. k(u.regions, function(f) {
  64372. o[f.name] = l.isSelected(f.name) || !1;
  64373. });
  64374. var c = [];
  64375. k(o, function(f, d) {
  64376. o[d] && c.push(d);
  64377. }), s.push({
  64378. geoIndex: l.componentIndex,
  64379. // Use singular, the same naming convention as the event `selectchanged`.
  64380. name: c
  64381. });
  64382. }), {
  64383. selected: o,
  64384. allSelected: s,
  64385. name: i.name
  64386. };
  64387. });
  64388. }
  64389. e("toggleSelected", {
  64390. type: "geoToggleSelect",
  64391. event: "geoselectchanged"
  64392. }), e("select", {
  64393. type: "geoSelect",
  64394. event: "geoselected"
  64395. }), e("unSelect", {
  64396. type: "geoUnSelect",
  64397. event: "geounselected"
  64398. }), t.registerAction({
  64399. type: "geoRoam",
  64400. event: "geoRoam",
  64401. update: "updateTransform"
  64402. }, function(n, r, i) {
  64403. var a = n.componentType || "series";
  64404. r.eachComponent({
  64405. mainType: a,
  64406. query: n
  64407. }, function(o) {
  64408. var s = o.coordinateSystem;
  64409. if (s.type === "geo") {
  64410. var l = Hk(s, n, o.get("scaleLimit"), i);
  64411. o.setCenter && o.setCenter(l.center), o.setZoom && o.setZoom(l.zoom), a === "series" && k(o.seriesGroup, function(u) {
  64412. u.setCenter(l.center), u.setZoom(l.zoom);
  64413. });
  64414. }
  64415. });
  64416. });
  64417. }
  64418. function KBe(t) {
  64419. at(mne), t.registerChartView(FBe), t.registerSeriesModel(WBe), t.registerLayout(GBe), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, HBe), vee("map", t.registerAction);
  64420. }
  64421. function JBe(t) {
  64422. var e = t;
  64423. e.hierNode = {
  64424. defaultAncestor: null,
  64425. ancestor: e,
  64426. prelim: 0,
  64427. modifier: 0,
  64428. change: 0,
  64429. shift: 0,
  64430. i: 0,
  64431. thread: null
  64432. };
  64433. for (var n = [e], r, i; r = n.pop(); )
  64434. if (i = r.children, r.isExpand && i.length)
  64435. for (var a = i.length, o = a - 1; o >= 0; o--) {
  64436. var s = i[o];
  64437. s.hierNode = {
  64438. defaultAncestor: null,
  64439. ancestor: s,
  64440. prelim: 0,
  64441. modifier: 0,
  64442. change: 0,
  64443. shift: 0,
  64444. i: o,
  64445. thread: null
  64446. }, n.push(s);
  64447. }
  64448. }
  64449. function eze(t, e) {
  64450. var n = t.isExpand ? t.children : [], r = t.parentNode.children, i = t.hierNode.i ? r[t.hierNode.i - 1] : null;
  64451. if (n.length) {
  64452. rze(t);
  64453. var a = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
  64454. i ? (t.hierNode.prelim = i.hierNode.prelim + e(t, i), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a;
  64455. } else i && (t.hierNode.prelim = i.hierNode.prelim + e(t, i));
  64456. t.parentNode.hierNode.defaultAncestor = ize(t, i, t.parentNode.hierNode.defaultAncestor || r[0], e);
  64457. }
  64458. function tze(t) {
  64459. var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  64460. t.setLayout({
  64461. x: e
  64462. }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier;
  64463. }
  64464. function MF(t) {
  64465. return arguments.length ? t : sze;
  64466. }
  64467. function eg(t, e) {
  64468. return t -= Math.PI / 2, {
  64469. x: e * Math.cos(t),
  64470. y: e * Math.sin(t)
  64471. };
  64472. }
  64473. function nze(t, e) {
  64474. return Rn(t.getBoxLayoutParams(), {
  64475. width: e.getWidth(),
  64476. height: e.getHeight()
  64477. });
  64478. }
  64479. function rze(t) {
  64480. for (var e = t.children, n = e.length, r = 0, i = 0; --n >= 0; ) {
  64481. var a = e[n];
  64482. a.hierNode.prelim += r, a.hierNode.modifier += r, i += a.hierNode.change, r += a.hierNode.shift + i;
  64483. }
  64484. }
  64485. function ize(t, e, n, r) {
  64486. if (e) {
  64487. 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 = pP(s), a = vP(a), s && a; ) {
  64488. i = pP(i), o = vP(o), i.hierNode.ancestor = t;
  64489. var d = s.hierNode.prelim + f - a.hierNode.prelim - u + r(s, a);
  64490. d > 0 && (oze(aze(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;
  64491. }
  64492. s && !pP(i) && (i.hierNode.thread = s, i.hierNode.modifier += f - l), a && !vP(o) && (o.hierNode.thread = a, o.hierNode.modifier += u - c, n = t);
  64493. }
  64494. return n;
  64495. }
  64496. function pP(t) {
  64497. var e = t.children;
  64498. return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread;
  64499. }
  64500. function vP(t) {
  64501. var e = t.children;
  64502. return e.length && t.isExpand ? e[0] : t.hierNode.thread;
  64503. }
  64504. function aze(t, e, n) {
  64505. return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n;
  64506. }
  64507. function oze(t, e, n) {
  64508. var r = n / (e.hierNode.i - t.hierNode.i);
  64509. e.hierNode.change -= r, e.hierNode.shift += n, e.hierNode.modifier += n, e.hierNode.prelim += n, t.hierNode.change += r;
  64510. }
  64511. function sze(t, e) {
  64512. return t.parentNode === e.parentNode ? 1 : 2;
  64513. }
  64514. var lze = (
  64515. /** @class */
  64516. /* @__PURE__ */ function() {
  64517. function t() {
  64518. this.parentPoint = [], this.childPoints = [];
  64519. }
  64520. return t;
  64521. }()
  64522. ), uze = (
  64523. /** @class */
  64524. function(t) {
  64525. q(e, t);
  64526. function e(n) {
  64527. return t.call(this, n) || this;
  64528. }
  64529. return e.prototype.getDefaultStyle = function() {
  64530. return {
  64531. stroke: "#000",
  64532. fill: null
  64533. };
  64534. }, e.prototype.getDefaultShape = function() {
  64535. return new lze();
  64536. }, e.prototype.buildPath = function(n, r) {
  64537. var i = r.childPoints, a = i.length, o = r.parentPoint, s = i[0], l = i[a - 1];
  64538. if (a === 1) {
  64539. n.moveTo(o[0], o[1]), n.lineTo(s[0], s[1]);
  64540. return;
  64541. }
  64542. var u = r.orient, c = u === "TB" || u === "BT" ? 0 : 1, f = 1 - c, d = _e(r.forkPosition, 1), h = [];
  64543. 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]);
  64544. for (var p = 1; p < a - 1; p++) {
  64545. var v = i[p];
  64546. n.moveTo(v[0], v[1]), h[c] = v[c], n.lineTo(h[0], h[1]);
  64547. }
  64548. }, e;
  64549. }(ot)
  64550. ), cze = (
  64551. /** @class */
  64552. function(t) {
  64553. q(e, t);
  64554. function e() {
  64555. var n = t !== null && t.apply(this, arguments) || this;
  64556. return n.type = e.type, n._mainGroup = new Ve(), n;
  64557. }
  64558. return e.prototype.init = function(n, r) {
  64559. this._controller = new J0(r.getZr()), this._controllerHost = {
  64560. target: this.group
  64561. }, this.group.add(this._mainGroup);
  64562. }, e.prototype.render = function(n, r, i) {
  64563. var a = n.getData(), o = n.layoutInfo, s = this._mainGroup, l = n.get("layout");
  64564. 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);
  64565. var u = this._data;
  64566. a.diff(u).add(function(c) {
  64567. IF(a, c) && DF(a, c, null, s, n);
  64568. }).update(function(c, f) {
  64569. var d = u.getItemGraphicEl(f);
  64570. if (!IF(a, c)) {
  64571. d && kF(u, f, d, s, n);
  64572. return;
  64573. }
  64574. DF(a, c, d, s, n);
  64575. }).remove(function(c) {
  64576. var f = u.getItemGraphicEl(c);
  64577. f && kF(u, c, f, s, n);
  64578. }).execute(), this._nodeScaleRatio = n.get("nodeScaleRatio"), this._updateNodeAndLinkScale(n), n.get("expandAndCollapse") === !0 && a.eachItemGraphicEl(function(c, f) {
  64579. c.off("click").on("click", function() {
  64580. i.dispatchAction({
  64581. type: "treeExpandAndCollapse",
  64582. seriesId: n.id,
  64583. dataIndex: f
  64584. });
  64585. });
  64586. }), this._data = a;
  64587. }, e.prototype._updateViewCoordSys = function(n, r) {
  64588. var i = n.getData(), a = [];
  64589. i.each(function(f) {
  64590. var d = i.getItemLayout(f);
  64591. d && !isNaN(d.x) && !isNaN(d.y) && a.push([+d.x, +d.y]);
  64592. });
  64593. var o = [], s = [];
  64594. Zx(a, o, s);
  64595. var l = this._min, u = this._max;
  64596. 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);
  64597. var c = n.coordinateSystem = new ey();
  64598. 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({
  64599. x: c.x,
  64600. y: c.y,
  64601. scaleX: c.scaleX,
  64602. scaleY: c.scaleY
  64603. }), this._min = o, this._max = s;
  64604. }, e.prototype._updateController = function(n, r, i) {
  64605. var a = this, o = this._controller, s = this._controllerHost, l = this.group;
  64606. o.setPointerChecker(function(u, c, f) {
  64607. var d = l.getBoundingRect();
  64608. return d.applyTransform(l.transform), d.contain(c, f) && !yw(u, i, n);
  64609. }), o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
  64610. Fk(s, u.dx, u.dy), i.dispatchAction({
  64611. seriesId: n.id,
  64612. type: "treeRoam",
  64613. dx: u.dx,
  64614. dy: u.dy
  64615. });
  64616. }).on("zoom", function(u) {
  64617. Wk(s, u.scale, u.originX, u.originY), i.dispatchAction({
  64618. seriesId: n.id,
  64619. type: "treeRoam",
  64620. zoom: u.scale,
  64621. originX: u.originX,
  64622. originY: u.originY
  64623. }), a._updateNodeAndLinkScale(n), i.updateLabelLayout();
  64624. });
  64625. }, e.prototype._updateNodeAndLinkScale = function(n) {
  64626. var r = n.getData(), i = this._getNodeGlobalScale(n);
  64627. r.eachItemGraphicEl(function(a, o) {
  64628. a.setSymbolScale(i);
  64629. });
  64630. }, e.prototype._getNodeGlobalScale = function(n) {
  64631. var r = n.coordinateSystem;
  64632. if (r.type !== "view")
  64633. return 1;
  64634. var i = this._nodeScaleRatio, a = r.scaleX || 1, o = r.getZoom(), s = (o - 1) * i + 1;
  64635. return s / a;
  64636. }, e.prototype.dispose = function() {
  64637. this._controller && this._controller.dispose(), this._controllerHost = null;
  64638. }, e.prototype.remove = function() {
  64639. this._mainGroup.removeAll(), this._data = null;
  64640. }, e.type = "tree", e;
  64641. }(zt)
  64642. );
  64643. function IF(t, e) {
  64644. var n = t.getItemLayout(e);
  64645. return n && !isNaN(n.x) && !isNaN(n.y);
  64646. }
  64647. function DF(t, e, n, r, i) {
  64648. 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 ? {
  64649. x: d.__oldX,
  64650. y: d.__oldY,
  64651. rawX: d.__radialOldRawX,
  64652. rawY: d.__radialOldRawY
  64653. } : h, v = o.getLayout();
  64654. a ? (n = new Z0(t, e, null, {
  64655. symbolInnerColor: u,
  64656. useNameLabel: !0
  64657. }), n.x = p.x, n.y = p.y) : n.updateData(t, e, null, {
  64658. symbolInnerColor: u,
  64659. useNameLabel: !0
  64660. }), 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, Ct(n, {
  64661. x: v.x,
  64662. y: v.y
  64663. }, i);
  64664. var g = n.getSymbolPath();
  64665. if (i.get("layout") === "radial") {
  64666. var m = c.children[0], y = m.getLayout(), b = m.children.length, _ = void 0, O = void 0;
  64667. if (v.x === y.x && o.isExpand === !0 && m.children.length) {
  64668. var S = {
  64669. x: (m.children[0].getLayout().x + m.children[b - 1].getLayout().x) / 2,
  64670. y: (m.children[0].getLayout().y + m.children[b - 1].getLayout().y) / 2
  64671. };
  64672. _ = Math.atan2(S.y - y.y, S.x - y.x), _ < 0 && (_ = Math.PI * 2 + _), O = S.x < y.x, O && (_ = _ - Math.PI);
  64673. } else
  64674. _ = Math.atan2(v.y - y.y, v.x - y.x), _ < 0 && (_ = Math.PI * 2 + _), o.children.length === 0 || o.children.length !== 0 && o.isExpand === !1 ? (O = v.x < y.x, O && (_ = _ - Math.PI)) : (O = v.x > y.x, O || (_ = _ - Math.PI));
  64675. var x = O ? "left" : "right", C = s.getModel("label"), T = C.get("rotate"), w = T * (Math.PI / 180), P = g.getTextContent();
  64676. P && (g.setTextConfig({
  64677. position: C.get("position") || x,
  64678. rotation: T == null ? -_ : w,
  64679. origin: "center"
  64680. }), P.setStyle("verticalAlign", "middle"));
  64681. }
  64682. var $ = s.get(["emphasis", "focus"]), A = $ === "relative" ? _m(o.getAncestorsIndices(), o.getDescendantIndices()) : $ === "ancestor" ? o.getAncestorsIndices() : $ === "descendant" ? o.getDescendantIndices() : null;
  64683. A && (Fe(n).focus = A), fze(i, o, c, n, p, h, v, r), n.__edge && (n.onHoverStateChange = function(D) {
  64684. if (D !== "blur") {
  64685. var E = o.parentNode && t.getItemGraphicEl(o.parentNode.dataIndex);
  64686. E && E.hoverState === z0 || lO(n.__edge, D);
  64687. }
  64688. });
  64689. }
  64690. function fze(t, e, n, r, i, a, o, s) {
  64691. 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;
  64692. if (u === "curve")
  64693. e.parentNode && e.parentNode !== n && (v || (v = r.__edge = new F0({
  64694. shape: gE(c, f, d, i, i)
  64695. })), Ct(v, {
  64696. shape: gE(c, f, d, a, o)
  64697. }, t));
  64698. else if (u === "polyline") {
  64699. if (c === "orthogonal") {
  64700. if (e !== n && e.children && e.children.length !== 0 && e.isExpand === !0) {
  64701. for (var g = e.children, m = [], y = 0; y < g.length; y++) {
  64702. var b = g[y].getLayout();
  64703. m.push([b.x, b.y]);
  64704. }
  64705. v || (v = r.__edge = new uze({
  64706. shape: {
  64707. parentPoint: [o.x, o.y],
  64708. childPoints: [[o.x, o.y]],
  64709. orient: f,
  64710. forkPosition: h
  64711. }
  64712. })), Ct(v, {
  64713. shape: {
  64714. parentPoint: [o.x, o.y],
  64715. childPoints: m
  64716. }
  64717. }, t);
  64718. }
  64719. } else if (process.env.NODE_ENV !== "production")
  64720. throw new Error("The polyline edgeShape can only be used in orthogonal layout");
  64721. }
  64722. v && !(u === "polyline" && !e.isExpand) && (v.useStyle(Re({
  64723. strokeNoScale: !0,
  64724. fill: null
  64725. }, p)), Tr(v, l, "lineStyle"), _f(v), s.add(v));
  64726. }
  64727. function RF(t, e, n, r, i) {
  64728. var a = e.tree.root, o = yne(a, t), s = o.source, l = o.sourceLayout, u = e.getItemGraphicEl(t.dataIndex);
  64729. if (u) {
  64730. 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"]);
  64731. d && (h === "curve" ? uu(d, {
  64732. shape: gE(p, v, g, l, l),
  64733. style: {
  64734. opacity: 0
  64735. }
  64736. }, r, {
  64737. cb: function() {
  64738. n.remove(d);
  64739. },
  64740. removeOpt: i
  64741. }) : h === "polyline" && r.get("layout") === "orthogonal" && uu(d, {
  64742. shape: {
  64743. parentPoint: [l.x, l.y],
  64744. childPoints: [[l.x, l.y]]
  64745. },
  64746. style: {
  64747. opacity: 0
  64748. }
  64749. }, r, {
  64750. cb: function() {
  64751. n.remove(d);
  64752. },
  64753. removeOpt: i
  64754. }));
  64755. }
  64756. }
  64757. function yne(t, e) {
  64758. for (var n = e.parentNode === t ? e : e.parentNode || e, r; r = n.getLayout(), r == null; )
  64759. n = n.parentNode === t ? n : n.parentNode || n;
  64760. return {
  64761. source: n,
  64762. sourceLayout: r
  64763. };
  64764. }
  64765. function kF(t, e, n, r, i) {
  64766. var a = t.tree.getNodeByDataIndex(e), o = t.tree.root, s = yne(o, a).sourceLayout, l = {
  64767. duration: i.get("animationDurationUpdate"),
  64768. easing: i.get("animationEasingUpdate")
  64769. };
  64770. uu(n, {
  64771. x: s.x + 1,
  64772. y: s.y + 1
  64773. }, i, {
  64774. cb: function() {
  64775. r.remove(n), t.setItemGraphicEl(e, null);
  64776. },
  64777. removeOpt: l
  64778. }), n.fadeOut(null, t.hostModel, {
  64779. fadeLabel: !0,
  64780. animation: l
  64781. }), a.children.forEach(function(u) {
  64782. RF(u, t, r, i, l);
  64783. }), RF(a, t, r, i, l);
  64784. }
  64785. function gE(t, e, n, r, i) {
  64786. var a, o, s, l, u, c, f, d;
  64787. if (t === "radial") {
  64788. u = r.rawX, f = r.rawY, c = i.rawX, d = i.rawY;
  64789. var h = eg(u, f), p = eg(u, f + (d - f) * n), v = eg(c, d + (f - d) * n), g = eg(c, d);
  64790. return {
  64791. x1: h.x || 0,
  64792. y1: h.y || 0,
  64793. x2: g.x || 0,
  64794. y2: g.y || 0,
  64795. cpx1: p.x || 0,
  64796. cpy1: p.y || 0,
  64797. cpx2: v.x || 0,
  64798. cpy2: v.y || 0
  64799. };
  64800. } else
  64801. 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);
  64802. return {
  64803. x1: u,
  64804. y1: f,
  64805. x2: c,
  64806. y2: d,
  64807. cpx1: a,
  64808. cpy1: o,
  64809. cpx2: s,
  64810. cpy2: l
  64811. };
  64812. }
  64813. var wa = bt();
  64814. function bne(t) {
  64815. var e = t.mainData, n = t.datas;
  64816. n || (n = {
  64817. main: e
  64818. }, t.datasAttr = {
  64819. main: "data"
  64820. }), t.datas = t.mainData = null, _ne(e, n, t), k(n, function(r) {
  64821. k(e.TRANSFERABLE_METHODS, function(i) {
  64822. r.wrapMethod(i, Ue(dze, t));
  64823. });
  64824. }), e.wrapMethod("cloneShallow", Ue(pze, t)), k(e.CHANGABLE_METHODS, function(r) {
  64825. e.wrapMethod(r, Ue(hze, t));
  64826. }), ke(n[e.dataType] === e);
  64827. }
  64828. function dze(t, e) {
  64829. if (mze(this)) {
  64830. var n = le({}, wa(this).datas);
  64831. n[this.dataType] = e, _ne(e, n, t);
  64832. } else
  64833. Gk(e, this.dataType, wa(this).mainData, t);
  64834. return e;
  64835. }
  64836. function hze(t, e) {
  64837. return t.struct && t.struct.update(), e;
  64838. }
  64839. function pze(t, e) {
  64840. return k(wa(e).datas, function(n, r) {
  64841. n !== e && Gk(n.cloneShallow(), r, e, t);
  64842. }), e;
  64843. }
  64844. function vze(t) {
  64845. var e = wa(this).mainData;
  64846. return t == null || e == null ? e : wa(e).datas[t];
  64847. }
  64848. function gze() {
  64849. var t = wa(this).mainData;
  64850. return t == null ? [{
  64851. data: t
  64852. }] : ce(st(wa(t).datas), function(e) {
  64853. return {
  64854. type: e,
  64855. data: wa(t).datas[e]
  64856. };
  64857. });
  64858. }
  64859. function mze(t) {
  64860. return wa(t).mainData === t;
  64861. }
  64862. function _ne(t, e, n) {
  64863. wa(t).datas = {}, k(e, function(r, i) {
  64864. Gk(r, i, t, n);
  64865. });
  64866. }
  64867. function Gk(t, e, n, r) {
  64868. wa(n).datas[e] = t, wa(t).mainData = n, t.dataType = e, r.struct && (t[r.structAttr] = r.struct, r.struct[r.datasAttr[e]] = t), t.getLinkedData = vze, t.getLinkedDataAll = gze;
  64869. }
  64870. var yze = (
  64871. /** @class */
  64872. function() {
  64873. function t(e, n) {
  64874. this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = n;
  64875. }
  64876. return t.prototype.isRemoved = function() {
  64877. return this.dataIndex < 0;
  64878. }, t.prototype.eachNode = function(e, n, r) {
  64879. Me(e) && (r = n, n = e, e = null), e = e || {}, Oe(e) && (e = {
  64880. order: e
  64881. });
  64882. var i = e.order || "preorder", a = this[e.attr || "children"], o;
  64883. i === "preorder" && (o = n.call(r, this));
  64884. for (var s = 0; !o && s < a.length; s++)
  64885. a[s].eachNode(e, n, r);
  64886. i === "postorder" && n.call(r, this);
  64887. }, t.prototype.updateDepthAndHeight = function(e) {
  64888. var n = 0;
  64889. this.depth = e;
  64890. for (var r = 0; r < this.children.length; r++) {
  64891. var i = this.children[r];
  64892. i.updateDepthAndHeight(e + 1), i.height > n && (n = i.height);
  64893. }
  64894. this.height = n + 1;
  64895. }, t.prototype.getNodeById = function(e) {
  64896. if (this.getId() === e)
  64897. return this;
  64898. for (var n = 0, r = this.children, i = r.length; n < i; n++) {
  64899. var a = r[n].getNodeById(e);
  64900. if (a)
  64901. return a;
  64902. }
  64903. }, t.prototype.contains = function(e) {
  64904. if (e === this)
  64905. return !0;
  64906. for (var n = 0, r = this.children, i = r.length; n < i; n++) {
  64907. var a = r[n].contains(e);
  64908. if (a)
  64909. return a;
  64910. }
  64911. }, t.prototype.getAncestors = function(e) {
  64912. for (var n = [], r = e ? this : this.parentNode; r; )
  64913. n.push(r), r = r.parentNode;
  64914. return n.reverse(), n;
  64915. }, t.prototype.getAncestorsIndices = function() {
  64916. for (var e = [], n = this; n; )
  64917. e.push(n.dataIndex), n = n.parentNode;
  64918. return e.reverse(), e;
  64919. }, t.prototype.getDescendantIndices = function() {
  64920. var e = [];
  64921. return this.eachNode(function(n) {
  64922. e.push(n.dataIndex);
  64923. }), e;
  64924. }, t.prototype.getValue = function(e) {
  64925. var n = this.hostTree.data;
  64926. return n.getStore().get(n.getDimensionIndex(e || "value"), this.dataIndex);
  64927. }, t.prototype.setLayout = function(e, n) {
  64928. this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, n);
  64929. }, t.prototype.getLayout = function() {
  64930. return this.hostTree.data.getItemLayout(this.dataIndex);
  64931. }, t.prototype.getModel = function(e) {
  64932. if (!(this.dataIndex < 0)) {
  64933. var n = this.hostTree, r = n.data.getItemModel(this.dataIndex);
  64934. return r.getModel(e);
  64935. }
  64936. }, t.prototype.getLevelModel = function() {
  64937. return (this.hostTree.levelModels || [])[this.depth];
  64938. }, t.prototype.setVisual = function(e, n) {
  64939. this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, n);
  64940. }, t.prototype.getVisual = function(e) {
  64941. return this.hostTree.data.getItemVisual(this.dataIndex, e);
  64942. }, t.prototype.getRawIndex = function() {
  64943. return this.hostTree.data.getRawIndex(this.dataIndex);
  64944. }, t.prototype.getId = function() {
  64945. return this.hostTree.data.getId(this.dataIndex);
  64946. }, t.prototype.getChildIndex = function() {
  64947. if (this.parentNode) {
  64948. for (var e = this.parentNode.children, n = 0; n < e.length; ++n)
  64949. if (e[n] === this)
  64950. return n;
  64951. return -1;
  64952. }
  64953. return -1;
  64954. }, t.prototype.isAncestorOf = function(e) {
  64955. for (var n = e.parentNode; n; ) {
  64956. if (n === this)
  64957. return !0;
  64958. n = n.parentNode;
  64959. }
  64960. return !1;
  64961. }, t.prototype.isDescendantOf = function(e) {
  64962. return e !== this && e.isAncestorOf(this);
  64963. }, t;
  64964. }()
  64965. ), jk = (
  64966. /** @class */
  64967. function() {
  64968. function t(e) {
  64969. this.type = "tree", this._nodes = [], this.hostModel = e;
  64970. }
  64971. return t.prototype.eachNode = function(e, n, r) {
  64972. this.root.eachNode(e, n, r);
  64973. }, t.prototype.getNodeByDataIndex = function(e) {
  64974. var n = this.data.getRawIndex(e);
  64975. return this._nodes[n];
  64976. }, t.prototype.getNodeById = function(e) {
  64977. return this.root.getNodeById(e);
  64978. }, t.prototype.update = function() {
  64979. for (var e = this.data, n = this._nodes, r = 0, i = n.length; r < i; r++)
  64980. n[r].dataIndex = -1;
  64981. for (var r = 0, i = e.count(); r < i; r++)
  64982. n[e.getRawIndex(r)].dataIndex = r;
  64983. }, t.prototype.clearLayouts = function() {
  64984. this.data.clearItemLayouts();
  64985. }, t.createTree = function(e, n, r) {
  64986. var i = new t(n), a = [], o = 1;
  64987. s(e);
  64988. function s(c, f) {
  64989. var d = c.value;
  64990. o = Math.max(o, ue(d) ? d.length : 1), a.push(c);
  64991. var h = new yze(Vn(c.name, ""), i);
  64992. f ? bze(h, f) : i.root = h, i._nodes.push(h);
  64993. var p = c.children;
  64994. if (p)
  64995. for (var v = 0; v < p.length; v++)
  64996. s(p[v], h);
  64997. }
  64998. i.root.updateDepthAndHeight(0);
  64999. var l = Ap(a, {
  65000. coordDimensions: ["value"],
  65001. dimensionsCount: o
  65002. }).dimensions, u = new Nr(l, n);
  65003. return u.initData(a), r && r(u), bne({
  65004. mainData: u,
  65005. struct: i,
  65006. structAttr: "tree"
  65007. }), i.update(), i;
  65008. }, t;
  65009. }()
  65010. );
  65011. function bze(t, e) {
  65012. var n = e.children;
  65013. t.parentNode !== e && (n.push(t), t.parentNode = e);
  65014. }
  65015. function Vm(t, e, n) {
  65016. if (t && et(e, t.type) >= 0) {
  65017. var r = n.getData().tree.root, i = t.targetNode;
  65018. if (Oe(i) && (i = r.getNodeById(i)), i && r.contains(i))
  65019. return {
  65020. node: i
  65021. };
  65022. var a = t.targetNodeId;
  65023. if (a != null && (i = r.getNodeById(a)))
  65024. return {
  65025. node: i
  65026. };
  65027. }
  65028. }
  65029. function One(t) {
  65030. for (var e = []; t; )
  65031. t = t.parentNode, t && e.push(t);
  65032. return e.reverse();
  65033. }
  65034. function Zk(t, e) {
  65035. var n = One(t);
  65036. return et(n, e) >= 0;
  65037. }
  65038. function _w(t, e) {
  65039. for (var n = []; t; ) {
  65040. var r = t.dataIndex;
  65041. n.push({
  65042. name: t.name,
  65043. dataIndex: r,
  65044. value: e.getRawValue(r)
  65045. }), t = t.parentNode;
  65046. }
  65047. return n.reverse(), n;
  65048. }
  65049. var _ze = (
  65050. /** @class */
  65051. function(t) {
  65052. q(e, t);
  65053. function e() {
  65054. var n = t !== null && t.apply(this, arguments) || this;
  65055. return n.hasSymbolVisual = !0, n.ignoreStyleOnData = !0, n;
  65056. }
  65057. return e.prototype.getInitialData = function(n) {
  65058. var r = {
  65059. name: n.name,
  65060. children: n.data
  65061. }, i = n.leaves || {}, a = new Wt(i, this, this.ecModel), o = jk.createTree(r, this, s);
  65062. function s(f) {
  65063. f.wrapMethod("getItemModel", function(d, h) {
  65064. var p = o.getNodeByDataIndex(h);
  65065. return p && p.children.length && p.isExpand || (d.parentModel = a), d;
  65066. });
  65067. }
  65068. var l = 0;
  65069. o.eachNode("preorder", function(f) {
  65070. f.depth > l && (l = f.depth);
  65071. });
  65072. var u = n.expandAndCollapse, c = u && n.initialTreeDepth >= 0 ? n.initialTreeDepth : l;
  65073. return o.root.eachNode("preorder", function(f) {
  65074. var d = f.hostTree.data.getRawDataItem(f.dataIndex);
  65075. f.isExpand = d && d.collapsed != null ? !d.collapsed : f.depth <= c;
  65076. }), o.data;
  65077. }, e.prototype.getOrient = function() {
  65078. var n = this.get("orient");
  65079. return n === "horizontal" ? n = "LR" : n === "vertical" && (n = "TB"), n;
  65080. }, e.prototype.setZoom = function(n) {
  65081. this.option.zoom = n;
  65082. }, e.prototype.setCenter = function(n) {
  65083. this.option.center = n;
  65084. }, e.prototype.formatTooltip = function(n, r, i) {
  65085. for (var a = this.getData().tree, o = a.root.children[0], s = a.getNodeByDataIndex(n), l = s.getValue(), u = s.name; s && s !== o; )
  65086. u = s.parentNode.name + "." + u, s = s.parentNode;
  65087. return tr("nameValue", {
  65088. name: u,
  65089. value: l,
  65090. noValue: isNaN(l) || l == null
  65091. });
  65092. }, e.prototype.getDataParams = function(n) {
  65093. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  65094. return r.treeAncestors = _w(i, this), r.collapsed = !i.isExpand, r;
  65095. }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
  65096. // zlevel: 0,
  65097. z: 2,
  65098. coordinateSystem: "view",
  65099. // the position of the whole view
  65100. left: "12%",
  65101. top: "12%",
  65102. right: "12%",
  65103. bottom: "12%",
  65104. // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'
  65105. layout: "orthogonal",
  65106. // value can be 'polyline'
  65107. edgeShape: "curve",
  65108. edgeForkPosition: "50%",
  65109. // true | false | 'move' | 'scale', see module:component/helper/RoamController.
  65110. roam: !1,
  65111. // Symbol size scale ratio in roam
  65112. nodeScaleRatio: 0.4,
  65113. // Default on center of graph
  65114. center: null,
  65115. zoom: 1,
  65116. orient: "LR",
  65117. symbol: "emptyCircle",
  65118. symbolSize: 7,
  65119. expandAndCollapse: !0,
  65120. initialTreeDepth: 2,
  65121. lineStyle: {
  65122. color: "#ccc",
  65123. width: 1.5,
  65124. curveness: 0.5
  65125. },
  65126. itemStyle: {
  65127. color: "lightsteelblue",
  65128. // borderColor: '#c23531',
  65129. borderWidth: 1.5
  65130. },
  65131. label: {
  65132. show: !0
  65133. },
  65134. animationEasing: "linear",
  65135. animationDuration: 700,
  65136. animationDurationUpdate: 500
  65137. }, e;
  65138. }(Ht)
  65139. );
  65140. function Oze(t, e, n) {
  65141. for (var r = [t], i = [], a; a = r.pop(); )
  65142. if (i.push(a), a.isExpand) {
  65143. var o = a.children;
  65144. if (o.length)
  65145. for (var s = 0; s < o.length; s++)
  65146. r.push(o[s]);
  65147. }
  65148. for (; a = i.pop(); )
  65149. e(a, n);
  65150. }
  65151. function xv(t, e) {
  65152. for (var n = [t], r; r = n.pop(); )
  65153. if (e(r), r.isExpand) {
  65154. var i = r.children;
  65155. if (i.length)
  65156. for (var a = i.length - 1; a >= 0; a--)
  65157. n.push(i[a]);
  65158. }
  65159. }
  65160. function Sze(t, e) {
  65161. t.eachSeriesByType("tree", function(n) {
  65162. xze(n, e);
  65163. });
  65164. }
  65165. function xze(t, e) {
  65166. var n = nze(t, e);
  65167. t.layoutInfo = n;
  65168. var r = t.get("layout"), i = 0, a = 0, o = null;
  65169. r === "radial" ? (i = 2 * Math.PI, a = Math.min(n.height, n.width) / 2, o = MF(function(b, _) {
  65170. return (b.parentNode === _.parentNode ? 1 : 2) / b.depth;
  65171. })) : (i = n.width, a = n.height, o = MF());
  65172. var s = t.getData().tree.root, l = s.children[0];
  65173. if (l) {
  65174. JBe(s), Oze(l, eze, o), s.hierNode.modifier = -l.hierNode.prelim, xv(l, tze);
  65175. var u = l, c = l, f = l;
  65176. xv(l, function(b) {
  65177. var _ = b.getLayout().x;
  65178. _ < u.getLayout().x && (u = b), _ > c.getLayout().x && (c = b), b.depth > f.depth && (f = b);
  65179. });
  65180. var d = u === c ? 1 : o(u, c) / 2, h = d - u.getLayout().x, p = 0, v = 0, g = 0, m = 0;
  65181. if (r === "radial")
  65182. p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), xv(l, function(b) {
  65183. g = (b.getLayout().x + h) * p, m = (b.depth - 1) * v;
  65184. var _ = eg(g, m);
  65185. b.setLayout({
  65186. x: _.x,
  65187. y: _.y,
  65188. rawX: g,
  65189. rawY: m
  65190. }, !0);
  65191. });
  65192. else {
  65193. var y = t.getOrient();
  65194. y === "RL" || y === "LR" ? (v = a / (c.getLayout().x + d + h), p = i / (f.depth - 1 || 1), xv(l, function(b) {
  65195. m = (b.getLayout().x + h) * v, g = y === "LR" ? (b.depth - 1) * p : i - (b.depth - 1) * p, b.setLayout({
  65196. x: g,
  65197. y: m
  65198. }, !0);
  65199. })) : (y === "TB" || y === "BT") && (p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), xv(l, function(b) {
  65200. g = (b.getLayout().x + h) * p, m = y === "TB" ? (b.depth - 1) * v : a - (b.depth - 1) * v, b.setLayout({
  65201. x: g,
  65202. y: m
  65203. }, !0);
  65204. }));
  65205. }
  65206. }
  65207. }
  65208. function wze(t) {
  65209. t.eachSeriesByType("tree", function(e) {
  65210. var n = e.getData(), r = n.tree;
  65211. r.eachNode(function(i) {
  65212. var a = i.getModel(), o = a.getModel("itemStyle").getItemStyle(), s = n.ensureUniqueItemVisual(i.dataIndex, "style");
  65213. le(s, o);
  65214. });
  65215. });
  65216. }
  65217. function Cze(t) {
  65218. t.registerAction({
  65219. type: "treeExpandAndCollapse",
  65220. event: "treeExpandAndCollapse",
  65221. update: "update"
  65222. }, function(e, n) {
  65223. n.eachComponent({
  65224. mainType: "series",
  65225. subType: "tree",
  65226. query: e
  65227. }, function(r) {
  65228. var i = e.dataIndex, a = r.getData().tree, o = a.getNodeByDataIndex(i);
  65229. o.isExpand = !o.isExpand;
  65230. });
  65231. }), t.registerAction({
  65232. type: "treeRoam",
  65233. event: "treeRoam",
  65234. // Here we set 'none' instead of 'update', because roam action
  65235. // just need to update the transform matrix without having to recalculate
  65236. // the layout. So don't need to go through the whole update process, such
  65237. // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.
  65238. update: "none"
  65239. }, function(e, n, r) {
  65240. n.eachComponent({
  65241. mainType: "series",
  65242. subType: "tree",
  65243. query: e
  65244. }, function(i) {
  65245. var a = i.coordinateSystem, o = Hk(a, e, void 0, r);
  65246. i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
  65247. });
  65248. });
  65249. }
  65250. function Tze(t) {
  65251. t.registerChartView(cze), t.registerSeriesModel(_ze), t.registerLayout(Sze), t.registerVisual(wze), Cze(t);
  65252. }
  65253. var LF = ["treemapZoomToNode", "treemapRender", "treemapMove"];
  65254. function Pze(t) {
  65255. for (var e = 0; e < LF.length; e++)
  65256. t.registerAction({
  65257. type: LF[e],
  65258. update: "updateView"
  65259. }, On);
  65260. t.registerAction({
  65261. type: "treemapRootToNode",
  65262. update: "updateView"
  65263. }, function(n, r) {
  65264. r.eachComponent({
  65265. mainType: "series",
  65266. subType: "treemap",
  65267. query: n
  65268. }, i);
  65269. function i(a, o) {
  65270. var s = ["treemapZoomToNode", "treemapRootToNode"], l = Vm(n, s, a);
  65271. if (l) {
  65272. var u = a.getViewRoot();
  65273. u && (n.direction = Zk(u, l.node) ? "rollUp" : "drillDown"), a.resetViewRoot(l.node);
  65274. }
  65275. }
  65276. });
  65277. }
  65278. function Sne(t) {
  65279. var e = t.getData(), n = e.tree, r = {};
  65280. n.eachNode(function(i) {
  65281. for (var a = i; a && a.depth > 1; )
  65282. a = a.parentNode;
  65283. var o = HA(t.ecModel, a.name || a.dataIndex + "", r);
  65284. i.setVisual("decal", o);
  65285. });
  65286. }
  65287. var $ze = (
  65288. /** @class */
  65289. function(t) {
  65290. q(e, t);
  65291. function e() {
  65292. var n = t !== null && t.apply(this, arguments) || this;
  65293. return n.type = e.type, n.preventUsingHoverLayer = !0, n;
  65294. }
  65295. return e.prototype.getInitialData = function(n, r) {
  65296. var i = {
  65297. name: n.name,
  65298. children: n.data
  65299. };
  65300. xne(i);
  65301. var a = n.levels || [], o = this.designatedVisualItemStyle = {}, s = new Wt({
  65302. itemStyle: o
  65303. }, this, r);
  65304. a = n.levels = Aze(a, r);
  65305. var l = ce(a || [], function(f) {
  65306. return new Wt(f, s, r);
  65307. }, this), u = jk.createTree(i, this, c);
  65308. function c(f) {
  65309. f.wrapMethod("getItemModel", function(d, h) {
  65310. var p = u.getNodeByDataIndex(h), v = p ? l[p.depth] : null;
  65311. return d.parentModel = v || s, d;
  65312. });
  65313. }
  65314. return u.data;
  65315. }, e.prototype.optionUpdated = function() {
  65316. this.resetViewRoot();
  65317. }, e.prototype.formatTooltip = function(n, r, i) {
  65318. var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
  65319. return tr("nameValue", {
  65320. name: s,
  65321. value: o
  65322. });
  65323. }, e.prototype.getDataParams = function(n) {
  65324. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  65325. return r.treeAncestors = _w(i, this), r.treePathInfo = r.treeAncestors, r;
  65326. }, e.prototype.setLayoutInfo = function(n) {
  65327. this.layoutInfo = this.layoutInfo || {}, le(this.layoutInfo, n);
  65328. }, e.prototype.mapIdToIndex = function(n) {
  65329. var r = this._idIndexMap;
  65330. r || (r = this._idIndexMap = Pe(), this._idIndexMapCount = 0);
  65331. var i = r.get(n);
  65332. return i == null && r.set(n, i = this._idIndexMapCount++), i;
  65333. }, e.prototype.getViewRoot = function() {
  65334. return this._viewRoot;
  65335. }, e.prototype.resetViewRoot = function(n) {
  65336. n ? this._viewRoot = n : n = this._viewRoot;
  65337. var r = this.getRawData().tree.root;
  65338. (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
  65339. }, e.prototype.enableAriaDecal = function() {
  65340. Sne(this);
  65341. }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
  65342. // Disable progressive rendering
  65343. progressive: 0,
  65344. // size: ['80%', '80%'], // deprecated, compatible with ec2.
  65345. left: "center",
  65346. top: "middle",
  65347. width: "80%",
  65348. height: "80%",
  65349. sort: !0,
  65350. clipWindow: "origin",
  65351. squareRatio: 0.5 * (1 + Math.sqrt(5)),
  65352. leafDepth: null,
  65353. drillDownIcon: "▶",
  65354. // to align specialized icon. ▷▶❒❐▼✚
  65355. zoomToNodeRatio: 0.32 * 0.32,
  65356. scaleLimit: null,
  65357. roam: !0,
  65358. nodeClick: "zoomToNode",
  65359. animation: !0,
  65360. animationDurationUpdate: 900,
  65361. animationEasing: "quinticInOut",
  65362. breadcrumb: {
  65363. show: !0,
  65364. height: 22,
  65365. left: "center",
  65366. top: "bottom",
  65367. // right
  65368. // bottom
  65369. emptyItemWidth: 25,
  65370. itemStyle: {
  65371. color: "rgba(0,0,0,0.7)",
  65372. textStyle: {
  65373. color: "#fff"
  65374. }
  65375. },
  65376. emphasis: {
  65377. itemStyle: {
  65378. color: "rgba(0,0,0,0.9)"
  65379. // '#5793f3',
  65380. }
  65381. }
  65382. },
  65383. label: {
  65384. show: !0,
  65385. // Do not use textDistance, for ellipsis rect just the same as treemap node rect.
  65386. distance: 0,
  65387. padding: 5,
  65388. position: "inside",
  65389. // formatter: null,
  65390. color: "#fff",
  65391. overflow: "truncate"
  65392. // align
  65393. // verticalAlign
  65394. },
  65395. upperLabel: {
  65396. show: !1,
  65397. position: [0, "50%"],
  65398. height: 20,
  65399. // formatter: null,
  65400. // color: '#fff',
  65401. overflow: "truncate",
  65402. // align: null,
  65403. verticalAlign: "middle"
  65404. },
  65405. itemStyle: {
  65406. color: null,
  65407. colorAlpha: null,
  65408. colorSaturation: null,
  65409. borderWidth: 0,
  65410. gapWidth: 0,
  65411. borderColor: "#fff",
  65412. borderColorSaturation: null
  65413. // If specified, borderColor will be ineffective, and the
  65414. // border color is evaluated by color of current node and
  65415. // borderColorSaturation.
  65416. },
  65417. emphasis: {
  65418. upperLabel: {
  65419. show: !0,
  65420. position: [0, "50%"],
  65421. overflow: "truncate",
  65422. verticalAlign: "middle"
  65423. }
  65424. },
  65425. visualDimension: 0,
  65426. visualMin: null,
  65427. visualMax: null,
  65428. color: [],
  65429. // level[n].color (if necessary).
  65430. // + Specify color list of each level. level[0].color would be global
  65431. // color list if not specified. (see method `setDefault`).
  65432. // + But set as a empty array to forbid fetch color from global palette
  65433. // when using nodeModel.get('color'), otherwise nodes on deep level
  65434. // will always has color palette set and are not able to inherit color
  65435. // from parent node.
  65436. // + TreemapSeries.color can not be set as 'none', otherwise effect
  65437. // legend color fetching (see seriesColor.js).
  65438. colorAlpha: null,
  65439. colorSaturation: null,
  65440. colorMappingBy: "index",
  65441. visibleMin: 10,
  65442. // be rendered. Only works when sort is 'asc' or 'desc'.
  65443. childrenVisibleMin: null,
  65444. // grandchildren will not show.
  65445. // Why grandchildren? If not grandchildren but children,
  65446. // some siblings show children and some not,
  65447. // the appearance may be mess and not consistent,
  65448. levels: []
  65449. // Each item: {
  65450. // visibleMin, itemStyle, visualDimension, label
  65451. // }
  65452. }, e;
  65453. }(Ht)
  65454. );
  65455. function xne(t) {
  65456. var e = 0;
  65457. k(t.children, function(r) {
  65458. xne(r);
  65459. var i = r.value;
  65460. ue(i) && (i = i[0]), e += i;
  65461. });
  65462. var n = t.value;
  65463. ue(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), ue(t.value) ? t.value[0] = n : t.value = n;
  65464. }
  65465. function Aze(t, e) {
  65466. var n = Qt(e.get("color")), r = Qt(e.get(["aria", "decal", "decals"]));
  65467. if (n) {
  65468. t = t || [];
  65469. var i, a;
  65470. k(t, function(s) {
  65471. var l = new Wt(s), u = l.get("color"), c = l.get("decal");
  65472. (l.get(["itemStyle", "color"]) || u && u !== "none") && (i = !0), (l.get(["itemStyle", "decal"]) || c && c !== "none") && (a = !0);
  65473. });
  65474. var o = t[0] || (t[0] = {});
  65475. return i || (o.color = n.slice()), !a && r && (o.decal = r.slice()), t;
  65476. }
  65477. }
  65478. var Eze = 8, NF = 8, gP = 5, Mze = (
  65479. /** @class */
  65480. function() {
  65481. function t(e) {
  65482. this.group = new Ve(), e.add(this.group);
  65483. }
  65484. return t.prototype.render = function(e, n, r, i) {
  65485. var a = e.getModel("breadcrumb"), o = this.group;
  65486. if (o.removeAll(), !(!a.get("show") || !r)) {
  65487. var s = a.getModel("itemStyle"), l = a.getModel("emphasis"), u = s.getModel("textStyle"), c = l.getModel(["itemStyle", "textStyle"]), f = {
  65488. pos: {
  65489. left: a.get("left"),
  65490. right: a.get("right"),
  65491. top: a.get("top"),
  65492. bottom: a.get("bottom")
  65493. },
  65494. box: {
  65495. width: n.getWidth(),
  65496. height: n.getHeight()
  65497. },
  65498. emptyItemWidth: a.get("emptyItemWidth"),
  65499. totalWidth: 0,
  65500. renderList: []
  65501. };
  65502. this._prepare(r, f, u), this._renderContent(e, f, s, l, u, c, i), ow(o, f.pos, f.box);
  65503. }
  65504. }, t.prototype._prepare = function(e, n, r) {
  65505. for (var i = e; i; i = i.parentNode) {
  65506. var a = Vn(i.getModel().get("name"), ""), o = r.getTextRect(a), s = Math.max(o.width + Eze * 2, n.emptyItemWidth);
  65507. n.totalWidth += s + NF, n.renderList.push({
  65508. node: i,
  65509. text: a,
  65510. width: s
  65511. });
  65512. }
  65513. }, t.prototype._renderContent = function(e, n, r, i, a, o, s) {
  65514. for (var l = 0, u = n.emptyItemWidth, c = e.get(["breadcrumb", "height"]), f = _Le(n.pos, n.box), d = n.totalWidth, h = n.renderList, p = i.getModel("itemStyle").getItemStyle(), v = h.length - 1; v >= 0; v--) {
  65515. var g = h[v], m = g.node, y = g.width, b = g.text;
  65516. d > f.width && (d -= y - u, y = u, b = null);
  65517. var _ = new ai({
  65518. shape: {
  65519. points: Ize(l, 0, y, c, v === h.length - 1, v === 0)
  65520. },
  65521. style: Re(r.getItemStyle(), {
  65522. lineJoin: "bevel"
  65523. }),
  65524. textContent: new gt({
  65525. style: Zt(a, {
  65526. text: b
  65527. })
  65528. }),
  65529. textConfig: {
  65530. position: "inside"
  65531. },
  65532. z2: mp * 1e4,
  65533. onclick: Ue(s, m)
  65534. });
  65535. _.disableLabelAnimation = !0, _.getTextContent().ensureState("emphasis").style = Zt(o, {
  65536. text: b
  65537. }), _.ensureState("emphasis").style = p, bn(_, i.get("focus"), i.get("blurScope"), i.get("disabled")), this.group.add(_), Dze(_, e, m), l += y + NF;
  65538. }
  65539. }, t.prototype.remove = function() {
  65540. this.group.removeAll();
  65541. }, t;
  65542. }()
  65543. );
  65544. function Ize(t, e, n, r, i, a) {
  65545. var o = [[i ? t : t - gP, e], [t + n, e], [t + n, e + r], [i ? t : t - gP, e + r]];
  65546. return !a && o.splice(2, 0, [t + n + gP, e + r / 2]), !i && o.push([t, e + r / 2]), o;
  65547. }
  65548. function Dze(t, e, n) {
  65549. Fe(t).eventData = {
  65550. componentType: "series",
  65551. componentSubType: "treemap",
  65552. componentIndex: e.componentIndex,
  65553. seriesIndex: e.seriesIndex,
  65554. seriesName: e.name,
  65555. seriesType: "treemap",
  65556. selfType: "breadcrumb",
  65557. nodeData: {
  65558. dataIndex: n && n.dataIndex,
  65559. name: n && n.name
  65560. },
  65561. treePathInfo: n && _w(n, e)
  65562. };
  65563. }
  65564. var Rze = (
  65565. /** @class */
  65566. function() {
  65567. function t() {
  65568. this._storage = [], this._elExistsMap = {};
  65569. }
  65570. return t.prototype.add = function(e, n, r, i, a) {
  65571. return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({
  65572. el: e,
  65573. target: n,
  65574. duration: r,
  65575. delay: i,
  65576. easing: a
  65577. }), !0);
  65578. }, t.prototype.finished = function(e) {
  65579. return this._finishedCallback = e, this;
  65580. }, t.prototype.start = function() {
  65581. for (var e = this, n = this._storage.length, r = function() {
  65582. n--, n <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback());
  65583. }, i = 0, a = this._storage.length; i < a; i++) {
  65584. var o = this._storage[i];
  65585. o.el.animateTo(o.target, {
  65586. duration: o.duration,
  65587. delay: o.delay,
  65588. easing: o.easing,
  65589. setToFinal: !0,
  65590. done: r,
  65591. aborted: r
  65592. });
  65593. }
  65594. return this;
  65595. }, t;
  65596. }()
  65597. );
  65598. function kze() {
  65599. return new Rze();
  65600. }
  65601. var mE = Ve, BF = mt, zF = 3, VF = "label", FF = "upperLabel", Lze = mp * 10, Nze = mp * 2, Bze = mp * 3, pc = bf([
  65602. ["fill", "color"],
  65603. // `borderColor` and `borderWidth` has been occupied,
  65604. // so use `stroke` to indicate the stroke of the rect.
  65605. ["stroke", "strokeColor"],
  65606. ["lineWidth", "strokeWidth"],
  65607. ["shadowBlur"],
  65608. ["shadowOffsetX"],
  65609. ["shadowOffsetY"],
  65610. ["shadowColor"]
  65611. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  65612. // So do not transfer decal directly.
  65613. ]), WF = function(t) {
  65614. var e = pc(t);
  65615. return e.stroke = e.fill = e.lineWidth = null, e;
  65616. }, RO = bt(), zze = (
  65617. /** @class */
  65618. function(t) {
  65619. q(e, t);
  65620. function e() {
  65621. var n = t !== null && t.apply(this, arguments) || this;
  65622. return n.type = e.type, n._state = "ready", n._storage = wv(), n;
  65623. }
  65624. return e.prototype.render = function(n, r, i, a) {
  65625. var o = r.findComponents({
  65626. mainType: "series",
  65627. subType: "treemap",
  65628. query: a
  65629. });
  65630. if (!(et(o, n) < 0)) {
  65631. this.seriesModel = n, this.api = i, this.ecModel = r;
  65632. var s = ["treemapZoomToNode", "treemapRootToNode"], l = Vm(a, s, n), u = a && a.type, c = n.layoutInfo, f = !this._oldTree, d = this._storage, h = u === "treemapRootToNode" && l && d ? {
  65633. rootNodeGroup: d.nodeGroup[l.node.getRawIndex()],
  65634. direction: a.direction
  65635. } : null, p = this._giveContainerGroup(c), v = n.get("animation"), g = this._doRender(p, n, h);
  65636. v && !f && (!u || u === "treemapZoomToNode" || u === "treemapRootToNode") ? this._doAnimation(p, g, n, h) : g.renderFinally(), this._resetController(i), this._renderBreadcrumb(n, i, l);
  65637. }
  65638. }, e.prototype._giveContainerGroup = function(n) {
  65639. var r = this._containerGroup;
  65640. return r || (r = this._containerGroup = new mE(), this._initEvents(r), this.group.add(r)), r.x = n.x, r.y = n.y, r;
  65641. }, e.prototype._doRender = function(n, r, i) {
  65642. var a = r.getData().tree, o = this._oldTree, s = wv(), l = wv(), u = this._storage, c = [];
  65643. function f(y, b, _, O) {
  65644. return Vze(r, l, u, i, s, c, y, b, _, O);
  65645. }
  65646. v(a.root ? [a.root] : [], o && o.root ? [o.root] : [], n, a === o || !o, 0);
  65647. var d = g(u);
  65648. if (this._oldTree = a, this._storage = l, this._controllerHost) {
  65649. var h = this.seriesModel.layoutInfo, p = a.root.getLayout();
  65650. p.width === h.width && p.height === h.height && (this._controllerHost.zoom = 1);
  65651. }
  65652. return {
  65653. lastsForAnimation: s,
  65654. willDeleteEls: d,
  65655. renderFinally: m
  65656. };
  65657. function v(y, b, _, O, S) {
  65658. O ? (b = y, k(y, function(T, w) {
  65659. !T.isRemoved() && C(w, w);
  65660. })) : new Xs(b, y, x, x).add(C).update(C).remove(Ue(C, null)).execute();
  65661. function x(T) {
  65662. return T.getId();
  65663. }
  65664. function C(T, w) {
  65665. var P = T != null ? y[T] : null, $ = w != null ? b[w] : null, A = f(P, $, _, S);
  65666. A && v(P && P.viewChildren || [], $ && $.viewChildren || [], A, O, S + 1);
  65667. }
  65668. }
  65669. function g(y) {
  65670. var b = wv();
  65671. return y && k(y, function(_, O) {
  65672. var S = b[O];
  65673. k(_, function(x) {
  65674. x && (S.push(x), RO(x).willDelete = !0);
  65675. });
  65676. }), b;
  65677. }
  65678. function m() {
  65679. k(d, function(y) {
  65680. k(y, function(b) {
  65681. b.parent && b.parent.remove(b);
  65682. });
  65683. }), k(c, function(y) {
  65684. y.invisible = !0, y.dirty();
  65685. });
  65686. }
  65687. }, e.prototype._doAnimation = function(n, r, i, a) {
  65688. var o = i.get("animationDurationUpdate"), s = i.get("animationEasing"), l = (Me(o) ? 0 : o) || 0, u = (Me(s) ? null : s) || "cubicOut", c = kze();
  65689. k(r.willDeleteEls, function(f, d) {
  65690. k(f, function(h, p) {
  65691. if (!h.invisible) {
  65692. var v = h.parent, g, m = RO(v);
  65693. if (a && a.direction === "drillDown")
  65694. g = v === a.rootNodeGroup ? {
  65695. shape: {
  65696. x: 0,
  65697. y: 0,
  65698. width: m.nodeWidth,
  65699. height: m.nodeHeight
  65700. },
  65701. style: {
  65702. opacity: 0
  65703. }
  65704. } : {
  65705. style: {
  65706. opacity: 0
  65707. }
  65708. };
  65709. else {
  65710. var y = 0, b = 0;
  65711. m.willDelete || (y = m.nodeWidth / 2, b = m.nodeHeight / 2), g = d === "nodeGroup" ? {
  65712. x: y,
  65713. y: b,
  65714. style: {
  65715. opacity: 0
  65716. }
  65717. } : {
  65718. shape: {
  65719. x: y,
  65720. y: b,
  65721. width: 0,
  65722. height: 0
  65723. },
  65724. style: {
  65725. opacity: 0
  65726. }
  65727. };
  65728. }
  65729. g && c.add(h, g, l, 0, u);
  65730. }
  65731. });
  65732. }), k(this._storage, function(f, d) {
  65733. k(f, function(h, p) {
  65734. var v = r.lastsForAnimation[d][p], g = {};
  65735. v && (h instanceof Ve ? v.oldX != null && (g.x = h.x, g.y = h.y, h.x = v.oldX, h.y = v.oldY) : (v.oldShape && (g.shape = le({}, h.shape), h.setShape(v.oldShape)), v.fadein ? (h.setStyle("opacity", 0), g.style = {
  65736. opacity: 1
  65737. }) : h.style.opacity !== 1 && (g.style = {
  65738. opacity: 1
  65739. })), c.add(h, g, l, 0, u));
  65740. });
  65741. }, this), this._state = "animating", c.finished(xe(function() {
  65742. this._state = "ready", r.renderFinally();
  65743. }, this)).start();
  65744. }, e.prototype._resetController = function(n) {
  65745. var r = this._controller, i = this._controllerHost;
  65746. i || (this._controllerHost = {
  65747. target: this.group
  65748. }, i = this._controllerHost), r || (r = this._controller = new J0(n.getZr()), r.enable(this.seriesModel.get("roam")), i.zoomLimit = this.seriesModel.get("scaleLimit"), i.zoom = this.seriesModel.get("zoom"), r.on("pan", xe(this._onPan, this)), r.on("zoom", xe(this._onZoom, this)));
  65749. var a = new Je(0, 0, n.getWidth(), n.getHeight());
  65750. r.setPointerChecker(function(o, s, l) {
  65751. return a.contain(s, l);
  65752. });
  65753. }, e.prototype._clearController = function() {
  65754. var n = this._controller;
  65755. this._controllerHost = null, n && (n.dispose(), n = null);
  65756. }, e.prototype._onPan = function(n) {
  65757. if (this._state !== "animating" && (Math.abs(n.dx) > zF || Math.abs(n.dy) > zF)) {
  65758. var r = this.seriesModel.getData().tree.root;
  65759. if (!r)
  65760. return;
  65761. var i = r.getLayout();
  65762. if (!i)
  65763. return;
  65764. this.api.dispatchAction({
  65765. type: "treemapMove",
  65766. from: this.uid,
  65767. seriesId: this.seriesModel.id,
  65768. rootRect: {
  65769. x: i.x + n.dx,
  65770. y: i.y + n.dy,
  65771. width: i.width,
  65772. height: i.height
  65773. }
  65774. });
  65775. }
  65776. }, e.prototype._onZoom = function(n) {
  65777. var r = n.originX, i = n.originY, a = n.scale;
  65778. if (this._state !== "animating") {
  65779. var o = this.seriesModel.getData().tree.root;
  65780. if (!o)
  65781. return;
  65782. var s = o.getLayout();
  65783. if (!s)
  65784. return;
  65785. var l = new Je(s.x, s.y, s.width, s.height), u = null, c = this._controllerHost;
  65786. u = c.zoomLimit;
  65787. var f = c.zoom = c.zoom || 1;
  65788. if (f *= a, u) {
  65789. var d = u.min || 0, h = u.max || 1 / 0;
  65790. f = Math.max(Math.min(h, f), d);
  65791. }
  65792. var p = f / c.zoom;
  65793. c.zoom = f;
  65794. var v = this.seriesModel.layoutInfo;
  65795. r -= v.x, i -= v.y;
  65796. var g = wi();
  65797. so(g, g, [-r, -i]), Bx(g, g, [p, p]), so(g, g, [r, i]), l.applyTransform(g), this.api.dispatchAction({
  65798. type: "treemapRender",
  65799. from: this.uid,
  65800. seriesId: this.seriesModel.id,
  65801. rootRect: {
  65802. x: l.x,
  65803. y: l.y,
  65804. width: l.width,
  65805. height: l.height
  65806. }
  65807. });
  65808. }
  65809. }, e.prototype._initEvents = function(n) {
  65810. var r = this;
  65811. n.on("click", function(i) {
  65812. if (r._state === "ready") {
  65813. var a = r.seriesModel.get("nodeClick", !0);
  65814. if (a) {
  65815. var o = r.findTarget(i.offsetX, i.offsetY);
  65816. if (o) {
  65817. var s = o.node;
  65818. if (s.getLayout().isLeafRoot)
  65819. r._rootToNode(o);
  65820. else if (a === "zoomToNode")
  65821. r._zoomToNode(o);
  65822. else if (a === "link") {
  65823. var l = s.hostTree.data.getItemModel(s.dataIndex), u = l.get("link", !0), c = l.get("target", !0) || "blank";
  65824. u && pO(u, c);
  65825. }
  65826. }
  65827. }
  65828. }
  65829. }, this);
  65830. }, e.prototype._renderBreadcrumb = function(n, r, i) {
  65831. var a = this;
  65832. i || (i = n.get("leafDepth", !0) != null ? {
  65833. node: n.getViewRoot()
  65834. } : this.findTarget(r.getWidth() / 2, r.getHeight() / 2), i || (i = {
  65835. node: n.getData().tree.root
  65836. })), (this._breadcrumb || (this._breadcrumb = new Mze(this.group))).render(n, r, i.node, function(o) {
  65837. a._state !== "animating" && (Zk(n.getViewRoot(), o) ? a._rootToNode({
  65838. node: o
  65839. }) : a._zoomToNode({
  65840. node: o
  65841. }));
  65842. });
  65843. }, e.prototype.remove = function() {
  65844. this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = wv(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove();
  65845. }, e.prototype.dispose = function() {
  65846. this._clearController();
  65847. }, e.prototype._zoomToNode = function(n) {
  65848. this.api.dispatchAction({
  65849. type: "treemapZoomToNode",
  65850. from: this.uid,
  65851. seriesId: this.seriesModel.id,
  65852. targetNode: n.node
  65853. });
  65854. }, e.prototype._rootToNode = function(n) {
  65855. this.api.dispatchAction({
  65856. type: "treemapRootToNode",
  65857. from: this.uid,
  65858. seriesId: this.seriesModel.id,
  65859. targetNode: n.node
  65860. });
  65861. }, e.prototype.findTarget = function(n, r) {
  65862. var i, a = this.seriesModel.getViewRoot();
  65863. return a.eachNode({
  65864. attr: "viewChildren",
  65865. order: "preorder"
  65866. }, function(o) {
  65867. var s = this._storage.background[o.getRawIndex()];
  65868. if (s) {
  65869. var l = s.transformCoordToLocal(n, r), u = s.shape;
  65870. if (u.x <= l[0] && l[0] <= u.x + u.width && u.y <= l[1] && l[1] <= u.y + u.height)
  65871. i = {
  65872. node: o,
  65873. offsetX: l[0],
  65874. offsetY: l[1]
  65875. };
  65876. else
  65877. return !1;
  65878. }
  65879. }, this), i;
  65880. }, e.type = "treemap", e;
  65881. }(zt)
  65882. );
  65883. function wv() {
  65884. return {
  65885. nodeGroup: [],
  65886. background: [],
  65887. content: []
  65888. };
  65889. }
  65890. function Vze(t, e, n, r, i, a, o, s, l, u) {
  65891. if (!o)
  65892. return;
  65893. var c = o.getLayout(), f = t.getData(), d = o.getModel();
  65894. if (f.setItemGraphicEl(o.dataIndex, null), !c || !c.isInView)
  65895. return;
  65896. var h = c.width, p = c.height, v = c.borderWidth, g = c.invisible, m = o.getRawIndex(), y = s && s.getRawIndex(), b = o.viewChildren, _ = c.upperHeight, O = b && b.length, S = d.getModel("itemStyle"), x = d.getModel(["emphasis", "itemStyle"]), C = d.getModel(["blur", "itemStyle"]), T = d.getModel(["select", "itemStyle"]), w = S.get("borderRadius") || 0, P = ne("nodeGroup", mE);
  65897. if (!P)
  65898. return;
  65899. if (l.add(P), P.x = c.x || 0, P.y = c.y || 0, P.markRedraw(), RO(P).nodeWidth = h, RO(P).nodeHeight = p, c.isAboveViewRoot)
  65900. return P;
  65901. var $ = ne("background", BF, u, Nze);
  65902. $ && B(P, $, O && c.upperLabelHeight);
  65903. var A = d.getModel("emphasis"), D = A.get("focus"), E = A.get("blurScope"), R = A.get("disabled"), N = D === "ancestor" ? o.getAncestorsIndices() : D === "descendant" ? o.getDescendantIndices() : D;
  65904. if (O)
  65905. lu(P) && Lc(P, !1), $ && (Lc($, !R), f.setItemGraphicEl(o.dataIndex, $), kA($, N, E));
  65906. else {
  65907. var V = ne("content", BF, u, Bze);
  65908. V && W(P, V), $.disableMorphing = !0, $ && lu($) && Lc($, !1), Lc(P, !R), f.setItemGraphicEl(o.dataIndex, P), kA(P, N, E);
  65909. }
  65910. return P;
  65911. function B(K, ie, X) {
  65912. var H = Fe(ie);
  65913. if (H.dataIndex = o.dataIndex, H.seriesIndex = t.seriesIndex, ie.setShape({
  65914. x: 0,
  65915. y: 0,
  65916. width: h,
  65917. height: p,
  65918. r: w
  65919. }), g)
  65920. F(ie);
  65921. else {
  65922. ie.invisible = !1;
  65923. var G = o.getVisual("style"), re = G.stroke, fe = WF(S);
  65924. fe.fill = re;
  65925. var de = pc(x);
  65926. de.fill = x.get("borderColor");
  65927. var Ee = pc(C);
  65928. Ee.fill = C.get("borderColor");
  65929. var $e = pc(T);
  65930. if ($e.fill = T.get("borderColor"), X) {
  65931. var Se = h - 2 * v;
  65932. Q(
  65933. // PENDING: convert ZRColor to ColorString for text.
  65934. ie,
  65935. re,
  65936. G.opacity,
  65937. {
  65938. x: v,
  65939. y: 0,
  65940. width: Se,
  65941. height: _
  65942. }
  65943. );
  65944. } else
  65945. ie.removeTextContent();
  65946. ie.setStyle(fe), ie.ensureState("emphasis").style = de, ie.ensureState("blur").style = Ee, ie.ensureState("select").style = $e, _f(ie);
  65947. }
  65948. K.add(ie);
  65949. }
  65950. function W(K, ie) {
  65951. var X = Fe(ie);
  65952. X.dataIndex = o.dataIndex, X.seriesIndex = t.seriesIndex;
  65953. var H = Math.max(h - 2 * v, 0), G = Math.max(p - 2 * v, 0);
  65954. if (ie.culling = !0, ie.setShape({
  65955. x: v,
  65956. y: v,
  65957. width: H,
  65958. height: G,
  65959. r: w
  65960. }), g)
  65961. F(ie);
  65962. else {
  65963. ie.invisible = !1;
  65964. var re = o.getVisual("style"), fe = re.fill, de = WF(S);
  65965. de.fill = fe, de.decal = re.decal;
  65966. var Ee = pc(x), $e = pc(C), Se = pc(T);
  65967. Q(ie, fe, re.opacity, null), ie.setStyle(de), ie.ensureState("emphasis").style = Ee, ie.ensureState("blur").style = $e, ie.ensureState("select").style = Se, _f(ie);
  65968. }
  65969. K.add(ie);
  65970. }
  65971. function F(K) {
  65972. !K.invisible && a.push(K);
  65973. }
  65974. function Q(K, ie, X, H) {
  65975. var G = d.getModel(H ? FF : VF), re = Vn(d.get("name"), null), fe = G.getShallow("show");
  65976. Pr(K, er(d, H ? FF : VF), {
  65977. defaultText: fe ? re : null,
  65978. inheritColor: ie,
  65979. defaultOpacity: X,
  65980. labelFetcher: t,
  65981. labelDataIndex: o.dataIndex
  65982. });
  65983. var de = K.getTextContent();
  65984. if (de) {
  65985. var Ee = de.style, $e = Lx(Ee.padding || 0);
  65986. H && (K.setTextConfig({
  65987. layoutRect: H
  65988. }), de.disableLabelLayout = !0), de.beforeUpdate = function() {
  65989. var be = Math.max((H ? H.width : K.shape.width) - $e[1] - $e[3], 0), he = Math.max((H ? H.height : K.shape.height) - $e[0] - $e[2], 0);
  65990. (Ee.width !== be || Ee.height !== he) && de.setStyle({
  65991. width: be,
  65992. height: he
  65993. });
  65994. }, Ee.truncateMinChar = 2, Ee.lineOverflow = "truncate", Z(Ee, H, c);
  65995. var Se = de.getState("emphasis");
  65996. Z(Se ? Se.style : null, H, c);
  65997. }
  65998. }
  65999. function Z(K, ie, X) {
  66000. var H = K ? K.text : null;
  66001. if (!ie && X.isLeafRoot && H != null) {
  66002. var G = t.get("drillDownIcon", !0);
  66003. K.text = G ? G + " " + H : H;
  66004. }
  66005. }
  66006. function ne(K, ie, X, H) {
  66007. var G = y != null && n[K][y], re = i[K];
  66008. return G ? (n[K][y] = null, ee(re, G)) : g || (G = new ie(), G instanceof Da && (G.z2 = Fze(X, H)), oe(re, G)), e[K][m] = G;
  66009. }
  66010. function ee(K, ie) {
  66011. var X = K[m] = {};
  66012. ie instanceof mE ? (X.oldX = ie.x, X.oldY = ie.y) : X.oldShape = le({}, ie.shape);
  66013. }
  66014. function oe(K, ie) {
  66015. var X = K[m] = {}, H = o.parentNode, G = ie instanceof Ve;
  66016. if (H && (!r || r.direction === "drillDown")) {
  66017. var re = 0, fe = 0, de = i.background[H.getRawIndex()];
  66018. !r && de && de.oldShape && (re = de.oldShape.width, fe = de.oldShape.height), G ? (X.oldX = 0, X.oldY = fe) : X.oldShape = {
  66019. x: re,
  66020. y: fe,
  66021. width: 0,
  66022. height: 0
  66023. };
  66024. }
  66025. X.fadein = !G;
  66026. }
  66027. }
  66028. function Fze(t, e) {
  66029. return t * Lze + e;
  66030. }
  66031. var Fm = k, Wze = Ie, kO = -1, qn = (
  66032. /** @class */
  66033. function() {
  66034. function t(e) {
  66035. var n = e.mappingMethod, r = e.type, i = this.option = Le(e);
  66036. this.type = r, this.mappingMethod = n, this._normalizeData = Gze[n];
  66037. var a = t.visualHandlers[r];
  66038. this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._normalizedToVisual = a._normalizedToVisual[n], n === "piecewise" ? (mP(i), Qze(i)) : n === "category" ? i.categories ? Hze(i) : mP(i, !0) : (ke(n !== "linear" || i.dataExtent), mP(i));
  66039. }
  66040. return t.prototype.mapValueToVisual = function(e) {
  66041. var n = this._normalizeData(e);
  66042. return this._normalizedToVisual(n, e);
  66043. }, t.prototype.getNormalizer = function() {
  66044. return xe(this._normalizeData, this);
  66045. }, t.listVisualTypes = function() {
  66046. return st(t.visualHandlers);
  66047. }, t.isValidType = function(e) {
  66048. return t.visualHandlers.hasOwnProperty(e);
  66049. }, t.eachVisual = function(e, n, r) {
  66050. Ie(e) ? k(e, n, r) : n.call(r, e);
  66051. }, t.mapVisual = function(e, n, r) {
  66052. var i, a = ue(e) ? [] : Ie(e) ? {} : (i = !0, null);
  66053. return t.eachVisual(e, function(o, s) {
  66054. var l = n.call(r, o, s);
  66055. i ? a = l : a[s] = l;
  66056. }), a;
  66057. }, t.retrieveVisuals = function(e) {
  66058. var n = {}, r;
  66059. return e && Fm(t.visualHandlers, function(i, a) {
  66060. e.hasOwnProperty(a) && (n[a] = e[a], r = !0);
  66061. }), r ? n : null;
  66062. }, t.prepareVisualTypes = function(e) {
  66063. if (ue(e))
  66064. e = e.slice();
  66065. else if (Wze(e)) {
  66066. var n = [];
  66067. Fm(e, function(r, i) {
  66068. n.push(i);
  66069. }), e = n;
  66070. } else
  66071. return [];
  66072. return e.sort(function(r, i) {
  66073. return i === "color" && r !== "color" && r.indexOf("color") === 0 ? 1 : -1;
  66074. }), e;
  66075. }, t.dependsOn = function(e, n) {
  66076. return n === "color" ? !!(e && e.indexOf(n) === 0) : e === n;
  66077. }, t.findPieceIndex = function(e, n, r) {
  66078. for (var i, a = 1 / 0, o = 0, s = n.length; o < s; o++) {
  66079. var l = n[o].value;
  66080. if (l != null) {
  66081. if (l === e || Oe(l) && l === e + "")
  66082. return o;
  66083. r && d(l, o);
  66084. }
  66085. }
  66086. for (var o = 0, s = n.length; o < s; o++) {
  66087. var u = n[o], c = u.interval, f = u.close;
  66088. if (c) {
  66089. if (c[0] === -1 / 0) {
  66090. if ($b(f[1], e, c[1]))
  66091. return o;
  66092. } else if (c[1] === 1 / 0) {
  66093. if ($b(f[0], c[0], e))
  66094. return o;
  66095. } else if ($b(f[0], c[0], e) && $b(f[1], e, c[1]))
  66096. return o;
  66097. r && d(c[0], o), r && d(c[1], o);
  66098. }
  66099. }
  66100. if (r)
  66101. return e === 1 / 0 ? n.length - 1 : e === -1 / 0 ? 0 : i;
  66102. function d(h, p) {
  66103. var v = Math.abs(h - e);
  66104. v < a && (a = v, i = p);
  66105. }
  66106. }, t.visualHandlers = {
  66107. color: {
  66108. applyVisual: Cv("color"),
  66109. getColorMapper: function() {
  66110. var e = this.option;
  66111. return xe(e.mappingMethod === "category" ? function(n, r) {
  66112. return !r && (n = this._normalizeData(n)), tg.call(this, n);
  66113. } : function(n, r, i) {
  66114. var a = !!i;
  66115. return !r && (n = this._normalizeData(n)), i = Eg(n, e.parsedVisual, i), a ? i : no(i, "rgba");
  66116. }, this);
  66117. },
  66118. _normalizedToVisual: {
  66119. linear: function(e) {
  66120. return no(Eg(e, this.option.parsedVisual), "rgba");
  66121. },
  66122. category: tg,
  66123. piecewise: function(e, n) {
  66124. var r = bE.call(this, n);
  66125. return r == null && (r = no(Eg(e, this.option.parsedVisual), "rgba")), r;
  66126. },
  66127. fixed: vc
  66128. }
  66129. },
  66130. colorHue: Pb(function(e, n) {
  66131. return nh(e, n);
  66132. }),
  66133. colorSaturation: Pb(function(e, n) {
  66134. return nh(e, null, n);
  66135. }),
  66136. colorLightness: Pb(function(e, n) {
  66137. return nh(e, null, null, n);
  66138. }),
  66139. colorAlpha: Pb(function(e, n) {
  66140. return wm(e, n);
  66141. }),
  66142. decal: {
  66143. applyVisual: Cv("decal"),
  66144. _normalizedToVisual: {
  66145. linear: null,
  66146. category: tg,
  66147. piecewise: null,
  66148. fixed: null
  66149. }
  66150. },
  66151. opacity: {
  66152. applyVisual: Cv("opacity"),
  66153. _normalizedToVisual: yE([0, 1])
  66154. },
  66155. liftZ: {
  66156. applyVisual: Cv("liftZ"),
  66157. _normalizedToVisual: {
  66158. linear: vc,
  66159. category: vc,
  66160. piecewise: vc,
  66161. fixed: vc
  66162. }
  66163. },
  66164. symbol: {
  66165. applyVisual: function(e, n, r) {
  66166. var i = this.mapValueToVisual(e);
  66167. r("symbol", i);
  66168. },
  66169. _normalizedToVisual: {
  66170. linear: QF,
  66171. category: tg,
  66172. piecewise: function(e, n) {
  66173. var r = bE.call(this, n);
  66174. return r == null && (r = QF.call(this, e)), r;
  66175. },
  66176. fixed: vc
  66177. }
  66178. },
  66179. symbolSize: {
  66180. applyVisual: Cv("symbolSize"),
  66181. _normalizedToVisual: yE([0, 1])
  66182. }
  66183. }, t;
  66184. }()
  66185. );
  66186. function Qze(t) {
  66187. var e = t.pieceList;
  66188. t.hasSpecialVisual = !1, k(e, function(n, r) {
  66189. n.originIndex = r, n.visual != null && (t.hasSpecialVisual = !0);
  66190. });
  66191. }
  66192. function Hze(t) {
  66193. var e = t.categories, n = t.categoryMap = {}, r = t.visual;
  66194. if (Fm(e, function(o, s) {
  66195. n[o] = s;
  66196. }), !ue(r)) {
  66197. var i = [];
  66198. Ie(r) ? Fm(r, function(o, s) {
  66199. var l = n[s];
  66200. i[l ?? kO] = o;
  66201. }) : i[kO] = r, r = wne(t, i);
  66202. }
  66203. for (var a = e.length - 1; a >= 0; a--)
  66204. r[a] == null && (delete n[e[a]], e.pop());
  66205. }
  66206. function mP(t, e) {
  66207. var n = t.visual, r = [];
  66208. Ie(n) ? Fm(n, function(a) {
  66209. r.push(a);
  66210. }) : n != null && r.push(n);
  66211. var i = {
  66212. color: 1,
  66213. symbol: 1
  66214. };
  66215. !e && r.length === 1 && !i.hasOwnProperty(t.type) && (r[1] = r[0]), wne(t, r);
  66216. }
  66217. function Pb(t) {
  66218. return {
  66219. applyVisual: function(e, n, r) {
  66220. var i = this.mapValueToVisual(e);
  66221. r("color", t(n("color"), i));
  66222. },
  66223. _normalizedToVisual: yE([0, 1])
  66224. };
  66225. }
  66226. function QF(t) {
  66227. var e = this.option.visual;
  66228. return e[Math.round(Lt(t, [0, 1], [0, e.length - 1], !0))] || {};
  66229. }
  66230. function Cv(t) {
  66231. return function(e, n, r) {
  66232. r(t, this.mapValueToVisual(e));
  66233. };
  66234. }
  66235. function tg(t) {
  66236. var e = this.option.visual;
  66237. return e[this.option.loop && t !== kO ? t % e.length : t];
  66238. }
  66239. function vc() {
  66240. return this.option.visual[0];
  66241. }
  66242. function yE(t) {
  66243. return {
  66244. linear: function(e) {
  66245. return Lt(e, t, this.option.visual, !0);
  66246. },
  66247. category: tg,
  66248. piecewise: function(e, n) {
  66249. var r = bE.call(this, n);
  66250. return r == null && (r = Lt(e, t, this.option.visual, !0)), r;
  66251. },
  66252. fixed: vc
  66253. };
  66254. }
  66255. function bE(t) {
  66256. var e = this.option, n = e.pieceList;
  66257. if (e.hasSpecialVisual) {
  66258. var r = qn.findPieceIndex(t, n), i = n[r];
  66259. if (i && i.visual)
  66260. return i.visual[this.type];
  66261. }
  66262. }
  66263. function wne(t, e) {
  66264. return t.visual = e, t.type === "color" && (t.parsedVisual = ce(e, function(n) {
  66265. var r = Kr(n);
  66266. return !r && process.env.NODE_ENV !== "production" && dn("'" + n + "' is an illegal color, fallback to '#000000'", !0), r || [0, 0, 0, 1];
  66267. })), e;
  66268. }
  66269. var Gze = {
  66270. linear: function(t) {
  66271. return Lt(t, this.option.dataExtent, [0, 1], !0);
  66272. },
  66273. piecewise: function(t) {
  66274. var e = this.option.pieceList, n = qn.findPieceIndex(t, e, !0);
  66275. if (n != null)
  66276. return Lt(n, [0, e.length - 1], [0, 1], !0);
  66277. },
  66278. category: function(t) {
  66279. var e = this.option.categories ? this.option.categoryMap[t] : t;
  66280. return e ?? kO;
  66281. },
  66282. fixed: On
  66283. };
  66284. function $b(t, e, n) {
  66285. return t ? e <= n : e < n;
  66286. }
  66287. var jze = "itemStyle", Cne = bt();
  66288. const Zze = {
  66289. seriesType: "treemap",
  66290. reset: function(t) {
  66291. var e = t.getData().tree, n = e.root;
  66292. n.isRemoved() || Tne(
  66293. n,
  66294. // Visual should calculate from tree root but not view root.
  66295. {},
  66296. t.getViewRoot().getAncestors(),
  66297. t
  66298. );
  66299. }
  66300. };
  66301. function Tne(t, e, n, r) {
  66302. var i = t.getModel(), a = t.getLayout(), o = t.hostTree.data;
  66303. if (!(!a || a.invisible || !a.isInView)) {
  66304. var s = i.getModel(jze), l = Uze(s, e, r), u = o.ensureUniqueItemVisual(t.dataIndex, "style"), c = s.get("borderColor"), f = s.get("borderColorSaturation"), d;
  66305. f != null && (d = HF(l), c = Xze(f, d)), u.stroke = c;
  66306. var h = t.viewChildren;
  66307. if (!h || !h.length)
  66308. d = HF(l), u.fill = d;
  66309. else {
  66310. var p = Yze(t, i, a, s, l, h);
  66311. k(h, function(v, g) {
  66312. if (v.depth >= n.length || v === n[v.depth]) {
  66313. var m = qze(i, l, v, g, p, r);
  66314. Tne(v, m, n, r);
  66315. }
  66316. });
  66317. }
  66318. }
  66319. }
  66320. function Uze(t, e, n) {
  66321. var r = le({}, e), i = n.designatedVisualItemStyle;
  66322. return k(["color", "colorAlpha", "colorSaturation"], function(a) {
  66323. i[a] = e[a];
  66324. var o = t.get(a);
  66325. i[a] = null, o != null && (r[a] = o);
  66326. }), r;
  66327. }
  66328. function HF(t) {
  66329. var e = yP(t, "color");
  66330. if (e) {
  66331. var n = yP(t, "colorAlpha"), r = yP(t, "colorSaturation");
  66332. return r && (e = nh(e, null, null, r)), n && (e = wm(e, n)), e;
  66333. }
  66334. }
  66335. function Xze(t, e) {
  66336. return e != null ? nh(e, null, null, t) : null;
  66337. }
  66338. function yP(t, e) {
  66339. var n = t[e];
  66340. if (n != null && n !== "none")
  66341. return n;
  66342. }
  66343. function Yze(t, e, n, r, i, a) {
  66344. if (!(!a || !a.length)) {
  66345. var o = bP(e, "color") || i.color != null && i.color !== "none" && (bP(e, "colorAlpha") || bP(e, "colorSaturation"));
  66346. if (o) {
  66347. var s = e.get("visualMin"), l = e.get("visualMax"), u = n.dataExtent.slice();
  66348. s != null && s < u[0] && (u[0] = s), l != null && l > u[1] && (u[1] = l);
  66349. var c = e.get("colorMappingBy"), f = {
  66350. type: o.name,
  66351. dataExtent: u,
  66352. visual: o.range
  66353. };
  66354. f.type === "color" && (c === "index" || c === "id") ? (f.mappingMethod = "category", f.loop = !0) : f.mappingMethod = "linear";
  66355. var d = new qn(f);
  66356. return Cne(d).drColorMappingBy = c, d;
  66357. }
  66358. }
  66359. }
  66360. function bP(t, e) {
  66361. var n = t.get(e);
  66362. return ue(n) && n.length ? {
  66363. name: e,
  66364. range: n
  66365. } : null;
  66366. }
  66367. function qze(t, e, n, r, i, a) {
  66368. var o = le({}, e);
  66369. if (i) {
  66370. var s = i.type, l = s === "color" && Cne(i).drColorMappingBy, u = l === "index" ? r : l === "id" ? a.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
  66371. o[s] = i.mapValueToVisual(u);
  66372. }
  66373. return o;
  66374. }
  66375. var Wm = Math.max, LO = Math.min, GF = Tn, Uk = k, Pne = ["itemStyle", "borderWidth"], Kze = ["itemStyle", "gapWidth"], Jze = ["upperLabel", "show"], eVe = ["upperLabel", "height"];
  66376. const tVe = {
  66377. seriesType: "treemap",
  66378. reset: function(t, e, n, r) {
  66379. var i = n.getWidth(), a = n.getHeight(), o = t.option, s = Rn(t.getBoxLayoutParams(), {
  66380. width: n.getWidth(),
  66381. height: n.getHeight()
  66382. }), l = o.size || [], u = _e(GF(s.width, l[0]), i), c = _e(GF(s.height, l[1]), a), f = r && r.type, d = ["treemapZoomToNode", "treemapRootToNode"], h = Vm(r, d, t), p = f === "treemapRender" || f === "treemapMove" ? r.rootRect : null, v = t.getViewRoot(), g = One(v);
  66383. if (f !== "treemapMove") {
  66384. var m = f === "treemapZoomToNode" ? sVe(t, h, v, u, c) : p ? [p.width, p.height] : [u, c], y = o.sort;
  66385. y && y !== "asc" && y !== "desc" && (y = "desc");
  66386. var b = {
  66387. squareRatio: o.squareRatio,
  66388. sort: y,
  66389. leafDepth: o.leafDepth
  66390. };
  66391. v.hostTree.clearLayouts();
  66392. var _ = {
  66393. x: 0,
  66394. y: 0,
  66395. width: m[0],
  66396. height: m[1],
  66397. area: m[0] * m[1]
  66398. };
  66399. v.setLayout(_), $ne(v, b, !1, 0), _ = v.getLayout(), Uk(g, function(S, x) {
  66400. var C = (g[x + 1] || v).getValue();
  66401. S.setLayout(le({
  66402. dataExtent: [C, C],
  66403. borderWidth: 0,
  66404. upperHeight: 0
  66405. }, _));
  66406. });
  66407. }
  66408. var O = t.getData().tree.root;
  66409. O.setLayout(lVe(s, p, h), !0), t.setLayoutInfo(s), Ane(
  66410. O,
  66411. // Transform to base element coordinate system.
  66412. new Je(-s.x, -s.y, i, a),
  66413. g,
  66414. v,
  66415. 0
  66416. );
  66417. }
  66418. };
  66419. function $ne(t, e, n, r) {
  66420. var i, a;
  66421. if (!t.isRemoved()) {
  66422. var o = t.getLayout();
  66423. i = o.width, a = o.height;
  66424. var s = t.getModel(), l = s.get(Pne), u = s.get(Kze) / 2, c = Ene(s), f = Math.max(l, c), d = l - u, h = f - u;
  66425. t.setLayout({
  66426. borderWidth: l,
  66427. upperHeight: f,
  66428. upperLabelHeight: c
  66429. }, !0), i = Wm(i - 2 * d, 0), a = Wm(a - d - h, 0);
  66430. var p = i * a, v = nVe(t, s, p, e, n, r);
  66431. if (v.length) {
  66432. var g = {
  66433. x: d,
  66434. y: h,
  66435. width: i,
  66436. height: a
  66437. }, m = LO(i, a), y = 1 / 0, b = [];
  66438. b.area = 0;
  66439. for (var _ = 0, O = v.length; _ < O; ) {
  66440. var S = v[_];
  66441. b.push(S), b.area += S.getLayout().area;
  66442. var x = oVe(b, m, e.squareRatio);
  66443. x <= y ? (_++, y = x) : (b.area -= b.pop().getLayout().area, jF(b, m, g, u, !1), m = LO(g.width, g.height), b.length = b.area = 0, y = 1 / 0);
  66444. }
  66445. if (b.length && jF(b, m, g, u, !0), !n) {
  66446. var C = s.get("childrenVisibleMin");
  66447. C != null && p < C && (n = !0);
  66448. }
  66449. for (var _ = 0, O = v.length; _ < O; _++)
  66450. $ne(v[_], e, n, r + 1);
  66451. }
  66452. }
  66453. }
  66454. function nVe(t, e, n, r, i, a) {
  66455. var o = t.children || [], s = r.sort;
  66456. s !== "asc" && s !== "desc" && (s = null);
  66457. var l = r.leafDepth != null && r.leafDepth <= a;
  66458. if (i && !l)
  66459. return t.viewChildren = [];
  66460. o = Nt(o, function(h) {
  66461. return !h.isRemoved();
  66462. }), iVe(o, s);
  66463. var u = aVe(e, o, s);
  66464. if (u.sum === 0)
  66465. return t.viewChildren = [];
  66466. if (u.sum = rVe(e, n, u.sum, s, o), u.sum === 0)
  66467. return t.viewChildren = [];
  66468. for (var c = 0, f = o.length; c < f; c++) {
  66469. var d = o[c].getValue() / u.sum * n;
  66470. o[c].setLayout({
  66471. area: d
  66472. });
  66473. }
  66474. return l && (o.length && t.setLayout({
  66475. isLeafRoot: !0
  66476. }, !0), o.length = 0), t.viewChildren = o, t.setLayout({
  66477. dataExtent: u.dataExtent
  66478. }, !0), o;
  66479. }
  66480. function rVe(t, e, n, r, i) {
  66481. if (!r)
  66482. return n;
  66483. for (var a = t.get("visibleMin"), o = i.length, s = o, l = o - 1; l >= 0; l--) {
  66484. var u = i[r === "asc" ? o - l - 1 : l].getValue();
  66485. u / n * e < a && (s = l, n -= u);
  66486. }
  66487. return r === "asc" ? i.splice(0, o - s) : i.splice(s, o - s), n;
  66488. }
  66489. function iVe(t, e) {
  66490. return e && t.sort(function(n, r) {
  66491. var i = e === "asc" ? n.getValue() - r.getValue() : r.getValue() - n.getValue();
  66492. return i === 0 ? e === "asc" ? n.dataIndex - r.dataIndex : r.dataIndex - n.dataIndex : i;
  66493. }), t;
  66494. }
  66495. function aVe(t, e, n) {
  66496. for (var r = 0, i = 0, a = e.length; i < a; i++)
  66497. r += e[i].getValue();
  66498. var o = t.get("visualDimension"), s;
  66499. 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], Uk(e, function(l) {
  66500. var u = l.getValue(o);
  66501. u < s[0] && (s[0] = u), u > s[1] && (s[1] = u);
  66502. })), {
  66503. sum: r,
  66504. dataExtent: s
  66505. };
  66506. }
  66507. function oVe(t, e, n) {
  66508. for (var r = 0, i = 1 / 0, a = 0, o = void 0, s = t.length; a < s; a++)
  66509. o = t[a].getLayout().area, o && (o < i && (i = o), o > r && (r = o));
  66510. var l = t.area * t.area, u = e * e * n;
  66511. return l ? Wm(u * r / l, l / (u * i)) : 1 / 0;
  66512. }
  66513. function jF(t, e, n, r, i) {
  66514. 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;
  66515. (i || c > n[l[o]]) && (c = n[l[o]]);
  66516. for (var f = 0, d = t.length; f < d; f++) {
  66517. var h = t[f], p = {}, v = c ? h.getLayout().area / c : 0, g = p[l[o]] = Wm(c - 2 * r, 0), m = n[s[a]] + n[l[a]] - u, y = f === d - 1 || m < v ? m : v, b = p[l[a]] = Wm(y - 2 * r, 0);
  66518. p[s[o]] = n[s[o]] + LO(r, g / 2), p[s[a]] = u + LO(r, b / 2), u += y, h.setLayout(p, !0);
  66519. }
  66520. n[s[o]] += c, n[l[o]] -= c;
  66521. }
  66522. function sVe(t, e, n, r, i) {
  66523. var a = (e || {}).node, o = [r, i];
  66524. if (!a || a === n)
  66525. return o;
  66526. for (var s, l = r * i, u = l * t.option.zoomToNodeRatio; s = a.parentNode; ) {
  66527. for (var c = 0, f = s.children, d = 0, h = f.length; d < h; d++)
  66528. c += f[d].getValue();
  66529. var p = a.getValue();
  66530. if (p === 0)
  66531. return o;
  66532. u *= c / p;
  66533. var v = s.getModel(), g = v.get(Pne), m = Math.max(g, Ene(v));
  66534. u += 4 * g * g + (3 * g + m) * Math.pow(u, 0.5), u > TA && (u = TA), a = s;
  66535. }
  66536. u < l && (u = l);
  66537. var y = Math.pow(u / l, 0.5);
  66538. return [r * y, i * y];
  66539. }
  66540. function lVe(t, e, n) {
  66541. if (e)
  66542. return {
  66543. x: e.x,
  66544. y: e.y
  66545. };
  66546. var r = {
  66547. x: 0,
  66548. y: 0
  66549. };
  66550. if (!n)
  66551. return r;
  66552. var i = n.node, a = i.getLayout();
  66553. if (!a)
  66554. return r;
  66555. for (var o = [a.width / 2, a.height / 2], s = i; s; ) {
  66556. var l = s.getLayout();
  66557. o[0] += l.x, o[1] += l.y, s = s.parentNode;
  66558. }
  66559. return {
  66560. x: t.width / 2 - o[0],
  66561. y: t.height / 2 - o[1]
  66562. };
  66563. }
  66564. function Ane(t, e, n, r, i) {
  66565. var a = t.getLayout(), o = n[i], s = o && o === t;
  66566. if (!(o && !s || i === n.length && t !== r)) {
  66567. t.setLayout({
  66568. // isInView means: viewRoot sub tree + viewAbovePath
  66569. isInView: !0,
  66570. // invisible only means: outside view clip so that the node can not
  66571. // see but still layout for animation preparation but not render.
  66572. invisible: !s && !e.intersect(a),
  66573. isAboveViewRoot: s
  66574. }, !0);
  66575. var l = new Je(e.x - a.x, e.y - a.y, e.width, e.height);
  66576. Uk(t.viewChildren || [], function(u) {
  66577. Ane(u, l, n, r, i + 1);
  66578. });
  66579. }
  66580. }
  66581. function Ene(t) {
  66582. return t.get(Jze) ? t.get(eVe) : 0;
  66583. }
  66584. function uVe(t) {
  66585. t.registerSeriesModel($ze), t.registerChartView(zze), t.registerVisual(Zze), t.registerLayout(tVe), Pze(t);
  66586. }
  66587. function cVe(t) {
  66588. var e = t.findComponents({
  66589. mainType: "legend"
  66590. });
  66591. !e || !e.length || t.eachSeriesByType("graph", function(n) {
  66592. var r = n.getCategoriesData(), i = n.getGraph(), a = i.data, o = r.mapArray(r.getName);
  66593. a.filterSelf(function(s) {
  66594. var l = a.getItemModel(s), u = l.getShallow("category");
  66595. if (u != null) {
  66596. St(u) && (u = o[u]);
  66597. for (var c = 0; c < e.length; c++)
  66598. if (!e[c].isSelected(u))
  66599. return !1;
  66600. }
  66601. return !0;
  66602. });
  66603. });
  66604. }
  66605. function fVe(t) {
  66606. var e = {};
  66607. t.eachSeriesByType("graph", function(n) {
  66608. var r = n.getCategoriesData(), i = n.getData(), a = {};
  66609. r.each(function(o) {
  66610. var s = r.getName(o);
  66611. a["ec-" + s] = o;
  66612. var l = r.getItemModel(o), u = l.getModel("itemStyle").getItemStyle();
  66613. u.fill || (u.fill = n.getColorFromPalette(s, e)), r.setItemVisual(o, "style", u);
  66614. for (var c = ["symbol", "symbolSize", "symbolKeepAspect"], f = 0; f < c.length; f++) {
  66615. var d = l.getShallow(c[f], !0);
  66616. d != null && r.setItemVisual(o, c[f], d);
  66617. }
  66618. }), r.count() && i.each(function(o) {
  66619. var s = i.getItemModel(o), l = s.getShallow("category");
  66620. if (l != null) {
  66621. Oe(l) && (l = a["ec-" + l]);
  66622. var u = r.getItemVisual(l, "style"), c = i.ensureUniqueItemVisual(o, "style");
  66623. le(c, u);
  66624. for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], d = 0; d < f.length; d++)
  66625. i.setItemVisual(o, f[d], r.getItemVisual(l, f[d]));
  66626. }
  66627. });
  66628. });
  66629. }
  66630. function Ab(t) {
  66631. return t instanceof Array || (t = [t, t]), t;
  66632. }
  66633. function dVe(t) {
  66634. t.eachSeriesByType("graph", function(e) {
  66635. var n = e.getGraph(), r = e.getEdgeData(), i = Ab(e.get("edgeSymbol")), a = Ab(e.get("edgeSymbolSize"));
  66636. 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) {
  66637. var s = r.getItemModel(o), l = n.getEdgeByIndex(o), u = Ab(s.getShallow("symbol", !0)), c = Ab(s.getShallow("symbolSize", !0)), f = s.getModel("lineStyle").getLineStyle(), d = r.ensureUniqueItemVisual(o, "style");
  66638. switch (le(d, f), d.stroke) {
  66639. case "source": {
  66640. var h = l.node1.getVisual("style");
  66641. d.stroke = h && h.fill;
  66642. break;
  66643. }
  66644. case "target": {
  66645. var h = l.node2.getVisual("style");
  66646. d.stroke = h && h.fill;
  66647. break;
  66648. }
  66649. }
  66650. 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]);
  66651. });
  66652. });
  66653. }
  66654. var _E = "-->", Ow = function(t) {
  66655. return t.get("autoCurveness") || null;
  66656. }, Mne = function(t, e) {
  66657. var n = Ow(t), r = 20, i = [];
  66658. if (St(n))
  66659. r = n;
  66660. else if (ue(n)) {
  66661. t.__curvenessList = n;
  66662. return;
  66663. }
  66664. e > r && (r = e);
  66665. var a = r % 2 ? r + 2 : r + 3;
  66666. i = [];
  66667. for (var o = 0; o < a; o++)
  66668. i.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1));
  66669. t.__curvenessList = i;
  66670. }, Qm = function(t, e, n) {
  66671. var r = [t.id, t.dataIndex].join("."), i = [e.id, e.dataIndex].join(".");
  66672. return [n.uid, r, i].join(_E);
  66673. }, Ine = function(t) {
  66674. var e = t.split(_E);
  66675. return [e[0], e[2], e[1]].join(_E);
  66676. }, hVe = function(t, e) {
  66677. var n = Qm(t.node1, t.node2, e);
  66678. return e.__edgeMap[n];
  66679. }, pVe = function(t, e) {
  66680. var n = OE(Qm(t.node1, t.node2, e), e), r = OE(Qm(t.node2, t.node1, e), e);
  66681. return n + r;
  66682. }, OE = function(t, e) {
  66683. var n = e.__edgeMap;
  66684. return n[t] ? n[t].length : 0;
  66685. };
  66686. function vVe(t) {
  66687. Ow(t) && (t.__curvenessList = [], t.__edgeMap = {}, Mne(t));
  66688. }
  66689. function gVe(t, e, n, r) {
  66690. if (Ow(n)) {
  66691. var i = Qm(t, e, n), a = n.__edgeMap, o = a[Ine(i)];
  66692. 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);
  66693. }
  66694. }
  66695. function Xk(t, e, n, r) {
  66696. var i = Ow(e), a = ue(i);
  66697. if (!i)
  66698. return null;
  66699. var o = hVe(t, e);
  66700. if (!o)
  66701. return null;
  66702. for (var s = -1, l = 0; l < o.length; l++)
  66703. if (o[l] === n) {
  66704. s = l;
  66705. break;
  66706. }
  66707. var u = pVe(t, e);
  66708. Mne(e, u), t.lineStyle = t.lineStyle || {};
  66709. var c = Qm(t.node1, t.node2, e), f = e.__curvenessList, d = a || u % 2 ? 0 : 1;
  66710. if (o.isForward)
  66711. return f[d + s];
  66712. var h = Ine(c), p = OE(h, e), v = f[s + p + d];
  66713. 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];
  66714. }
  66715. function Dne(t) {
  66716. var e = t.coordinateSystem;
  66717. if (!(e && e.type !== "view")) {
  66718. var n = t.getGraph();
  66719. n.eachNode(function(r) {
  66720. var i = r.getModel();
  66721. r.setLayout([+i.get("x"), +i.get("y")]);
  66722. }), Yk(n, t);
  66723. }
  66724. }
  66725. function Yk(t, e) {
  66726. t.eachEdge(function(n, r) {
  66727. var i = Ui(n.getModel().get(["lineStyle", "curveness"]), -Xk(n, e, r, !0), 0), a = Uo(n.node1.getLayout()), o = Uo(n.node2.getLayout()), s = [a, o];
  66728. +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);
  66729. });
  66730. }
  66731. function mVe(t, e) {
  66732. t.eachSeriesByType("graph", function(n) {
  66733. var r = n.get("layout"), i = n.coordinateSystem;
  66734. if (i && i.type !== "view") {
  66735. var a = n.getData(), o = [];
  66736. k(i.dimensions, function(d) {
  66737. o = o.concat(a.mapDimensionsAll(d));
  66738. });
  66739. for (var s = 0; s < a.count(); s++) {
  66740. for (var l = [], u = !1, c = 0; c < o.length; c++) {
  66741. var f = a.get(o[c], s);
  66742. isNaN(f) || (u = !0), l.push(f);
  66743. }
  66744. u ? a.setItemLayout(s, i.dataToPoint(l)) : a.setItemLayout(s, [NaN, NaN]);
  66745. }
  66746. Yk(a.graph, n);
  66747. } else (!r || r === "none") && Dne(n);
  66748. });
  66749. }
  66750. function ng(t) {
  66751. var e = t.coordinateSystem;
  66752. if (e.type !== "view")
  66753. return 1;
  66754. var n = t.option.nodeScaleRatio, r = e.scaleX, i = e.getZoom(), a = (i - 1) * n + 1;
  66755. return a / r;
  66756. }
  66757. function rg(t) {
  66758. var e = t.getVisual("symbolSize");
  66759. return e instanceof Array && (e = (e[0] + e[1]) / 2), +e;
  66760. }
  66761. var ZF = Math.PI, _P = [];
  66762. function qk(t, e, n, r) {
  66763. var i = t.coordinateSystem;
  66764. if (!(i && i.type !== "view")) {
  66765. 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();
  66766. if (o.setLayout({
  66767. cx: l,
  66768. cy: u
  66769. }), !!f) {
  66770. if (n) {
  66771. var d = i.pointToData(r), h = d[0], p = d[1], v = [h - l, p - u];
  66772. kf(v, v), Pg(v, v, c), n.setLayout([l + v[0], u + v[1]], !0);
  66773. var g = t.get(["circular", "rotateLabel"]);
  66774. Rne(n, g, l, u);
  66775. }
  66776. yVe[e](t, s, o, c, l, u, f), s.eachEdge(function(m, y) {
  66777. var b = Ui(m.getModel().get(["lineStyle", "curveness"]), Xk(m, t, y), 0), _ = Uo(m.node1.getLayout()), O = Uo(m.node2.getLayout()), S, x = (_[0] + O[0]) / 2, C = (_[1] + O[1]) / 2;
  66778. +b && (b *= 3, S = [l * b + x * (1 - b), u * b + C * (1 - b)]), m.setLayout([_, O, S]);
  66779. });
  66780. }
  66781. }
  66782. }
  66783. var yVe = {
  66784. value: function(t, e, n, r, i, a, o) {
  66785. var s = 0, l = n.getSum("value"), u = Math.PI * 2 / (l || o);
  66786. e.eachNode(function(c) {
  66787. var f = c.getValue("value"), d = u * (l ? f : 1) / 2;
  66788. s += d, c.setLayout([r * Math.cos(s) + i, r * Math.sin(s) + a]), s += d;
  66789. });
  66790. },
  66791. symbolSize: function(t, e, n, r, i, a, o) {
  66792. var s = 0;
  66793. _P.length = o;
  66794. var l = ng(t);
  66795. e.eachNode(function(f) {
  66796. var d = rg(f);
  66797. isNaN(d) && (d = 2), d < 0 && (d = 0), d *= l;
  66798. var h = Math.asin(d / 2 / r);
  66799. isNaN(h) && (h = ZF / 2), _P[f.dataIndex] = h, s += h * 2;
  66800. });
  66801. var u = (2 * ZF - s) / o / 2, c = 0;
  66802. e.eachNode(function(f) {
  66803. var d = u + _P[f.dataIndex];
  66804. c += d, (!f.getLayout() || !f.getLayout().fixed) && f.setLayout([r * Math.cos(c) + i, r * Math.sin(c) + a]), c += d;
  66805. });
  66806. }
  66807. };
  66808. function Rne(t, e, n, r) {
  66809. var i = t.getGraphicEl();
  66810. if (i) {
  66811. var a = t.getModel(), o = a.get(["label", "rotate"]) || 0, s = i.getSymbolPath();
  66812. if (e) {
  66813. var l = t.getLayout(), u = Math.atan2(l[1] - r, l[0] - n);
  66814. u < 0 && (u = Math.PI * 2 + u);
  66815. var c = l[0] < n;
  66816. c && (u = u - Math.PI);
  66817. var f = c ? "left" : "right";
  66818. s.setTextConfig({
  66819. rotation: -u,
  66820. position: f,
  66821. origin: "center"
  66822. });
  66823. var d = s.ensureState("emphasis");
  66824. le(d.textConfig || (d.textConfig = {}), {
  66825. position: f
  66826. });
  66827. } else
  66828. s.setTextConfig({
  66829. rotation: o *= Math.PI / 180
  66830. });
  66831. }
  66832. }
  66833. function bVe(t) {
  66834. t.eachSeriesByType("graph", function(e) {
  66835. e.get("layout") === "circular" && qk(e, "symbolSize");
  66836. });
  66837. }
  66838. var vd = Y1;
  66839. function _Ve(t, e, n) {
  66840. 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++) {
  66841. var f = r[c];
  66842. f.p || (f.p = wu(o * (Math.random() - 0.5) + l[0], s * (Math.random() - 0.5) + l[1])), f.pp = Uo(f.p), f.edges = null;
  66843. }
  66844. var d = n.friction == null ? 0.6 : n.friction, h = d, p, v;
  66845. return {
  66846. warmUp: function() {
  66847. h = d * 0.8;
  66848. },
  66849. setFixed: function(g) {
  66850. r[g].fixed = !0;
  66851. },
  66852. setUnfixed: function(g) {
  66853. r[g].fixed = !1;
  66854. },
  66855. /**
  66856. * Before step hook
  66857. */
  66858. beforeStep: function(g) {
  66859. p = g;
  66860. },
  66861. /**
  66862. * After step hook
  66863. */
  66864. afterStep: function(g) {
  66865. v = g;
  66866. },
  66867. /**
  66868. * Some formulas were originally copied from "d3.js"
  66869. * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
  66870. * with some modifications made for this project.
  66871. * See the license statement at the head of this file.
  66872. */
  66873. step: function(g) {
  66874. p && p(r, i);
  66875. for (var m = [], y = r.length, b = 0; b < i.length; b++) {
  66876. var _ = i[b];
  66877. if (!_.ignoreForceLayout) {
  66878. var O = _.n1, S = _.n2;
  66879. kl(m, S.p, O.p);
  66880. var x = Om(m) - _.d, C = S.w / (O.w + S.w);
  66881. isNaN(C) && (C = 0), kf(m, m), !O.fixed && vd(O.p, O.p, m, C * x * h), !S.fixed && vd(S.p, S.p, m, -(1 - C) * x * h);
  66882. }
  66883. }
  66884. for (var b = 0; b < y; b++) {
  66885. var T = r[b];
  66886. T.fixed || (kl(m, l, T.p), vd(T.p, T.p, m, u * h));
  66887. }
  66888. for (var b = 0; b < y; b++)
  66889. for (var O = r[b], w = b + 1; w < y; w++) {
  66890. var S = r[w];
  66891. kl(m, S.p, O.p);
  66892. var x = Om(m);
  66893. x === 0 && (Eq(m, Math.random() - 0.5, Math.random() - 0.5), x = 1);
  66894. var P = (O.rep + S.rep) / x / x;
  66895. !O.fixed && vd(O.pp, O.pp, m, P), !S.fixed && vd(S.pp, S.pp, m, -P);
  66896. }
  66897. for (var $ = [], b = 0; b < y; b++) {
  66898. var T = r[b];
  66899. T.fixed || (kl($, T.p, T.pp), vd(T.p, T.p, $, h), Ir(T.pp, T.p));
  66900. }
  66901. h = h * 0.992;
  66902. var A = h < 0.01;
  66903. v && v(r, i, A), g && g(A);
  66904. }
  66905. };
  66906. }
  66907. function OVe(t) {
  66908. t.eachSeriesByType("graph", function(e) {
  66909. var n = e.coordinateSystem;
  66910. if (!(n && n.type !== "view"))
  66911. if (e.get("layout") === "force") {
  66912. var r = e.preservedPoints || {}, i = e.getGraph(), a = i.data, o = i.edgeData, s = e.getModel("force"), l = s.get("initLayout");
  66913. e.preservedPoints ? a.each(function(b) {
  66914. var _ = a.getId(b);
  66915. a.setItemLayout(b, r[_] || [NaN, NaN]);
  66916. }) : !l || l === "none" ? Dne(e) : l === "circular" && qk(e, "value");
  66917. var u = a.getDataExtent("value"), c = o.getDataExtent("value"), f = s.get("repulsion"), d = s.get("edgeLength"), h = ue(f) ? f : [f, f], p = ue(d) ? d : [d, d];
  66918. p = [p[1], p[0]];
  66919. var v = a.mapArray("value", function(b, _) {
  66920. var O = a.getItemLayout(_), S = Lt(b, u, h);
  66921. return isNaN(S) && (S = (h[0] + h[1]) / 2), {
  66922. w: S,
  66923. rep: S,
  66924. fixed: a.getItemModel(_).get("fixed"),
  66925. p: !O || isNaN(O[0]) || isNaN(O[1]) ? null : O
  66926. };
  66927. }), g = o.mapArray("value", function(b, _) {
  66928. var O = i.getEdgeByIndex(_), S = Lt(b, c, p);
  66929. isNaN(S) && (S = (p[0] + p[1]) / 2);
  66930. var x = O.getModel(), C = Ui(O.getModel().get(["lineStyle", "curveness"]), -Xk(O, e, _, !0), 0);
  66931. return {
  66932. n1: v[O.node1.dataIndex],
  66933. n2: v[O.node2.dataIndex],
  66934. d: S,
  66935. curveness: C,
  66936. ignoreForceLayout: x.get("ignoreForceLayout")
  66937. };
  66938. }), m = n.getBoundingRect(), y = _Ve(v, g, {
  66939. rect: m,
  66940. gravity: s.get("gravity"),
  66941. friction: s.get("friction")
  66942. });
  66943. y.beforeStep(function(b, _) {
  66944. for (var O = 0, S = b.length; O < S; O++)
  66945. b[O].fixed && Ir(b[O].p, i.getNodeByIndex(O).getLayout());
  66946. }), y.afterStep(function(b, _, O) {
  66947. for (var S = 0, x = b.length; S < x; S++)
  66948. b[S].fixed || i.getNodeByIndex(S).setLayout(b[S].p), r[a.getId(S)] = b[S].p;
  66949. for (var S = 0, x = _.length; S < x; S++) {
  66950. var C = _[S], T = i.getEdgeByIndex(S), w = C.n1.p, P = C.n2.p, $ = T.getLayout();
  66951. $ = $ ? $.slice() : [], $[0] = $[0] || [], $[1] = $[1] || [], Ir($[0], w), Ir($[1], P), +C.curveness && ($[2] = [(w[0] + P[0]) / 2 - (w[1] - P[1]) * C.curveness, (w[1] + P[1]) / 2 - (P[0] - w[0]) * C.curveness]), T.setLayout($);
  66952. }
  66953. }), e.forceLayout = y, e.preservedPoints = r, y.step();
  66954. } else
  66955. e.forceLayout = null;
  66956. });
  66957. }
  66958. function SVe(t, e, n) {
  66959. var r = le(t.getBoxLayoutParams(), {
  66960. aspect: n
  66961. });
  66962. return Rn(r, {
  66963. width: e.getWidth(),
  66964. height: e.getHeight()
  66965. });
  66966. }
  66967. function xVe(t, e) {
  66968. var n = [];
  66969. return t.eachSeriesByType("graph", function(r) {
  66970. var i = r.get("coordinateSystem");
  66971. if (!i || i === "view") {
  66972. var a = r.getData(), o = a.mapArray(function(g) {
  66973. var m = a.getItemModel(g);
  66974. return [+m.get("x"), +m.get("y")];
  66975. }), s = [], l = [];
  66976. Zx(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);
  66977. var u = (l[0] - s[0]) / (l[1] - s[1]), c = SVe(r, e, u);
  66978. isNaN(u) && (s = [c.x, c.y], l = [c.x + c.width, c.y + c.height]);
  66979. var f = l[0] - s[0], d = l[1] - s[1], h = c.width, p = c.height, v = r.coordinateSystem = new ey();
  66980. 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);
  66981. }
  66982. }), n;
  66983. }
  66984. var UF = Un.prototype, OP = F0.prototype, kne = (
  66985. /** @class */
  66986. /* @__PURE__ */ function() {
  66987. function t() {
  66988. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  66989. }
  66990. return t;
  66991. }()
  66992. );
  66993. (function(t) {
  66994. q(e, t);
  66995. function e() {
  66996. return t !== null && t.apply(this, arguments) || this;
  66997. }
  66998. return e;
  66999. })(kne);
  67000. function SP(t) {
  67001. return isNaN(+t.cpx1) || isNaN(+t.cpy1);
  67002. }
  67003. var wVe = (
  67004. /** @class */
  67005. function(t) {
  67006. q(e, t);
  67007. function e(n) {
  67008. var r = t.call(this, n) || this;
  67009. return r.type = "ec-line", r;
  67010. }
  67011. return e.prototype.getDefaultStyle = function() {
  67012. return {
  67013. stroke: "#000",
  67014. fill: null
  67015. };
  67016. }, e.prototype.getDefaultShape = function() {
  67017. return new kne();
  67018. }, e.prototype.buildPath = function(n, r) {
  67019. SP(r) ? UF.buildPath.call(this, n, r) : OP.buildPath.call(this, n, r);
  67020. }, e.prototype.pointAt = function(n) {
  67021. return SP(this.shape) ? UF.pointAt.call(this, n) : OP.pointAt.call(this, n);
  67022. }, e.prototype.tangentAt = function(n) {
  67023. var r = this.shape, i = SP(r) ? [r.x2 - r.x1, r.y2 - r.y1] : OP.tangentAt.call(this, n);
  67024. return kf(i, i);
  67025. }, e;
  67026. }(ot)
  67027. ), xP = ["fromSymbol", "toSymbol"];
  67028. function XF(t) {
  67029. return "_" + t + "Type";
  67030. }
  67031. function YF(t, e, n) {
  67032. var r = e.getItemVisual(n, t);
  67033. if (!r || r === "none")
  67034. return r;
  67035. 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 = $p(i), u = Ff(o || 0, l);
  67036. return r + l + u + (a || "") + (s || "");
  67037. }
  67038. function qF(t, e, n) {
  67039. var r = e.getItemVisual(n, t);
  67040. if (!(!r || r === "none")) {
  67041. 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 = $p(i), u = Ff(o || 0, l), c = $n(r, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
  67042. return c.__specifiedRotation = a == null || isNaN(a) ? void 0 : +a * Math.PI / 180 || 0, c.name = t, c;
  67043. }
  67044. }
  67045. function CVe(t) {
  67046. var e = new wVe({
  67047. name: "line",
  67048. subPixelOptimize: !0
  67049. });
  67050. return SE(e.shape, t), e;
  67051. }
  67052. function SE(t, e) {
  67053. t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
  67054. var n = e[2];
  67055. n ? (t.cpx1 = n[0], t.cpy1 = n[1]) : (t.cpx1 = NaN, t.cpy1 = NaN);
  67056. }
  67057. var Kk = (
  67058. /** @class */
  67059. function(t) {
  67060. q(e, t);
  67061. function e(n, r, i) {
  67062. var a = t.call(this) || this;
  67063. return a._createLine(n, r, i), a;
  67064. }
  67065. return e.prototype._createLine = function(n, r, i) {
  67066. var a = n.hostModel, o = n.getItemLayout(r), s = CVe(o);
  67067. s.shape.percent = 0, Yt(s, {
  67068. shape: {
  67069. percent: 1
  67070. }
  67071. }, a, r), this.add(s), k(xP, function(l) {
  67072. var u = qF(l, n, r);
  67073. this.add(u), this[XF(l)] = YF(l, n, r);
  67074. }, this), this._updateCommonStl(n, r, i);
  67075. }, e.prototype.updateData = function(n, r, i) {
  67076. var a = n.hostModel, o = this.childOfName("line"), s = n.getItemLayout(r), l = {
  67077. shape: {}
  67078. };
  67079. SE(l.shape, s), Ct(o, l, a, r), k(xP, function(u) {
  67080. var c = YF(u, n, r), f = XF(u);
  67081. if (this[f] !== c) {
  67082. this.remove(this.childOfName(u));
  67083. var d = qF(u, n, r);
  67084. this.add(d);
  67085. }
  67086. this[f] = c;
  67087. }, this), this._updateCommonStl(n, r, i);
  67088. }, e.prototype.getLinePath = function() {
  67089. return this.childAt(0);
  67090. }, e.prototype._updateCommonStl = function(n, r, i) {
  67091. 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;
  67092. if (!i || n.hasItemOption) {
  67093. var p = n.getItemModel(r), v = p.getModel("emphasis");
  67094. 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 = er(p);
  67095. }
  67096. var g = n.getItemVisual(r, "style"), m = g.stroke;
  67097. 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, k(xP, function(S) {
  67098. var x = this.childOfName(S);
  67099. if (x) {
  67100. x.setColor(m), x.style.opacity = g.opacity;
  67101. for (var C = 0; C < ri.length; C++) {
  67102. var T = ri[C], w = o.getState(T);
  67103. if (w) {
  67104. var P = w.style || {}, $ = x.ensureState(T), A = $.style || ($.style = {});
  67105. P.stroke != null && (A[x.__isEmptyBrush ? "stroke" : "fill"] = P.stroke), P.opacity != null && (A.opacity = P.opacity);
  67106. }
  67107. }
  67108. x.markRedraw();
  67109. }
  67110. }, this);
  67111. var y = a.getRawValue(r);
  67112. Pr(this, c, {
  67113. labelDataIndex: r,
  67114. labelFetcher: {
  67115. getFormattedLabel: function(S, x) {
  67116. return a.getFormattedLabel(S, x, n.dataType);
  67117. }
  67118. },
  67119. inheritColor: m || "#000",
  67120. defaultOpacity: g.opacity,
  67121. defaultText: (y == null ? n.getName(r) : isFinite(y) ? mn(y) : y) + ""
  67122. });
  67123. var b = this.getTextContent();
  67124. if (b) {
  67125. var _ = c.normal;
  67126. b.__align = b.style.align, b.__verticalAlign = b.style.verticalAlign, b.__position = _.get("position") || "middle";
  67127. var O = _.get("distance");
  67128. ue(O) || (O = [O, O]), b.__labelDistance = O;
  67129. }
  67130. this.setTextConfig({
  67131. position: null,
  67132. local: !0,
  67133. inside: !1
  67134. // Can't be inside for stroke element.
  67135. }), bn(this, d, h, f);
  67136. }, e.prototype.highlight = function() {
  67137. Zs(this);
  67138. }, e.prototype.downplay = function() {
  67139. Us(this);
  67140. }, e.prototype.updateLayout = function(n, r) {
  67141. this.setLinePoints(n.getItemLayout(r));
  67142. }, e.prototype.setLinePoints = function(n) {
  67143. var r = this.childOfName("line");
  67144. SE(r.shape, n), r.dirty();
  67145. }, e.prototype.beforeUpdate = function() {
  67146. var n = this, r = n.childOfName("fromSymbol"), i = n.childOfName("toSymbol"), a = n.getTextContent();
  67147. if (!r && !i && (!a || a.ignore))
  67148. return;
  67149. for (var o = 1, s = this.parent; s; )
  67150. s.scaleX && (o /= s.scaleX), s = s.parent;
  67151. var l = n.childOfName("line");
  67152. if (!this.__dirty && !l.__dirty)
  67153. return;
  67154. var u = l.shape.percent, c = l.pointAt(0), f = l.pointAt(u), d = kl([], f, c);
  67155. kf(d, d);
  67156. function h(w, P) {
  67157. var $ = w.__specifiedRotation;
  67158. if ($ == null) {
  67159. var A = l.tangentAt(P);
  67160. w.attr("rotation", (P === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(A[1], A[0]));
  67161. } else
  67162. w.attr("rotation", $);
  67163. }
  67164. 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) {
  67165. a.x = a.y = 0, a.originX = a.originY = 0;
  67166. var p = void 0, v = void 0, g = a.__labelDistance, m = g[0] * o, y = g[1] * o, b = u / 2, _ = l.tangentAt(b), O = [_[1], -_[0]], S = l.pointAt(b);
  67167. O[1] > 0 && (O[0] = -O[0], O[1] = -O[1]);
  67168. var x = _[0] < 0 ? -1 : 1;
  67169. if (a.__position !== "start" && a.__position !== "end") {
  67170. var C = -Math.atan2(_[1], _[0]);
  67171. f[0] < c[0] && (C = Math.PI + C), a.rotation = C;
  67172. }
  67173. var T = void 0;
  67174. switch (a.__position) {
  67175. case "insideStartTop":
  67176. case "insideMiddleTop":
  67177. case "insideEndTop":
  67178. case "middle":
  67179. T = -y, v = "bottom";
  67180. break;
  67181. case "insideStartBottom":
  67182. case "insideMiddleBottom":
  67183. case "insideEndBottom":
  67184. T = y, v = "top";
  67185. break;
  67186. default:
  67187. T = 0, v = "middle";
  67188. }
  67189. switch (a.__position) {
  67190. case "end":
  67191. 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";
  67192. break;
  67193. case "start":
  67194. 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";
  67195. break;
  67196. case "insideStartTop":
  67197. case "insideStart":
  67198. case "insideStartBottom":
  67199. a.x = m * x + c[0], a.y = c[1] + T, p = _[0] < 0 ? "right" : "left", a.originX = -m * x, a.originY = -T;
  67200. break;
  67201. case "insideMiddleTop":
  67202. case "insideMiddle":
  67203. case "insideMiddleBottom":
  67204. case "middle":
  67205. a.x = S[0], a.y = S[1] + T, p = "center", a.originY = -T;
  67206. break;
  67207. case "insideEndTop":
  67208. case "insideEnd":
  67209. case "insideEndBottom":
  67210. a.x = -m * x + f[0], a.y = f[1] + T, p = _[0] >= 0 ? "right" : "left", a.originX = m * x, a.originY = -T;
  67211. break;
  67212. }
  67213. a.scaleX = a.scaleY = o, a.setStyle({
  67214. // Use the user specified text align and baseline first
  67215. verticalAlign: a.__verticalAlign || v,
  67216. align: a.__align || p
  67217. });
  67218. }
  67219. }, e;
  67220. }(Ve)
  67221. ), Jk = (
  67222. /** @class */
  67223. function() {
  67224. function t(e) {
  67225. this.group = new Ve(), this._LineCtor = e || Kk;
  67226. }
  67227. return t.prototype.updateData = function(e) {
  67228. var n = this;
  67229. this._progressiveEls = null;
  67230. var r = this, i = r.group, a = r._lineData;
  67231. r._lineData = e, a || i.removeAll();
  67232. var o = KF(e);
  67233. e.diff(a).add(function(s) {
  67234. n._doAdd(e, s, o);
  67235. }).update(function(s, l) {
  67236. n._doUpdate(a, e, l, s, o);
  67237. }).remove(function(s) {
  67238. i.remove(a.getItemGraphicEl(s));
  67239. }).execute();
  67240. }, t.prototype.updateLayout = function() {
  67241. var e = this._lineData;
  67242. e && e.eachItemGraphicEl(function(n, r) {
  67243. n.updateLayout(e, r);
  67244. }, this);
  67245. }, t.prototype.incrementalPrepareUpdate = function(e) {
  67246. this._seriesScope = KF(e), this._lineData = null, this.group.removeAll();
  67247. }, t.prototype.incrementalUpdate = function(e, n) {
  67248. this._progressiveEls = [];
  67249. function r(s) {
  67250. !s.isGroup && !TVe(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0);
  67251. }
  67252. for (var i = e.start; i < e.end; i++) {
  67253. var a = n.getItemLayout(i);
  67254. if (wP(a)) {
  67255. var o = new this._LineCtor(n, i, this._seriesScope);
  67256. o.traverse(r), this.group.add(o), n.setItemGraphicEl(i, o), this._progressiveEls.push(o);
  67257. }
  67258. }
  67259. }, t.prototype.remove = function() {
  67260. this.group.removeAll();
  67261. }, t.prototype.eachRendered = function(e) {
  67262. Tu(this._progressiveEls || this.group, e);
  67263. }, t.prototype._doAdd = function(e, n, r) {
  67264. var i = e.getItemLayout(n);
  67265. if (wP(i)) {
  67266. var a = new this._LineCtor(e, n, r);
  67267. e.setItemGraphicEl(n, a), this.group.add(a);
  67268. }
  67269. }, t.prototype._doUpdate = function(e, n, r, i, a) {
  67270. var o = e.getItemGraphicEl(r);
  67271. if (!wP(n.getItemLayout(i))) {
  67272. this.group.remove(o);
  67273. return;
  67274. }
  67275. o ? o.updateData(n, i, a) : o = new this._LineCtor(n, i, a), n.setItemGraphicEl(i, o), this.group.add(o);
  67276. }, t;
  67277. }()
  67278. );
  67279. function TVe(t) {
  67280. return t.animators && t.animators.length > 0;
  67281. }
  67282. function KF(t) {
  67283. var e = t.hostModel, n = e.getModel("emphasis");
  67284. return {
  67285. lineStyle: e.getModel("lineStyle").getLineStyle(),
  67286. emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
  67287. blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
  67288. selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
  67289. emphasisDisabled: n.get("disabled"),
  67290. blurScope: n.get("blurScope"),
  67291. focus: n.get("focus"),
  67292. labelStatesModels: er(e)
  67293. };
  67294. }
  67295. function JF(t) {
  67296. return isNaN(t[0]) || isNaN(t[1]);
  67297. }
  67298. function wP(t) {
  67299. return t && !JF(t[0]) && !JF(t[1]);
  67300. }
  67301. var CP = [], TP = [], PP = [], gd = ir, $P = Ul, eW = Math.abs;
  67302. function tW(t, e, n) {
  67303. 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) {
  67304. CP[0] = gd(r[0], i[0], a[0], c), CP[1] = gd(r[1], i[1], a[1], c);
  67305. var f = eW($P(CP, e) - l);
  67306. f < o && (o = f, s = c);
  67307. }
  67308. for (var d = 0; d < 32; d++) {
  67309. var h = s + u;
  67310. TP[0] = gd(r[0], i[0], a[0], s), TP[1] = gd(r[1], i[1], a[1], s), PP[0] = gd(r[0], i[0], a[0], h), PP[1] = gd(r[1], i[1], a[1], h);
  67311. var f = $P(TP, e) - l;
  67312. if (eW(f) < 0.01)
  67313. break;
  67314. var p = $P(PP, e) - l;
  67315. u /= 2, f < 0 ? p >= 0 ? s = s + u : s = s - u : p >= 0 ? s = s - u : s = s + u;
  67316. }
  67317. return s;
  67318. }
  67319. function AP(t, e) {
  67320. var n = [], r = Sm, i = [[], [], []], a = [[], []], o = [];
  67321. e /= 2, t.eachEdge(function(s, l) {
  67322. var u = s.getLayout(), c = s.getVisual("fromSymbol"), f = s.getVisual("toSymbol");
  67323. u.__original || (u.__original = [Uo(u[0]), Uo(u[1])], u[2] && u.__original.push(Uo(u[2])));
  67324. var d = u.__original;
  67325. if (u[2] != null) {
  67326. if (Ir(i[0], d[0]), Ir(i[1], d[2]), Ir(i[2], d[1]), c && c !== "none") {
  67327. var h = rg(s.node1), p = tW(i, d[0], h * e);
  67328. 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];
  67329. }
  67330. if (f && f !== "none") {
  67331. var h = rg(s.node2), p = tW(i, d[1], h * e);
  67332. 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];
  67333. }
  67334. Ir(u[0], i[0]), Ir(u[1], i[2]), Ir(u[2], i[1]);
  67335. } else {
  67336. if (Ir(a[0], d[0]), Ir(a[1], d[1]), kl(o, a[1], a[0]), kf(o, o), c && c !== "none") {
  67337. var h = rg(s.node1);
  67338. Y1(a[0], a[0], o, h * e);
  67339. }
  67340. if (f && f !== "none") {
  67341. var h = rg(s.node2);
  67342. Y1(a[1], a[1], o, -h * e);
  67343. }
  67344. Ir(u[0], a[0]), Ir(u[1], a[1]);
  67345. }
  67346. });
  67347. }
  67348. function nW(t) {
  67349. return t.type === "view";
  67350. }
  67351. var PVe = (
  67352. /** @class */
  67353. function(t) {
  67354. q(e, t);
  67355. function e() {
  67356. var n = t !== null && t.apply(this, arguments) || this;
  67357. return n.type = e.type, n;
  67358. }
  67359. return e.prototype.init = function(n, r) {
  67360. var i = new U0(), a = new Jk(), o = this.group;
  67361. this._controller = new J0(r.getZr()), this._controllerHost = {
  67362. target: o
  67363. }, o.add(i.group), o.add(a.group), this._symbolDraw = i, this._lineDraw = a, this._firstRender = !0;
  67364. }, e.prototype.render = function(n, r, i) {
  67365. var a = this, o = n.coordinateSystem;
  67366. this._model = n;
  67367. var s = this._symbolDraw, l = this._lineDraw, u = this.group;
  67368. if (nW(o)) {
  67369. var c = {
  67370. x: o.x,
  67371. y: o.y,
  67372. scaleX: o.scaleX,
  67373. scaleY: o.scaleY
  67374. };
  67375. this._firstRender ? u.attr(c) : Ct(u, c, n);
  67376. }
  67377. AP(n.getGraph(), ng(n));
  67378. var f = n.getData();
  67379. s.updateData(f);
  67380. var d = n.getEdgeData();
  67381. l.updateData(d), this._updateNodeAndLinkScale(), this._updateController(n, r, i), clearTimeout(this._layoutTimeout);
  67382. var h = n.forceLayout, p = n.get(["force", "layoutAnimation"]);
  67383. h && this._startForceLayoutIteration(h, p);
  67384. var v = n.get("layout");
  67385. f.graph.eachNode(function(b) {
  67386. var _ = b.dataIndex, O = b.getGraphicEl(), S = b.getModel();
  67387. if (O) {
  67388. O.off("drag").off("dragend");
  67389. var x = S.get("draggable");
  67390. x && O.on("drag", function(T) {
  67391. switch (v) {
  67392. case "force":
  67393. h.warmUp(), !a._layouting && a._startForceLayoutIteration(h, p), h.setFixed(_), f.setItemLayout(_, [O.x, O.y]);
  67394. break;
  67395. case "circular":
  67396. f.setItemLayout(_, [O.x, O.y]), b.setLayout({
  67397. fixed: !0
  67398. }, !0), qk(n, "symbolSize", b, [T.offsetX, T.offsetY]), a.updateLayout(n);
  67399. break;
  67400. case "none":
  67401. default:
  67402. f.setItemLayout(_, [O.x, O.y]), Yk(n.getGraph(), n), a.updateLayout(n);
  67403. break;
  67404. }
  67405. }).on("dragend", function() {
  67406. h && h.setUnfixed(_);
  67407. }), O.setDraggable(x, !!S.get("cursor"));
  67408. var C = S.get(["emphasis", "focus"]);
  67409. C === "adjacency" && (Fe(O).focus = b.getAdjacentDataIndices());
  67410. }
  67411. }), f.graph.eachEdge(function(b) {
  67412. var _ = b.getGraphicEl(), O = b.getModel().get(["emphasis", "focus"]);
  67413. _ && O === "adjacency" && (Fe(_).focus = {
  67414. edge: [b.dataIndex],
  67415. node: [b.node1.dataIndex, b.node2.dataIndex]
  67416. });
  67417. });
  67418. var g = n.get("layout") === "circular" && n.get(["circular", "rotateLabel"]), m = f.getLayout("cx"), y = f.getLayout("cy");
  67419. f.graph.eachNode(function(b) {
  67420. Rne(b, g, m, y);
  67421. }), this._firstRender = !1;
  67422. }, e.prototype.dispose = function() {
  67423. this.remove(), this._controller && this._controller.dispose(), this._controllerHost = null;
  67424. }, e.prototype._startForceLayoutIteration = function(n, r) {
  67425. var i = this;
  67426. (function a() {
  67427. n.step(function(o) {
  67428. i.updateLayout(i._model), (i._layouting = !o) && (r ? i._layoutTimeout = setTimeout(a, 16) : a());
  67429. });
  67430. })();
  67431. }, e.prototype._updateController = function(n, r, i) {
  67432. var a = this, o = this._controller, s = this._controllerHost, l = this.group;
  67433. if (o.setPointerChecker(function(u, c, f) {
  67434. var d = l.getBoundingRect();
  67435. return d.applyTransform(l.transform), d.contain(c, f) && !yw(u, i, n);
  67436. }), !nW(n.coordinateSystem)) {
  67437. o.disable();
  67438. return;
  67439. }
  67440. o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
  67441. Fk(s, u.dx, u.dy), i.dispatchAction({
  67442. seriesId: n.id,
  67443. type: "graphRoam",
  67444. dx: u.dx,
  67445. dy: u.dy
  67446. });
  67447. }).on("zoom", function(u) {
  67448. Wk(s, u.scale, u.originX, u.originY), i.dispatchAction({
  67449. seriesId: n.id,
  67450. type: "graphRoam",
  67451. zoom: u.scale,
  67452. originX: u.originX,
  67453. originY: u.originY
  67454. }), a._updateNodeAndLinkScale(), AP(n.getGraph(), ng(n)), a._lineDraw.updateLayout(), i.updateLabelLayout();
  67455. });
  67456. }, e.prototype._updateNodeAndLinkScale = function() {
  67457. var n = this._model, r = n.getData(), i = ng(n);
  67458. r.eachItemGraphicEl(function(a, o) {
  67459. a && a.setSymbolScale(i);
  67460. });
  67461. }, e.prototype.updateLayout = function(n) {
  67462. AP(n.getGraph(), ng(n)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout();
  67463. }, e.prototype.remove = function() {
  67464. clearTimeout(this._layoutTimeout), this._layouting = !1, this._layoutTimeout = null, this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove();
  67465. }, e.type = "graph", e;
  67466. }(zt)
  67467. );
  67468. function md(t) {
  67469. return "_EC_" + t;
  67470. }
  67471. var $Ve = (
  67472. /** @class */
  67473. function() {
  67474. function t(e) {
  67475. this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1;
  67476. }
  67477. return t.prototype.isDirected = function() {
  67478. return this._directed;
  67479. }, t.prototype.addNode = function(e, n) {
  67480. e = e == null ? "" + n : "" + e;
  67481. var r = this._nodesMap;
  67482. if (r[md(e)]) {
  67483. process.env.NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id");
  67484. return;
  67485. }
  67486. var i = new gc(e, n);
  67487. return i.hostGraph = this, this.nodes.push(i), r[md(e)] = i, i;
  67488. }, t.prototype.getNodeByIndex = function(e) {
  67489. var n = this.data.getRawIndex(e);
  67490. return this.nodes[n];
  67491. }, t.prototype.getNodeById = function(e) {
  67492. return this._nodesMap[md(e)];
  67493. }, t.prototype.addEdge = function(e, n, r) {
  67494. var i = this._nodesMap, a = this._edgesMap;
  67495. if (St(e) && (e = this.nodes[e]), St(n) && (n = this.nodes[n]), e instanceof gc || (e = i[md(e)]), n instanceof gc || (n = i[md(n)]), !(!e || !n)) {
  67496. var o = e.id + "-" + n.id, s = new Lne(e, n, r);
  67497. 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;
  67498. }
  67499. }, t.prototype.getEdgeByIndex = function(e) {
  67500. var n = this.edgeData.getRawIndex(e);
  67501. return this.edges[n];
  67502. }, t.prototype.getEdge = function(e, n) {
  67503. e instanceof gc && (e = e.id), n instanceof gc && (n = n.id);
  67504. var r = this._edgesMap;
  67505. return this._directed ? r[e + "-" + n] : r[e + "-" + n] || r[n + "-" + e];
  67506. }, t.prototype.eachNode = function(e, n) {
  67507. for (var r = this.nodes, i = r.length, a = 0; a < i; a++)
  67508. r[a].dataIndex >= 0 && e.call(n, r[a], a);
  67509. }, t.prototype.eachEdge = function(e, n) {
  67510. for (var r = this.edges, i = r.length, a = 0; a < i; a++)
  67511. r[a].dataIndex >= 0 && r[a].node1.dataIndex >= 0 && r[a].node2.dataIndex >= 0 && e.call(n, r[a], a);
  67512. }, t.prototype.breadthFirstTraverse = function(e, n, r, i) {
  67513. if (n instanceof gc || (n = this._nodesMap[md(n)]), !!n) {
  67514. for (var a = r === "out" ? "outEdges" : r === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
  67515. this.nodes[o].__visited = !1;
  67516. if (!e.call(i, n, null))
  67517. for (var s = [n]; s.length; )
  67518. for (var l = s.shift(), u = l[a], o = 0; o < u.length; o++) {
  67519. var c = u[o], f = c.node1 === l ? c.node2 : c.node1;
  67520. if (!f.__visited) {
  67521. if (e.call(i, f, l))
  67522. return;
  67523. s.push(f), f.__visited = !0;
  67524. }
  67525. }
  67526. }
  67527. }, t.prototype.update = function() {
  67528. for (var e = this.data, n = this.edgeData, r = this.nodes, i = this.edges, a = 0, o = r.length; a < o; a++)
  67529. r[a].dataIndex = -1;
  67530. for (var a = 0, o = e.count(); a < o; a++)
  67531. r[e.getRawIndex(a)].dataIndex = a;
  67532. n.filterSelf(function(s) {
  67533. var l = i[n.getRawIndex(s)];
  67534. return l.node1.dataIndex >= 0 && l.node2.dataIndex >= 0;
  67535. });
  67536. for (var a = 0, o = i.length; a < o; a++)
  67537. i[a].dataIndex = -1;
  67538. for (var a = 0, o = n.count(); a < o; a++)
  67539. i[n.getRawIndex(a)].dataIndex = a;
  67540. }, t.prototype.clone = function() {
  67541. for (var e = new t(this._directed), n = this.nodes, r = this.edges, i = 0; i < n.length; i++)
  67542. e.addNode(n[i].id, n[i].dataIndex);
  67543. for (var i = 0; i < r.length; i++) {
  67544. var a = r[i];
  67545. e.addEdge(a.node1.id, a.node2.id, a.dataIndex);
  67546. }
  67547. return e;
  67548. }, t;
  67549. }()
  67550. ), gc = (
  67551. /** @class */
  67552. function() {
  67553. function t(e, n) {
  67554. this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e ?? "", this.dataIndex = n ?? -1;
  67555. }
  67556. return t.prototype.degree = function() {
  67557. return this.edges.length;
  67558. }, t.prototype.inDegree = function() {
  67559. return this.inEdges.length;
  67560. }, t.prototype.outDegree = function() {
  67561. return this.outEdges.length;
  67562. }, t.prototype.getModel = function(e) {
  67563. if (!(this.dataIndex < 0)) {
  67564. var n = this.hostGraph, r = n.data.getItemModel(this.dataIndex);
  67565. return r.getModel(e);
  67566. }
  67567. }, t.prototype.getAdjacentDataIndices = function() {
  67568. for (var e = {
  67569. edge: [],
  67570. node: []
  67571. }, n = 0; n < this.edges.length; n++) {
  67572. var r = this.edges[n];
  67573. r.dataIndex < 0 || (e.edge.push(r.dataIndex), e.node.push(r.node1.dataIndex, r.node2.dataIndex));
  67574. }
  67575. return e;
  67576. }, t.prototype.getTrajectoryDataIndices = function() {
  67577. for (var e = Pe(), n = Pe(), r = 0; r < this.edges.length; r++) {
  67578. var i = this.edges[r];
  67579. if (!(i.dataIndex < 0)) {
  67580. e.set(i.dataIndex, !0);
  67581. for (var a = [i.node1], o = [i.node2], s = 0; s < a.length; ) {
  67582. var l = a[s];
  67583. s++, n.set(l.dataIndex, !0);
  67584. for (var u = 0; u < l.inEdges.length; u++)
  67585. e.set(l.inEdges[u].dataIndex, !0), a.push(l.inEdges[u].node1);
  67586. }
  67587. for (s = 0; s < o.length; ) {
  67588. var c = o[s];
  67589. s++, n.set(c.dataIndex, !0);
  67590. for (var u = 0; u < c.outEdges.length; u++)
  67591. e.set(c.outEdges[u].dataIndex, !0), o.push(c.outEdges[u].node2);
  67592. }
  67593. }
  67594. }
  67595. return {
  67596. edge: e.keys(),
  67597. node: n.keys()
  67598. };
  67599. }, t;
  67600. }()
  67601. ), Lne = (
  67602. /** @class */
  67603. function() {
  67604. function t(e, n, r) {
  67605. this.dataIndex = -1, this.node1 = e, this.node2 = n, this.dataIndex = r ?? -1;
  67606. }
  67607. return t.prototype.getModel = function(e) {
  67608. if (!(this.dataIndex < 0)) {
  67609. var n = this.hostGraph, r = n.edgeData.getItemModel(this.dataIndex);
  67610. return r.getModel(e);
  67611. }
  67612. }, t.prototype.getAdjacentDataIndices = function() {
  67613. return {
  67614. edge: [this.dataIndex],
  67615. node: [this.node1.dataIndex, this.node2.dataIndex]
  67616. };
  67617. }, t.prototype.getTrajectoryDataIndices = function() {
  67618. var e = Pe(), n = Pe();
  67619. e.set(this.dataIndex, !0);
  67620. for (var r = [this.node1], i = [this.node2], a = 0; a < r.length; ) {
  67621. var o = r[a];
  67622. a++, n.set(o.dataIndex, !0);
  67623. for (var s = 0; s < o.inEdges.length; s++)
  67624. e.set(o.inEdges[s].dataIndex, !0), r.push(o.inEdges[s].node1);
  67625. }
  67626. for (a = 0; a < i.length; ) {
  67627. var l = i[a];
  67628. a++, n.set(l.dataIndex, !0);
  67629. for (var s = 0; s < l.outEdges.length; s++)
  67630. e.set(l.outEdges[s].dataIndex, !0), i.push(l.outEdges[s].node2);
  67631. }
  67632. return {
  67633. edge: e.keys(),
  67634. node: n.keys()
  67635. };
  67636. }, t;
  67637. }()
  67638. );
  67639. function Nne(t, e) {
  67640. return {
  67641. /**
  67642. * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
  67643. */
  67644. getValue: function(n) {
  67645. var r = this[t][e];
  67646. return r.getStore().get(r.getDimensionIndex(n || "value"), this.dataIndex);
  67647. },
  67648. // TODO: TYPE stricter type.
  67649. setVisual: function(n, r) {
  67650. this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, r);
  67651. },
  67652. getVisual: function(n) {
  67653. return this[t][e].getItemVisual(this.dataIndex, n);
  67654. },
  67655. setLayout: function(n, r) {
  67656. this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, r);
  67657. },
  67658. getLayout: function() {
  67659. return this[t][e].getItemLayout(this.dataIndex);
  67660. },
  67661. getGraphicEl: function() {
  67662. return this[t][e].getItemGraphicEl(this.dataIndex);
  67663. },
  67664. getRawIndex: function() {
  67665. return this[t][e].getRawIndex(this.dataIndex);
  67666. }
  67667. };
  67668. }
  67669. xn(gc, Nne("hostGraph", "data"));
  67670. xn(Lne, Nne("hostGraph", "edgeData"));
  67671. function Bne(t, e, n, r, i) {
  67672. for (var a = new $Ve(r), o = 0; o < t.length; o++)
  67673. a.addNode(Tn(
  67674. // Id, name, dataIndex
  67675. t[o].id,
  67676. t[o].name,
  67677. o
  67678. ), o);
  67679. for (var s = [], l = [], u = 0, o = 0; o < e.length; o++) {
  67680. var c = e[o], f = c.source, d = c.target;
  67681. a.addEdge(f, d, u) && (l.push(c), s.push(Tn(Vn(c.id, null), f + " > " + d)), u++);
  67682. }
  67683. var h = n.get("coordinateSystem"), p;
  67684. if (h === "cartesian2d" || h === "polar")
  67685. p = cs(t, n);
  67686. else {
  67687. var v = Vf.get(h), g = v ? v.dimensions || [] : [];
  67688. et(g, "value") < 0 && g.concat(["value"]);
  67689. var m = Ap(t, {
  67690. coordDimensions: g,
  67691. encodeDefine: n.getEncode()
  67692. }).dimensions;
  67693. p = new Nr(m, n), p.initData(t);
  67694. }
  67695. var y = new Nr(["value"], n);
  67696. return y.initData(l, s), i && i(p, y), bne({
  67697. mainData: p,
  67698. struct: a,
  67699. structAttr: "graph",
  67700. datas: {
  67701. node: p,
  67702. edge: y
  67703. },
  67704. datasAttr: {
  67705. node: "data",
  67706. edge: "edgeData"
  67707. }
  67708. }), a.update(), a;
  67709. }
  67710. var AVe = (
  67711. /** @class */
  67712. function(t) {
  67713. q(e, t);
  67714. function e() {
  67715. var n = t !== null && t.apply(this, arguments) || this;
  67716. return n.type = e.type, n.hasSymbolVisual = !0, n;
  67717. }
  67718. return e.prototype.init = function(n) {
  67719. t.prototype.init.apply(this, arguments);
  67720. var r = this;
  67721. function i() {
  67722. return r._categoriesData;
  67723. }
  67724. this.legendVisualProvider = new K0(i, i), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
  67725. }, e.prototype.mergeOption = function(n) {
  67726. t.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
  67727. }, e.prototype.mergeDefaultAndTheme = function(n) {
  67728. t.prototype.mergeDefaultAndTheme.apply(this, arguments), mf(n, "edgeLabel", ["show"]);
  67729. }, e.prototype.getInitialData = function(n, r) {
  67730. var i = n.edges || n.links || [], a = n.data || n.nodes || [], o = this;
  67731. if (a && i) {
  67732. vVe(this);
  67733. var s = Bne(a, i, this, !0, l);
  67734. return k(s.edges, function(u) {
  67735. gVe(u.node1, u.node2, this, u.dataIndex);
  67736. }, this), s.data;
  67737. }
  67738. function l(u, c) {
  67739. u.wrapMethod("getItemModel", function(p) {
  67740. var v = o._categoriesModels, g = p.getShallow("category"), m = v[g];
  67741. return m && (m.parentModel = p.parentModel, p.parentModel = m), p;
  67742. });
  67743. var f = Wt.prototype.getModel;
  67744. function d(p, v) {
  67745. var g = f.call(this, p, v);
  67746. return g.resolveParentPath = h, g;
  67747. }
  67748. c.wrapMethod("getItemModel", function(p) {
  67749. return p.resolveParentPath = h, p.getModel = d, p;
  67750. });
  67751. function h(p) {
  67752. if (p && (p[0] === "label" || p[1] === "label")) {
  67753. var v = p.slice();
  67754. return p[0] === "label" ? v[0] = "edgeLabel" : p[1] === "label" && (v[1] = "edgeLabel"), v;
  67755. }
  67756. return p;
  67757. }
  67758. }
  67759. }, e.prototype.getGraph = function() {
  67760. return this.getData().graph;
  67761. }, e.prototype.getEdgeData = function() {
  67762. return this.getGraph().edgeData;
  67763. }, e.prototype.getCategoriesData = function() {
  67764. return this._categoriesData;
  67765. }, e.prototype.formatTooltip = function(n, r, i) {
  67766. if (i === "edge") {
  67767. 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 = [];
  67768. return l != null && c.push(l), u != null && c.push(u), tr("nameValue", {
  67769. name: c.join(" > "),
  67770. value: o.value,
  67771. noValue: o.value == null
  67772. });
  67773. }
  67774. var f = aee({
  67775. series: this,
  67776. dataIndex: n,
  67777. multipleSeries: r
  67778. });
  67779. return f;
  67780. }, e.prototype._updateCategoriesData = function() {
  67781. var n = ce(this.option.categories || [], function(i) {
  67782. return i.value != null ? i : le({
  67783. value: 0
  67784. }, i);
  67785. }), r = new Nr(["value"], this);
  67786. r.initData(n), this._categoriesData = r, this._categoriesModels = r.mapArray(function(i) {
  67787. return r.getItemModel(i);
  67788. });
  67789. }, e.prototype.setZoom = function(n) {
  67790. this.option.zoom = n;
  67791. }, e.prototype.setCenter = function(n) {
  67792. this.option.center = n;
  67793. }, e.prototype.isAnimationEnabled = function() {
  67794. return t.prototype.isAnimationEnabled.call(this) && !(this.get("layout") === "force" && this.get(["force", "layoutAnimation"]));
  67795. }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  67796. // zlevel: 0,
  67797. z: 2,
  67798. coordinateSystem: "view",
  67799. // Default option for all coordinate systems
  67800. // xAxisIndex: 0,
  67801. // yAxisIndex: 0,
  67802. // polarIndex: 0,
  67803. // geoIndex: 0,
  67804. legendHoverLink: !0,
  67805. layout: null,
  67806. // Configuration of circular layout
  67807. circular: {
  67808. rotateLabel: !1
  67809. },
  67810. // Configuration of force directed layout
  67811. force: {
  67812. initLayout: null,
  67813. // Node repulsion. Can be an array to represent range.
  67814. repulsion: [0, 50],
  67815. gravity: 0.1,
  67816. // Initial friction
  67817. friction: 0.6,
  67818. // Edge length. Can be an array to represent range.
  67819. edgeLength: 30,
  67820. layoutAnimation: !0
  67821. },
  67822. left: "center",
  67823. top: "center",
  67824. // right: null,
  67825. // bottom: null,
  67826. // width: '80%',
  67827. // height: '80%',
  67828. symbol: "circle",
  67829. symbolSize: 10,
  67830. edgeSymbol: ["none", "none"],
  67831. edgeSymbolSize: 10,
  67832. edgeLabel: {
  67833. position: "middle",
  67834. distance: 5
  67835. },
  67836. draggable: !1,
  67837. roam: !1,
  67838. // Default on center of graph
  67839. center: null,
  67840. zoom: 1,
  67841. // Symbol size scale ratio in roam
  67842. nodeScaleRatio: 0.6,
  67843. // cursor: null,
  67844. // categories: [],
  67845. // data: []
  67846. // Or
  67847. // nodes: []
  67848. //
  67849. // links: []
  67850. // Or
  67851. // edges: []
  67852. label: {
  67853. show: !1,
  67854. formatter: "{b}"
  67855. },
  67856. itemStyle: {},
  67857. lineStyle: {
  67858. color: "#aaa",
  67859. width: 1,
  67860. opacity: 0.5
  67861. },
  67862. emphasis: {
  67863. scale: !0,
  67864. label: {
  67865. show: !0
  67866. }
  67867. },
  67868. select: {
  67869. itemStyle: {
  67870. borderColor: "#212121"
  67871. }
  67872. }
  67873. }, e;
  67874. }(Ht)
  67875. ), EVe = {
  67876. type: "graphRoam",
  67877. event: "graphRoam",
  67878. update: "none"
  67879. };
  67880. function MVe(t) {
  67881. t.registerChartView(PVe), t.registerSeriesModel(AVe), t.registerProcessor(cVe), t.registerVisual(fVe), t.registerVisual(dVe), t.registerLayout(mVe), t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, bVe), t.registerLayout(OVe), t.registerCoordinateSystem("graphView", {
  67882. dimensions: ey.dimensions,
  67883. create: xVe
  67884. }), t.registerAction({
  67885. type: "focusNodeAdjacency",
  67886. event: "focusNodeAdjacency",
  67887. update: "series:focusNodeAdjacency"
  67888. }, On), t.registerAction({
  67889. type: "unfocusNodeAdjacency",
  67890. event: "unfocusNodeAdjacency",
  67891. update: "series:unfocusNodeAdjacency"
  67892. }, On), t.registerAction(EVe, function(e, n, r) {
  67893. n.eachComponent({
  67894. mainType: "series",
  67895. query: e
  67896. }, function(i) {
  67897. var a = i.coordinateSystem, o = Hk(a, e, void 0, r);
  67898. i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
  67899. });
  67900. });
  67901. }
  67902. var IVe = (
  67903. /** @class */
  67904. /* @__PURE__ */ function() {
  67905. function t() {
  67906. this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0;
  67907. }
  67908. return t;
  67909. }()
  67910. ), DVe = (
  67911. /** @class */
  67912. function(t) {
  67913. q(e, t);
  67914. function e(n) {
  67915. var r = t.call(this, n) || this;
  67916. return r.type = "pointer", r;
  67917. }
  67918. return e.prototype.getDefaultShape = function() {
  67919. return new IVe();
  67920. }, e.prototype.buildPath = function(n, r) {
  67921. 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);
  67922. 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);
  67923. }, e;
  67924. }(ot)
  67925. );
  67926. function RVe(t, e) {
  67927. var n = t.get("center"), r = e.getWidth(), i = e.getHeight(), a = Math.min(r, i), o = _e(n[0], e.getWidth()), s = _e(n[1], e.getHeight()), l = _e(t.get("radius"), a / 2);
  67928. return {
  67929. cx: o,
  67930. cy: s,
  67931. r: l
  67932. };
  67933. }
  67934. function Eb(t, e) {
  67935. var n = t == null ? "" : t + "";
  67936. return e && (Oe(e) ? n = e.replace("{value}", n) : Me(e) && (n = e(t))), n;
  67937. }
  67938. var kVe = (
  67939. /** @class */
  67940. function(t) {
  67941. q(e, t);
  67942. function e() {
  67943. var n = t !== null && t.apply(this, arguments) || this;
  67944. return n.type = e.type, n;
  67945. }
  67946. return e.prototype.render = function(n, r, i) {
  67947. this.group.removeAll();
  67948. var a = n.get(["axisLine", "lineStyle", "color"]), o = RVe(n, i);
  67949. this._renderMain(n, r, i, a, o), this._data = n.getData();
  67950. }, e.prototype.dispose = function() {
  67951. }, e.prototype._renderMain = function(n, r, i, a, o) {
  67952. 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 ? MO : ii, p = f.get("show"), v = f.getModel("lineStyle"), g = v.get("width"), m = [u, c];
  67953. RR(m, !l), u = m[0], c = m[1];
  67954. for (var y = c - u, b = u, _ = [], O = 0; p && O < a.length; O++) {
  67955. var S = Math.min(Math.max(a[O][0], 0), 1);
  67956. c = u + y * S;
  67957. var x = new h({
  67958. shape: {
  67959. startAngle: b,
  67960. endAngle: c,
  67961. cx: o.cx,
  67962. cy: o.cy,
  67963. clockwise: l,
  67964. r0: o.r - g,
  67965. r: o.r
  67966. },
  67967. silent: !0
  67968. });
  67969. x.setStyle({
  67970. fill: a[O][1]
  67971. }), x.setStyle(v.getLineStyle(
  67972. // Because we use sector to simulate arc
  67973. // so the properties for stroking are useless
  67974. ["color", "width"]
  67975. )), _.push(x), b = c;
  67976. }
  67977. _.reverse(), k(_, function(T) {
  67978. return s.add(T);
  67979. });
  67980. var C = function(T) {
  67981. if (T <= 0)
  67982. return a[0][1];
  67983. var w;
  67984. for (w = 0; w < a.length; w++)
  67985. if (a[w][0] >= T && (w === 0 ? 0 : a[w - 1][0]) < T)
  67986. return a[w][1];
  67987. return a[w - 1][1];
  67988. };
  67989. this._renderTicks(n, r, i, C, o, u, c, l, g), this._renderTitleAndDetail(n, r, i, C, o), this._renderAnchor(n, o), this._renderPointer(n, r, i, C, o, u, c, l, g);
  67990. }, e.prototype._renderTicks = function(n, r, i, a, o, s, l, u, c) {
  67991. 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"), b = n.getModel("axisLabel"), _ = n.get("splitNumber"), O = y.get("splitNumber"), S = _e(m.get("length"), p), x = _e(y.get("length"), p), C = s, T = (l - s) / _, w = T / O, P = m.getModel("lineStyle").getLineStyle(), $ = y.getModel("lineStyle").getLineStyle(), A = m.get("distance"), D, E, R = 0; R <= _; R++) {
  67992. if (D = Math.cos(C), E = Math.sin(C), m.get("show")) {
  67993. var N = A ? A + c : c, V = new Un({
  67994. shape: {
  67995. x1: D * (p - N) + d,
  67996. y1: E * (p - N) + h,
  67997. x2: D * (p - S - N) + d,
  67998. y2: E * (p - S - N) + h
  67999. },
  68000. style: P,
  68001. silent: !0
  68002. });
  68003. P.stroke === "auto" && V.setStyle({
  68004. stroke: a(R / _)
  68005. }), f.add(V);
  68006. }
  68007. if (b.get("show")) {
  68008. var N = b.get("distance") + A, B = Eb(mn(R / _ * (g - v) + v), b.get("formatter")), W = a(R / _), F = D * (p - S - N) + d, Q = E * (p - S - N) + h, Z = b.get("rotate"), ne = 0;
  68009. Z === "radial" ? (ne = -C + 2 * Math.PI, ne > Math.PI / 2 && (ne += Math.PI)) : Z === "tangential" ? ne = -C - Math.PI / 2 : St(Z) && (ne = Z * Math.PI / 180), ne === 0 ? f.add(new gt({
  68010. style: Zt(b, {
  68011. text: B,
  68012. x: F,
  68013. y: Q,
  68014. verticalAlign: E < -0.8 ? "top" : E > 0.8 ? "bottom" : "middle",
  68015. align: D < -0.4 ? "left" : D > 0.4 ? "right" : "center"
  68016. }, {
  68017. inheritColor: W
  68018. }),
  68019. silent: !0
  68020. })) : f.add(new gt({
  68021. style: Zt(b, {
  68022. text: B,
  68023. x: F,
  68024. y: Q,
  68025. verticalAlign: "middle",
  68026. align: "center"
  68027. }, {
  68028. inheritColor: W
  68029. }),
  68030. silent: !0,
  68031. originX: F,
  68032. originY: Q,
  68033. rotation: ne
  68034. }));
  68035. }
  68036. if (y.get("show") && R !== _) {
  68037. var N = y.get("distance");
  68038. N = N ? N + c : c;
  68039. for (var ee = 0; ee <= O; ee++) {
  68040. D = Math.cos(C), E = Math.sin(C);
  68041. var oe = new Un({
  68042. shape: {
  68043. x1: D * (p - N) + d,
  68044. y1: E * (p - N) + h,
  68045. x2: D * (p - x - N) + d,
  68046. y2: E * (p - x - N) + h
  68047. },
  68048. silent: !0,
  68049. style: $
  68050. });
  68051. $.stroke === "auto" && oe.setStyle({
  68052. stroke: a((R + ee / O) / _)
  68053. }), f.add(oe), C += w;
  68054. }
  68055. C -= w;
  68056. } else
  68057. C += T;
  68058. }
  68059. }, e.prototype._renderPointer = function(n, r, i, a, o, s, l, u, c) {
  68060. 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(), b = y.mapDimension("value"), _ = +n.get("min"), O = +n.get("max"), S = [_, O], x = [s, l];
  68061. function C(w, P) {
  68062. var $ = y.getItemModel(w), A = $.getModel("pointer"), D = _e(A.get("width"), o.r), E = _e(A.get("length"), o.r), R = n.get(["pointer", "icon"]), N = A.get("offsetCenter"), V = _e(N[0], o.r), B = _e(N[1], o.r), W = A.get("keepAspect"), F;
  68063. return R ? F = $n(R, V - D / 2, B - E, D, E, null, W) : F = new DVe({
  68064. shape: {
  68065. angle: -Math.PI / 2,
  68066. width: D,
  68067. r: E,
  68068. x: V,
  68069. y: B
  68070. }
  68071. }), F.rotation = -(P + Math.PI / 2), F.x = o.cx, F.y = o.cy, F;
  68072. }
  68073. function T(w, P) {
  68074. var $ = g.get("roundCap"), A = $ ? MO : ii, D = g.get("overlap"), E = D ? g.get("width") : c / y.count(), R = D ? o.r - E : o.r - (w + 1) * E, N = D ? o.r : o.r - w * E, V = new A({
  68075. shape: {
  68076. startAngle: s,
  68077. endAngle: P,
  68078. cx: o.cx,
  68079. cy: o.cy,
  68080. clockwise: u,
  68081. r0: R,
  68082. r: N
  68083. }
  68084. });
  68085. return D && (V.z2 = O - y.get(b, w) % O), V;
  68086. }
  68087. (m || v) && (y.diff(d).add(function(w) {
  68088. var P = y.get(b, w);
  68089. if (v) {
  68090. var $ = C(w, s);
  68091. Yt($, {
  68092. rotation: -((isNaN(+P) ? x[0] : Lt(P, S, x, !0)) + Math.PI / 2)
  68093. }, n), f.add($), y.setItemGraphicEl(w, $);
  68094. }
  68095. if (m) {
  68096. var A = T(w, s), D = g.get("clip");
  68097. Yt(A, {
  68098. shape: {
  68099. endAngle: Lt(P, S, x, D)
  68100. }
  68101. }, n), f.add(A), IA(n.seriesIndex, y.dataType, w, A), p[w] = A;
  68102. }
  68103. }).update(function(w, P) {
  68104. var $ = y.get(b, w);
  68105. if (v) {
  68106. var A = d.getItemGraphicEl(P), D = A ? A.rotation : s, E = C(w, D);
  68107. E.rotation = D, Ct(E, {
  68108. rotation: -((isNaN(+$) ? x[0] : Lt($, S, x, !0)) + Math.PI / 2)
  68109. }, n), f.add(E), y.setItemGraphicEl(w, E);
  68110. }
  68111. if (m) {
  68112. var R = h[P], N = R ? R.shape.endAngle : s, V = T(w, N), B = g.get("clip");
  68113. Ct(V, {
  68114. shape: {
  68115. endAngle: Lt($, S, x, B)
  68116. }
  68117. }, n), f.add(V), IA(n.seriesIndex, y.dataType, w, V), p[w] = V;
  68118. }
  68119. }).execute(), y.each(function(w) {
  68120. var P = y.getItemModel(w), $ = P.getModel("emphasis"), A = $.get("focus"), D = $.get("blurScope"), E = $.get("disabled");
  68121. if (v) {
  68122. var R = y.getItemGraphicEl(w), N = y.getItemVisual(w, "style"), V = N.fill;
  68123. if (R instanceof lr) {
  68124. var B = R.style;
  68125. R.useStyle(le({
  68126. image: B.image,
  68127. x: B.x,
  68128. y: B.y,
  68129. width: B.width,
  68130. height: B.height
  68131. }, N));
  68132. } else
  68133. R.useStyle(N), R.type !== "pointer" && R.setColor(V);
  68134. R.setStyle(P.getModel(["pointer", "itemStyle"]).getItemStyle()), R.style.fill === "auto" && R.setStyle("fill", a(Lt(y.get(b, w), S, [0, 1], !0))), R.z2EmphasisLift = 0, Tr(R, P), bn(R, A, D, E);
  68135. }
  68136. if (m) {
  68137. var W = p[w];
  68138. W.useStyle(y.getItemVisual(w, "style")), W.setStyle(P.getModel(["progress", "itemStyle"]).getItemStyle()), W.z2EmphasisLift = 0, Tr(W, P), bn(W, A, D, E);
  68139. }
  68140. }), this._progressEls = p);
  68141. }, e.prototype._renderAnchor = function(n, r) {
  68142. var i = n.getModel("anchor"), a = i.get("show");
  68143. if (a) {
  68144. var o = i.get("size"), s = i.get("icon"), l = i.get("offsetCenter"), u = i.get("keepAspect"), c = $n(s, r.cx - o / 2 + _e(l[0], r.r), r.cy - o / 2 + _e(l[1], r.r), o, o, null, u);
  68145. c.z2 = i.get("showAbove") ? 1 : 0, c.setStyle(i.getModel("itemStyle").getItemStyle()), this.group.add(c);
  68146. }
  68147. }, e.prototype._renderTitleAndDetail = function(n, r, i, a, o) {
  68148. var s = this, l = n.getData(), u = l.mapDimension("value"), c = +n.get("min"), f = +n.get("max"), d = new Ve(), h = [], p = [], v = n.isAnimationEnabled(), g = n.get(["pointer", "showAbove"]);
  68149. l.diff(this._data).add(function(m) {
  68150. h[m] = new gt({
  68151. silent: !0
  68152. }), p[m] = new gt({
  68153. silent: !0
  68154. });
  68155. }).update(function(m, y) {
  68156. h[m] = s._titleEls[y], p[m] = s._detailEls[y];
  68157. }).execute(), l.each(function(m) {
  68158. var y = l.getItemModel(m), b = l.get(u, m), _ = new Ve(), O = a(Lt(b, [c, f], [0, 1], !0)), S = y.getModel("title");
  68159. if (S.get("show")) {
  68160. var x = S.get("offsetCenter"), C = o.cx + _e(x[0], o.r), T = o.cy + _e(x[1], o.r), w = h[m];
  68161. w.attr({
  68162. z2: g ? 0 : 2,
  68163. style: Zt(S, {
  68164. x: C,
  68165. y: T,
  68166. text: l.getName(m),
  68167. align: "center",
  68168. verticalAlign: "middle"
  68169. }, {
  68170. inheritColor: O
  68171. })
  68172. }), _.add(w);
  68173. }
  68174. var P = y.getModel("detail");
  68175. if (P.get("show")) {
  68176. var $ = P.get("offsetCenter"), A = o.cx + _e($[0], o.r), D = o.cy + _e($[1], o.r), E = _e(P.get("width"), o.r), R = _e(P.get("height"), o.r), N = n.get(["progress", "show"]) ? l.getItemVisual(m, "style").fill : O, w = p[m], V = P.get("formatter");
  68177. w.attr({
  68178. z2: g ? 0 : 2,
  68179. style: Zt(P, {
  68180. x: A,
  68181. y: D,
  68182. text: Eb(b, V),
  68183. width: isNaN(E) ? null : E,
  68184. height: isNaN(R) ? null : R,
  68185. align: "center",
  68186. verticalAlign: "middle"
  68187. }, {
  68188. inheritColor: N
  68189. })
  68190. }), hJ(w, {
  68191. normal: P
  68192. }, b, function(W) {
  68193. return Eb(W, V);
  68194. }), v && pJ(w, m, l, n, {
  68195. getFormattedLabel: function(W, F, Q, Z, ne, ee) {
  68196. return Eb(ee ? ee.interpolatedValue : b, V);
  68197. }
  68198. }), _.add(w);
  68199. }
  68200. d.add(_);
  68201. }), this.group.add(d), this._titleEls = h, this._detailEls = p;
  68202. }, e.type = "gauge", e;
  68203. }(zt)
  68204. ), LVe = (
  68205. /** @class */
  68206. function(t) {
  68207. q(e, t);
  68208. function e() {
  68209. var n = t !== null && t.apply(this, arguments) || this;
  68210. return n.type = e.type, n.visualStyleAccessPath = "itemStyle", n;
  68211. }
  68212. return e.prototype.getInitialData = function(n, r) {
  68213. return Ip(this, ["value"]);
  68214. }, e.type = "series.gauge", e.defaultOption = {
  68215. // zlevel: 0,
  68216. z: 2,
  68217. colorBy: "data",
  68218. // 默认全局居中
  68219. center: ["50%", "50%"],
  68220. legendHoverLink: !0,
  68221. radius: "75%",
  68222. startAngle: 225,
  68223. endAngle: -45,
  68224. clockwise: !0,
  68225. // 最小值
  68226. min: 0,
  68227. // 最大值
  68228. max: 100,
  68229. // 分割段数,默认为10
  68230. splitNumber: 10,
  68231. // 坐标轴线
  68232. axisLine: {
  68233. // 默认显示,属性show控制显示与否
  68234. show: !0,
  68235. roundCap: !1,
  68236. lineStyle: {
  68237. color: [[1, "#E6EBF8"]],
  68238. width: 10
  68239. }
  68240. },
  68241. // 坐标轴线
  68242. progress: {
  68243. // 默认显示,属性show控制显示与否
  68244. show: !1,
  68245. overlap: !0,
  68246. width: 10,
  68247. roundCap: !1,
  68248. clip: !0
  68249. },
  68250. // 分隔线
  68251. splitLine: {
  68252. // 默认显示,属性show控制显示与否
  68253. show: !0,
  68254. // 属性length控制线长
  68255. length: 10,
  68256. distance: 10,
  68257. // 属性lineStyle(详见lineStyle)控制线条样式
  68258. lineStyle: {
  68259. color: "#63677A",
  68260. width: 3,
  68261. type: "solid"
  68262. }
  68263. },
  68264. // 坐标轴小标记
  68265. axisTick: {
  68266. // 属性show控制显示与否,默认不显示
  68267. show: !0,
  68268. // 每份split细分多少段
  68269. splitNumber: 5,
  68270. // 属性length控制线长
  68271. length: 6,
  68272. distance: 10,
  68273. // 属性lineStyle控制线条样式
  68274. lineStyle: {
  68275. color: "#63677A",
  68276. width: 1,
  68277. type: "solid"
  68278. }
  68279. },
  68280. axisLabel: {
  68281. show: !0,
  68282. distance: 15,
  68283. // formatter: null,
  68284. color: "#464646",
  68285. fontSize: 12,
  68286. rotate: 0
  68287. },
  68288. pointer: {
  68289. icon: null,
  68290. offsetCenter: [0, 0],
  68291. show: !0,
  68292. showAbove: !0,
  68293. length: "60%",
  68294. width: 6,
  68295. keepAspect: !1
  68296. },
  68297. anchor: {
  68298. show: !1,
  68299. showAbove: !1,
  68300. size: 6,
  68301. icon: "circle",
  68302. offsetCenter: [0, 0],
  68303. keepAspect: !1,
  68304. itemStyle: {
  68305. color: "#fff",
  68306. borderWidth: 0,
  68307. borderColor: "#5470c6"
  68308. }
  68309. },
  68310. title: {
  68311. show: !0,
  68312. // x, y,单位px
  68313. offsetCenter: [0, "20%"],
  68314. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  68315. color: "#464646",
  68316. fontSize: 16,
  68317. valueAnimation: !1
  68318. },
  68319. detail: {
  68320. show: !0,
  68321. backgroundColor: "rgba(0,0,0,0)",
  68322. borderWidth: 0,
  68323. borderColor: "#ccc",
  68324. width: 100,
  68325. height: null,
  68326. padding: [5, 10],
  68327. // x, y,单位px
  68328. offsetCenter: [0, "40%"],
  68329. // formatter: null,
  68330. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  68331. color: "#464646",
  68332. fontSize: 30,
  68333. fontWeight: "bold",
  68334. lineHeight: 30,
  68335. valueAnimation: !1
  68336. }
  68337. }, e;
  68338. }(Ht)
  68339. );
  68340. function NVe(t) {
  68341. t.registerChartView(kVe), t.registerSeriesModel(LVe);
  68342. }
  68343. var BVe = ["itemStyle", "opacity"], zVe = (
  68344. /** @class */
  68345. function(t) {
  68346. q(e, t);
  68347. function e(n, r) {
  68348. var i = t.call(this) || this, a = i, o = new oi(), s = new gt();
  68349. return a.setTextContent(s), i.setTextGuideLine(o), i.updateData(n, r, !0), i;
  68350. }
  68351. return e.prototype.updateData = function(n, r, i) {
  68352. var a = this, o = n.hostModel, s = n.getItemModel(r), l = n.getItemLayout(r), u = s.getModel("emphasis"), c = s.get(BVe);
  68353. c = c ?? 1, i || uo(a), a.useStyle(n.getItemVisual(r, "style")), a.style.lineJoin = "round", i ? (a.setShape({
  68354. points: l.points
  68355. }), a.style.opacity = 0, Yt(a, {
  68356. style: {
  68357. opacity: c
  68358. }
  68359. }, o, r)) : Ct(a, {
  68360. style: {
  68361. opacity: c
  68362. },
  68363. shape: {
  68364. points: l.points
  68365. }
  68366. }, o, r), Tr(a, s), this._updateLabel(n, r), bn(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
  68367. }, e.prototype._updateLabel = function(n, r) {
  68368. 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;
  68369. Pr(
  68370. // position will not be used in setLabelStyle
  68371. o,
  68372. er(l),
  68373. {
  68374. labelFetcher: n.hostModel,
  68375. labelDataIndex: r,
  68376. defaultOpacity: f.opacity,
  68377. defaultText: n.getName(r)
  68378. },
  68379. {
  68380. normal: {
  68381. align: c.textAlign,
  68382. verticalAlign: c.verticalAlign
  68383. }
  68384. }
  68385. ), i.setTextConfig({
  68386. local: !0,
  68387. inside: !!c.inside,
  68388. insideStroke: d,
  68389. // insideFill: 'auto',
  68390. outsideFill: d
  68391. });
  68392. var h = c.linePoints;
  68393. a.setShape({
  68394. points: h
  68395. }), i.textGuideLineConfig = {
  68396. anchor: h ? new Ke(h[0][0], h[0][1]) : null
  68397. }, Ct(o, {
  68398. style: {
  68399. x: c.x,
  68400. y: c.y
  68401. }
  68402. }, s, r), o.attr({
  68403. rotation: c.rotation,
  68404. originX: c.x,
  68405. originY: c.y,
  68406. z2: 10
  68407. }), Ek(i, Mk(l), {
  68408. // Default use item visual color
  68409. stroke: d
  68410. });
  68411. }, e;
  68412. }(ai)
  68413. ), VVe = (
  68414. /** @class */
  68415. function(t) {
  68416. q(e, t);
  68417. function e() {
  68418. var n = t !== null && t.apply(this, arguments) || this;
  68419. return n.type = e.type, n.ignoreLabelLineUpdate = !0, n;
  68420. }
  68421. return e.prototype.render = function(n, r, i) {
  68422. var a = n.getData(), o = this._data, s = this.group;
  68423. a.diff(o).add(function(l) {
  68424. var u = new zVe(a, l);
  68425. a.setItemGraphicEl(l, u), s.add(u);
  68426. }).update(function(l, u) {
  68427. var c = o.getItemGraphicEl(u);
  68428. c.updateData(a, l), s.add(c), a.setItemGraphicEl(l, c);
  68429. }).remove(function(l) {
  68430. var u = o.getItemGraphicEl(l);
  68431. $m(u, n, l);
  68432. }).execute(), this._data = a;
  68433. }, e.prototype.remove = function() {
  68434. this.group.removeAll(), this._data = null;
  68435. }, e.prototype.dispose = function() {
  68436. }, e.type = "funnel", e;
  68437. }(zt)
  68438. ), FVe = (
  68439. /** @class */
  68440. function(t) {
  68441. q(e, t);
  68442. function e() {
  68443. var n = t !== null && t.apply(this, arguments) || this;
  68444. return n.type = e.type, n;
  68445. }
  68446. return e.prototype.init = function(n) {
  68447. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new K0(xe(this.getData, this), xe(this.getRawData, this)), this._defaultLabelLine(n);
  68448. }, e.prototype.getInitialData = function(n, r) {
  68449. return Ip(this, {
  68450. coordDimensions: ["value"],
  68451. encodeDefaulter: Ue(rk, this)
  68452. });
  68453. }, e.prototype._defaultLabelLine = function(n) {
  68454. mf(n, "labelLine", ["show"]);
  68455. var r = n.labelLine, i = n.emphasis.labelLine;
  68456. r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
  68457. }, e.prototype.getDataParams = function(n) {
  68458. var r = this.getData(), i = t.prototype.getDataParams.call(this, n), a = r.mapDimension("value"), o = r.getSum(a);
  68459. return i.percent = o ? +(r.get(a, n) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i;
  68460. }, e.type = "series.funnel", e.defaultOption = {
  68461. // zlevel: 0, // 一级层叠
  68462. z: 2,
  68463. legendHoverLink: !0,
  68464. colorBy: "data",
  68465. left: 80,
  68466. top: 60,
  68467. right: 80,
  68468. bottom: 60,
  68469. // width: {totalWidth} - left - right,
  68470. // height: {totalHeight} - top - bottom,
  68471. // 默认取数据最小最大值
  68472. // min: 0,
  68473. // max: 100,
  68474. minSize: "0%",
  68475. maxSize: "100%",
  68476. sort: "descending",
  68477. orient: "vertical",
  68478. gap: 0,
  68479. funnelAlign: "center",
  68480. label: {
  68481. show: !0,
  68482. position: "outer"
  68483. // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
  68484. },
  68485. labelLine: {
  68486. show: !0,
  68487. length: 20,
  68488. lineStyle: {
  68489. // color: 各异,
  68490. width: 1
  68491. }
  68492. },
  68493. itemStyle: {
  68494. // color: 各异,
  68495. borderColor: "#fff",
  68496. borderWidth: 1
  68497. },
  68498. emphasis: {
  68499. label: {
  68500. show: !0
  68501. }
  68502. },
  68503. select: {
  68504. itemStyle: {
  68505. borderColor: "#212121"
  68506. }
  68507. }
  68508. }, e;
  68509. }(Ht)
  68510. );
  68511. function WVe(t, e) {
  68512. return Rn(t.getBoxLayoutParams(), {
  68513. width: e.getWidth(),
  68514. height: e.getHeight()
  68515. });
  68516. }
  68517. function QVe(t, e) {
  68518. for (var n = t.mapDimension("value"), r = t.mapArray(n, function(l) {
  68519. return l;
  68520. }), i = [], a = e === "ascending", o = 0, s = t.count(); o < s; o++)
  68521. i[o] = o;
  68522. return Me(e) ? i.sort(e) : e !== "none" && i.sort(function(l, u) {
  68523. return a ? r[l] - r[u] : r[u] - r[l];
  68524. }), i;
  68525. }
  68526. function HVe(t) {
  68527. var e = t.hostModel, n = e.get("orient");
  68528. t.each(function(r) {
  68529. 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;
  68530. if (c)
  68531. 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]];
  68532. else {
  68533. var v = void 0, g = void 0, m = void 0, y = void 0, b = s.get("length");
  68534. 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 - b, 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 + b, 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 - b, 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 + b, 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 - b, h = y - 5, f = "center") : (m = v + b, d = m + 5, f = "top")) : o === "rightBottom" ? (v = u[2][0], g = u[2][1], n === "horizontal" ? (y = g + b, h = y + 5, f = "center") : (m = v + b, d = m + 5, f = "bottom")) : o === "leftTop" ? (v = u[0][0], g = n === "horizontal" ? u[0][1] : u[1][1], n === "horizontal" ? (y = g - b, h = y - 5, f = "center") : (m = v - b, 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 + b, h = y + 5, f = "center") : (m = v - b, 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 + b, h = y + 5, f = "center") : (m = v + b, d = m + 5, f = "left")), n === "horizontal" ? (m = v, d = m) : (y = g, h = y), p = [[v, g], [m, y]];
  68535. }
  68536. l.label = {
  68537. linePoints: p,
  68538. x: d,
  68539. y: h,
  68540. verticalAlign: "middle",
  68541. textAlign: f,
  68542. inside: c
  68543. };
  68544. });
  68545. }
  68546. function GVe(t, e) {
  68547. t.eachSeriesByType("funnel", function(n) {
  68548. var r = n.getData(), i = r.mapDimension("value"), a = n.get("sort"), o = WVe(n, e), s = n.get("orient"), l = o.width, u = o.height, c = QVe(r, a), f = o.x, d = o.y, h = s === "horizontal" ? [_e(n.get("minSize"), u), _e(n.get("maxSize"), u)] : [_e(n.get("minSize"), l), _e(n.get("maxSize"), l)], p = r.getDataExtent(i), v = n.get("min"), g = n.get("max");
  68549. v == null && (v = Math.min(p[0], 0)), g == null && (g = p[1]);
  68550. var m = n.get("funnelAlign"), y = n.get("gap"), b = s === "horizontal" ? l : u, _ = (b - y * (r.count() - 1)) / r.count(), O = function(D, E) {
  68551. if (s === "horizontal") {
  68552. var R = r.get(i, D) || 0, N = Lt(R, [v, g], h, !0), V = void 0;
  68553. switch (m) {
  68554. case "top":
  68555. V = d;
  68556. break;
  68557. case "center":
  68558. V = d + (u - N) / 2;
  68559. break;
  68560. case "bottom":
  68561. V = d + (u - N);
  68562. break;
  68563. }
  68564. return [[E, V], [E, V + N]];
  68565. }
  68566. var B = r.get(i, D) || 0, W = Lt(B, [v, g], h, !0), F;
  68567. switch (m) {
  68568. case "left":
  68569. F = f;
  68570. break;
  68571. case "center":
  68572. F = f + (l - W) / 2;
  68573. break;
  68574. case "right":
  68575. F = f + l - W;
  68576. break;
  68577. }
  68578. return [[F, E], [F + W, E]];
  68579. };
  68580. a === "ascending" && (_ = -_, y = -y, s === "horizontal" ? f += l : d += u, c = c.reverse());
  68581. for (var S = 0; S < c.length; S++) {
  68582. var x = c[S], C = c[S + 1], T = r.getItemModel(x);
  68583. if (s === "horizontal") {
  68584. var w = T.get(["itemStyle", "width"]);
  68585. w == null ? w = _ : (w = _e(w, l), a === "ascending" && (w = -w));
  68586. var P = O(x, f), $ = O(C, f + w);
  68587. f += w + y, r.setItemLayout(x, {
  68588. points: P.concat($.slice().reverse())
  68589. });
  68590. } else {
  68591. var A = T.get(["itemStyle", "height"]);
  68592. A == null ? A = _ : (A = _e(A, u), a === "ascending" && (A = -A));
  68593. var P = O(x, d), $ = O(C, d + A);
  68594. d += A + y, r.setItemLayout(x, {
  68595. points: P.concat($.slice().reverse())
  68596. });
  68597. }
  68598. }
  68599. HVe(r);
  68600. });
  68601. }
  68602. function jVe(t) {
  68603. t.registerChartView(VVe), t.registerSeriesModel(FVe), t.registerLayout(GVe), t.registerProcessor(q0("funnel"));
  68604. }
  68605. var ZVe = 0.3, UVe = (
  68606. /** @class */
  68607. function(t) {
  68608. q(e, t);
  68609. function e() {
  68610. var n = t !== null && t.apply(this, arguments) || this;
  68611. return n.type = e.type, n._dataGroup = new Ve(), n._initialized = !1, n;
  68612. }
  68613. return e.prototype.init = function() {
  68614. this.group.add(this._dataGroup);
  68615. }, e.prototype.render = function(n, r, i, a) {
  68616. this._progressiveEls = null;
  68617. var o = this._dataGroup, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.dimensions, f = iW(n);
  68618. s.diff(l).add(d).update(h).remove(p).execute();
  68619. function d(g) {
  68620. var m = rW(s, o, g, c, u);
  68621. EP(m, s, g, f);
  68622. }
  68623. function h(g, m) {
  68624. var y = l.getItemGraphicEl(m), b = zne(s, g, c, u);
  68625. s.setItemGraphicEl(g, y), Ct(y, {
  68626. shape: {
  68627. points: b
  68628. }
  68629. }, n, g), uo(y), EP(y, s, g, f);
  68630. }
  68631. function p(g) {
  68632. var m = l.getItemGraphicEl(g);
  68633. o.remove(m);
  68634. }
  68635. if (!this._initialized) {
  68636. this._initialized = !0;
  68637. var v = XVe(u, n, function() {
  68638. setTimeout(function() {
  68639. o.removeClipPath();
  68640. });
  68641. });
  68642. o.setClipPath(v);
  68643. }
  68644. this._data = s;
  68645. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  68646. this._initialized = !0, this._data = null, this._dataGroup.removeAll();
  68647. }, e.prototype.incrementalRender = function(n, r, i) {
  68648. for (var a = r.getData(), o = r.coordinateSystem, s = o.dimensions, l = iW(r), u = this._progressiveEls = [], c = n.start; c < n.end; c++) {
  68649. var f = rW(a, this._dataGroup, c, s, o);
  68650. f.incremental = !0, EP(f, a, c, l), u.push(f);
  68651. }
  68652. }, e.prototype.remove = function() {
  68653. this._dataGroup && this._dataGroup.removeAll(), this._data = null;
  68654. }, e.type = "parallel", e;
  68655. }(zt)
  68656. );
  68657. function XVe(t, e, n) {
  68658. var r = t.model, i = t.getRect(), a = new mt({
  68659. shape: {
  68660. x: i.x,
  68661. y: i.y,
  68662. width: i.width,
  68663. height: i.height
  68664. }
  68665. }), o = r.get("layout") === "horizontal" ? "width" : "height";
  68666. return a.setShape(o, 0), Yt(a, {
  68667. shape: {
  68668. width: i.width,
  68669. height: i.height
  68670. }
  68671. }, e, n), a;
  68672. }
  68673. function zne(t, e, n, r) {
  68674. for (var i = [], a = 0; a < n.length; a++) {
  68675. var o = n[a], s = t.get(t.mapDimension(o), e);
  68676. YVe(s, r.getAxis(o).type) || i.push(r.dataToPoint(s, o));
  68677. }
  68678. return i;
  68679. }
  68680. function rW(t, e, n, r, i) {
  68681. var a = zne(t, n, r, i), o = new oi({
  68682. shape: {
  68683. points: a
  68684. },
  68685. // silent: true,
  68686. z2: 10
  68687. });
  68688. return e.add(o), t.setItemGraphicEl(n, o), o;
  68689. }
  68690. function iW(t) {
  68691. var e = t.get("smooth", !0);
  68692. return e === !0 && (e = ZVe), e = as(e), ou(e) && (e = 0), {
  68693. smooth: e
  68694. };
  68695. }
  68696. function EP(t, e, n, r) {
  68697. t.useStyle(e.getItemVisual(n, "style")), t.style.fill = null, t.setShape("smooth", r.smooth);
  68698. var i = e.getItemModel(n), a = i.getModel("emphasis");
  68699. Tr(t, i, "lineStyle"), bn(t, a.get("focus"), a.get("blurScope"), a.get("disabled"));
  68700. }
  68701. function YVe(t, e) {
  68702. return e === "category" ? t == null : t == null || isNaN(t);
  68703. }
  68704. var qVe = (
  68705. /** @class */
  68706. function(t) {
  68707. q(e, t);
  68708. function e() {
  68709. var n = t !== null && t.apply(this, arguments) || this;
  68710. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
  68711. }
  68712. return e.prototype.getInitialData = function(n, r) {
  68713. return cs(null, this, {
  68714. useEncodeDefaulter: xe(KVe, null, this)
  68715. });
  68716. }, e.prototype.getRawIndicesByActiveState = function(n) {
  68717. var r = this.coordinateSystem, i = this.getData(), a = [];
  68718. return r.eachActiveState(i, function(o, s) {
  68719. n === o && a.push(i.getRawIndex(s));
  68720. }), a;
  68721. }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
  68722. // zlevel: 0,
  68723. z: 2,
  68724. coordinateSystem: "parallel",
  68725. parallelIndex: 0,
  68726. label: {
  68727. show: !1
  68728. },
  68729. inactiveOpacity: 0.05,
  68730. activeOpacity: 1,
  68731. lineStyle: {
  68732. width: 1,
  68733. opacity: 0.45,
  68734. type: "solid"
  68735. },
  68736. emphasis: {
  68737. label: {
  68738. show: !1
  68739. }
  68740. },
  68741. progressive: 500,
  68742. smooth: !1,
  68743. animationEasing: "linear"
  68744. }, e;
  68745. }(Ht)
  68746. );
  68747. function KVe(t) {
  68748. var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
  68749. if (e) {
  68750. var n = {};
  68751. return k(e.dimensions, function(r) {
  68752. var i = JVe(r);
  68753. n[r] = i;
  68754. }), n;
  68755. }
  68756. }
  68757. function JVe(t) {
  68758. return +t.replace("dim", "");
  68759. }
  68760. var eFe = ["lineStyle", "opacity"], tFe = {
  68761. seriesType: "parallel",
  68762. reset: function(t, e) {
  68763. var n = t.coordinateSystem, r = {
  68764. normal: t.get(["lineStyle", "opacity"]),
  68765. active: t.get("activeOpacity"),
  68766. inactive: t.get("inactiveOpacity")
  68767. };
  68768. return {
  68769. progress: function(i, a) {
  68770. n.eachActiveState(a, function(o, s) {
  68771. var l = r[o];
  68772. if (o === "normal" && a.hasItemOption) {
  68773. var u = a.getItemModel(s).get(eFe, !0);
  68774. u != null && (l = u);
  68775. }
  68776. var c = a.ensureUniqueItemVisual(s, "style");
  68777. c.opacity = l;
  68778. }, i.start, i.end);
  68779. }
  68780. };
  68781. }
  68782. };
  68783. function nFe(t) {
  68784. rFe(t), iFe(t);
  68785. }
  68786. function rFe(t) {
  68787. if (!t.parallel) {
  68788. var e = !1;
  68789. k(t.series, function(n) {
  68790. n && n.type === "parallel" && (e = !0);
  68791. }), e && (t.parallel = [{}]);
  68792. }
  68793. }
  68794. function iFe(t) {
  68795. var e = Qt(t.parallelAxis);
  68796. k(e, function(n) {
  68797. if (Ie(n)) {
  68798. var r = n.parallelIndex || 0, i = Qt(t.parallel)[r];
  68799. i && i.parallelAxisDefault && qe(n, i.parallelAxisDefault, !1);
  68800. }
  68801. });
  68802. }
  68803. var aFe = 5, oFe = (
  68804. /** @class */
  68805. function(t) {
  68806. q(e, t);
  68807. function e() {
  68808. var n = t !== null && t.apply(this, arguments) || this;
  68809. return n.type = e.type, n;
  68810. }
  68811. return e.prototype.render = function(n, r, i) {
  68812. this._model = n, this._api = i, this._handlers || (this._handlers = {}, k(sFe, function(a, o) {
  68813. i.getZr().on(o, this._handlers[o] = xe(a, this));
  68814. }, this)), Pp(this, "_throttledDispatchExpand", n.get("axisExpandRate"), "fixRate");
  68815. }, e.prototype.dispose = function(n, r) {
  68816. Im(this, "_throttledDispatchExpand"), k(this._handlers, function(i, a) {
  68817. r.getZr().off(a, i);
  68818. }), this._handlers = null;
  68819. }, e.prototype._throttledDispatchExpand = function(n) {
  68820. this._dispatchExpand(n);
  68821. }, e.prototype._dispatchExpand = function(n) {
  68822. n && this._api.dispatchAction(le({
  68823. type: "parallelAxisExpand"
  68824. }, n));
  68825. }, e.type = "parallel", e;
  68826. }(Xt)
  68827. ), sFe = {
  68828. mousedown: function(t) {
  68829. MP(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY]);
  68830. },
  68831. mouseup: function(t) {
  68832. var e = this._mouseDownPoint;
  68833. if (MP(this, "click") && e) {
  68834. var n = [t.offsetX, t.offsetY], r = Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2);
  68835. if (r > aFe)
  68836. return;
  68837. var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
  68838. i.behavior !== "none" && this._dispatchExpand({
  68839. axisExpandWindow: i.axisExpandWindow
  68840. });
  68841. }
  68842. this._mouseDownPoint = null;
  68843. },
  68844. mousemove: function(t) {
  68845. if (!(this._mouseDownPoint || !MP(this, "mousemove"))) {
  68846. var e = this._model, n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]), r = n.behavior;
  68847. r === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(r === "none" ? null : {
  68848. axisExpandWindow: n.axisExpandWindow,
  68849. // Jumping uses animation, and sliding suppresses animation.
  68850. animation: r === "jump" ? null : {
  68851. duration: 0
  68852. // Disable animation.
  68853. }
  68854. });
  68855. }
  68856. }
  68857. };
  68858. function MP(t, e) {
  68859. var n = t._model;
  68860. return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e;
  68861. }
  68862. var lFe = (
  68863. /** @class */
  68864. function(t) {
  68865. q(e, t);
  68866. function e() {
  68867. var n = t !== null && t.apply(this, arguments) || this;
  68868. return n.type = e.type, n;
  68869. }
  68870. return e.prototype.init = function() {
  68871. t.prototype.init.apply(this, arguments), this.mergeOption({});
  68872. }, e.prototype.mergeOption = function(n) {
  68873. var r = this.option;
  68874. n && qe(r, n, !0), this._initDimensions();
  68875. }, e.prototype.contains = function(n, r) {
  68876. var i = n.get("parallelIndex");
  68877. return i != null && r.getComponent("parallel", i) === this;
  68878. }, e.prototype.setAxisExpand = function(n) {
  68879. k(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(r) {
  68880. n.hasOwnProperty(r) && (this.option[r] = n[r]);
  68881. }, this);
  68882. }, e.prototype._initDimensions = function() {
  68883. var n = this.dimensions = [], r = this.parallelAxisIndex = [], i = Nt(this.ecModel.queryComponents({
  68884. mainType: "parallelAxis"
  68885. }), function(a) {
  68886. return (a.get("parallelIndex") || 0) === this.componentIndex;
  68887. }, this);
  68888. k(i, function(a) {
  68889. n.push("dim" + a.get("dim")), r.push(a.componentIndex);
  68890. });
  68891. }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
  68892. // zlevel: 0,
  68893. z: 0,
  68894. left: 80,
  68895. top: 60,
  68896. right: 80,
  68897. bottom: 60,
  68898. // width: {totalWidth} - left - right,
  68899. // height: {totalHeight} - top - bottom,
  68900. layout: "horizontal",
  68901. // FIXME
  68902. // naming?
  68903. axisExpandable: !1,
  68904. axisExpandCenter: null,
  68905. axisExpandCount: 0,
  68906. axisExpandWidth: 50,
  68907. axisExpandRate: 17,
  68908. axisExpandDebounce: 50,
  68909. // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.
  68910. // Do not doc to user until necessary.
  68911. axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],
  68912. axisExpandTriggerOn: "click",
  68913. parallelAxisDefault: null
  68914. }, e;
  68915. }(rt)
  68916. ), uFe = (
  68917. /** @class */
  68918. function(t) {
  68919. q(e, t);
  68920. function e(n, r, i, a, o) {
  68921. var s = t.call(this, n, r, i) || this;
  68922. return s.type = a || "value", s.axisIndex = o, s;
  68923. }
  68924. return e.prototype.isHorizontal = function() {
  68925. return this.coordinateSystem.getModel().get("layout") !== "horizontal";
  68926. }, e;
  68927. }(Va)
  68928. );
  68929. function Hf(t, e, n, r, i, a) {
  68930. t = t || 0;
  68931. var o = n[1] - n[0];
  68932. if (i != null && (i = yd(i, [0, o])), a != null && (a = Math.max(a, i ?? 0)), r === "all") {
  68933. var s = Math.abs(e[1] - e[0]);
  68934. s = yd(s, [0, o]), i = a = yd(s, [i, a]), r = 0;
  68935. }
  68936. e[0] = yd(e[0], n), e[1] = yd(e[1], n);
  68937. var l = IP(e, r);
  68938. e[r] += t;
  68939. var u = i || 0, c = n.slice();
  68940. l.sign < 0 ? c[0] += u : c[1] -= u, e[r] = yd(e[r], c);
  68941. var f;
  68942. return f = IP(e, r), i != null && (f.sign !== l.sign || f.span < i) && (e[1 - r] = e[r] + l.sign * i), f = IP(e, r), a != null && f.span > a && (e[1 - r] = e[r] + f.sign * a), e;
  68943. }
  68944. function IP(t, e) {
  68945. var n = t[e] - t[1 - e];
  68946. return {
  68947. span: Math.abs(n),
  68948. sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
  68949. };
  68950. }
  68951. function yd(t, e) {
  68952. return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, t));
  68953. }
  68954. var DP = k, Vne = Math.min, Fne = Math.max, aW = Math.floor, cFe = Math.ceil, oW = mn, fFe = Math.PI, dFe = (
  68955. /** @class */
  68956. function() {
  68957. function t(e, n, r) {
  68958. this.type = "parallel", this._axesMap = Pe(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, n, r);
  68959. }
  68960. return t.prototype._init = function(e, n, r) {
  68961. var i = e.dimensions, a = e.parallelAxisIndex;
  68962. DP(i, function(o, s) {
  68963. var l = a[s], u = n.getComponent("parallelAxis", l), c = this._axesMap.set(o, new uFe(o, j0(u), [0, 0], u.get("type"), l)), f = c.type === "category";
  68964. c.onBand = f && u.get("boundaryGap"), c.inverse = u.get("inverse"), u.axis = c, c.model = u, c.coordinateSystem = u.coordinateSystem = this;
  68965. }, this);
  68966. }, t.prototype.update = function(e, n) {
  68967. this._updateAxesFromSeries(this._model, e);
  68968. }, t.prototype.containPoint = function(e) {
  68969. var n = this._makeLayoutInfo(), r = n.axisBase, i = n.layoutBase, a = n.pixelDimIndex, o = e[1 - a], s = e[a];
  68970. return o >= r && o <= r + n.axisLength && s >= i && s <= i + n.layoutLength;
  68971. }, t.prototype.getModel = function() {
  68972. return this._model;
  68973. }, t.prototype._updateAxesFromSeries = function(e, n) {
  68974. n.eachSeries(function(r) {
  68975. if (e.contains(r, n)) {
  68976. var i = r.getData();
  68977. DP(this.dimensions, function(a) {
  68978. var o = this._axesMap.get(a);
  68979. o.scale.unionExtentFromData(i, i.mapDimension(a)), Sf(o.scale, o.model);
  68980. }, this);
  68981. }
  68982. }, this);
  68983. }, t.prototype.resize = function(e, n) {
  68984. this._rect = Rn(e.getBoxLayoutParams(), {
  68985. width: n.getWidth(),
  68986. height: n.getHeight()
  68987. }), this._layoutAxes();
  68988. }, t.prototype.getRect = function() {
  68989. return this._rect;
  68990. }, t.prototype._makeLayoutInfo = function() {
  68991. 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 = Mb(e.get("axisExpandWidth"), l), f = Mb(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;
  68992. if (h)
  68993. p = Mb(h[1] - h[0], l), h[1] = h[0] + p;
  68994. else {
  68995. p = Mb(c * (f - 1), l);
  68996. var v = e.get("axisExpandCenter") || aW(u / 2);
  68997. h = [c * v - p / 2], h[1] = h[0] + p;
  68998. }
  68999. var g = (s - p) / (u - f);
  69000. g < 3 && (g = 0);
  69001. var m = [aW(oW(h[0] / c, 1)) + 1, cFe(oW(h[1] / c, 1)) - 1], y = g / c * h[0];
  69002. return {
  69003. layout: a,
  69004. pixelDimIndex: o,
  69005. layoutBase: n[r[o]],
  69006. layoutLength: s,
  69007. axisBase: n[r[1 - o]],
  69008. axisLength: n[i[1 - o]],
  69009. axisExpandable: d,
  69010. axisExpandWidth: c,
  69011. axisCollapseWidth: g,
  69012. axisExpandWindow: h,
  69013. axisCount: u,
  69014. winInnerIndices: m,
  69015. axisExpandWindow0Pos: y
  69016. };
  69017. }, t.prototype._layoutAxes = function() {
  69018. var e = this._rect, n = this._axesMap, r = this.dimensions, i = this._makeLayoutInfo(), a = i.layout;
  69019. n.each(function(o) {
  69020. var s = [0, i.axisLength], l = o.inverse ? 1 : 0;
  69021. o.setExtent(s[l], s[1 - l]);
  69022. }), DP(r, function(o, s) {
  69023. var l = (i.axisExpandable ? pFe : hFe)(s, i), u = {
  69024. horizontal: {
  69025. x: l.position,
  69026. y: i.axisLength
  69027. },
  69028. vertical: {
  69029. x: 0,
  69030. y: l.position
  69031. }
  69032. }, c = {
  69033. horizontal: fFe / 2,
  69034. vertical: 0
  69035. }, f = [u[a].x + e.x, u[a].y + e.y], d = c[a], h = wi();
  69036. Cu(h, h, d), so(h, h, f), this._axesLayout[o] = {
  69037. position: f,
  69038. rotation: d,
  69039. transform: h,
  69040. axisNameAvailableWidth: l.axisNameAvailableWidth,
  69041. axisLabelShow: l.axisLabelShow,
  69042. nameTruncateMaxWidth: l.nameTruncateMaxWidth,
  69043. tickDirection: 1,
  69044. labelDirection: 1
  69045. };
  69046. }, this);
  69047. }, t.prototype.getAxis = function(e) {
  69048. return this._axesMap.get(e);
  69049. }, t.prototype.dataToPoint = function(e, n) {
  69050. return this.axisCoordToPoint(this._axesMap.get(n).dataToCoord(e), n);
  69051. }, t.prototype.eachActiveState = function(e, n, r, i) {
  69052. r == null && (r = 0), i == null && (i = e.count());
  69053. var a = this._axesMap, o = this.dimensions, s = [], l = [];
  69054. k(o, function(g) {
  69055. s.push(e.mapDimension(g)), l.push(a.get(g).model);
  69056. });
  69057. for (var u = this.hasAxisBrushed(), c = r; c < i; c++) {
  69058. var f = void 0;
  69059. if (!u)
  69060. f = "normal";
  69061. else {
  69062. f = "active";
  69063. for (var d = e.getValues(s, c), h = 0, p = o.length; h < p; h++) {
  69064. var v = l[h].getActiveState(d[h]);
  69065. if (v === "inactive") {
  69066. f = "inactive";
  69067. break;
  69068. }
  69069. }
  69070. }
  69071. n(f, c);
  69072. }
  69073. }, t.prototype.hasAxisBrushed = function() {
  69074. for (var e = this.dimensions, n = this._axesMap, r = !1, i = 0, a = e.length; i < a; i++)
  69075. n.get(e[i]).model.getActiveState() !== "normal" && (r = !0);
  69076. return r;
  69077. }, t.prototype.axisCoordToPoint = function(e, n) {
  69078. var r = this._axesLayout[n];
  69079. return ro([e, 0], r.transform);
  69080. }, t.prototype.getAxisLayout = function(e) {
  69081. return Le(this._axesLayout[e]);
  69082. }, t.prototype.getSlidedAxisExpandWindow = function(e) {
  69083. var n = this._makeLayoutInfo(), r = n.pixelDimIndex, i = n.axisExpandWindow.slice(), a = i[1] - i[0], o = [0, n.axisExpandWidth * (n.axisCount - 1)];
  69084. if (!this.containPoint(e))
  69085. return {
  69086. behavior: "none",
  69087. axisExpandWindow: i
  69088. };
  69089. var s = e[r] - n.layoutBase - n.axisExpandWindow0Pos, l, u = "slide", c = n.axisCollapseWidth, f = this._model.get("axisExpandSlideTriggerArea"), d = f[0] != null;
  69090. if (c)
  69091. 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 ? Hf(l, i, o, "all") : u = "none";
  69092. else {
  69093. var h = i[1] - i[0], p = o[1] * s / h;
  69094. i = [Fne(0, p - h / 2)], i[1] = Vne(o[1], i[0] + h), i[0] = i[1] - h;
  69095. }
  69096. return {
  69097. axisExpandWindow: i,
  69098. behavior: u
  69099. };
  69100. }, t;
  69101. }()
  69102. );
  69103. function Mb(t, e) {
  69104. return Vne(Fne(t, e[0]), e[1]);
  69105. }
  69106. function hFe(t, e) {
  69107. var n = e.layoutLength / (e.axisCount - 1);
  69108. return {
  69109. position: n * t,
  69110. axisNameAvailableWidth: n,
  69111. axisLabelShow: !0
  69112. };
  69113. }
  69114. function pFe(t, e) {
  69115. var n = e.layoutLength, r = e.axisExpandWidth, i = e.axisCount, a = e.axisCollapseWidth, o = e.winInnerIndices, s, l = a, u = !1, c;
  69116. 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), {
  69117. position: s,
  69118. axisNameAvailableWidth: l,
  69119. axisLabelShow: u,
  69120. nameTruncateMaxWidth: c
  69121. };
  69122. }
  69123. function vFe(t, e) {
  69124. var n = [];
  69125. return t.eachComponent("parallel", function(r, i) {
  69126. var a = new dFe(r, t, e);
  69127. a.name = "parallel_" + i, a.resize(r, e), r.coordinateSystem = a, a.model = r, n.push(a);
  69128. }), t.eachSeries(function(r) {
  69129. if (r.get("coordinateSystem") === "parallel") {
  69130. var i = r.getReferringComponents("parallel", Dn).models[0];
  69131. r.coordinateSystem = i.coordinateSystem;
  69132. }
  69133. }), n;
  69134. }
  69135. var gFe = {
  69136. create: vFe
  69137. }, xE = (
  69138. /** @class */
  69139. function(t) {
  69140. q(e, t);
  69141. function e() {
  69142. var n = t !== null && t.apply(this, arguments) || this;
  69143. return n.type = e.type, n.activeIntervals = [], n;
  69144. }
  69145. return e.prototype.getAreaSelectStyle = function() {
  69146. return bf([
  69147. ["fill", "color"],
  69148. ["lineWidth", "borderWidth"],
  69149. ["stroke", "borderColor"],
  69150. ["width", "width"],
  69151. ["opacity", "opacity"]
  69152. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  69153. // So do not transfer decal directly.
  69154. ])(this.getModel("areaSelectStyle"));
  69155. }, e.prototype.setActiveIntervals = function(n) {
  69156. var r = this.activeIntervals = Le(n);
  69157. if (r)
  69158. for (var i = r.length - 1; i >= 0; i--)
  69159. Wi(r[i]);
  69160. }, e.prototype.getActiveState = function(n) {
  69161. var r = this.activeIntervals;
  69162. if (!r.length)
  69163. return "normal";
  69164. if (n == null || isNaN(+n))
  69165. return "inactive";
  69166. if (r.length === 1) {
  69167. var i = r[0];
  69168. if (i[0] <= n && n <= i[1])
  69169. return "active";
  69170. } else
  69171. for (var a = 0, o = r.length; a < o; a++)
  69172. if (r[a][0] <= n && n <= r[a][1])
  69173. return "active";
  69174. return "inactive";
  69175. }, e;
  69176. }(rt)
  69177. );
  69178. xn(xE, Mp);
  69179. var xf = !0, Hm = Math.min, Xh = Math.max, mFe = Math.pow, yFe = 1e4, bFe = 6, _Fe = 6, sW = "globalPan", OFe = {
  69180. w: [0, 0],
  69181. e: [0, 1],
  69182. n: [1, 0],
  69183. s: [1, 1]
  69184. }, SFe = {
  69185. w: "ew",
  69186. e: "ew",
  69187. n: "ns",
  69188. s: "ns",
  69189. ne: "nesw",
  69190. sw: "nesw",
  69191. nw: "nwse",
  69192. se: "nwse"
  69193. }, lW = {
  69194. brushStyle: {
  69195. lineWidth: 2,
  69196. stroke: "rgba(210,219,238,0.3)",
  69197. fill: "#D2DBEE"
  69198. },
  69199. transformable: !0,
  69200. brushMode: "single",
  69201. removeOnClick: !1
  69202. }, xFe = 0, eL = (
  69203. /** @class */
  69204. function(t) {
  69205. q(e, t);
  69206. function e(n) {
  69207. var r = t.call(this) || this;
  69208. return r._track = [], r._covers = [], r._handlers = {}, process.env.NODE_ENV !== "production" && ke(n), r._zr = n, r.group = new Ve(), r._uid = "brushController_" + xFe++, k(EFe, function(i, a) {
  69209. this._handlers[a] = xe(i, this);
  69210. }, r), r;
  69211. }
  69212. return e.prototype.enableBrush = function(n) {
  69213. return process.env.NODE_ENV !== "production" && ke(this._mounted), this._brushType && this._doDisableBrush(), n.brushType && this._doEnableBrush(n), this;
  69214. }, e.prototype._doEnableBrush = function(n) {
  69215. var r = this._zr;
  69216. this._enableGlobalPan || hBe(r, sW, this._uid), k(this._handlers, function(i, a) {
  69217. r.on(a, i);
  69218. }), this._brushType = n.brushType, this._brushOption = qe(Le(lW), n, !0);
  69219. }, e.prototype._doDisableBrush = function() {
  69220. var n = this._zr;
  69221. pBe(n, sW, this._uid), k(this._handlers, function(r, i) {
  69222. n.off(i, r);
  69223. }), this._brushType = this._brushOption = null;
  69224. }, e.prototype.setPanels = function(n) {
  69225. if (n && n.length) {
  69226. var r = this._panels = {};
  69227. k(n, function(i) {
  69228. r[i.panelId] = Le(i);
  69229. });
  69230. } else
  69231. this._panels = null;
  69232. return this;
  69233. }, e.prototype.mount = function(n) {
  69234. n = n || {}, process.env.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = n.enableGlobalPan;
  69235. var r = this.group;
  69236. return this._zr.add(r), r.attr({
  69237. x: n.x || 0,
  69238. y: n.y || 0,
  69239. rotation: n.rotation || 0,
  69240. scaleX: n.scaleX || 1,
  69241. scaleY: n.scaleY || 1
  69242. }), this._transform = r.getLocalTransform(), this;
  69243. }, e.prototype.updateCovers = function(n) {
  69244. process.env.NODE_ENV !== "production" && ke(this._mounted), n = ce(n, function(d) {
  69245. return qe(Le(lW), d, !0);
  69246. });
  69247. var r = "\0-brush-index-", i = this._covers, a = this._covers = [], o = this, s = this._creatingCover;
  69248. return new Xs(i, n, u, l).add(c).update(c).remove(f).execute(), this;
  69249. function l(d, h) {
  69250. return (d.id != null ? d.id : r + h) + "-" + d.brushType;
  69251. }
  69252. function u(d, h) {
  69253. return l(d.__brushOption, h);
  69254. }
  69255. function c(d, h) {
  69256. var p = n[d];
  69257. if (h != null && i[h] === s)
  69258. a[d] = i[h];
  69259. else {
  69260. var v = a[d] = h != null ? (i[h].__brushOption = p, i[h]) : Qne(o, Wne(o, p));
  69261. tL(o, v);
  69262. }
  69263. }
  69264. function f(d) {
  69265. i[d] !== s && o.group.remove(i[d]);
  69266. }
  69267. }, e.prototype.unmount = function() {
  69268. if (!(process.env.NODE_ENV !== "production" && !this._mounted))
  69269. return this.enableBrush(!1), wE(this), this._zr.remove(this.group), process.env.NODE_ENV !== "production" && (this._mounted = !1), this;
  69270. }, e.prototype.dispose = function() {
  69271. this.unmount(), this.off();
  69272. }, e;
  69273. }(La)
  69274. );
  69275. function Wne(t, e) {
  69276. var n = Sw[e.brushType].createCover(t, e);
  69277. return n.__brushOption = e, Gne(n, e), t.group.add(n), n;
  69278. }
  69279. function Qne(t, e) {
  69280. var n = nL(e);
  69281. return n.endCreating && (n.endCreating(t, e), Gne(e, e.__brushOption)), e;
  69282. }
  69283. function Hne(t, e) {
  69284. var n = e.__brushOption;
  69285. nL(e).updateCoverShape(t, e, n.range, n);
  69286. }
  69287. function Gne(t, e) {
  69288. var n = e.z;
  69289. n == null && (n = yFe), t.traverse(function(r) {
  69290. r.z = n, r.z2 = n;
  69291. });
  69292. }
  69293. function tL(t, e) {
  69294. nL(e).updateCommon(t, e), Hne(t, e);
  69295. }
  69296. function nL(t) {
  69297. return Sw[t.__brushOption.brushType];
  69298. }
  69299. function rL(t, e, n) {
  69300. var r = t._panels;
  69301. if (!r)
  69302. return xf;
  69303. var i, a = t._transform;
  69304. return k(r, function(o) {
  69305. o.isTargetByCursor(e, n, a) && (i = o);
  69306. }), i;
  69307. }
  69308. function jne(t, e) {
  69309. var n = t._panels;
  69310. if (!n)
  69311. return xf;
  69312. var r = e.__brushOption.panelId;
  69313. return r != null ? n[r] : xf;
  69314. }
  69315. function wE(t) {
  69316. var e = t._covers, n = e.length;
  69317. return k(e, function(r) {
  69318. t.group.remove(r);
  69319. }, t), e.length = 0, !!n;
  69320. }
  69321. function wf(t, e) {
  69322. var n = ce(t._covers, function(r) {
  69323. var i = r.__brushOption, a = Le(i.range);
  69324. return {
  69325. brushType: i.brushType,
  69326. panelId: i.panelId,
  69327. range: a
  69328. };
  69329. });
  69330. t.trigger("brush", {
  69331. areas: n,
  69332. isEnd: !!e.isEnd,
  69333. removeOnClick: !!e.removeOnClick
  69334. });
  69335. }
  69336. function wFe(t) {
  69337. var e = t._track;
  69338. if (!e.length)
  69339. return !1;
  69340. var n = e[e.length - 1], r = e[0], i = n[0] - r[0], a = n[1] - r[1], o = mFe(i * i + a * a, 0.5);
  69341. return o > bFe;
  69342. }
  69343. function Zne(t) {
  69344. var e = t.length - 1;
  69345. return e < 0 && (e = 0), [t[0], t[e]];
  69346. }
  69347. function Une(t, e, n, r) {
  69348. var i = new Ve();
  69349. return i.add(new mt({
  69350. name: "main",
  69351. style: iL(n),
  69352. silent: !0,
  69353. draggable: !0,
  69354. cursor: "move",
  69355. drift: Ue(uW, t, e, i, ["n", "s", "w", "e"]),
  69356. ondragend: Ue(wf, e, {
  69357. isEnd: !0
  69358. })
  69359. })), k(r, function(a) {
  69360. i.add(new mt({
  69361. name: a.join(""),
  69362. style: {
  69363. opacity: 0
  69364. },
  69365. draggable: !0,
  69366. silent: !0,
  69367. invisible: !0,
  69368. drift: Ue(uW, t, e, i, a),
  69369. ondragend: Ue(wf, e, {
  69370. isEnd: !0
  69371. })
  69372. }));
  69373. }), i;
  69374. }
  69375. function Xne(t, e, n, r) {
  69376. var i = r.brushStyle.lineWidth || 0, a = Xh(i, _Fe), 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;
  69377. bs(t, e, "main", o, s, p, v), r.transformable && (bs(t, e, "w", l, u, a, m), bs(t, e, "e", d, u, a, m), bs(t, e, "n", l, u, g, a), bs(t, e, "s", l, h, g, a), bs(t, e, "nw", l, u, a, a), bs(t, e, "ne", d, u, a, a), bs(t, e, "sw", l, h, a, a), bs(t, e, "se", d, h, a, a));
  69378. }
  69379. function CE(t, e) {
  69380. var n = e.__brushOption, r = n.transformable, i = e.childAt(0);
  69381. i.useStyle(iL(n)), i.attr({
  69382. silent: !r,
  69383. cursor: r ? "move" : "default"
  69384. }), k([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(a) {
  69385. var o = e.childOfName(a.join("")), s = a.length === 1 ? TE(t, a[0]) : TFe(t, a);
  69386. o && o.attr({
  69387. silent: !r,
  69388. invisible: !r,
  69389. cursor: r ? SFe[s] + "-resize" : null
  69390. });
  69391. });
  69392. }
  69393. function bs(t, e, n, r, i, a, o) {
  69394. var s = e.childOfName(n);
  69395. s && s.setShape($Fe(aL(t, e, [[r, i], [r + a, i + o]])));
  69396. }
  69397. function iL(t) {
  69398. return Re({
  69399. strokeNoScale: !0
  69400. }, t.brushStyle);
  69401. }
  69402. function Yne(t, e, n, r) {
  69403. var i = [Hm(t, n), Hm(e, r)], a = [Xh(t, n), Xh(e, r)];
  69404. return [
  69405. [i[0], a[0]],
  69406. [i[1], a[1]]
  69407. // y range
  69408. ];
  69409. }
  69410. function CFe(t) {
  69411. return ql(t.group);
  69412. }
  69413. function TE(t, e) {
  69414. var n = {
  69415. w: "left",
  69416. e: "right",
  69417. n: "top",
  69418. s: "bottom"
  69419. }, r = {
  69420. left: "w",
  69421. right: "e",
  69422. top: "n",
  69423. bottom: "s"
  69424. }, i = ew(n[e], CFe(t));
  69425. return r[i];
  69426. }
  69427. function TFe(t, e) {
  69428. var n = [TE(t, e[0]), TE(t, e[1])];
  69429. return (n[0] === "e" || n[0] === "w") && n.reverse(), n.join("");
  69430. }
  69431. function uW(t, e, n, r, i, a) {
  69432. var o = n.__brushOption, s = t.toRectRange(o.range), l = qne(e, i, a);
  69433. k(r, function(u) {
  69434. var c = OFe[u];
  69435. s[c[0]][c[1]] += l[c[0]];
  69436. }), o.range = t.fromRectRange(Yne(s[0][0], s[1][0], s[0][1], s[1][1])), tL(e, n), wf(e, {
  69437. isEnd: !1
  69438. });
  69439. }
  69440. function PFe(t, e, n, r) {
  69441. var i = e.__brushOption.range, a = qne(t, n, r);
  69442. k(i, function(o) {
  69443. o[0] += a[0], o[1] += a[1];
  69444. }), tL(t, e), wf(t, {
  69445. isEnd: !1
  69446. });
  69447. }
  69448. function qne(t, e, n) {
  69449. var r = t.group, i = r.transformCoordToLocal(e, n), a = r.transformCoordToLocal(0, 0);
  69450. return [i[0] - a[0], i[1] - a[1]];
  69451. }
  69452. function aL(t, e, n) {
  69453. var r = jne(t, e);
  69454. return r && r !== xf ? r.clipPath(n, t._transform) : Le(n);
  69455. }
  69456. function $Fe(t) {
  69457. var e = Hm(t[0][0], t[1][0]), n = Hm(t[0][1], t[1][1]), r = Xh(t[0][0], t[1][0]), i = Xh(t[0][1], t[1][1]);
  69458. return {
  69459. x: e,
  69460. y: n,
  69461. width: r - e,
  69462. height: i - n
  69463. };
  69464. }
  69465. function AFe(t, e, n) {
  69466. if (
  69467. // Check active
  69468. !(!t._brushType || MFe(t, e.offsetX, e.offsetY))
  69469. ) {
  69470. var r = t._zr, i = t._covers, a = rL(t, e, n);
  69471. if (!t._dragging)
  69472. for (var o = 0; o < i.length; o++) {
  69473. var s = i[o].__brushOption;
  69474. if (a && (a === xf || s.panelId === a.panelId) && Sw[s.brushType].contain(i[o], n[0], n[1]))
  69475. return;
  69476. }
  69477. a && r.setCursorStyle("crosshair");
  69478. }
  69479. }
  69480. function PE(t) {
  69481. var e = t.event;
  69482. e.preventDefault && e.preventDefault();
  69483. }
  69484. function $E(t, e, n) {
  69485. return t.childOfName("main").contain(e, n);
  69486. }
  69487. function Kne(t, e, n, r) {
  69488. var i = t._creatingCover, a = t._creatingPanel, o = t._brushOption, s;
  69489. if (t._track.push(n.slice()), wFe(t) || i) {
  69490. if (a && !i) {
  69491. o.brushMode === "single" && wE(t);
  69492. var l = Le(o);
  69493. l.brushType = cW(l.brushType, a), l.panelId = a === xf ? null : a.panelId, i = t._creatingCover = Wne(t, l), t._covers.push(i);
  69494. }
  69495. if (i) {
  69496. var u = Sw[cW(t._brushType, a)], c = i.__brushOption;
  69497. c.range = u.getCreatingRange(aL(t, i, t._track)), r && (Qne(t, i), u.updateCommon(t, i)), Hne(t, i), s = {
  69498. isEnd: r
  69499. };
  69500. }
  69501. } else r && o.brushMode === "single" && o.removeOnClick && rL(t, e, n) && wE(t) && (s = {
  69502. isEnd: r,
  69503. removeOnClick: !0
  69504. });
  69505. return s;
  69506. }
  69507. function cW(t, e) {
  69508. return t === "auto" ? (process.env.NODE_ENV !== "production" && ke(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : t;
  69509. }
  69510. var EFe = {
  69511. mousedown: function(t) {
  69512. if (this._dragging)
  69513. fW(this, t);
  69514. else if (!t.target || !t.target.draggable) {
  69515. PE(t);
  69516. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  69517. this._creatingCover = null;
  69518. var n = this._creatingPanel = rL(this, t, e);
  69519. n && (this._dragging = !0, this._track = [e.slice()]);
  69520. }
  69521. },
  69522. mousemove: function(t) {
  69523. var e = t.offsetX, n = t.offsetY, r = this.group.transformCoordToLocal(e, n);
  69524. if (AFe(this, t, r), this._dragging) {
  69525. PE(t);
  69526. var i = Kne(this, t, r, !1);
  69527. i && wf(this, i);
  69528. }
  69529. },
  69530. mouseup: function(t) {
  69531. fW(this, t);
  69532. }
  69533. };
  69534. function fW(t, e) {
  69535. if (t._dragging) {
  69536. PE(e);
  69537. var n = e.offsetX, r = e.offsetY, i = t.group.transformCoordToLocal(n, r), a = Kne(t, e, i, !0);
  69538. t._dragging = !1, t._track = [], t._creatingCover = null, a && wf(t, a);
  69539. }
  69540. }
  69541. function MFe(t, e, n) {
  69542. var r = t._zr;
  69543. return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
  69544. }
  69545. var Sw = {
  69546. lineX: dW(0),
  69547. lineY: dW(1),
  69548. rect: {
  69549. createCover: function(t, e) {
  69550. function n(r) {
  69551. return r;
  69552. }
  69553. return Une({
  69554. toRectRange: n,
  69555. fromRectRange: n
  69556. }, t, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]);
  69557. },
  69558. getCreatingRange: function(t) {
  69559. var e = Zne(t);
  69560. return Yne(e[1][0], e[1][1], e[0][0], e[0][1]);
  69561. },
  69562. updateCoverShape: function(t, e, n, r) {
  69563. Xne(t, e, n, r);
  69564. },
  69565. updateCommon: CE,
  69566. contain: $E
  69567. },
  69568. polygon: {
  69569. createCover: function(t, e) {
  69570. var n = new Ve();
  69571. return n.add(new oi({
  69572. name: "main",
  69573. style: iL(e),
  69574. silent: !0
  69575. })), n;
  69576. },
  69577. getCreatingRange: function(t) {
  69578. return t;
  69579. },
  69580. endCreating: function(t, e) {
  69581. e.remove(e.childAt(0)), e.add(new ai({
  69582. name: "main",
  69583. draggable: !0,
  69584. drift: Ue(PFe, t, e),
  69585. ondragend: Ue(wf, t, {
  69586. isEnd: !0
  69587. })
  69588. }));
  69589. },
  69590. updateCoverShape: function(t, e, n, r) {
  69591. e.childAt(0).setShape({
  69592. points: aL(t, e, n)
  69593. });
  69594. },
  69595. updateCommon: CE,
  69596. contain: $E
  69597. }
  69598. };
  69599. function dW(t) {
  69600. return {
  69601. createCover: function(e, n) {
  69602. return Une({
  69603. toRectRange: function(r) {
  69604. var i = [r, [0, 100]];
  69605. return t && i.reverse(), i;
  69606. },
  69607. fromRectRange: function(r) {
  69608. return r[t];
  69609. }
  69610. }, e, n, [[["w"], ["e"]], [["n"], ["s"]]][t]);
  69611. },
  69612. getCreatingRange: function(e) {
  69613. var n = Zne(e), r = Hm(n[0][t], n[1][t]), i = Xh(n[0][t], n[1][t]);
  69614. return [r, i];
  69615. },
  69616. updateCoverShape: function(e, n, r, i) {
  69617. var a, o = jne(e, n);
  69618. if (o !== xf && o.getLinearBrushOtherExtent)
  69619. a = o.getLinearBrushOtherExtent(t);
  69620. else {
  69621. var s = e._zr;
  69622. a = [0, [s.getWidth(), s.getHeight()][1 - t]];
  69623. }
  69624. var l = [r, a];
  69625. t && l.reverse(), Xne(e, n, l, i);
  69626. },
  69627. updateCommon: CE,
  69628. contain: $E
  69629. };
  69630. }
  69631. function Jne(t) {
  69632. return t = oL(t), function(e) {
  69633. return GR(e, t);
  69634. };
  69635. }
  69636. function ere(t, e) {
  69637. return t = oL(t), function(n) {
  69638. var r = e ?? n, i = r ? t.width : t.height, a = r ? t.x : t.y;
  69639. return [a, a + (i || 0)];
  69640. };
  69641. }
  69642. function tre(t, e, n) {
  69643. var r = oL(t);
  69644. return function(i, a) {
  69645. return r.contain(a[0], a[1]) && !yw(i, e, n);
  69646. };
  69647. }
  69648. function oL(t) {
  69649. return Je.create(t);
  69650. }
  69651. var IFe = ["axisLine", "axisTickLabel", "axisName"], DFe = (
  69652. /** @class */
  69653. function(t) {
  69654. q(e, t);
  69655. function e() {
  69656. var n = t !== null && t.apply(this, arguments) || this;
  69657. return n.type = e.type, n;
  69658. }
  69659. return e.prototype.init = function(n, r) {
  69660. t.prototype.init.apply(this, arguments), (this._brushController = new eL(r.getZr())).on("brush", xe(this._onBrush, this));
  69661. }, e.prototype.render = function(n, r, i, a) {
  69662. if (!RFe(n, r, a)) {
  69663. this.axisModel = n, this.api = i, this.group.removeAll();
  69664. var o = this._axisGroup;
  69665. if (this._axisGroup = new Ve(), this.group.add(this._axisGroup), !!n.get("show")) {
  69666. var s = LFe(n, r), l = s.coordinateSystem, u = n.getAreaSelectStyle(), c = u.width, f = n.axis.dim, d = l.getAxisLayout(f), h = le({
  69667. strokeContainThreshold: c
  69668. }, d), p = new Jr(n, h);
  69669. k(IFe, p.add, p), this._axisGroup.add(p.getGroup()), this._refreshBrushController(h, u, n, s, c, i), Q0(o, this._axisGroup, n);
  69670. }
  69671. }
  69672. }, e.prototype._refreshBrushController = function(n, r, i, a, o, s) {
  69673. var l = i.axis.getExtent(), u = l[1] - l[0], c = Math.min(30, Math.abs(u) * 0.1), f = Je.create({
  69674. x: l[0],
  69675. y: -o / 2,
  69676. width: u,
  69677. height: o
  69678. });
  69679. f.x -= c, f.width += 2 * c, this._brushController.mount({
  69680. enableGlobalPan: !0,
  69681. rotation: n.rotation,
  69682. x: n.position[0],
  69683. y: n.position[1]
  69684. }).setPanels([{
  69685. panelId: "pl",
  69686. clipPath: Jne(f),
  69687. isTargetByCursor: tre(f, s, a),
  69688. getLinearBrushOtherExtent: ere(f, 0)
  69689. }]).enableBrush({
  69690. brushType: "lineX",
  69691. brushStyle: r,
  69692. removeOnClick: !0
  69693. }).updateCovers(kFe(i));
  69694. }, e.prototype._onBrush = function(n) {
  69695. var r = n.areas, i = this.axisModel, a = i.axis, o = ce(r, function(s) {
  69696. return [a.coordToData(s.range[0], !0), a.coordToData(s.range[1], !0)];
  69697. });
  69698. (!i.option.realtime === n.isEnd || n.removeOnClick) && this.api.dispatchAction({
  69699. type: "axisAreaSelect",
  69700. parallelAxisId: i.id,
  69701. intervals: o
  69702. });
  69703. }, e.prototype.dispose = function() {
  69704. this._brushController.dispose();
  69705. }, e.type = "parallelAxis", e;
  69706. }(Xt)
  69707. );
  69708. function RFe(t, e, n) {
  69709. return n && n.type === "axisAreaSelect" && e.findComponents({
  69710. mainType: "parallelAxis",
  69711. query: n
  69712. })[0] === t;
  69713. }
  69714. function kFe(t) {
  69715. var e = t.axis;
  69716. return ce(t.activeIntervals, function(n) {
  69717. return {
  69718. brushType: "lineX",
  69719. panelId: "pl",
  69720. range: [e.dataToCoord(n[0], !0), e.dataToCoord(n[1], !0)]
  69721. };
  69722. });
  69723. }
  69724. function LFe(t, e) {
  69725. return e.getComponent("parallel", t.get("parallelIndex"));
  69726. }
  69727. var NFe = {
  69728. type: "axisAreaSelect",
  69729. event: "axisAreaSelected"
  69730. // update: 'updateVisual'
  69731. };
  69732. function BFe(t) {
  69733. t.registerAction(NFe, function(e, n) {
  69734. n.eachComponent({
  69735. mainType: "parallelAxis",
  69736. query: e
  69737. }, function(r) {
  69738. r.axis.model.setActiveIntervals(e.intervals);
  69739. });
  69740. }), t.registerAction("parallelAxisExpand", function(e, n) {
  69741. n.eachComponent({
  69742. mainType: "parallel",
  69743. query: e
  69744. }, function(r) {
  69745. r.setAxisExpand(e);
  69746. });
  69747. });
  69748. }
  69749. var zFe = {
  69750. type: "value",
  69751. areaSelectStyle: {
  69752. width: 20,
  69753. borderWidth: 1,
  69754. borderColor: "rgba(160,197,232)",
  69755. color: "rgba(160,197,232)",
  69756. opacity: 0.3
  69757. },
  69758. realtime: !0,
  69759. z: 10
  69760. };
  69761. function nre(t) {
  69762. t.registerComponentView(oFe), t.registerComponentModel(lFe), t.registerCoordinateSystem("parallel", gFe), t.registerPreprocessor(nFe), t.registerComponentModel(xE), t.registerComponentView(DFe), Uh(t, "parallel", xE, zFe), BFe(t);
  69763. }
  69764. function VFe(t) {
  69765. at(nre), t.registerChartView(UVe), t.registerSeriesModel(qVe), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, tFe);
  69766. }
  69767. var FFe = (
  69768. /** @class */
  69769. /* @__PURE__ */ function() {
  69770. function t() {
  69771. 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;
  69772. }
  69773. return t;
  69774. }()
  69775. ), WFe = (
  69776. /** @class */
  69777. function(t) {
  69778. q(e, t);
  69779. function e(n) {
  69780. return t.call(this, n) || this;
  69781. }
  69782. return e.prototype.getDefaultShape = function() {
  69783. return new FFe();
  69784. }, e.prototype.buildPath = function(n, r) {
  69785. var i = r.extent;
  69786. 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();
  69787. }, e.prototype.highlight = function() {
  69788. Zs(this);
  69789. }, e.prototype.downplay = function() {
  69790. Us(this);
  69791. }, e;
  69792. }(ot)
  69793. ), QFe = (
  69794. /** @class */
  69795. function(t) {
  69796. q(e, t);
  69797. function e() {
  69798. var n = t !== null && t.apply(this, arguments) || this;
  69799. return n.type = e.type, n._focusAdjacencyDisabled = !1, n;
  69800. }
  69801. return e.prototype.render = function(n, r, i) {
  69802. 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");
  69803. this._model = n, s.removeAll(), s.x = l.x, s.y = l.y, o.eachEdge(function(p) {
  69804. var v = new WFe(), g = Fe(v);
  69805. g.dataIndex = p.dataIndex, g.seriesIndex = n.seriesIndex, g.dataType = "edge";
  69806. var m = p.getModel(), y = m.getModel("lineStyle"), b = y.get("curveness"), _ = p.node1.getLayout(), O = p.node1.getModel(), S = O.get("localX"), x = O.get("localY"), C = p.node2.getLayout(), T = p.node2.getModel(), w = T.get("localX"), P = T.get("localY"), $ = p.getLayout(), A, D, E, R, N, V, B, W;
  69807. v.shape.extent = Math.max(1, $.dy), v.shape.orient = h, h === "vertical" ? (A = (S != null ? S * u : _.x) + $.sy, D = (x != null ? x * c : _.y) + _.dy, E = (w != null ? w * u : C.x) + $.ty, R = P != null ? P * c : C.y, N = A, V = D * (1 - b) + R * b, B = E, W = D * b + R * (1 - b)) : (A = (S != null ? S * u : _.x) + _.dx, D = (x != null ? x * c : _.y) + $.sy, E = w != null ? w * u : C.x, R = (P != null ? P * c : C.y) + $.ty, N = A * (1 - b) + E * b, V = D, B = A * b + E * (1 - b), W = R), v.setShape({
  69808. x1: A,
  69809. y1: D,
  69810. x2: E,
  69811. y2: R,
  69812. cpx1: N,
  69813. cpy1: V,
  69814. cpx2: B,
  69815. cpy2: W
  69816. }), v.useStyle(y.getItemStyle()), hW(v.style, h, p);
  69817. var F = "" + m.get("value"), Q = er(m, "edgeLabel");
  69818. Pr(v, Q, {
  69819. labelFetcher: {
  69820. getFormattedLabel: function(ee, oe, K, ie, X, H) {
  69821. return n.getFormattedLabel(
  69822. ee,
  69823. oe,
  69824. "edge",
  69825. ie,
  69826. // ensure edgeLabel formatter is provided
  69827. // to prevent the inheritance from `label.formatter` of the series
  69828. Ui(X, Q.normal && Q.normal.get("formatter"), F),
  69829. H
  69830. );
  69831. }
  69832. },
  69833. labelDataIndex: p.dataIndex,
  69834. defaultText: F
  69835. }), v.setTextConfig({
  69836. position: "inside"
  69837. });
  69838. var Z = m.getModel("emphasis");
  69839. Tr(v, m, "lineStyle", function(ee) {
  69840. var oe = ee.getItemStyle();
  69841. return hW(oe, h, p), oe;
  69842. }), s.add(v), d.setItemGraphicEl(p.dataIndex, v);
  69843. var ne = Z.get("focus");
  69844. bn(v, ne === "adjacency" ? p.getAdjacentDataIndices() : ne === "trajectory" ? p.getTrajectoryDataIndices() : ne, Z.get("blurScope"), Z.get("disabled"));
  69845. }), o.eachNode(function(p) {
  69846. var v = p.getLayout(), g = p.getModel(), m = g.get("localX"), y = g.get("localY"), b = g.getModel("emphasis"), _ = g.get(["itemStyle", "borderRadius"]) || 0, O = new mt({
  69847. shape: {
  69848. x: m != null ? m * u : v.x,
  69849. y: y != null ? y * c : v.y,
  69850. width: v.dx,
  69851. height: v.dy,
  69852. r: _
  69853. },
  69854. style: g.getModel("itemStyle").getItemStyle(),
  69855. z2: 10
  69856. });
  69857. Pr(O, er(g), {
  69858. labelFetcher: {
  69859. getFormattedLabel: function(x, C) {
  69860. return n.getFormattedLabel(x, C, "node");
  69861. }
  69862. },
  69863. labelDataIndex: p.dataIndex,
  69864. defaultText: p.id
  69865. }), O.disableLabelAnimation = !0, O.setStyle("fill", p.getVisual("color")), O.setStyle("decal", p.getVisual("style").decal), Tr(O, g), s.add(O), f.setItemGraphicEl(p.dataIndex, O), Fe(O).dataType = "node";
  69866. var S = b.get("focus");
  69867. bn(O, S === "adjacency" ? p.getAdjacentDataIndices() : S === "trajectory" ? p.getTrajectoryDataIndices() : S, b.get("blurScope"), b.get("disabled"));
  69868. }), f.eachItemGraphicEl(function(p, v) {
  69869. var g = f.getItemModel(v);
  69870. g.get("draggable") && (p.drift = function(m, y) {
  69871. a._focusAdjacencyDisabled = !0, this.shape.x += m, this.shape.y += y, this.dirty(), i.dispatchAction({
  69872. type: "dragNode",
  69873. seriesId: n.id,
  69874. dataIndex: f.getRawIndex(v),
  69875. localX: this.shape.x / u,
  69876. localY: this.shape.y / c
  69877. });
  69878. }, p.ondragend = function() {
  69879. a._focusAdjacencyDisabled = !1;
  69880. }, p.draggable = !0, p.cursor = "move");
  69881. }), !this._data && n.isAnimationEnabled() && s.setClipPath(HFe(s.getBoundingRect(), n, function() {
  69882. s.removeClipPath();
  69883. })), this._data = n.getData();
  69884. }, e.prototype.dispose = function() {
  69885. }, e.type = "sankey", e;
  69886. }(zt)
  69887. );
  69888. function hW(t, e, n) {
  69889. switch (t.fill) {
  69890. case "source":
  69891. t.fill = n.node1.getVisual("color"), t.decal = n.node1.getVisual("style").decal;
  69892. break;
  69893. case "target":
  69894. t.fill = n.node2.getVisual("color"), t.decal = n.node2.getVisual("style").decal;
  69895. break;
  69896. case "gradient":
  69897. var r = n.node1.getVisual("color"), i = n.node2.getVisual("color");
  69898. Oe(r) && Oe(i) && (t.fill = new yp(0, 0, +(e === "horizontal"), +(e === "vertical"), [{
  69899. color: r,
  69900. offset: 0
  69901. }, {
  69902. color: i,
  69903. offset: 1
  69904. }]));
  69905. }
  69906. }
  69907. function HFe(t, e, n) {
  69908. var r = new mt({
  69909. shape: {
  69910. x: t.x - 10,
  69911. y: t.y - 10,
  69912. width: 0,
  69913. height: t.height + 20
  69914. }
  69915. });
  69916. return Yt(r, {
  69917. shape: {
  69918. width: t.width + 20
  69919. }
  69920. }, e, n), r;
  69921. }
  69922. var GFe = (
  69923. /** @class */
  69924. function(t) {
  69925. q(e, t);
  69926. function e() {
  69927. var n = t !== null && t.apply(this, arguments) || this;
  69928. return n.type = e.type, n;
  69929. }
  69930. return e.prototype.getInitialData = function(n, r) {
  69931. var i = n.edges || n.links, a = n.data || n.nodes, o = n.levels;
  69932. this.levelModels = [];
  69933. for (var s = this.levelModels, l = 0; l < o.length; l++)
  69934. if (o[l].depth != null && o[l].depth >= 0)
  69935. s[o[l].depth] = new Wt(o[l], this, r);
  69936. else if (process.env.NODE_ENV !== "production")
  69937. throw new Error("levels[i].depth is mandatory and should be natural number");
  69938. if (a && i) {
  69939. var u = Bne(a, i, this, !0, c);
  69940. return u.data;
  69941. }
  69942. function c(f, d) {
  69943. f.wrapMethod("getItemModel", function(h, p) {
  69944. var v = h.parentModel, g = v.getData().getItemLayout(p);
  69945. if (g) {
  69946. var m = g.depth, y = v.levelModels[m];
  69947. y && (h.parentModel = y);
  69948. }
  69949. return h;
  69950. }), d.wrapMethod("getItemModel", function(h, p) {
  69951. var v = h.parentModel, g = v.getGraph().getEdgeByIndex(p), m = g.node1.getLayout();
  69952. if (m) {
  69953. var y = m.depth, b = v.levelModels[y];
  69954. b && (h.parentModel = b);
  69955. }
  69956. return h;
  69957. });
  69958. }
  69959. }, e.prototype.setNodePosition = function(n, r) {
  69960. var i = this.option.data || this.option.nodes, a = i[n];
  69961. a.localX = r[0], a.localY = r[1];
  69962. }, e.prototype.getGraph = function() {
  69963. return this.getData().graph;
  69964. }, e.prototype.getEdgeData = function() {
  69965. return this.getGraph().edgeData;
  69966. }, e.prototype.formatTooltip = function(n, r, i) {
  69967. function a(h) {
  69968. return isNaN(h) || h == null;
  69969. }
  69970. if (i === "edge") {
  69971. var o = this.getDataParams(n, i), s = o.data, l = o.value, u = s.source + " -- " + s.target;
  69972. return tr("nameValue", {
  69973. name: u,
  69974. value: l,
  69975. noValue: a(l)
  69976. });
  69977. } else {
  69978. var c = this.getGraph().getNodeByIndex(n), f = c.getLayout().value, d = this.getDataParams(n, i).data.name;
  69979. return tr("nameValue", {
  69980. name: d != null ? d + "" : null,
  69981. value: f,
  69982. noValue: a(f)
  69983. });
  69984. }
  69985. }, e.prototype.optionUpdated = function() {
  69986. }, e.prototype.getDataParams = function(n, r) {
  69987. var i = t.prototype.getDataParams.call(this, n, r);
  69988. if (i.value == null && r === "node") {
  69989. var a = this.getGraph().getNodeByIndex(n), o = a.getLayout().value;
  69990. i.value = o;
  69991. }
  69992. return i;
  69993. }, e.type = "series.sankey", e.defaultOption = {
  69994. // zlevel: 0,
  69995. z: 2,
  69996. coordinateSystem: "view",
  69997. left: "5%",
  69998. top: "5%",
  69999. right: "20%",
  70000. bottom: "5%",
  70001. orient: "horizontal",
  70002. nodeWidth: 20,
  70003. nodeGap: 8,
  70004. draggable: !0,
  70005. layoutIterations: 32,
  70006. label: {
  70007. show: !0,
  70008. position: "right",
  70009. fontSize: 12
  70010. },
  70011. edgeLabel: {
  70012. show: !1,
  70013. fontSize: 12
  70014. },
  70015. levels: [],
  70016. nodeAlign: "justify",
  70017. lineStyle: {
  70018. color: "#314656",
  70019. opacity: 0.2,
  70020. curveness: 0.5
  70021. },
  70022. emphasis: {
  70023. label: {
  70024. show: !0
  70025. },
  70026. lineStyle: {
  70027. opacity: 0.5
  70028. }
  70029. },
  70030. select: {
  70031. itemStyle: {
  70032. borderColor: "#212121"
  70033. }
  70034. },
  70035. animationEasing: "linear",
  70036. animationDuration: 1e3
  70037. }, e;
  70038. }(Ht)
  70039. );
  70040. function jFe(t, e) {
  70041. t.eachSeriesByType("sankey", function(n) {
  70042. var r = n.get("nodeWidth"), i = n.get("nodeGap"), a = ZFe(n, e);
  70043. n.layoutInfo = a;
  70044. var o = a.width, s = a.height, l = n.getGraph(), u = l.nodes, c = l.edges;
  70045. XFe(u);
  70046. var f = Nt(u, function(v) {
  70047. return v.getLayout().value === 0;
  70048. }), d = f.length !== 0 ? 0 : n.get("layoutIterations"), h = n.get("orient"), p = n.get("nodeAlign");
  70049. UFe(u, c, r, i, o, s, d, h, p);
  70050. });
  70051. }
  70052. function ZFe(t, e) {
  70053. return Rn(t.getBoxLayoutParams(), {
  70054. width: e.getWidth(),
  70055. height: e.getHeight()
  70056. });
  70057. }
  70058. function UFe(t, e, n, r, i, a, o, s, l) {
  70059. YFe(t, e, n, i, a, s, l), eWe(t, e, a, i, r, o, s), uWe(t, s);
  70060. }
  70061. function XFe(t) {
  70062. k(t, function(e) {
  70063. var n = Jl(e.outEdges, NO), r = Jl(e.inEdges, NO), i = e.getValue() || 0, a = Math.max(n, r, i);
  70064. e.setLayout({
  70065. value: a
  70066. }, !0);
  70067. });
  70068. }
  70069. function YFe(t, e, n, r, i, a, o) {
  70070. for (var s = [], l = [], u = [], c = [], f = 0, d = 0; d < e.length; d++)
  70071. s[d] = 1;
  70072. for (var d = 0; d < t.length; d++)
  70073. l[d] = t[d].inEdges.length, l[d] === 0 && u.push(t[d]);
  70074. for (var h = -1; u.length; ) {
  70075. for (var p = 0; p < u.length; p++) {
  70076. var v = u[p], g = v.hostGraph.data.getRawDataItem(v.dataIndex), m = g.depth != null && g.depth >= 0;
  70077. m && g.depth > h && (h = g.depth), v.setLayout({
  70078. depth: m ? g.depth : f
  70079. }, !0), a === "vertical" ? v.setLayout({
  70080. dy: n
  70081. }, !0) : v.setLayout({
  70082. dx: n
  70083. }, !0);
  70084. for (var y = 0; y < v.outEdges.length; y++) {
  70085. var b = v.outEdges[y], _ = e.indexOf(b);
  70086. s[_] = 0;
  70087. var O = b.node2, S = t.indexOf(O);
  70088. --l[S] === 0 && c.indexOf(O) < 0 && c.push(O);
  70089. }
  70090. }
  70091. ++f, u = c, c = [];
  70092. }
  70093. for (var d = 0; d < s.length; d++)
  70094. if (s[d] === 1)
  70095. throw new Error("Sankey is a DAG, the original data has cycle!");
  70096. var x = h > f - 1 ? h : f - 1;
  70097. o && o !== "left" && qFe(t, o, a, x);
  70098. var C = a === "vertical" ? (i - n) / x : (r - n) / x;
  70099. JFe(t, C, a);
  70100. }
  70101. function rre(t) {
  70102. var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
  70103. return e.depth != null && e.depth >= 0;
  70104. }
  70105. function qFe(t, e, n, r) {
  70106. if (e === "right") {
  70107. for (var i = [], a = t, o = 0; a.length; ) {
  70108. for (var s = 0; s < a.length; s++) {
  70109. var l = a[s];
  70110. l.setLayout({
  70111. skNodeHeight: o
  70112. }, !0);
  70113. for (var u = 0; u < l.inEdges.length; u++) {
  70114. var c = l.inEdges[u];
  70115. i.indexOf(c.node1) < 0 && i.push(c.node1);
  70116. }
  70117. }
  70118. a = i, i = [], ++o;
  70119. }
  70120. k(t, function(f) {
  70121. rre(f) || f.setLayout({
  70122. depth: Math.max(0, r - f.getLayout().skNodeHeight)
  70123. }, !0);
  70124. });
  70125. } else e === "justify" && KFe(t, r);
  70126. }
  70127. function KFe(t, e) {
  70128. k(t, function(n) {
  70129. !rre(n) && !n.outEdges.length && n.setLayout({
  70130. depth: e
  70131. }, !0);
  70132. });
  70133. }
  70134. function JFe(t, e, n) {
  70135. k(t, function(r) {
  70136. var i = r.getLayout().depth * e;
  70137. n === "vertical" ? r.setLayout({
  70138. y: i
  70139. }, !0) : r.setLayout({
  70140. x: i
  70141. }, !0);
  70142. });
  70143. }
  70144. function eWe(t, e, n, r, i, a, o) {
  70145. var s = tWe(t, o);
  70146. nWe(s, e, n, r, i, o), RP(s, i, n, r, o);
  70147. for (var l = 1; a > 0; a--)
  70148. l *= 0.99, rWe(s, l, o), RP(s, i, n, r, o), lWe(s, l, o), RP(s, i, n, r, o);
  70149. }
  70150. function tWe(t, e) {
  70151. var n = [], r = e === "vertical" ? "y" : "x", i = $A(t, function(a) {
  70152. return a.getLayout()[r];
  70153. });
  70154. return i.keys.sort(function(a, o) {
  70155. return a - o;
  70156. }), k(i.keys, function(a) {
  70157. n.push(i.buckets.get(a));
  70158. }), n;
  70159. }
  70160. function nWe(t, e, n, r, i, a) {
  70161. var o = 1 / 0;
  70162. k(t, function(s) {
  70163. var l = s.length, u = 0;
  70164. k(s, function(f) {
  70165. u += f.getLayout().value;
  70166. });
  70167. var c = a === "vertical" ? (r - (l - 1) * i) / u : (n - (l - 1) * i) / u;
  70168. c < o && (o = c);
  70169. }), k(t, function(s) {
  70170. k(s, function(l, u) {
  70171. var c = l.getLayout().value * o;
  70172. a === "vertical" ? (l.setLayout({
  70173. x: u
  70174. }, !0), l.setLayout({
  70175. dx: c
  70176. }, !0)) : (l.setLayout({
  70177. y: u
  70178. }, !0), l.setLayout({
  70179. dy: c
  70180. }, !0));
  70181. });
  70182. }), k(e, function(s) {
  70183. var l = +s.getValue() * o;
  70184. s.setLayout({
  70185. dy: l
  70186. }, !0);
  70187. });
  70188. }
  70189. function RP(t, e, n, r, i) {
  70190. var a = i === "vertical" ? "x" : "y";
  70191. k(t, function(o) {
  70192. o.sort(function(v, g) {
  70193. return v.getLayout()[a] - g.getLayout()[a];
  70194. });
  70195. for (var s, l, u, c = 0, f = o.length, d = i === "vertical" ? "dx" : "dy", h = 0; h < f; h++)
  70196. l = o[h], u = c - l.getLayout()[a], u > 0 && (s = l.getLayout()[a] + u, i === "vertical" ? l.setLayout({
  70197. x: s
  70198. }, !0) : l.setLayout({
  70199. y: s
  70200. }, !0)), c = l.getLayout()[a] + l.getLayout()[d] + e;
  70201. var p = i === "vertical" ? r : n;
  70202. if (u = c - e - p, u > 0) {
  70203. s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
  70204. x: s
  70205. }, !0) : l.setLayout({
  70206. y: s
  70207. }, !0), c = s;
  70208. for (var h = f - 2; h >= 0; --h)
  70209. l = o[h], u = l.getLayout()[a] + l.getLayout()[d] + e - c, u > 0 && (s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
  70210. x: s
  70211. }, !0) : l.setLayout({
  70212. y: s
  70213. }, !0)), c = l.getLayout()[a];
  70214. }
  70215. });
  70216. }
  70217. function rWe(t, e, n) {
  70218. k(t.slice().reverse(), function(r) {
  70219. k(r, function(i) {
  70220. if (i.outEdges.length) {
  70221. var a = Jl(i.outEdges, iWe, n) / Jl(i.outEdges, NO);
  70222. if (isNaN(a)) {
  70223. var o = i.outEdges.length;
  70224. a = o ? Jl(i.outEdges, aWe, n) / o : 0;
  70225. }
  70226. if (n === "vertical") {
  70227. var s = i.getLayout().x + (a - fu(i, n)) * e;
  70228. i.setLayout({
  70229. x: s
  70230. }, !0);
  70231. } else {
  70232. var l = i.getLayout().y + (a - fu(i, n)) * e;
  70233. i.setLayout({
  70234. y: l
  70235. }, !0);
  70236. }
  70237. }
  70238. });
  70239. });
  70240. }
  70241. function iWe(t, e) {
  70242. return fu(t.node2, e) * t.getValue();
  70243. }
  70244. function aWe(t, e) {
  70245. return fu(t.node2, e);
  70246. }
  70247. function oWe(t, e) {
  70248. return fu(t.node1, e) * t.getValue();
  70249. }
  70250. function sWe(t, e) {
  70251. return fu(t.node1, e);
  70252. }
  70253. function fu(t, e) {
  70254. return e === "vertical" ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2;
  70255. }
  70256. function NO(t) {
  70257. return t.getValue();
  70258. }
  70259. function Jl(t, e, n) {
  70260. for (var r = 0, i = t.length, a = -1; ++a < i; ) {
  70261. var o = +e(t[a], n);
  70262. isNaN(o) || (r += o);
  70263. }
  70264. return r;
  70265. }
  70266. function lWe(t, e, n) {
  70267. k(t, function(r) {
  70268. k(r, function(i) {
  70269. if (i.inEdges.length) {
  70270. var a = Jl(i.inEdges, oWe, n) / Jl(i.inEdges, NO);
  70271. if (isNaN(a)) {
  70272. var o = i.inEdges.length;
  70273. a = o ? Jl(i.inEdges, sWe, n) / o : 0;
  70274. }
  70275. if (n === "vertical") {
  70276. var s = i.getLayout().x + (a - fu(i, n)) * e;
  70277. i.setLayout({
  70278. x: s
  70279. }, !0);
  70280. } else {
  70281. var l = i.getLayout().y + (a - fu(i, n)) * e;
  70282. i.setLayout({
  70283. y: l
  70284. }, !0);
  70285. }
  70286. }
  70287. });
  70288. });
  70289. }
  70290. function uWe(t, e) {
  70291. var n = e === "vertical" ? "x" : "y";
  70292. k(t, function(r) {
  70293. r.outEdges.sort(function(i, a) {
  70294. return i.node2.getLayout()[n] - a.node2.getLayout()[n];
  70295. }), r.inEdges.sort(function(i, a) {
  70296. return i.node1.getLayout()[n] - a.node1.getLayout()[n];
  70297. });
  70298. }), k(t, function(r) {
  70299. var i = 0, a = 0;
  70300. k(r.outEdges, function(o) {
  70301. o.setLayout({
  70302. sy: i
  70303. }, !0), i += o.getLayout().dy;
  70304. }), k(r.inEdges, function(o) {
  70305. o.setLayout({
  70306. ty: a
  70307. }, !0), a += o.getLayout().dy;
  70308. });
  70309. });
  70310. }
  70311. function cWe(t) {
  70312. t.eachSeriesByType("sankey", function(e) {
  70313. var n = e.getGraph(), r = n.nodes, i = n.edges;
  70314. if (r.length) {
  70315. var a = 1 / 0, o = -1 / 0;
  70316. k(r, function(s) {
  70317. var l = s.getLayout().value;
  70318. l < a && (a = l), l > o && (o = l);
  70319. }), k(r, function(s) {
  70320. var l = new qn({
  70321. type: "color",
  70322. mappingMethod: "linear",
  70323. dataExtent: [a, o],
  70324. visual: e.get("color")
  70325. }), u = l.mapValueToVisual(s.getLayout().value), c = s.getModel().get(["itemStyle", "color"]);
  70326. c != null ? (s.setVisual("color", c), s.setVisual("style", {
  70327. fill: c
  70328. })) : (s.setVisual("color", u), s.setVisual("style", {
  70329. fill: u
  70330. }));
  70331. });
  70332. }
  70333. i.length && k(i, function(s) {
  70334. var l = s.getModel().get("lineStyle");
  70335. s.setVisual("style", l);
  70336. });
  70337. });
  70338. }
  70339. function fWe(t) {
  70340. t.registerChartView(QFe), t.registerSeriesModel(GFe), t.registerLayout(jFe), t.registerVisual(cWe), t.registerAction({
  70341. type: "dragNode",
  70342. event: "dragnode",
  70343. // here can only use 'update' now, other value is not support in echarts.
  70344. update: "update"
  70345. }, function(e, n) {
  70346. n.eachComponent({
  70347. mainType: "series",
  70348. subType: "sankey",
  70349. query: e
  70350. }, function(r) {
  70351. r.setNodePosition(e.dataIndex, [e.localX, e.localY]);
  70352. });
  70353. });
  70354. }
  70355. var ire = (
  70356. /** @class */
  70357. function() {
  70358. function t() {
  70359. }
  70360. return t.prototype.getInitialData = function(e, n) {
  70361. 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;
  70362. 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";
  70363. 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;
  70364. if (g && l) {
  70365. var m = [];
  70366. k(g, function(_, O) {
  70367. var S;
  70368. ue(_) ? (S = _.slice(), _.unshift(O)) : ue(_.value) ? (S = le({}, _), S.value = S.value.slice(), _.value.unshift(O)) : S = _, m.push(S);
  70369. }), e.data = m;
  70370. }
  70371. var y = this.defaultValueDimensions, b = [{
  70372. name: f,
  70373. type: TO(p),
  70374. ordinalMeta: r,
  70375. otherDims: {
  70376. tooltip: !1,
  70377. itemName: 0
  70378. },
  70379. dimsDef: ["base"]
  70380. }, {
  70381. name: d,
  70382. type: TO(v),
  70383. dimsDef: y.slice()
  70384. }];
  70385. return Ip(this, {
  70386. coordDimensions: b,
  70387. dimensionsCount: y.length + 1,
  70388. encodeDefaulter: Ue(IJ, b, this)
  70389. });
  70390. }, t.prototype.getBaseAxis = function() {
  70391. var e = this._baseAxisDim;
  70392. return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis;
  70393. }, t;
  70394. }()
  70395. ), are = (
  70396. /** @class */
  70397. function(t) {
  70398. q(e, t);
  70399. function e() {
  70400. var n = t !== null && t.apply(this, arguments) || this;
  70401. return n.type = e.type, n.defaultValueDimensions = [{
  70402. name: "min",
  70403. defaultTooltip: !0
  70404. }, {
  70405. name: "Q1",
  70406. defaultTooltip: !0
  70407. }, {
  70408. name: "median",
  70409. defaultTooltip: !0
  70410. }, {
  70411. name: "Q3",
  70412. defaultTooltip: !0
  70413. }, {
  70414. name: "max",
  70415. defaultTooltip: !0
  70416. }], n.visualDrawType = "stroke", n;
  70417. }
  70418. return e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  70419. // zlevel: 0,
  70420. z: 2,
  70421. coordinateSystem: "cartesian2d",
  70422. legendHoverLink: !0,
  70423. layout: null,
  70424. boxWidth: [7, 50],
  70425. itemStyle: {
  70426. color: "#fff",
  70427. borderWidth: 1
  70428. },
  70429. emphasis: {
  70430. scale: !0,
  70431. itemStyle: {
  70432. borderWidth: 2,
  70433. shadowBlur: 5,
  70434. shadowOffsetX: 1,
  70435. shadowOffsetY: 1,
  70436. shadowColor: "rgba(0,0,0,0.2)"
  70437. }
  70438. },
  70439. animationDuration: 800
  70440. }, e;
  70441. }(Ht)
  70442. );
  70443. xn(are, ire, !0);
  70444. var dWe = (
  70445. /** @class */
  70446. function(t) {
  70447. q(e, t);
  70448. function e() {
  70449. var n = t !== null && t.apply(this, arguments) || this;
  70450. return n.type = e.type, n;
  70451. }
  70452. return e.prototype.render = function(n, r, i) {
  70453. var a = n.getData(), o = this.group, s = this._data;
  70454. this._data || o.removeAll();
  70455. var l = n.get("layout") === "horizontal" ? 1 : 0;
  70456. a.diff(s).add(function(u) {
  70457. if (a.hasValue(u)) {
  70458. var c = a.getItemLayout(u), f = pW(c, a, u, l, !0);
  70459. a.setItemGraphicEl(u, f), o.add(f);
  70460. }
  70461. }).update(function(u, c) {
  70462. var f = s.getItemGraphicEl(c);
  70463. if (!a.hasValue(u)) {
  70464. o.remove(f);
  70465. return;
  70466. }
  70467. var d = a.getItemLayout(u);
  70468. f ? (uo(f), ore(d, f, a, u)) : f = pW(d, a, u, l), o.add(f), a.setItemGraphicEl(u, f);
  70469. }).remove(function(u) {
  70470. var c = s.getItemGraphicEl(u);
  70471. c && o.remove(c);
  70472. }).execute(), this._data = a;
  70473. }, e.prototype.remove = function(n) {
  70474. var r = this.group, i = this._data;
  70475. this._data = null, i && i.eachItemGraphicEl(function(a) {
  70476. a && r.remove(a);
  70477. });
  70478. }, e.type = "boxplot", e;
  70479. }(zt)
  70480. ), hWe = (
  70481. /** @class */
  70482. /* @__PURE__ */ function() {
  70483. function t() {
  70484. }
  70485. return t;
  70486. }()
  70487. ), pWe = (
  70488. /** @class */
  70489. function(t) {
  70490. q(e, t);
  70491. function e(n) {
  70492. var r = t.call(this, n) || this;
  70493. return r.type = "boxplotBoxPath", r;
  70494. }
  70495. return e.prototype.getDefaultShape = function() {
  70496. return new hWe();
  70497. }, e.prototype.buildPath = function(n, r) {
  70498. var i = r.points, a = 0;
  70499. for (n.moveTo(i[a][0], i[a][1]), a++; a < 4; a++)
  70500. n.lineTo(i[a][0], i[a][1]);
  70501. for (n.closePath(); a < i.length; a++)
  70502. n.moveTo(i[a][0], i[a][1]), a++, n.lineTo(i[a][0], i[a][1]);
  70503. }, e;
  70504. }(ot)
  70505. );
  70506. function pW(t, e, n, r, i) {
  70507. var a = t.ends, o = new pWe({
  70508. shape: {
  70509. points: i ? vWe(a, r, t) : a
  70510. }
  70511. });
  70512. return ore(t, o, e, n, i), o;
  70513. }
  70514. function ore(t, e, n, r, i) {
  70515. var a = n.hostModel, o = Nf[i ? "initProps" : "updateProps"];
  70516. o(e, {
  70517. shape: {
  70518. points: t.ends
  70519. }
  70520. }, a, r), e.useStyle(n.getItemVisual(r, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
  70521. var s = n.getItemModel(r), l = s.getModel("emphasis");
  70522. Tr(e, s), bn(e, l.get("focus"), l.get("blurScope"), l.get("disabled"));
  70523. }
  70524. function vWe(t, e, n) {
  70525. return ce(t, function(r) {
  70526. return r = r.slice(), r[e] = n.initBaseline, r;
  70527. });
  70528. }
  70529. var Fg = k;
  70530. function gWe(t) {
  70531. var e = mWe(t);
  70532. Fg(e, function(n) {
  70533. var r = n.seriesModels;
  70534. r.length && (yWe(n), Fg(r, function(i, a) {
  70535. bWe(i, n.boxOffsetList[a], n.boxWidthList[a]);
  70536. }));
  70537. });
  70538. }
  70539. function mWe(t) {
  70540. var e = [], n = [];
  70541. return t.eachSeriesByType("boxplot", function(r) {
  70542. var i = r.getBaseAxis(), a = et(n, i);
  70543. a < 0 && (a = n.length, n[a] = i, e[a] = {
  70544. axis: i,
  70545. seriesModels: []
  70546. }), e[a].seriesModels.push(r);
  70547. }), e;
  70548. }
  70549. function yWe(t) {
  70550. var e = t.axis, n = t.seriesModels, r = n.length, i = t.boxWidthList = [], a = t.boxOffsetList = [], o = [], s;
  70551. if (e.type === "category")
  70552. s = e.getBandWidth();
  70553. else {
  70554. var l = 0;
  70555. Fg(n, function(p) {
  70556. l = Math.max(l, p.getData().count());
  70557. });
  70558. var u = e.getExtent();
  70559. s = Math.abs(u[1] - u[0]) / l;
  70560. }
  70561. Fg(n, function(p) {
  70562. var v = p.get("boxWidth");
  70563. ue(v) || (v = [v, v]), o.push([_e(v[0], s) || 0, _e(v[1], s) || 0]);
  70564. });
  70565. var c = s * 0.8 - 2, f = c / r * 0.3, d = (c - f * (r - 1)) / r, h = d / 2 - c / 2;
  70566. Fg(n, function(p, v) {
  70567. a.push(h), h += f + d, i.push(Math.min(Math.max(d, o[v][0]), o[v][1]));
  70568. });
  70569. }
  70570. function bWe(t, e, n) {
  70571. 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]);
  70572. if (u == null || c.length < 5)
  70573. return;
  70574. for (var f = 0; f < i.count(); f++) {
  70575. var d = i.get(u, f), h = b(d, c[2], f), p = b(d, c[0], f), v = b(d, c[1], f), g = b(d, c[3], f), m = b(d, c[4], f), y = [];
  70576. _(y, v, !1), _(y, g, !0), y.push(p, v, m, g), O(y, p), O(y, m), O(y, h), i.setItemLayout(f, {
  70577. initBaseline: h[s],
  70578. ends: y
  70579. });
  70580. }
  70581. function b(S, x, C) {
  70582. var T = i.get(x, C), w = [];
  70583. w[o] = S, w[s] = T;
  70584. var P;
  70585. return isNaN(S) || isNaN(T) ? P = [NaN, NaN] : (P = r.dataToPoint(w), P[o] += e), P;
  70586. }
  70587. function _(S, x, C) {
  70588. var T = x.slice(), w = x.slice();
  70589. T[o] += a, w[o] -= a, C ? S.push(T, w) : S.push(w, T);
  70590. }
  70591. function O(S, x) {
  70592. var C = x.slice(), T = x.slice();
  70593. C[o] -= a, T[o] += a, S.push(C, T);
  70594. }
  70595. }
  70596. function _We(t, e) {
  70597. e = e || {};
  70598. for (var n = [], r = [], i = e.boundIQR, a = i === "none" || i === 0, o = 0; o < t.length; o++) {
  70599. var s = Wi(t[o].slice()), l = V_(s, 0.25), u = V_(s, 0.5), c = V_(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 = Me(g) ? g({
  70600. value: o
  70601. }) : Oe(g) ? g.replace("{value}", o + "") : o + "";
  70602. n.push([m, p, l, u, c, v]);
  70603. for (var y = 0; y < s.length; y++) {
  70604. var b = s[y];
  70605. if (b < p || b > v) {
  70606. var _ = [m, b];
  70607. r.push(_);
  70608. }
  70609. }
  70610. }
  70611. return {
  70612. boxData: n,
  70613. outliers: r
  70614. };
  70615. }
  70616. var OWe = {
  70617. type: "echarts:boxplot",
  70618. transform: function(e) {
  70619. var n = e.upstream;
  70620. if (n.sourceFormat !== zr) {
  70621. var r = "";
  70622. process.env.NODE_ENV !== "production" && (r = ni("source data is not applicable for this boxplot transform. Expect number[][].")), Et(r);
  70623. }
  70624. var i = _We(n.getRawData(), e.config);
  70625. return [{
  70626. dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
  70627. data: i.boxData
  70628. }, {
  70629. data: i.outliers
  70630. }];
  70631. }
  70632. };
  70633. function SWe(t) {
  70634. t.registerSeriesModel(are), t.registerChartView(dWe), t.registerLayout(gWe), t.registerTransform(OWe);
  70635. }
  70636. var xWe = ["color", "borderColor"], wWe = (
  70637. /** @class */
  70638. function(t) {
  70639. q(e, t);
  70640. function e() {
  70641. var n = t !== null && t.apply(this, arguments) || this;
  70642. return n.type = e.type, n;
  70643. }
  70644. return e.prototype.render = function(n, r, i) {
  70645. this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(n), this._isLargeDraw ? this._renderLarge(n) : this._renderNormal(n);
  70646. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  70647. this._clear(), this._updateDrawMode(n);
  70648. }, e.prototype.incrementalRender = function(n, r, i, a) {
  70649. this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(n, r) : this._incrementalRenderNormal(n, r);
  70650. }, e.prototype.eachRendered = function(n) {
  70651. Tu(this._progressiveEls || this.group, n);
  70652. }, e.prototype._updateDrawMode = function(n) {
  70653. var r = n.pipelineContext.large;
  70654. (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
  70655. }, e.prototype._renderNormal = function(n) {
  70656. 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();
  70657. this._data || a.removeAll(), r.diff(i).add(function(c) {
  70658. if (r.hasValue(c)) {
  70659. var f = r.getItemLayout(c);
  70660. if (s && vW(u, f))
  70661. return;
  70662. var d = kP(f, c, !0);
  70663. Yt(d, {
  70664. shape: {
  70665. points: f.ends
  70666. }
  70667. }, n, c), LP(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
  70668. }
  70669. }).update(function(c, f) {
  70670. var d = i.getItemGraphicEl(f);
  70671. if (!r.hasValue(c)) {
  70672. a.remove(d);
  70673. return;
  70674. }
  70675. var h = r.getItemLayout(c);
  70676. if (s && vW(u, h)) {
  70677. a.remove(d);
  70678. return;
  70679. }
  70680. d ? (Ct(d, {
  70681. shape: {
  70682. points: h.ends
  70683. }
  70684. }, n, c), uo(d)) : d = kP(h), LP(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
  70685. }).remove(function(c) {
  70686. var f = i.getItemGraphicEl(c);
  70687. f && a.remove(f);
  70688. }).execute(), this._data = r;
  70689. }, e.prototype._renderLarge = function(n) {
  70690. this._clear(), gW(n, this.group);
  70691. var r = n.get("clip", !0) ? X0(n.coordinateSystem, !1, n) : null;
  70692. r ? this.group.setClipPath(r) : this.group.removeClipPath();
  70693. }, e.prototype._incrementalRenderNormal = function(n, r) {
  70694. for (var i = r.getData(), a = i.getLayout("isSimpleBox"), o; (o = n.next()) != null; ) {
  70695. var s = i.getItemLayout(o), l = kP(s);
  70696. LP(l, i, o, a), l.incremental = !0, this.group.add(l), this._progressiveEls.push(l);
  70697. }
  70698. }, e.prototype._incrementalRenderLarge = function(n, r) {
  70699. gW(r, this.group, this._progressiveEls, !0);
  70700. }, e.prototype.remove = function(n) {
  70701. this._clear();
  70702. }, e.prototype._clear = function() {
  70703. this.group.removeAll(), this._data = null;
  70704. }, e.type = "candlestick", e;
  70705. }(zt)
  70706. ), CWe = (
  70707. /** @class */
  70708. /* @__PURE__ */ function() {
  70709. function t() {
  70710. }
  70711. return t;
  70712. }()
  70713. ), TWe = (
  70714. /** @class */
  70715. function(t) {
  70716. q(e, t);
  70717. function e(n) {
  70718. var r = t.call(this, n) || this;
  70719. return r.type = "normalCandlestickBox", r;
  70720. }
  70721. return e.prototype.getDefaultShape = function() {
  70722. return new CWe();
  70723. }, e.prototype.buildPath = function(n, r) {
  70724. var i = r.points;
  70725. 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]));
  70726. }, e;
  70727. }(ot)
  70728. );
  70729. function kP(t, e, n) {
  70730. var r = t.ends;
  70731. return new TWe({
  70732. shape: {
  70733. points: n ? PWe(r, t) : r
  70734. },
  70735. z2: 100
  70736. });
  70737. }
  70738. function vW(t, e) {
  70739. for (var n = !0, r = 0; r < e.ends.length; r++)
  70740. if (t.contain(e.ends[r][0], e.ends[r][1])) {
  70741. n = !1;
  70742. break;
  70743. }
  70744. return n;
  70745. }
  70746. function LP(t, e, n, r) {
  70747. var i = e.getItemModel(n);
  70748. t.useStyle(e.getItemVisual(n, "style")), t.style.strokeNoScale = !0, t.__simpleBox = r, Tr(t, i);
  70749. }
  70750. function PWe(t, e) {
  70751. return ce(t, function(n) {
  70752. return n = n.slice(), n[1] = e.initBaseline, n;
  70753. });
  70754. }
  70755. var $We = (
  70756. /** @class */
  70757. /* @__PURE__ */ function() {
  70758. function t() {
  70759. }
  70760. return t;
  70761. }()
  70762. ), NP = (
  70763. /** @class */
  70764. function(t) {
  70765. q(e, t);
  70766. function e(n) {
  70767. var r = t.call(this, n) || this;
  70768. return r.type = "largeCandlestickBox", r;
  70769. }
  70770. return e.prototype.getDefaultShape = function() {
  70771. return new $We();
  70772. }, e.prototype.buildPath = function(n, r) {
  70773. for (var i = r.points, a = 0; a < i.length; )
  70774. if (this.__sign === i[a++]) {
  70775. var o = i[a++];
  70776. n.moveTo(o, i[a++]), n.lineTo(o, i[a++]);
  70777. } else
  70778. a += 3;
  70779. }, e;
  70780. }(ot)
  70781. );
  70782. function gW(t, e, n, r) {
  70783. var i = t.getData(), a = i.getLayout("largePoints"), o = new NP({
  70784. shape: {
  70785. points: a
  70786. },
  70787. __sign: 1,
  70788. ignoreCoarsePointer: !0
  70789. });
  70790. e.add(o);
  70791. var s = new NP({
  70792. shape: {
  70793. points: a
  70794. },
  70795. __sign: -1,
  70796. ignoreCoarsePointer: !0
  70797. });
  70798. e.add(s);
  70799. var l = new NP({
  70800. shape: {
  70801. points: a
  70802. },
  70803. __sign: 0,
  70804. ignoreCoarsePointer: !0
  70805. });
  70806. e.add(l), BP(1, o, t), BP(-1, s, t), BP(0, l, t), r && (o.incremental = !0, s.incremental = !0), n && n.push(o, s);
  70807. }
  70808. function BP(t, e, n, r) {
  70809. var i = n.get(["itemStyle", t > 0 ? "borderColor" : "borderColor0"]) || n.get(["itemStyle", t > 0 ? "color" : "color0"]);
  70810. t === 0 && (i = n.get(["itemStyle", "borderColorDoji"]));
  70811. var a = n.getModel("itemStyle").getItemStyle(xWe);
  70812. e.useStyle(a), e.style.fill = null, e.style.stroke = i;
  70813. }
  70814. var sre = (
  70815. /** @class */
  70816. function(t) {
  70817. q(e, t);
  70818. function e() {
  70819. var n = t !== null && t.apply(this, arguments) || this;
  70820. return n.type = e.type, n.defaultValueDimensions = [{
  70821. name: "open",
  70822. defaultTooltip: !0
  70823. }, {
  70824. name: "close",
  70825. defaultTooltip: !0
  70826. }, {
  70827. name: "lowest",
  70828. defaultTooltip: !0
  70829. }, {
  70830. name: "highest",
  70831. defaultTooltip: !0
  70832. }], n;
  70833. }
  70834. return e.prototype.getShadowDim = function() {
  70835. return "open";
  70836. }, e.prototype.brushSelector = function(n, r, i) {
  70837. var a = r.getItemLayout(n);
  70838. return a && i.rect(a.brushRect);
  70839. }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  70840. // zlevel: 0,
  70841. z: 2,
  70842. coordinateSystem: "cartesian2d",
  70843. legendHoverLink: !0,
  70844. // xAxisIndex: 0,
  70845. // yAxisIndex: 0,
  70846. layout: null,
  70847. clip: !0,
  70848. itemStyle: {
  70849. color: "#eb5454",
  70850. color0: "#47b262",
  70851. borderColor: "#eb5454",
  70852. borderColor0: "#47b262",
  70853. borderColorDoji: null,
  70854. // borderColor: '#d24040',
  70855. // borderColor0: '#398f4f',
  70856. borderWidth: 1
  70857. },
  70858. emphasis: {
  70859. scale: !0,
  70860. itemStyle: {
  70861. borderWidth: 2
  70862. }
  70863. },
  70864. barMaxWidth: null,
  70865. barMinWidth: null,
  70866. barWidth: null,
  70867. large: !0,
  70868. largeThreshold: 600,
  70869. progressive: 3e3,
  70870. progressiveThreshold: 1e4,
  70871. progressiveChunkMode: "mod",
  70872. animationEasing: "linear",
  70873. animationDuration: 300
  70874. }, e;
  70875. }(Ht)
  70876. );
  70877. xn(sre, ire, !0);
  70878. function AWe(t) {
  70879. !t || !ue(t.series) || k(t.series, function(e) {
  70880. Ie(e) && e.type === "k" && (e.type = "candlestick");
  70881. });
  70882. }
  70883. var EWe = ["itemStyle", "borderColor"], MWe = ["itemStyle", "borderColor0"], IWe = ["itemStyle", "borderColorDoji"], DWe = ["itemStyle", "color"], RWe = ["itemStyle", "color0"], kWe = {
  70884. seriesType: "candlestick",
  70885. plan: Tp(),
  70886. // For legend.
  70887. performRawSeries: !0,
  70888. reset: function(t, e) {
  70889. function n(a, o) {
  70890. return o.get(a > 0 ? DWe : RWe);
  70891. }
  70892. function r(a, o) {
  70893. return o.get(a === 0 ? IWe : a > 0 ? EWe : MWe);
  70894. }
  70895. if (!e.isSeriesFiltered(t)) {
  70896. var i = t.pipelineContext.large;
  70897. return !i && {
  70898. progress: function(a, o) {
  70899. for (var s; (s = a.next()) != null; ) {
  70900. var l = o.getItemModel(s), u = o.getItemLayout(s).sign, c = l.getItemStyle();
  70901. c.fill = n(u, l), c.stroke = r(u, l) || c.fill;
  70902. var f = o.ensureUniqueItemVisual(s, "style");
  70903. le(f, c);
  70904. }
  70905. }
  70906. };
  70907. }
  70908. }
  70909. }, LWe = {
  70910. seriesType: "candlestick",
  70911. plan: Tp(),
  70912. reset: function(t) {
  70913. var e = t.coordinateSystem, n = t.getData(), r = NWe(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];
  70914. if (n.setLayout({
  70915. candleWidth: r,
  70916. // The value is experimented visually.
  70917. isSimpleBox: r <= 1.3
  70918. }), s < 0 || l.length < 4)
  70919. return;
  70920. return {
  70921. progress: t.pipelineContext.large ? p : h
  70922. };
  70923. function h(v, g) {
  70924. for (var m, y = g.getStore(); (m = v.next()) != null; ) {
  70925. var b = y.get(s, m), _ = y.get(u, m), O = y.get(c, m), S = y.get(f, m), x = y.get(d, m), C = Math.min(_, O), T = Math.max(_, O), w = N(C, b), P = N(T, b), $ = N(S, b), A = N(x, b), D = [];
  70926. V(D, P, 0), V(D, w, 1), D.push(W(A), W(P), W($), W(w));
  70927. var E = g.getItemModel(m), R = !!E.get(["itemStyle", "borderColorDoji"]);
  70928. g.setItemLayout(m, {
  70929. sign: mW(y, m, _, O, c, R),
  70930. initBaseline: _ > O ? P[a] : w[a],
  70931. ends: D,
  70932. brushRect: B(S, x, b)
  70933. });
  70934. }
  70935. function N(F, Q) {
  70936. var Z = [];
  70937. return Z[i] = Q, Z[a] = F, isNaN(Q) || isNaN(F) ? [NaN, NaN] : e.dataToPoint(Z);
  70938. }
  70939. function V(F, Q, Z) {
  70940. var ne = Q.slice(), ee = Q.slice();
  70941. ne[i] = Q_(ne[i] + r / 2, 1, !1), ee[i] = Q_(ee[i] - r / 2, 1, !0), Z ? F.push(ne, ee) : F.push(ee, ne);
  70942. }
  70943. function B(F, Q, Z) {
  70944. var ne = N(F, Z), ee = N(Q, Z);
  70945. return ne[i] -= r / 2, ee[i] -= r / 2, {
  70946. x: ne[0],
  70947. y: ne[1],
  70948. width: r,
  70949. height: ee[1] - ne[1]
  70950. };
  70951. }
  70952. function W(F) {
  70953. return F[i] = Q_(F[i], 1), F;
  70954. }
  70955. }
  70956. function p(v, g) {
  70957. for (var m = Wo(v.count * 4), y = 0, b, _ = [], O = [], S, x = g.getStore(), C = !!t.get(["itemStyle", "borderColorDoji"]); (S = v.next()) != null; ) {
  70958. var T = x.get(s, S), w = x.get(u, S), P = x.get(c, S), $ = x.get(f, S), A = x.get(d, S);
  70959. if (isNaN(T) || isNaN($) || isNaN(A)) {
  70960. m[y++] = NaN, y += 3;
  70961. continue;
  70962. }
  70963. m[y++] = mW(x, S, w, P, c, C), _[i] = T, _[a] = $, b = e.dataToPoint(_, null, O), m[y++] = b ? b[0] : NaN, m[y++] = b ? b[1] : NaN, _[a] = A, b = e.dataToPoint(_, null, O), m[y++] = b ? b[1] : NaN;
  70964. }
  70965. g.setLayout("largePoints", m);
  70966. }
  70967. }
  70968. };
  70969. function mW(t, e, n, r, i, a) {
  70970. var o;
  70971. return n > r ? o = -1 : n < r ? o = 1 : o = a ? 0 : e > 0 ? t.get(i, e - 1) <= r ? 1 : -1 : 1, o;
  70972. }
  70973. function NWe(t, e) {
  70974. var n = t.getBaseAxis(), r, i = n.type === "category" ? n.getBandWidth() : (r = n.getExtent(), Math.abs(r[1] - r[0]) / e.count()), a = _e(We(t.get("barMaxWidth"), i), i), o = _e(We(t.get("barMinWidth"), 1), i), s = t.get("barWidth");
  70975. return s != null ? _e(s, i) : Math.max(Math.min(i / 2, a), o);
  70976. }
  70977. function BWe(t) {
  70978. t.registerChartView(wWe), t.registerSeriesModel(sre), t.registerPreprocessor(AWe), t.registerVisual(kWe), t.registerLayout(LWe);
  70979. }
  70980. function yW(t, e) {
  70981. var n = e.rippleEffectColor || e.color;
  70982. t.eachChild(function(r) {
  70983. r.attr({
  70984. z: e.z,
  70985. zlevel: e.zlevel,
  70986. style: {
  70987. stroke: e.brushType === "stroke" ? n : null,
  70988. fill: e.brushType === "fill" ? n : null
  70989. }
  70990. });
  70991. });
  70992. }
  70993. var zWe = (
  70994. /** @class */
  70995. function(t) {
  70996. q(e, t);
  70997. function e(n, r) {
  70998. var i = t.call(this) || this, a = new Z0(n, r), o = new Ve();
  70999. return i.add(a), i.add(o), i.updateData(n, r), i;
  71000. }
  71001. return e.prototype.stopEffectAnimation = function() {
  71002. this.childAt(1).removeAll();
  71003. }, e.prototype.startEffectAnimation = function(n) {
  71004. for (var r = n.symbolType, i = n.color, a = n.rippleNumber, o = this.childAt(1), s = 0; s < a; s++) {
  71005. var l = $n(r, -1, -1, 2, 2, i);
  71006. l.attr({
  71007. style: {
  71008. strokeNoScale: !0
  71009. },
  71010. z2: 99,
  71011. silent: !0,
  71012. scaleX: 0.5,
  71013. scaleY: 0.5
  71014. });
  71015. var u = -s / a * n.period + n.effectOffset;
  71016. l.animate("", !0).when(n.period, {
  71017. scaleX: n.rippleScale / 2,
  71018. scaleY: n.rippleScale / 2
  71019. }).delay(u).start(), l.animateStyle(!0).when(n.period, {
  71020. opacity: 0
  71021. }).delay(u).start(), o.add(l);
  71022. }
  71023. yW(o, n);
  71024. }, e.prototype.updateEffectAnimation = function(n) {
  71025. for (var r = this._effectCfg, i = this.childAt(1), a = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < a.length; o++) {
  71026. var s = a[o];
  71027. if (r[s] !== n[s]) {
  71028. this.stopEffectAnimation(), this.startEffectAnimation(n);
  71029. return;
  71030. }
  71031. }
  71032. yW(i, n);
  71033. }, e.prototype.highlight = function() {
  71034. Zs(this);
  71035. }, e.prototype.downplay = function() {
  71036. Us(this);
  71037. }, e.prototype.getSymbolType = function() {
  71038. var n = this.childAt(0);
  71039. return n && n.getSymbolType();
  71040. }, e.prototype.updateData = function(n, r) {
  71041. var i = this, a = n.hostModel;
  71042. this.childAt(0).updateData(n, r);
  71043. var o = this.childAt(1), s = n.getItemModel(r), l = n.getItemVisual(r, "symbol"), u = $p(n.getItemVisual(r, "symbolSize")), c = n.getItemVisual(r, "style"), f = c && c.fill, d = s.getModel("emphasis");
  71044. o.setScale(u), o.traverse(function(g) {
  71045. g.setStyle("fill", f);
  71046. });
  71047. var h = Ff(n.getItemVisual(r, "symbolOffset"), u);
  71048. h && (o.x = h[0], o.y = h[1]);
  71049. var p = n.getItemVisual(r, "symbolRotate");
  71050. o.rotation = (p || 0) * Math.PI / 180 || 0;
  71051. var v = {};
  71052. 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) {
  71053. g === "emphasis" ? v.showEffectOn !== "render" && i.startEffectAnimation(v) : g === "normal" && v.showEffectOn !== "render" && i.stopEffectAnimation();
  71054. }), this._effectCfg = v, bn(this, d.get("focus"), d.get("blurScope"), d.get("disabled"));
  71055. }, e.prototype.fadeOut = function(n) {
  71056. n && n();
  71057. }, e;
  71058. }(Ve)
  71059. ), VWe = (
  71060. /** @class */
  71061. function(t) {
  71062. q(e, t);
  71063. function e() {
  71064. var n = t !== null && t.apply(this, arguments) || this;
  71065. return n.type = e.type, n;
  71066. }
  71067. return e.prototype.init = function() {
  71068. this._symbolDraw = new U0(zWe);
  71069. }, e.prototype.render = function(n, r, i) {
  71070. var a = n.getData(), o = this._symbolDraw;
  71071. o.updateData(a, {
  71072. clipShape: this._getClipShape(n)
  71073. }), this.group.add(o.group);
  71074. }, e.prototype._getClipShape = function(n) {
  71075. var r = n.coordinateSystem, i = r && r.getArea && r.getArea();
  71076. return n.get("clip", !0) ? i : null;
  71077. }, e.prototype.updateTransform = function(n, r, i) {
  71078. var a = n.getData();
  71079. this.group.dirty();
  71080. var o = Y0("").reset(n, r, i);
  71081. o.progress && o.progress({
  71082. start: 0,
  71083. end: a.count(),
  71084. count: a.count()
  71085. }, a), this._symbolDraw.updateLayout();
  71086. }, e.prototype._updateGroupTransform = function(n) {
  71087. var r = n.coordinateSystem;
  71088. r && r.getRoamTransform && (this.group.transform = Dq(r.getRoamTransform()), this.group.decomposeTransform());
  71089. }, e.prototype.remove = function(n, r) {
  71090. this._symbolDraw && this._symbolDraw.remove(!0);
  71091. }, e.type = "effectScatter", e;
  71092. }(zt)
  71093. ), FWe = (
  71094. /** @class */
  71095. function(t) {
  71096. q(e, t);
  71097. function e() {
  71098. var n = t !== null && t.apply(this, arguments) || this;
  71099. return n.type = e.type, n.hasSymbolVisual = !0, n;
  71100. }
  71101. return e.prototype.getInitialData = function(n, r) {
  71102. return cs(null, this, {
  71103. useEncodeDefaulter: !0
  71104. });
  71105. }, e.prototype.brushSelector = function(n, r, i) {
  71106. return i.point(r.getItemLayout(n));
  71107. }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
  71108. coordinateSystem: "cartesian2d",
  71109. // zlevel: 0,
  71110. z: 2,
  71111. legendHoverLink: !0,
  71112. effectType: "ripple",
  71113. progressive: 0,
  71114. // When to show the effect, option: 'render'|'emphasis'
  71115. showEffectOn: "render",
  71116. clip: !0,
  71117. // Ripple effect config
  71118. rippleEffect: {
  71119. period: 4,
  71120. // Scale of ripple
  71121. scale: 2.5,
  71122. // Brush type can be fill or stroke
  71123. brushType: "fill",
  71124. // Ripple number
  71125. number: 3
  71126. },
  71127. universalTransition: {
  71128. divideShape: "clone"
  71129. },
  71130. // Cartesian coordinate system
  71131. // xAxisIndex: 0,
  71132. // yAxisIndex: 0,
  71133. // Polar coordinate system
  71134. // polarIndex: 0,
  71135. // Geo coordinate system
  71136. // geoIndex: 0,
  71137. // symbol: null, // 图形类型
  71138. symbolSize: 10
  71139. // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
  71140. // symbolRotate: null, // 图形旋转控制
  71141. // itemStyle: {
  71142. // opacity: 1
  71143. // }
  71144. }, e;
  71145. }(Ht)
  71146. );
  71147. function WWe(t) {
  71148. t.registerChartView(VWe), t.registerSeriesModel(FWe), t.registerLayout(Y0("effectScatter"));
  71149. }
  71150. var lre = (
  71151. /** @class */
  71152. function(t) {
  71153. q(e, t);
  71154. function e(n, r, i) {
  71155. var a = t.call(this) || this;
  71156. return a.add(a.createLine(n, r, i)), a._updateEffectSymbol(n, r), a;
  71157. }
  71158. return e.prototype.createLine = function(n, r, i) {
  71159. return new Kk(n, r, i);
  71160. }, e.prototype._updateEffectSymbol = function(n, r) {
  71161. var i = n.getItemModel(r), a = i.getModel("effect"), o = a.get("symbolSize"), s = a.get("symbol");
  71162. ue(o) || (o = [o, o]);
  71163. var l = n.getItemVisual(r, "style"), u = a.get("color") || l && l.stroke, c = this.childAt(1);
  71164. this._symbolType !== s && (this.remove(c), c = $n(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));
  71165. }, e.prototype._updateEffectAnimation = function(n, r, i) {
  71166. var a = this.childAt(1);
  71167. if (a) {
  71168. var o = n.getItemLayout(i), s = r.get("period") * 1e3, l = r.get("loop"), u = r.get("roundTrip"), c = r.get("constantSpeed"), f = Tn(r.get("delay"), function(h) {
  71169. return h / n.count() * s / 3;
  71170. });
  71171. 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) {
  71172. a.stopAnimation();
  71173. var d = void 0;
  71174. Me(f) ? d = f(i) : d = f, a.__t > 0 && (d = -s * a.__t), this._animateSymbol(a, s, d, l, u);
  71175. }
  71176. this._period = s, this._loop = l, this._roundTrip = u;
  71177. }
  71178. }, e.prototype._animateSymbol = function(n, r, i, a, o) {
  71179. if (r > 0) {
  71180. n.__t = 0;
  71181. var s = this, l = n.animate("", a).when(o ? r * 2 : r, {
  71182. __t: o ? 2 : 1
  71183. }).delay(i).during(function() {
  71184. s._updateSymbolPosition(n);
  71185. });
  71186. a || l.done(function() {
  71187. s.remove(n);
  71188. }), l.start();
  71189. }
  71190. }, e.prototype._getLineLength = function(n) {
  71191. return Ps(n.__p1, n.__cp1) + Ps(n.__cp1, n.__p2);
  71192. }, e.prototype._updateAnimationPoints = function(n, r) {
  71193. 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];
  71194. }, e.prototype.updateData = function(n, r, i) {
  71195. this.childAt(0).updateData(n, r, i), this._updateEffectSymbol(n, r);
  71196. }, e.prototype._updateSymbolPosition = function(n) {
  71197. 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 = ir, c = dA;
  71198. s[0] = u(r[0], a[0], i[0], o), s[1] = u(r[1], a[1], i[1], o);
  71199. 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);
  71200. 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 = Ps(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 * Ps(r, s) : n.scaleY = this._symbolScale[1]), n.__lastT = n.__t, n.ignore = !1, n.x = s[0], n.y = s[1];
  71201. }, e.prototype.updateLayout = function(n, r) {
  71202. this.childAt(0).updateLayout(n, r);
  71203. var i = n.getItemModel(r).getModel("effect");
  71204. this._updateEffectAnimation(n, i, r);
  71205. }, e;
  71206. }(Ve)
  71207. ), ure = (
  71208. /** @class */
  71209. function(t) {
  71210. q(e, t);
  71211. function e(n, r, i) {
  71212. var a = t.call(this) || this;
  71213. return a._createPolyline(n, r, i), a;
  71214. }
  71215. return e.prototype._createPolyline = function(n, r, i) {
  71216. var a = n.getItemLayout(r), o = new oi({
  71217. shape: {
  71218. points: a
  71219. }
  71220. });
  71221. this.add(o), this._updateCommonStl(n, r, i);
  71222. }, e.prototype.updateData = function(n, r, i) {
  71223. var a = n.hostModel, o = this.childAt(0), s = {
  71224. shape: {
  71225. points: n.getItemLayout(r)
  71226. }
  71227. };
  71228. Ct(o, s, a, r), this._updateCommonStl(n, r, i);
  71229. }, e.prototype._updateCommonStl = function(n, r, i) {
  71230. 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;
  71231. if (!i || n.hasItemOption) {
  71232. var f = o.getModel("emphasis");
  71233. s = f.getModel("lineStyle").getLineStyle(), c = f.get("disabled"), l = f.get("focus"), u = f.get("blurScope");
  71234. }
  71235. a.useStyle(n.getItemVisual(r, "style")), a.style.fill = null, a.style.strokeNoScale = !0;
  71236. var d = a.ensureState("emphasis");
  71237. d.style = s, bn(this, l, u, c);
  71238. }, e.prototype.updateLayout = function(n, r) {
  71239. var i = this.childAt(0);
  71240. i.setShape("points", n.getItemLayout(r));
  71241. }, e;
  71242. }(Ve)
  71243. ), QWe = (
  71244. /** @class */
  71245. function(t) {
  71246. q(e, t);
  71247. function e() {
  71248. var n = t !== null && t.apply(this, arguments) || this;
  71249. return n._lastFrame = 0, n._lastFramePercent = 0, n;
  71250. }
  71251. return e.prototype.createLine = function(n, r, i) {
  71252. return new ure(n, r, i);
  71253. }, e.prototype._updateAnimationPoints = function(n, r) {
  71254. this._points = r;
  71255. for (var i = [0], a = 0, o = 1; o < r.length; o++) {
  71256. var s = r[o - 1], l = r[o];
  71257. a += Ps(s, l), i.push(a);
  71258. }
  71259. if (a === 0) {
  71260. this._length = 0;
  71261. return;
  71262. }
  71263. for (var o = 0; o < i.length; o++)
  71264. i[o] /= a;
  71265. this._offsets = i, this._length = a;
  71266. }, e.prototype._getLineLength = function() {
  71267. return this._length;
  71268. }, e.prototype._updateSymbolPosition = function(n) {
  71269. var r = n.__t < 1 ? n.__t : 2 - n.__t, i = this._points, a = this._offsets, o = i.length;
  71270. if (a) {
  71271. var s = this._lastFrame, l;
  71272. if (r < this._lastFramePercent) {
  71273. var u = Math.min(s + 1, o - 1);
  71274. for (l = u; l >= 0 && !(a[l] <= r); l--)
  71275. ;
  71276. l = Math.min(l, o - 2);
  71277. } else {
  71278. for (l = s; l < o && !(a[l] > r); l++)
  71279. ;
  71280. l = Math.min(l - 1, o - 2);
  71281. }
  71282. var c = (r - a[l]) / (a[l + 1] - a[l]), f = i[l], d = i[l + 1];
  71283. n.x = f[0] * (1 - c) + c * d[0], n.y = f[1] * (1 - c) + c * d[1];
  71284. 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];
  71285. n.rotation = -Math.atan2(p, h) - Math.PI / 2, this._lastFrame = l, this._lastFramePercent = r, n.ignore = !1;
  71286. }
  71287. }, e;
  71288. }(lre)
  71289. ), HWe = (
  71290. /** @class */
  71291. /* @__PURE__ */ function() {
  71292. function t() {
  71293. this.polyline = !1, this.curveness = 0, this.segs = [];
  71294. }
  71295. return t;
  71296. }()
  71297. ), GWe = (
  71298. /** @class */
  71299. function(t) {
  71300. q(e, t);
  71301. function e(n) {
  71302. var r = t.call(this, n) || this;
  71303. return r._off = 0, r.hoverDataIdx = -1, r;
  71304. }
  71305. return e.prototype.reset = function() {
  71306. this.notClear = !1, this._off = 0;
  71307. }, e.prototype.getDefaultStyle = function() {
  71308. return {
  71309. stroke: "#000",
  71310. fill: null
  71311. };
  71312. }, e.prototype.getDefaultShape = function() {
  71313. return new HWe();
  71314. }, e.prototype.buildPath = function(n, r) {
  71315. var i = r.segs, a = r.curveness, o;
  71316. if (r.polyline)
  71317. for (o = this._off; o < i.length; ) {
  71318. var s = i[o++];
  71319. if (s > 0) {
  71320. n.moveTo(i[o++], i[o++]);
  71321. for (var l = 1; l < s; l++)
  71322. n.lineTo(i[o++], i[o++]);
  71323. }
  71324. }
  71325. else
  71326. for (o = this._off; o < i.length; ) {
  71327. var u = i[o++], c = i[o++], f = i[o++], d = i[o++];
  71328. if (n.moveTo(u, c), a > 0) {
  71329. var h = (u + f) / 2 - (c - d) * a, p = (c + d) / 2 - (f - u) * a;
  71330. n.quadraticCurveTo(h, p, f, d);
  71331. } else
  71332. n.lineTo(f, d);
  71333. }
  71334. this.incremental && (this._off = o, this.notClear = !0);
  71335. }, e.prototype.findDataIndex = function(n, r) {
  71336. var i = this.shape, a = i.segs, o = i.curveness, s = this.style.lineWidth;
  71337. if (i.polyline)
  71338. for (var l = 0, u = 0; u < a.length; ) {
  71339. var c = a[u++];
  71340. if (c > 0)
  71341. for (var f = a[u++], d = a[u++], h = 1; h < c; h++) {
  71342. var p = a[u++], v = a[u++];
  71343. if (wl(f, d, p, v, s, n, r))
  71344. return l;
  71345. }
  71346. l++;
  71347. }
  71348. else
  71349. for (var l = 0, u = 0; u < a.length; ) {
  71350. var f = a[u++], d = a[u++], p = a[u++], v = a[u++];
  71351. if (o > 0) {
  71352. var g = (f + p) / 2 - (d - v) * o, m = (d + v) / 2 - (p - f) * o;
  71353. if (wK(f, d, g, m, p, v, s, n, r))
  71354. return l;
  71355. } else if (wl(f, d, p, v, s, n, r))
  71356. return l;
  71357. l++;
  71358. }
  71359. return -1;
  71360. }, e.prototype.contain = function(n, r) {
  71361. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  71362. if (n = i[0], r = i[1], a.contain(n, r)) {
  71363. var o = this.hoverDataIdx = this.findDataIndex(n, r);
  71364. return o >= 0;
  71365. }
  71366. return this.hoverDataIdx = -1, !1;
  71367. }, e.prototype.getBoundingRect = function() {
  71368. var n = this._rect;
  71369. if (!n) {
  71370. 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; ) {
  71371. var c = i[u++], f = i[u++];
  71372. a = Math.min(c, a), s = Math.max(c, s), o = Math.min(f, o), l = Math.max(f, l);
  71373. }
  71374. n = this._rect = new Je(a, o, s, l);
  71375. }
  71376. return n;
  71377. }, e;
  71378. }(ot)
  71379. ), jWe = (
  71380. /** @class */
  71381. function() {
  71382. function t() {
  71383. this.group = new Ve();
  71384. }
  71385. return t.prototype.updateData = function(e) {
  71386. this._clear();
  71387. var n = this._create();
  71388. n.setShape({
  71389. segs: e.getLayout("linesPoints")
  71390. }), this._setCommon(n, e);
  71391. }, t.prototype.incrementalPrepareUpdate = function(e) {
  71392. this.group.removeAll(), this._clear();
  71393. }, t.prototype.incrementalUpdate = function(e, n) {
  71394. var r = this._newAdded[0], i = n.getLayout("linesPoints"), a = r && r.shape.segs;
  71395. if (a && a.length < 2e4) {
  71396. var o = a.length, s = new Float32Array(o + i.length);
  71397. s.set(a), s.set(i, o), r.setShape({
  71398. segs: s
  71399. });
  71400. } else {
  71401. this._newAdded = [];
  71402. var l = this._create();
  71403. l.incremental = !0, l.setShape({
  71404. segs: i
  71405. }), this._setCommon(l, n), l.__startIndex = e.start;
  71406. }
  71407. }, t.prototype.remove = function() {
  71408. this._clear();
  71409. }, t.prototype.eachRendered = function(e) {
  71410. this._newAdded[0] && e(this._newAdded[0]);
  71411. }, t.prototype._create = function() {
  71412. var e = new GWe({
  71413. cursor: "default",
  71414. ignoreCoarsePointer: !0
  71415. });
  71416. return this._newAdded.push(e), this.group.add(e), e;
  71417. }, t.prototype._setCommon = function(e, n, r) {
  71418. var i = n.hostModel;
  71419. e.setShape({
  71420. polyline: i.get("polyline"),
  71421. curveness: i.get(["lineStyle", "curveness"])
  71422. }), e.useStyle(i.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
  71423. var a = n.getVisual("style");
  71424. a && a.stroke && e.setStyle("stroke", a.stroke), e.setStyle("fill", null);
  71425. var o = Fe(e);
  71426. o.seriesIndex = i.seriesIndex, e.on("mousemove", function(s) {
  71427. o.dataIndex = null;
  71428. var l = e.hoverDataIdx;
  71429. l > 0 && (o.dataIndex = l + e.__startIndex);
  71430. });
  71431. }, t.prototype._clear = function() {
  71432. this._newAdded = [], this.group.removeAll();
  71433. }, t;
  71434. }()
  71435. ), cre = {
  71436. seriesType: "lines",
  71437. plan: Tp(),
  71438. reset: function(t) {
  71439. var e = t.coordinateSystem;
  71440. if (!e) {
  71441. process.env.NODE_ENV !== "production" && Cr("The lines series must have a coordinate system.");
  71442. return;
  71443. }
  71444. var n = t.get("polyline"), r = t.pipelineContext.large;
  71445. return {
  71446. progress: function(i, a) {
  71447. var o = [];
  71448. if (r) {
  71449. var s = void 0, l = i.end - i.start;
  71450. if (n) {
  71451. for (var u = 0, c = i.start; c < i.end; c++)
  71452. u += t.getLineCoordsCount(c);
  71453. s = new Float32Array(l + u * 2);
  71454. } else
  71455. s = new Float32Array(l * 4);
  71456. for (var f = 0, d = [], c = i.start; c < i.end; c++) {
  71457. var h = t.getLineCoords(c, o);
  71458. n && (s[f++] = h);
  71459. for (var p = 0; p < h; p++)
  71460. d = e.dataToPoint(o[p], !1, d), s[f++] = d[0], s[f++] = d[1];
  71461. }
  71462. a.setLayout("linesPoints", s);
  71463. } else
  71464. for (var c = i.start; c < i.end; c++) {
  71465. var v = a.getItemModel(c), h = t.getLineCoords(c, o), g = [];
  71466. if (n)
  71467. for (var m = 0; m < h; m++)
  71468. g.push(e.dataToPoint(o[m]));
  71469. else {
  71470. g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]);
  71471. var y = v.get(["lineStyle", "curveness"]);
  71472. +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]);
  71473. }
  71474. a.setItemLayout(c, g);
  71475. }
  71476. }
  71477. };
  71478. }
  71479. }, ZWe = (
  71480. /** @class */
  71481. function(t) {
  71482. q(e, t);
  71483. function e() {
  71484. var n = t !== null && t.apply(this, arguments) || this;
  71485. return n.type = e.type, n;
  71486. }
  71487. return e.prototype.render = function(n, r, i) {
  71488. 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";
  71489. c || u.painter.getLayer(s).clear(!0), this._lastZlevel != null && !c && u.configLayer(this._lastZlevel, {
  71490. motionBlur: !1
  71491. }), 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, {
  71492. motionBlur: !0,
  71493. lastFrameAlpha: Math.max(Math.min(l / 10 + 0.9, 1), 0)
  71494. })), o.updateData(a);
  71495. var f = n.get("clip", !0) && X0(n.coordinateSystem, !1, n);
  71496. f ? this.group.setClipPath(f) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0;
  71497. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  71498. var a = n.getData(), o = this._updateLineDraw(a, n);
  71499. o.incrementalPrepareUpdate(a), this._clearLayer(i), this._finished = !1;
  71500. }, e.prototype.incrementalRender = function(n, r, i) {
  71501. this._lineDraw.incrementalUpdate(n, r.getData()), this._finished = n.end === r.getData().count();
  71502. }, e.prototype.eachRendered = function(n) {
  71503. this._lineDraw && this._lineDraw.eachRendered(n);
  71504. }, e.prototype.updateTransform = function(n, r, i) {
  71505. var a = n.getData(), o = n.pipelineContext;
  71506. if (!this._finished || o.large || o.progressiveRender)
  71507. return {
  71508. update: !0
  71509. };
  71510. var s = cre.reset(n, r, i);
  71511. s.progress && s.progress({
  71512. start: 0,
  71513. end: a.count(),
  71514. count: a.count()
  71515. }, a), this._lineDraw.updateLayout(), this._clearLayer(i);
  71516. }, e.prototype._updateLineDraw = function(n, r) {
  71517. var i = this._lineDraw, a = this._showEffect(r), o = !!r.get("polyline"), s = r.pipelineContext, l = s.large;
  71518. 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 jWe() : new Jk(o ? a ? QWe : ure : a ? lre : Kk), this._hasEffet = a, this._isPolyline = o, this._isLargeDraw = l), this.group.add(i.group), i;
  71519. }, e.prototype._showEffect = function(n) {
  71520. return !!n.get(["effect", "show"]);
  71521. }, e.prototype._clearLayer = function(n) {
  71522. var r = n.getZr(), i = r.painter.getType() === "svg";
  71523. !i && this._lastZlevel != null && r.painter.getLayer(this._lastZlevel).clear(!0);
  71524. }, e.prototype.remove = function(n, r) {
  71525. this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(r);
  71526. }, e.prototype.dispose = function(n, r) {
  71527. this.remove(n, r);
  71528. }, e.type = "lines", e;
  71529. }(zt)
  71530. ), UWe = typeof Uint32Array > "u" ? Array : Uint32Array, XWe = typeof Float64Array > "u" ? Array : Float64Array;
  71531. function bW(t) {
  71532. var e = t.data;
  71533. 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) {
  71534. var r = [n[0].coord, n[1].coord], i = {
  71535. coords: r
  71536. };
  71537. return n[0].name && (i.fromName = n[0].name), n[1].name && (i.toName = n[1].name), Rx([i, n[0], n[1]]);
  71538. }));
  71539. }
  71540. var YWe = (
  71541. /** @class */
  71542. function(t) {
  71543. q(e, t);
  71544. function e() {
  71545. var n = t !== null && t.apply(this, arguments) || this;
  71546. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
  71547. }
  71548. return e.prototype.init = function(n) {
  71549. n.data = n.data || [], bW(n);
  71550. var r = this._processFlatCoordsArray(n.data);
  71551. this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count)), t.prototype.init.apply(this, arguments);
  71552. }, e.prototype.mergeOption = function(n) {
  71553. if (bW(n), n.data) {
  71554. var r = this._processFlatCoordsArray(n.data);
  71555. this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count));
  71556. }
  71557. t.prototype.mergeOption.apply(this, arguments);
  71558. }, e.prototype.appendData = function(n) {
  71559. var r = this._processFlatCoordsArray(n.data);
  71560. r.flatCoords && (this._flatCoords ? (this._flatCoords = _m(this._flatCoords, r.flatCoords), this._flatCoordsOffset = _m(this._flatCoordsOffset, r.flatCoordsOffset)) : (this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset), n.data = new Float32Array(r.count)), this.getRawData().appendData(n.data);
  71561. }, e.prototype._getCoordsFromItemModel = function(n) {
  71562. var r = this.getData().getItemModel(n), i = r.option instanceof Array ? r.option : r.getShallow("coords");
  71563. if (process.env.NODE_ENV !== "production" && !(i instanceof Array && i.length > 0 && i[0] instanceof Array))
  71564. throw new Error("Invalid coords " + JSON.stringify(i) + ". Lines must have 2d coords array in data item.");
  71565. return i;
  71566. }, e.prototype.getLineCoordsCount = function(n) {
  71567. return this._flatCoordsOffset ? this._flatCoordsOffset[n * 2 + 1] : this._getCoordsFromItemModel(n).length;
  71568. }, e.prototype.getLineCoords = function(n, r) {
  71569. if (this._flatCoordsOffset) {
  71570. for (var i = this._flatCoordsOffset[n * 2], a = this._flatCoordsOffset[n * 2 + 1], o = 0; o < a; o++)
  71571. r[o] = r[o] || [], r[o][0] = this._flatCoords[i + o * 2], r[o][1] = this._flatCoords[i + o * 2 + 1];
  71572. return a;
  71573. } else {
  71574. for (var s = this._getCoordsFromItemModel(n), o = 0; o < s.length; o++)
  71575. r[o] = r[o] || [], r[o][0] = s[o][0], r[o][1] = s[o][1];
  71576. return s.length;
  71577. }
  71578. }, e.prototype._processFlatCoordsArray = function(n) {
  71579. var r = 0;
  71580. if (this._flatCoords && (r = this._flatCoords.length), St(n[0])) {
  71581. for (var i = n.length, a = new UWe(i), o = new XWe(i), s = 0, l = 0, u = 0, c = 0; c < i; ) {
  71582. u++;
  71583. var f = n[c++];
  71584. a[l++] = s + r, a[l++] = f;
  71585. for (var d = 0; d < f; d++) {
  71586. var h = n[c++], p = n[c++];
  71587. if (o[s++] = h, o[s++] = p, c > i && process.env.NODE_ENV !== "production")
  71588. throw new Error("Invalid data format.");
  71589. }
  71590. }
  71591. return {
  71592. flatCoordsOffset: new Uint32Array(a.buffer, 0, l),
  71593. flatCoords: o,
  71594. count: u
  71595. };
  71596. }
  71597. return {
  71598. flatCoordsOffset: null,
  71599. flatCoords: null,
  71600. count: n.length
  71601. };
  71602. }, e.prototype.getInitialData = function(n, r) {
  71603. if (process.env.NODE_ENV !== "production") {
  71604. var i = Vf.get(n.coordinateSystem);
  71605. if (!i)
  71606. throw new Error("Unknown coordinate system " + n.coordinateSystem);
  71607. }
  71608. var a = new Nr(["value"], this);
  71609. return a.hasItemOption = !1, a.initData(n.data, [], function(o, s, l, u) {
  71610. if (o instanceof Array)
  71611. return NaN;
  71612. a.hasItemOption = !0;
  71613. var c = o.value;
  71614. if (c != null)
  71615. return c instanceof Array ? c[u] : c;
  71616. }), a;
  71617. }, e.prototype.formatTooltip = function(n, r, i) {
  71618. var a = this.getData(), o = a.getItemModel(n), s = o.get("name");
  71619. if (s)
  71620. return s;
  71621. var l = o.get("fromName"), u = o.get("toName"), c = [];
  71622. return l != null && c.push(l), u != null && c.push(u), tr("nameValue", {
  71623. name: c.join(" > ")
  71624. });
  71625. }, e.prototype.preventIncremental = function() {
  71626. return !!this.get(["effect", "show"]);
  71627. }, e.prototype.getProgressive = function() {
  71628. var n = this.option.progressive;
  71629. return n ?? (this.option.large ? 1e4 : this.get("progressive"));
  71630. }, e.prototype.getProgressiveThreshold = function() {
  71631. var n = this.option.progressiveThreshold;
  71632. return n ?? (this.option.large ? 2e4 : this.get("progressiveThreshold"));
  71633. }, e.prototype.getZLevelKey = function() {
  71634. var n = this.getModel("effect"), r = n.get("trailLength");
  71635. return this.getData().count() > this.getProgressiveThreshold() ? this.id : n.get("show") && r > 0 ? r + "" : "";
  71636. }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
  71637. coordinateSystem: "geo",
  71638. // zlevel: 0,
  71639. z: 2,
  71640. legendHoverLink: !0,
  71641. // Cartesian coordinate system
  71642. xAxisIndex: 0,
  71643. yAxisIndex: 0,
  71644. symbol: ["none", "none"],
  71645. symbolSize: [10, 10],
  71646. // Geo coordinate system
  71647. geoIndex: 0,
  71648. effect: {
  71649. show: !1,
  71650. period: 4,
  71651. constantSpeed: 0,
  71652. symbol: "circle",
  71653. symbolSize: 3,
  71654. loop: !0,
  71655. trailLength: 0.2
  71656. },
  71657. large: !1,
  71658. // Available when large is true
  71659. largeThreshold: 2e3,
  71660. polyline: !1,
  71661. clip: !0,
  71662. label: {
  71663. show: !1,
  71664. position: "end"
  71665. // distance: 5,
  71666. // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
  71667. },
  71668. lineStyle: {
  71669. opacity: 0.5
  71670. }
  71671. }, e;
  71672. }(Ht)
  71673. );
  71674. function Ib(t) {
  71675. return t instanceof Array || (t = [t, t]), t;
  71676. }
  71677. var qWe = {
  71678. seriesType: "lines",
  71679. reset: function(t) {
  71680. var e = Ib(t.get("symbol")), n = Ib(t.get("symbolSize")), r = t.getData();
  71681. r.setVisual("fromSymbol", e && e[0]), r.setVisual("toSymbol", e && e[1]), r.setVisual("fromSymbolSize", n && n[0]), r.setVisual("toSymbolSize", n && n[1]);
  71682. function i(a, o) {
  71683. var s = a.getItemModel(o), l = Ib(s.getShallow("symbol", !0)), u = Ib(s.getShallow("symbolSize", !0));
  71684. 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]);
  71685. }
  71686. return {
  71687. dataEach: r.hasItemOption ? i : null
  71688. };
  71689. }
  71690. };
  71691. function KWe(t) {
  71692. t.registerChartView(ZWe), t.registerSeriesModel(YWe), t.registerLayout(cre), t.registerVisual(qWe);
  71693. }
  71694. var JWe = 256, e7e = (
  71695. /** @class */
  71696. function() {
  71697. function t() {
  71698. this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
  71699. inRange: null,
  71700. outOfRange: null
  71701. };
  71702. var e = oo.createCanvas();
  71703. this.canvas = e;
  71704. }
  71705. return t.prototype.update = function(e, n, r, i, a, o) {
  71706. 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;
  71707. f.width = n, f.height = r;
  71708. for (var p = 0; p < h; ++p) {
  71709. var v = e[p], g = v[0], m = v[1], y = v[2], b = i(y);
  71710. d.globalAlpha = b, d.drawImage(s, g - c, m - c);
  71711. }
  71712. if (!f.width || !f.height)
  71713. return f;
  71714. for (var _ = d.getImageData(0, 0, f.width, f.height), O = _.data, S = 0, x = O.length, C = this.minOpacity, T = this.maxOpacity, w = T - C; S < x; ) {
  71715. var b = O[S + 3] / 256, P = Math.floor(b * (JWe - 1)) * 4;
  71716. if (b > 0) {
  71717. var $ = o(b) ? l : u;
  71718. b > 0 && (b = b * w + C), O[S++] = $[P], O[S++] = $[P + 1], O[S++] = $[P + 2], O[S++] = $[P + 3] * b * 256;
  71719. } else
  71720. S += 4;
  71721. }
  71722. return d.putImageData(_, 0, 0), f;
  71723. }, t.prototype._getBrush = function() {
  71724. var e = this._brushCanvas || (this._brushCanvas = oo.createCanvas()), n = this.pointSize + this.blurSize, r = n * 2;
  71725. e.width = r, e.height = r;
  71726. var i = e.getContext("2d");
  71727. 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;
  71728. }, t.prototype._getGradient = function(e, n) {
  71729. 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++)
  71730. e[n](s / 255, !0, a), i[o++] = a[0], i[o++] = a[1], i[o++] = a[2], i[o++] = a[3];
  71731. return i;
  71732. }, t;
  71733. }()
  71734. );
  71735. function t7e(t, e, n) {
  71736. var r = t[1] - t[0];
  71737. e = ce(e, function(o) {
  71738. return {
  71739. interval: [(o.interval[0] - t[0]) / r, (o.interval[1] - t[0]) / r]
  71740. };
  71741. });
  71742. var i = e.length, a = 0;
  71743. return function(o) {
  71744. var s;
  71745. for (s = a; s < i; s++) {
  71746. var l = e[s].interval;
  71747. if (l[0] <= o && o <= l[1]) {
  71748. a = s;
  71749. break;
  71750. }
  71751. }
  71752. if (s === i)
  71753. for (s = a - 1; s >= 0; s--) {
  71754. var l = e[s].interval;
  71755. if (l[0] <= o && o <= l[1]) {
  71756. a = s;
  71757. break;
  71758. }
  71759. }
  71760. return s >= 0 && s < i && n[s];
  71761. };
  71762. }
  71763. function n7e(t, e) {
  71764. var n = t[1] - t[0];
  71765. return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n], function(r) {
  71766. return r >= e[0] && r <= e[1];
  71767. };
  71768. }
  71769. function _W(t) {
  71770. var e = t.dimensions;
  71771. return e[0] === "lng" && e[1] === "lat";
  71772. }
  71773. var r7e = (
  71774. /** @class */
  71775. function(t) {
  71776. q(e, t);
  71777. function e() {
  71778. var n = t !== null && t.apply(this, arguments) || this;
  71779. return n.type = e.type, n;
  71780. }
  71781. return e.prototype.render = function(n, r, i) {
  71782. var a;
  71783. if (r.eachComponent("visualMap", function(s) {
  71784. s.eachTargetSeries(function(l) {
  71785. l === n && (a = s);
  71786. });
  71787. }), process.env.NODE_ENV !== "production" && !a)
  71788. throw new Error("Heatmap must use with visualMap");
  71789. this._progressiveEls = null, this.group.removeAll();
  71790. var o = n.coordinateSystem;
  71791. o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(n, i, 0, n.getData().count()) : _W(o) && this._renderOnGeo(o, n, a, i);
  71792. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  71793. this.group.removeAll();
  71794. }, e.prototype.incrementalRender = function(n, r, i, a) {
  71795. var o = r.coordinateSystem;
  71796. o && (_W(o) ? this.render(r, i, a) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(r, a, n.start, n.end, !0)));
  71797. }, e.prototype.eachRendered = function(n) {
  71798. Tu(this._progressiveEls || this.group, n);
  71799. }, e.prototype._renderOnCartesianAndCalendar = function(n, r, i, a, o) {
  71800. var s = n.coordinateSystem, l = Wf(s, "cartesian2d"), u, c, f, d;
  71801. if (l) {
  71802. var h = s.getAxis("x"), p = s.getAxis("y");
  71803. if (process.env.NODE_ENV !== "production") {
  71804. if (!(h.type === "category" && p.type === "category"))
  71805. throw new Error("Heatmap on cartesian must have two category axes");
  71806. if (!(h.onBand && p.onBand))
  71807. throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
  71808. }
  71809. u = h.getBandWidth() + 0.5, c = p.getBandWidth() + 0.5, f = h.scale.getExtent(), d = p.scale.getExtent();
  71810. }
  71811. for (var v = this.group, g = n.getData(), m = n.getModel(["emphasis", "itemStyle"]).getItemStyle(), y = n.getModel(["blur", "itemStyle"]).getItemStyle(), b = n.getModel(["select", "itemStyle"]).getItemStyle(), _ = n.get(["itemStyle", "borderRadius"]), O = er(n), S = n.getModel("emphasis"), x = S.get("focus"), C = S.get("blurScope"), T = S.get("disabled"), w = l ? [g.mapDimension("x"), g.mapDimension("y"), g.mapDimension("value")] : [g.mapDimension("time"), g.mapDimension("value")], P = i; P < a; P++) {
  71812. var $ = void 0, A = g.getItemVisual(P, "style");
  71813. if (l) {
  71814. var D = g.get(w[0], P), E = g.get(w[1], P);
  71815. if (isNaN(g.get(w[2], P)) || isNaN(D) || isNaN(E) || D < f[0] || D > f[1] || E < d[0] || E > d[1])
  71816. continue;
  71817. var R = s.dataToPoint([D, E]);
  71818. $ = new mt({
  71819. shape: {
  71820. x: R[0] - u / 2,
  71821. y: R[1] - c / 2,
  71822. width: u,
  71823. height: c
  71824. },
  71825. style: A
  71826. });
  71827. } else {
  71828. if (isNaN(g.get(w[1], P)))
  71829. continue;
  71830. $ = new mt({
  71831. z2: 1,
  71832. shape: s.dataToRect([g.get(w[0], P)]).contentShape,
  71833. style: A
  71834. });
  71835. }
  71836. if (g.hasItemOption) {
  71837. var N = g.getItemModel(P), V = N.getModel("emphasis");
  71838. m = V.getModel("itemStyle").getItemStyle(), y = N.getModel(["blur", "itemStyle"]).getItemStyle(), b = N.getModel(["select", "itemStyle"]).getItemStyle(), _ = N.get(["itemStyle", "borderRadius"]), x = V.get("focus"), C = V.get("blurScope"), T = V.get("disabled"), O = er(N);
  71839. }
  71840. $.shape.r = _;
  71841. var B = n.getRawValue(P), W = "-";
  71842. B && B[2] != null && (W = B[2] + ""), Pr($, O, {
  71843. labelFetcher: n,
  71844. labelDataIndex: P,
  71845. defaultOpacity: A.opacity,
  71846. defaultText: W
  71847. }), $.ensureState("emphasis").style = m, $.ensureState("blur").style = y, $.ensureState("select").style = b, bn($, x, C, T), $.incremental = o, o && ($.states.emphasis.hoverLayer = !0), v.add($), g.setItemGraphicEl(P, $), this._progressiveEls && this._progressiveEls.push($);
  71848. }
  71849. }, e.prototype._renderOnGeo = function(n, r, i, a) {
  71850. var o = i.targetVisuals.inRange, s = i.targetVisuals.outOfRange, l = r.getData(), u = this._hmLayer || this._hmLayer || new e7e();
  71851. u.blurSize = r.get("blurSize"), u.pointSize = r.get("pointSize"), u.minOpacity = r.get("minOpacity"), u.maxOpacity = r.get("maxOpacity");
  71852. var c = n.getViewRect().clone(), f = n.getRoamTransform();
  71853. c.applyTransform(f);
  71854. 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")], b = l.mapArray(y, function(x, C, T) {
  71855. var w = n.dataToPoint([x, C]);
  71856. return w[0] -= d, w[1] -= h, w.push(T), w;
  71857. }), _ = i.getExtent(), O = i.type === "visualMap.continuous" ? n7e(_, i.option.range) : t7e(_, i.getPieceList(), i.option.selected);
  71858. u.update(b, g, m, o.color.getNormalizer(), {
  71859. inRange: o.color.getColorMapper(),
  71860. outOfRange: s.color.getColorMapper()
  71861. }, O);
  71862. var S = new lr({
  71863. style: {
  71864. width: g,
  71865. height: m,
  71866. x: d,
  71867. y: h,
  71868. image: u.canvas
  71869. },
  71870. silent: !0
  71871. });
  71872. this.group.add(S);
  71873. }, e.type = "heatmap", e;
  71874. }(zt)
  71875. ), i7e = (
  71876. /** @class */
  71877. function(t) {
  71878. q(e, t);
  71879. function e() {
  71880. var n = t !== null && t.apply(this, arguments) || this;
  71881. return n.type = e.type, n;
  71882. }
  71883. return e.prototype.getInitialData = function(n, r) {
  71884. return cs(null, this, {
  71885. generateCoord: "value"
  71886. });
  71887. }, e.prototype.preventIncremental = function() {
  71888. var n = Vf.get(this.get("coordinateSystem"));
  71889. if (n && n.dimensions)
  71890. return n.dimensions[0] === "lng" && n.dimensions[1] === "lat";
  71891. }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
  71892. coordinateSystem: "cartesian2d",
  71893. // zlevel: 0,
  71894. z: 2,
  71895. // Cartesian coordinate system
  71896. // xAxisIndex: 0,
  71897. // yAxisIndex: 0,
  71898. // Geo coordinate system
  71899. geoIndex: 0,
  71900. blurSize: 30,
  71901. pointSize: 20,
  71902. maxOpacity: 1,
  71903. minOpacity: 0,
  71904. select: {
  71905. itemStyle: {
  71906. borderColor: "#212121"
  71907. }
  71908. }
  71909. }, e;
  71910. }(Ht)
  71911. );
  71912. function a7e(t) {
  71913. t.registerChartView(r7e), t.registerSeriesModel(i7e);
  71914. }
  71915. var o7e = ["itemStyle", "borderWidth"], OW = [{
  71916. xy: "x",
  71917. wh: "width",
  71918. index: 0,
  71919. posDesc: ["left", "right"]
  71920. }, {
  71921. xy: "y",
  71922. wh: "height",
  71923. index: 1,
  71924. posDesc: ["top", "bottom"]
  71925. }], zP = new ul(), s7e = (
  71926. /** @class */
  71927. function(t) {
  71928. q(e, t);
  71929. function e() {
  71930. var n = t !== null && t.apply(this, arguments) || this;
  71931. return n.type = e.type, n;
  71932. }
  71933. return e.prototype.render = function(n, r, i) {
  71934. var a = this.group, o = n.getData(), s = this._data, l = n.coordinateSystem, u = l.getBaseAxis(), c = u.isHorizontal(), f = l.master.getRect(), d = {
  71935. ecSize: {
  71936. width: i.getWidth(),
  71937. height: i.getHeight()
  71938. },
  71939. seriesModel: n,
  71940. coordSys: l,
  71941. coordSysExtent: [[f.x, f.x + f.width], [f.y, f.y + f.height]],
  71942. isHorizontal: c,
  71943. valueDim: OW[+c],
  71944. categoryDim: OW[1 - +c]
  71945. };
  71946. o.diff(s).add(function(p) {
  71947. if (o.hasValue(p)) {
  71948. var v = xW(o, p), g = SW(o, p, v, d), m = wW(o, d, g);
  71949. o.setItemGraphicEl(p, m), a.add(m), TW(m, d, g);
  71950. }
  71951. }).update(function(p, v) {
  71952. var g = s.getItemGraphicEl(v);
  71953. if (!o.hasValue(p)) {
  71954. a.remove(g);
  71955. return;
  71956. }
  71957. var m = xW(o, p), y = SW(o, p, m, d), b = gre(o, y);
  71958. g && b !== g.__pictorialShapeStr && (a.remove(g), o.setItemGraphicEl(p, null), g = null), g ? p7e(g, d, y) : g = wW(o, d, y, !0), o.setItemGraphicEl(p, g), g.__pictorialSymbolMeta = y, a.add(g), TW(g, d, y);
  71959. }).remove(function(p) {
  71960. var v = s.getItemGraphicEl(p);
  71961. v && CW(s, p, v.__pictorialSymbolMeta.animationModel, v);
  71962. }).execute();
  71963. var h = n.get("clip", !0) ? X0(n.coordinateSystem, !1, n) : null;
  71964. return h ? a.setClipPath(h) : a.removeClipPath(), this._data = o, this.group;
  71965. }, e.prototype.remove = function(n, r) {
  71966. var i = this.group, a = this._data;
  71967. n.get("animation") ? a && a.eachItemGraphicEl(function(o) {
  71968. CW(a, Fe(o).dataIndex, n, o);
  71969. }) : i.removeAll();
  71970. }, e.type = "pictorialBar", e;
  71971. }(zt)
  71972. );
  71973. function SW(t, e, n, r) {
  71974. 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 = {
  71975. dataIndex: e,
  71976. layout: i,
  71977. itemModel: n,
  71978. symbolType: t.getItemVisual(e, "symbol") || "circle",
  71979. style: t.getItemVisual(e, "style"),
  71980. symbolClip: o,
  71981. symbolRepeat: a,
  71982. symbolRepeatDirection: n.get("symbolRepeatDirection"),
  71983. symbolPatternSize: c,
  71984. rotation: u,
  71985. animationModel: f ? n : null,
  71986. hoverScale: f && n.get(["emphasis", "scale"]),
  71987. z2: n.getShallow("z", !0) || 0
  71988. };
  71989. l7e(n, a, i, r, d), u7e(t, e, i, a, o, d.boundingLength, d.pxSign, c, r, d), c7e(n, d.symbolScale, u, r, d);
  71990. var h = d.symbolSize, p = Ff(n.get("symbolOffset"), h);
  71991. return f7e(n, h, i, a, o, p, s, d.valueLineWidth, d.boundingLength, d.repeatCutLength, r, d), d;
  71992. }
  71993. function l7e(t, e, n, r, i) {
  71994. 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;
  71995. if (ue(o)) {
  71996. var f = [VP(s, o[0]) - l, VP(s, o[1]) - l];
  71997. f[1] < f[0] && f.reverse(), c = f[u];
  71998. } else o != null ? c = VP(s, o) - l : e ? c = r.coordSysExtent[a.index][u] - l : c = n[a.wh];
  71999. i.boundingLength = c, e && (i.repeatCutLength = n[a.wh]), i.pxSign = c > 0 ? 1 : -1;
  72000. }
  72001. function VP(t, e) {
  72002. return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)));
  72003. }
  72004. function u7e(t, e, n, r, i, a, o, s, l, u) {
  72005. var c = l.valueDim, f = l.categoryDim, d = Math.abs(n[f.wh]), h = t.getItemVisual(e, "symbolSize"), p;
  72006. ue(h) ? p = h.slice() : h == null ? p = ["100%", "100%"] : p = [h, h], p[f.index] = _e(p[f.index], d), p[c.index] = _e(p[c.index], r ? d : Math.abs(a)), u.symbolSize = p;
  72007. var v = u.symbolScale = [p[0] / s, p[1] / s];
  72008. v[c.index] *= (l.isHorizontal ? -1 : 1) * o;
  72009. }
  72010. function c7e(t, e, n, r, i) {
  72011. var a = t.get(o7e) || 0;
  72012. a && (zP.attr({
  72013. scaleX: e[0],
  72014. scaleY: e[1],
  72015. rotation: n
  72016. }), zP.updateTransform(), a /= zP.getLineScale(), a *= e[r.valueDim.index]), i.valueLineWidth = a || 0;
  72017. }
  72018. function f7e(t, e, n, r, i, a, o, s, l, u, c, f) {
  72019. var d = c.categoryDim, h = c.valueDim, p = f.pxSign, v = Math.max(e[h.index] + s, 0), g = v;
  72020. if (r) {
  72021. var m = Math.abs(l), y = Tn(t.get("symbolMargin"), "15%") + "", b = !1;
  72022. y.lastIndexOf("!") === y.length - 1 && (b = !0, y = y.slice(0, y.length - 1));
  72023. var _ = _e(y, e[h.index]), O = Math.max(v + _ * 2, 0), S = b ? 0 : _ * 2, x = Wx(r), C = x ? r : PW((m + S) / O), T = m - C * v;
  72024. _ = T / 2 / (b ? C : Math.max(C - 1, 1)), O = v + _ * 2, S = b ? 0 : _ * 2, !x && r !== "fixed" && (C = u ? PW((Math.abs(u) + S) / O) : 0), g = C * O - S, f.repeatTimes = C, f.symbolMargin = _;
  72025. }
  72026. var w = p * (g / 2), P = f.pathPosition = [];
  72027. P[d.index] = n[d.wh] / 2, P[h.index] = o === "start" ? w : o === "end" ? l - w : l / 2, a && (P[0] += a[0], P[1] += a[1]);
  72028. var $ = f.bundlePosition = [];
  72029. $[d.index] = n[d.xy], $[h.index] = n[h.xy];
  72030. var A = f.barRectShape = le({}, n);
  72031. A[h.wh] = p * Math.max(Math.abs(n[h.wh]), Math.abs(P[h.index] + w)), A[d.wh] = n[d.wh];
  72032. var D = f.clipShape = {};
  72033. D[d.xy] = -n[d.xy], D[d.wh] = c.ecSize[d.wh], D[h.xy] = 0, D[h.wh] = n[h.wh];
  72034. }
  72035. function fre(t) {
  72036. var e = t.symbolPatternSize, n = $n(
  72037. // Consider texture img, make a big size.
  72038. t.symbolType,
  72039. -e / 2,
  72040. -e / 2,
  72041. e,
  72042. e
  72043. );
  72044. return n.attr({
  72045. culling: !0
  72046. }), n.type !== "image" && n.setStyle({
  72047. strokeNoScale: !0
  72048. }), n;
  72049. }
  72050. function dre(t, e, n, r) {
  72051. 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;
  72052. for (sL(t, function(v) {
  72053. v.__pictorialAnimationIndex = c, v.__pictorialRepeatTimes = u, c < u ? sh(v, null, p(c), n, r) : sh(v, null, {
  72054. scaleX: 0,
  72055. scaleY: 0
  72056. }, n, r, function() {
  72057. i.remove(v);
  72058. }), c++;
  72059. }); c < u; c++) {
  72060. var d = fre(n);
  72061. d.__pictorialAnimationIndex = c, d.__pictorialRepeatTimes = u, i.add(d);
  72062. var h = p(c);
  72063. sh(d, {
  72064. x: h.x,
  72065. y: h.y,
  72066. scaleX: 0,
  72067. scaleY: 0
  72068. }, {
  72069. scaleX: h.scaleX,
  72070. scaleY: h.scaleY,
  72071. rotation: h.rotation
  72072. }, n, r);
  72073. }
  72074. function p(v) {
  72075. var g = s.slice(), m = n.pxSign, y = v;
  72076. return (n.symbolRepeatDirection === "start" ? m > 0 : m < 0) && (y = u - 1 - v), g[l.index] = f * (y - u / 2 + 0.5) + s[l.index], {
  72077. x: g[0],
  72078. y: g[1],
  72079. scaleX: n.symbolScale[0],
  72080. scaleY: n.symbolScale[1],
  72081. rotation: n.rotation
  72082. };
  72083. }
  72084. }
  72085. function hre(t, e, n, r) {
  72086. var i = t.__pictorialBundle, a = t.__pictorialMainPath;
  72087. a ? sh(a, null, {
  72088. x: n.pathPosition[0],
  72089. y: n.pathPosition[1],
  72090. scaleX: n.symbolScale[0],
  72091. scaleY: n.symbolScale[1],
  72092. rotation: n.rotation
  72093. }, n, r) : (a = t.__pictorialMainPath = fre(n), i.add(a), sh(a, {
  72094. x: n.pathPosition[0],
  72095. y: n.pathPosition[1],
  72096. scaleX: 0,
  72097. scaleY: 0,
  72098. rotation: n.rotation
  72099. }, {
  72100. scaleX: n.symbolScale[0],
  72101. scaleY: n.symbolScale[1]
  72102. }, n, r));
  72103. }
  72104. function pre(t, e, n) {
  72105. var r = le({}, e.barRectShape), i = t.__pictorialBarRect;
  72106. i ? sh(i, null, {
  72107. shape: r
  72108. }, e, n) : (i = t.__pictorialBarRect = new mt({
  72109. z2: 2,
  72110. shape: r,
  72111. silent: !0,
  72112. style: {
  72113. stroke: "transparent",
  72114. fill: "transparent",
  72115. lineWidth: 0
  72116. }
  72117. }), i.disableMorphing = !0, t.add(i));
  72118. }
  72119. function vre(t, e, n, r) {
  72120. if (n.symbolClip) {
  72121. var i = t.__pictorialClipPath, a = le({}, n.clipShape), o = e.valueDim, s = n.animationModel, l = n.dataIndex;
  72122. if (i)
  72123. Ct(i, {
  72124. shape: a
  72125. }, s, l);
  72126. else {
  72127. a[o.wh] = 0, i = new mt({
  72128. shape: a
  72129. }), t.__pictorialBundle.setClipPath(i), t.__pictorialClipPath = i;
  72130. var u = {};
  72131. u[o.wh] = n.clipShape[o.wh], Nf[r ? "updateProps" : "initProps"](i, {
  72132. shape: u
  72133. }, s, l);
  72134. }
  72135. }
  72136. }
  72137. function xW(t, e) {
  72138. var n = t.getItemModel(e);
  72139. return n.getAnimationDelayParams = d7e, n.isAnimationEnabled = h7e, n;
  72140. }
  72141. function d7e(t) {
  72142. return {
  72143. index: t.__pictorialAnimationIndex,
  72144. count: t.__pictorialRepeatTimes
  72145. };
  72146. }
  72147. function h7e() {
  72148. return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation");
  72149. }
  72150. function wW(t, e, n, r) {
  72151. var i = new Ve(), a = new Ve();
  72152. return i.add(a), i.__pictorialBundle = a, a.x = n.bundlePosition[0], a.y = n.bundlePosition[1], n.symbolRepeat ? dre(i, e, n) : hre(i, e, n), pre(i, n, r), vre(i, e, n, r), i.__pictorialShapeStr = gre(t, n), i.__pictorialSymbolMeta = n, i;
  72153. }
  72154. function p7e(t, e, n) {
  72155. var r = n.animationModel, i = n.dataIndex, a = t.__pictorialBundle;
  72156. Ct(a, {
  72157. x: n.bundlePosition[0],
  72158. y: n.bundlePosition[1]
  72159. }, r, i), n.symbolRepeat ? dre(t, e, n, !0) : hre(t, e, n, !0), pre(t, n, !0), vre(t, e, n, !0);
  72160. }
  72161. function CW(t, e, n, r) {
  72162. var i = r.__pictorialBarRect;
  72163. i && i.removeTextContent();
  72164. var a = [];
  72165. sL(r, function(o) {
  72166. a.push(o);
  72167. }), r.__pictorialMainPath && a.push(r.__pictorialMainPath), r.__pictorialClipPath && (n = null), k(a, function(o) {
  72168. uu(o, {
  72169. scaleX: 0,
  72170. scaleY: 0
  72171. }, n, e, function() {
  72172. r.parent && r.parent.remove(r);
  72173. });
  72174. }), t.setItemGraphicEl(e, null);
  72175. }
  72176. function gre(t, e) {
  72177. return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":");
  72178. }
  72179. function sL(t, e, n) {
  72180. k(t.__pictorialBundle.children(), function(r) {
  72181. r !== t.__pictorialBarRect && e.call(n, r);
  72182. });
  72183. }
  72184. function sh(t, e, n, r, i, a) {
  72185. e && t.attr(e), r.symbolClip && !i ? n && t.attr(n) : n && Nf[i ? "updateProps" : "initProps"](t, n, r.animationModel, r.dataIndex, a);
  72186. }
  72187. function TW(t, e, n) {
  72188. 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");
  72189. sL(t, function(v) {
  72190. if (v instanceof lr) {
  72191. var g = v.style;
  72192. v.useStyle(le({
  72193. // TODO other properties like dx, dy ?
  72194. image: g.image,
  72195. x: g.x,
  72196. y: g.y,
  72197. width: g.width,
  72198. height: g.height
  72199. }, n.style));
  72200. } else
  72201. v.useStyle(n.style);
  72202. var m = v.ensureState("emphasis");
  72203. 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;
  72204. });
  72205. var h = e.valueDim.posDesc[+(n.boundingLength > 0)], p = t.__pictorialBarRect;
  72206. p.ignoreClip = !0, Pr(p, er(i), {
  72207. labelFetcher: e.seriesModel,
  72208. labelDataIndex: r,
  72209. defaultText: Zh(e.seriesModel.getData(), r),
  72210. inheritColor: n.style.fill,
  72211. defaultOpacity: n.style.opacity,
  72212. defaultOutsidePosition: h
  72213. }), bn(t, c, f, a.get("disabled"));
  72214. }
  72215. function PW(t) {
  72216. var e = Math.round(t);
  72217. return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t);
  72218. }
  72219. var v7e = (
  72220. /** @class */
  72221. function(t) {
  72222. q(e, t);
  72223. function e() {
  72224. var n = t !== null && t.apply(this, arguments) || this;
  72225. return n.type = e.type, n.hasSymbolVisual = !0, n.defaultSymbol = "roundRect", n;
  72226. }
  72227. return e.prototype.getInitialData = function(n) {
  72228. return n.stack = null, t.prototype.getInitialData.apply(this, arguments);
  72229. }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = Pu(Bm.defaultOption, {
  72230. symbol: "circle",
  72231. symbolSize: null,
  72232. symbolRotate: null,
  72233. symbolPosition: null,
  72234. symbolOffset: null,
  72235. symbolMargin: null,
  72236. symbolRepeat: !1,
  72237. symbolRepeatDirection: "end",
  72238. symbolClip: !1,
  72239. symbolBoundingData: null,
  72240. symbolPatternSize: 400,
  72241. barGap: "-100%",
  72242. // Pictorial bar do not clip by default because in many cases
  72243. // xAxis and yAxis are not displayed and it's expected not to clip
  72244. clip: !1,
  72245. // z can be set in data item, which is z2 actually.
  72246. // Disable progressive
  72247. progressive: 0,
  72248. emphasis: {
  72249. // By default pictorialBar do not hover scale. Hover scale is not suitable
  72250. // for the case that both has foreground and background.
  72251. scale: !1
  72252. },
  72253. select: {
  72254. itemStyle: {
  72255. borderColor: "#212121"
  72256. }
  72257. }
  72258. }), e;
  72259. }(Bm)
  72260. );
  72261. function g7e(t) {
  72262. t.registerChartView(s7e), t.registerSeriesModel(v7e), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, Ue(Kee, "pictorialBar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Jee("pictorialBar"));
  72263. }
  72264. var m7e = (
  72265. /** @class */
  72266. function(t) {
  72267. q(e, t);
  72268. function e() {
  72269. var n = t !== null && t.apply(this, arguments) || this;
  72270. return n.type = e.type, n._layers = [], n;
  72271. }
  72272. return e.prototype.render = function(n, r, i) {
  72273. var a = n.getData(), o = this, s = this.group, l = n.getLayerSeries(), u = a.getLayout("layoutInfo"), c = u.rect, f = u.boundaryGap;
  72274. s.x = 0, s.y = c.y + f[0];
  72275. function d(g) {
  72276. return g.name;
  72277. }
  72278. var h = new Xs(this._layersSeries || [], l, d, d), p = [];
  72279. h.add(xe(v, this, "add")).update(xe(v, this, "update")).remove(xe(v, this, "remove")).execute();
  72280. function v(g, m, y) {
  72281. var b = o._layers;
  72282. if (g === "remove") {
  72283. s.remove(b[m]);
  72284. return;
  72285. }
  72286. for (var _ = [], O = [], S, x = l[m].indices, C = 0; C < x.length; C++) {
  72287. var T = a.getItemLayout(x[C]), w = T.x, P = T.y0, $ = T.y;
  72288. _.push(w, P), O.push(w, P + $), S = a.getItemVisual(x[C], "style");
  72289. }
  72290. var A, D = a.getItemLayout(x[0]), E = n.getModel("label"), R = E.get("margin"), N = n.getModel("emphasis");
  72291. if (g === "add") {
  72292. var V = p[m] = new Ve();
  72293. A = new Fte({
  72294. shape: {
  72295. points: _,
  72296. stackedOnPoints: O,
  72297. smooth: 0.4,
  72298. stackedOnSmooth: 0.4,
  72299. smoothConstraint: !1
  72300. },
  72301. z2: 0
  72302. }), V.add(A), s.add(V), n.isAnimationEnabled() && A.setClipPath(y7e(A.getBoundingRect(), n, function() {
  72303. A.removeClipPath();
  72304. }));
  72305. } else {
  72306. var V = b[y];
  72307. A = V.childAt(0), s.add(V), p[m] = V, Ct(A, {
  72308. shape: {
  72309. points: _,
  72310. stackedOnPoints: O
  72311. }
  72312. }, n), uo(A);
  72313. }
  72314. Pr(A, er(n), {
  72315. labelDataIndex: x[C - 1],
  72316. defaultText: a.getName(x[C - 1]),
  72317. inheritColor: S.fill
  72318. }, {
  72319. normal: {
  72320. verticalAlign: "middle"
  72321. // align: 'right'
  72322. }
  72323. }), A.setTextConfig({
  72324. position: null,
  72325. local: !0
  72326. });
  72327. var B = A.getTextContent();
  72328. B && (B.x = D.x - R, B.y = D.y0 + D.y / 2), A.useStyle(S), a.setItemGraphicEl(m, A), Tr(A, n), bn(A, N.get("focus"), N.get("blurScope"), N.get("disabled"));
  72329. }
  72330. this._layersSeries = l, this._layers = p;
  72331. }, e.type = "themeRiver", e;
  72332. }(zt)
  72333. );
  72334. function y7e(t, e, n) {
  72335. var r = new mt({
  72336. shape: {
  72337. x: t.x - 10,
  72338. y: t.y - 10,
  72339. width: 0,
  72340. height: t.height + 20
  72341. }
  72342. });
  72343. return Yt(r, {
  72344. shape: {
  72345. x: t.x - 50,
  72346. width: t.width + 100,
  72347. height: t.height + 20
  72348. }
  72349. }, e, n), r;
  72350. }
  72351. var FP = 2, b7e = (
  72352. /** @class */
  72353. function(t) {
  72354. q(e, t);
  72355. function e() {
  72356. var n = t !== null && t.apply(this, arguments) || this;
  72357. return n.type = e.type, n;
  72358. }
  72359. return e.prototype.init = function(n) {
  72360. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new K0(xe(this.getData, this), xe(this.getRawData, this));
  72361. }, e.prototype.fixData = function(n) {
  72362. var r = n.length, i = {}, a = $A(n, function(d) {
  72363. return i.hasOwnProperty(d[0] + "") || (i[d[0] + ""] = -1), d[2];
  72364. }), o = [];
  72365. a.buckets.each(function(d, h) {
  72366. o.push({
  72367. name: h,
  72368. dataList: d
  72369. });
  72370. });
  72371. for (var s = o.length, l = 0; l < s; ++l) {
  72372. for (var u = o[l].name, c = 0; c < o[l].dataList.length; ++c) {
  72373. var f = o[l].dataList[c][0] + "";
  72374. i[f] = l;
  72375. }
  72376. for (var f in i)
  72377. i.hasOwnProperty(f) && i[f] !== l && (i[f] = l, n[r] = [f, 0, u], r++);
  72378. }
  72379. return n;
  72380. }, e.prototype.getInitialData = function(n, r) {
  72381. for (var i = this.getReferringComponents("singleAxis", Dn).models[0], a = i.get("type"), o = Nt(n.data, function(p) {
  72382. return p[2] !== void 0;
  72383. }), s = this.fixData(o || []), l = [], u = this.nameMap = Pe(), c = 0, f = 0; f < s.length; ++f)
  72384. l.push(s[f][FP]), u.get(s[f][FP]) || (u.set(s[f][FP], c), c++);
  72385. var d = Ap(s, {
  72386. coordDimensions: ["single"],
  72387. dimensionsDefine: [{
  72388. name: "time",
  72389. type: TO(a)
  72390. }, {
  72391. name: "value",
  72392. type: "float"
  72393. }, {
  72394. name: "name",
  72395. type: "ordinal"
  72396. }],
  72397. encodeDefine: {
  72398. single: 0,
  72399. value: 1,
  72400. itemName: 2
  72401. }
  72402. }).dimensions, h = new Nr(d, this);
  72403. return h.initData(s), h;
  72404. }, e.prototype.getLayerSeries = function() {
  72405. for (var n = this.getData(), r = n.count(), i = [], a = 0; a < r; ++a)
  72406. i[a] = a;
  72407. var o = n.mapDimension("single"), s = $A(i, function(u) {
  72408. return n.get("name", u);
  72409. }), l = [];
  72410. return s.buckets.each(function(u, c) {
  72411. u.sort(function(f, d) {
  72412. return n.get(o, f) - n.get(o, d);
  72413. }), l.push({
  72414. name: c,
  72415. indices: u
  72416. });
  72417. }), l;
  72418. }, e.prototype.getAxisTooltipData = function(n, r, i) {
  72419. ue(n) || (n = n ? [n] : []);
  72420. for (var a = this.getData(), o = this.getLayerSeries(), s = [], l = o.length, u, c = 0; c < l; ++c) {
  72421. for (var f = Number.MAX_VALUE, d = -1, h = o[c].indices.length, p = 0; p < h; ++p) {
  72422. var v = a.get(n[0], o[c].indices[p]), g = Math.abs(v - r);
  72423. g <= f && (u = v, f = g, d = o[c].indices[p]);
  72424. }
  72425. s.push(d);
  72426. }
  72427. return {
  72428. dataIndices: s,
  72429. nestestValue: u
  72430. };
  72431. }, e.prototype.formatTooltip = function(n, r, i) {
  72432. var a = this.getData(), o = a.getName(n), s = a.get(a.mapDimension("value"), n);
  72433. return tr("nameValue", {
  72434. name: o,
  72435. value: s
  72436. });
  72437. }, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = {
  72438. // zlevel: 0,
  72439. z: 2,
  72440. colorBy: "data",
  72441. coordinateSystem: "singleAxis",
  72442. // gap in axis's orthogonal orientation
  72443. boundaryGap: ["10%", "10%"],
  72444. // legendHoverLink: true,
  72445. singleAxisIndex: 0,
  72446. animationEasing: "linear",
  72447. label: {
  72448. margin: 4,
  72449. show: !0,
  72450. position: "left",
  72451. fontSize: 11
  72452. },
  72453. emphasis: {
  72454. label: {
  72455. show: !0
  72456. }
  72457. }
  72458. }, e;
  72459. }(Ht)
  72460. );
  72461. function _7e(t, e) {
  72462. t.eachSeriesByType("themeRiver", function(n) {
  72463. var r = n.getData(), i = n.coordinateSystem, a = {}, o = i.getRect();
  72464. a.rect = o;
  72465. var s = n.get("boundaryGap"), l = i.getAxis();
  72466. if (a.boundaryGap = s, l.orient === "horizontal") {
  72467. s[0] = _e(s[0], o.height), s[1] = _e(s[1], o.height);
  72468. var u = o.height - s[0] - s[1];
  72469. $W(r, n, u);
  72470. } else {
  72471. s[0] = _e(s[0], o.width), s[1] = _e(s[1], o.width);
  72472. var c = o.width - s[0] - s[1];
  72473. $W(r, n, c);
  72474. }
  72475. r.setLayout("layoutInfo", a);
  72476. });
  72477. }
  72478. function $W(t, e, n) {
  72479. if (t.count())
  72480. for (var r = e.coordinateSystem, i = e.getLayerSeries(), a = t.mapDimension("single"), o = t.mapDimension("value"), s = ce(i, function(g) {
  72481. return ce(g.indices, function(m) {
  72482. var y = r.dataToPoint(t.get(a, m));
  72483. return y[1] = t.get(o, m), y;
  72484. });
  72485. }), l = O7e(s), u = l.y0, c = n / l.max, f = i.length, d = i[0].indices.length, h, p = 0; p < d; ++p) {
  72486. h = u[p] * c, t.setItemLayout(i[0].indices[p], {
  72487. layerIndex: 0,
  72488. x: s[0][p][0],
  72489. y0: h,
  72490. y: s[0][p][1] * c
  72491. });
  72492. for (var v = 1; v < f; ++v)
  72493. h += s[v - 1][p][1] * c, t.setItemLayout(i[v].indices[p], {
  72494. layerIndex: v,
  72495. x: s[v][p][0],
  72496. y0: h,
  72497. y: s[v][p][1] * c
  72498. });
  72499. }
  72500. }
  72501. function O7e(t) {
  72502. for (var e = t.length, n = t[0].length, r = [], i = [], a = 0, o = 0; o < n; ++o) {
  72503. for (var s = 0, l = 0; l < e; ++l)
  72504. s += t[l][o][1];
  72505. s > a && (a = s), r.push(s);
  72506. }
  72507. for (var u = 0; u < n; ++u)
  72508. i[u] = (a - r[u]) / 2;
  72509. a = 0;
  72510. for (var c = 0; c < n; ++c) {
  72511. var f = r[c] + i[c];
  72512. f > a && (a = f);
  72513. }
  72514. return {
  72515. y0: i,
  72516. max: a
  72517. };
  72518. }
  72519. function S7e(t) {
  72520. t.registerChartView(m7e), t.registerSeriesModel(b7e), t.registerLayout(_7e), t.registerProcessor(q0("themeRiver"));
  72521. }
  72522. var x7e = 2, w7e = 4, AW = (
  72523. /** @class */
  72524. function(t) {
  72525. q(e, t);
  72526. function e(n, r, i, a) {
  72527. var o = t.call(this) || this;
  72528. o.z2 = x7e, o.textConfig = {
  72529. inside: !0
  72530. }, Fe(o).seriesIndex = r.seriesIndex;
  72531. var s = new gt({
  72532. z2: w7e,
  72533. silent: n.getModel().get(["label", "silent"])
  72534. });
  72535. return o.setTextContent(s), o.updateData(!0, n, r, i, a), o;
  72536. }
  72537. return e.prototype.updateData = function(n, r, i, a, o) {
  72538. this.node = r, r.piece = this, i = i || this._seriesModel, a = a || this._ecModel;
  72539. var s = this;
  72540. Fe(s).dataIndex = r.dataIndex;
  72541. var l = r.getModel(), u = l.getModel("emphasis"), c = r.getLayout(), f = le({}, c);
  72542. f.label = null;
  72543. var d = r.getVisual("style");
  72544. d.lineJoin = "bevel";
  72545. var h = r.getVisual("decal");
  72546. h && (d.decal = jh(h, o));
  72547. var p = Fc(l.getModel("itemStyle"), f, !0);
  72548. le(f, p), k(ri, function(y) {
  72549. var b = s.ensureState(y), _ = l.getModel([y, "itemStyle"]);
  72550. b.style = _.getItemStyle();
  72551. var O = Fc(_, f);
  72552. O && (b.shape = O);
  72553. }), n ? (s.setShape(f), s.shape.r = c.r0, Yt(s, {
  72554. shape: {
  72555. r: c.r
  72556. }
  72557. }, i, r.dataIndex)) : (Ct(s, {
  72558. shape: f
  72559. }, i), uo(s)), s.useStyle(d), this._updateLabel(i);
  72560. var v = l.getShallow("cursor");
  72561. v && s.attr("cursor", v), this._seriesModel = i || this._seriesModel, this._ecModel = a || this._ecModel;
  72562. var g = u.get("focus"), m = g === "ancestor" ? r.getAncestorsIndices() : g === "descendant" ? r.getDescendantIndices() : g;
  72563. bn(this, m, u.get("blurScope"), u.get("disabled"));
  72564. }, e.prototype._updateLabel = function(n) {
  72565. 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);
  72566. d.ignore = !v, k(Pm, function(m) {
  72567. var y = m === "normal" ? i.getModel("label") : i.getModel([m, "label"]), b = m === "normal", _ = b ? d : d.ensureState(m), O = n.getFormattedLabel(h, m);
  72568. b && (O = O || r.node.name), _.style = Zt(y, {}, null, m !== "normal", !0), O && (_.style.text = O);
  72569. var S = y.get("show");
  72570. S != null && !b && (_.ignore = !S);
  72571. var x = g(y, "position"), C = b ? f : f.states[m], T = C.style.fill;
  72572. C.textConfig = {
  72573. outsideFill: y.get("color") === "inherit" ? T : null,
  72574. inside: x !== "outside"
  72575. };
  72576. var w, P = g(y, "distance") || 0, $ = g(y, "align"), A = g(y, "rotate"), D = Math.PI * 0.5, E = Math.PI * 1.5, R = Qi(A === "tangential" ? Math.PI / 2 - l : l), N = R > D && !Fh(R - D) && R < E;
  72577. x === "outside" ? (w = o.r + P, $ = N ? "right" : "left") : !$ || $ === "center" ? (s === 2 * Math.PI && o.r0 === 0 ? w = 0 : w = (o.r + o.r0) / 2, $ = "center") : $ === "left" ? (w = o.r0 + P, $ = N ? "right" : "left") : $ === "right" && (w = o.r - P, $ = N ? "left" : "right"), _.style.align = $, _.style.verticalAlign = g(y, "verticalAlign") || "middle", _.x = w * u + o.cx, _.y = w * c + o.cy;
  72578. var V = 0;
  72579. A === "radial" ? V = Qi(-l) + (N ? Math.PI : 0) : A === "tangential" ? V = Qi(Math.PI / 2 - l) + (N ? Math.PI : 0) : St(A) && (V = A * Math.PI / 180), _.rotation = Qi(V);
  72580. });
  72581. function g(m, y) {
  72582. var b = m.get(y);
  72583. return b ?? a.get(y);
  72584. }
  72585. d.dirtyStyle();
  72586. }, e;
  72587. }(ii)
  72588. ), AE = "sunburstRootToNode", EW = "sunburstHighlight", C7e = "sunburstUnhighlight";
  72589. function T7e(t) {
  72590. t.registerAction({
  72591. type: AE,
  72592. update: "updateView"
  72593. }, function(e, n) {
  72594. n.eachComponent({
  72595. mainType: "series",
  72596. subType: "sunburst",
  72597. query: e
  72598. }, r);
  72599. function r(i, a) {
  72600. var o = Vm(e, [AE], i);
  72601. if (o) {
  72602. var s = i.getViewRoot();
  72603. s && (e.direction = Zk(s, o.node) ? "rollUp" : "drillDown"), i.resetViewRoot(o.node);
  72604. }
  72605. }
  72606. }), t.registerAction({
  72607. type: EW,
  72608. update: "none"
  72609. }, function(e, n, r) {
  72610. e = le({}, e), n.eachComponent({
  72611. mainType: "series",
  72612. subType: "sunburst",
  72613. query: e
  72614. }, i);
  72615. function i(a) {
  72616. var o = Vm(e, [EW], a);
  72617. o && (e.dataIndex = o.node.dataIndex);
  72618. }
  72619. process.env.NODE_ENV !== "production" && Cn("sunburstHighlight", "highlight"), r.dispatchAction(le(e, {
  72620. type: "highlight"
  72621. }));
  72622. }), t.registerAction({
  72623. type: C7e,
  72624. update: "updateView"
  72625. }, function(e, n, r) {
  72626. e = le({}, e), process.env.NODE_ENV !== "production" && Cn("sunburstUnhighlight", "downplay"), r.dispatchAction(le(e, {
  72627. type: "downplay"
  72628. }));
  72629. });
  72630. }
  72631. var P7e = (
  72632. /** @class */
  72633. function(t) {
  72634. q(e, t);
  72635. function e() {
  72636. var n = t !== null && t.apply(this, arguments) || this;
  72637. return n.type = e.type, n;
  72638. }
  72639. return e.prototype.render = function(n, r, i, a) {
  72640. var o = this;
  72641. this.seriesModel = n, this.api = i, this.ecModel = r;
  72642. var s = n.getData(), l = s.tree.root, u = n.getViewRoot(), c = this.group, f = n.get("renderLabelForZeroData"), d = [];
  72643. u.eachNode(function(y) {
  72644. d.push(y);
  72645. });
  72646. var h = this._oldChildren || [];
  72647. p(d, h), m(l, u), this._initEvents(), this._oldChildren = d;
  72648. function p(y, b) {
  72649. if (y.length === 0 && b.length === 0)
  72650. return;
  72651. new Xs(b, y, _, _).add(O).update(O).remove(Ue(O, null)).execute();
  72652. function _(S) {
  72653. return S.getId();
  72654. }
  72655. function O(S, x) {
  72656. var C = S == null ? null : y[S], T = x == null ? null : b[x];
  72657. v(C, T);
  72658. }
  72659. }
  72660. function v(y, b) {
  72661. if (!f && y && !y.getValue() && (y = null), y !== l && b !== l) {
  72662. if (b && b.piece)
  72663. y ? (b.piece.updateData(!1, y, n, r, i), s.setItemGraphicEl(y.dataIndex, b.piece)) : g(b);
  72664. else if (y) {
  72665. var _ = new AW(y, n, r, i);
  72666. c.add(_), s.setItemGraphicEl(y.dataIndex, _);
  72667. }
  72668. }
  72669. }
  72670. function g(y) {
  72671. y && y.piece && (c.remove(y.piece), y.piece = null);
  72672. }
  72673. function m(y, b) {
  72674. b.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, y, n, r, i) : (o.virtualPiece = new AW(y, n, r, i), c.add(o.virtualPiece)), b.piece.off("click"), o.virtualPiece.on("click", function(_) {
  72675. o._rootToNode(b.parentNode);
  72676. })) : o.virtualPiece && (c.remove(o.virtualPiece), o.virtualPiece = null);
  72677. }
  72678. }, e.prototype._initEvents = function() {
  72679. var n = this;
  72680. this.group.off("click"), this.group.on("click", function(r) {
  72681. var i = !1, a = n.seriesModel.getViewRoot();
  72682. a.eachNode(function(o) {
  72683. if (!i && o.piece && o.piece === r.target) {
  72684. var s = o.getModel().get("nodeClick");
  72685. if (s === "rootToNode")
  72686. n._rootToNode(o);
  72687. else if (s === "link") {
  72688. var l = o.getModel(), u = l.get("link");
  72689. if (u) {
  72690. var c = l.get("target", !0) || "_blank";
  72691. pO(u, c);
  72692. }
  72693. }
  72694. i = !0;
  72695. }
  72696. });
  72697. });
  72698. }, e.prototype._rootToNode = function(n) {
  72699. n !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
  72700. type: AE,
  72701. from: this.uid,
  72702. seriesId: this.seriesModel.id,
  72703. targetNode: n
  72704. });
  72705. }, e.prototype.containPoint = function(n, r) {
  72706. var i = r.getData(), a = i.getItemLayout(0);
  72707. if (a) {
  72708. var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
  72709. return l <= a.r && l >= a.r0;
  72710. }
  72711. }, e.type = "sunburst", e;
  72712. }(zt)
  72713. ), $7e = (
  72714. /** @class */
  72715. function(t) {
  72716. q(e, t);
  72717. function e() {
  72718. var n = t !== null && t.apply(this, arguments) || this;
  72719. return n.type = e.type, n.ignoreStyleOnData = !0, n;
  72720. }
  72721. return e.prototype.getInitialData = function(n, r) {
  72722. var i = {
  72723. name: n.name,
  72724. children: n.data
  72725. };
  72726. mre(i);
  72727. var a = this._levelModels = ce(n.levels || [], function(l) {
  72728. return new Wt(l, this, r);
  72729. }, this), o = jk.createTree(i, this, s);
  72730. function s(l) {
  72731. l.wrapMethod("getItemModel", function(u, c) {
  72732. var f = o.getNodeByDataIndex(c), d = a[f.depth];
  72733. return d && (u.parentModel = d), u;
  72734. });
  72735. }
  72736. return o.data;
  72737. }, e.prototype.optionUpdated = function() {
  72738. this.resetViewRoot();
  72739. }, e.prototype.getDataParams = function(n) {
  72740. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  72741. return r.treePathInfo = _w(i, this), r;
  72742. }, e.prototype.getLevelModel = function(n) {
  72743. return this._levelModels && this._levelModels[n.depth];
  72744. }, e.prototype.getViewRoot = function() {
  72745. return this._viewRoot;
  72746. }, e.prototype.resetViewRoot = function(n) {
  72747. n ? this._viewRoot = n : n = this._viewRoot;
  72748. var r = this.getRawData().tree.root;
  72749. (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
  72750. }, e.prototype.enableAriaDecal = function() {
  72751. Sne(this);
  72752. }, e.type = "series.sunburst", e.defaultOption = {
  72753. // zlevel: 0,
  72754. z: 2,
  72755. // 默认全局居中
  72756. center: ["50%", "50%"],
  72757. radius: [0, "75%"],
  72758. // 默认顺时针
  72759. clockwise: !0,
  72760. startAngle: 90,
  72761. // 最小角度改为0
  72762. minAngle: 0,
  72763. // If still show when all data zero.
  72764. stillShowZeroSum: !0,
  72765. // 'rootToNode', 'link', or false
  72766. nodeClick: "rootToNode",
  72767. renderLabelForZeroData: !1,
  72768. label: {
  72769. // could be: 'radial', 'tangential', or 'none'
  72770. rotate: "radial",
  72771. show: !0,
  72772. opacity: 1,
  72773. // 'left' is for inner side of inside, and 'right' is for outer
  72774. // side for inside
  72775. align: "center",
  72776. position: "inside",
  72777. distance: 5,
  72778. silent: !0
  72779. },
  72780. itemStyle: {
  72781. borderWidth: 1,
  72782. borderColor: "white",
  72783. borderType: "solid",
  72784. shadowBlur: 0,
  72785. shadowColor: "rgba(0, 0, 0, 0.2)",
  72786. shadowOffsetX: 0,
  72787. shadowOffsetY: 0,
  72788. opacity: 1
  72789. },
  72790. emphasis: {
  72791. focus: "descendant"
  72792. },
  72793. blur: {
  72794. itemStyle: {
  72795. opacity: 0.2
  72796. },
  72797. label: {
  72798. opacity: 0.1
  72799. }
  72800. },
  72801. // Animation type can be expansion, scale.
  72802. animationType: "expansion",
  72803. animationDuration: 1e3,
  72804. animationDurationUpdate: 500,
  72805. data: [],
  72806. /**
  72807. * Sort order.
  72808. *
  72809. * Valid values: 'desc', 'asc', null, or callback function.
  72810. * 'desc' and 'asc' for descend and ascendant order;
  72811. * null for not sorting;
  72812. * example of callback function:
  72813. * function(nodeA, nodeB) {
  72814. * return nodeA.getValue() - nodeB.getValue();
  72815. * }
  72816. */
  72817. sort: "desc"
  72818. }, e;
  72819. }(Ht)
  72820. );
  72821. function mre(t) {
  72822. var e = 0;
  72823. k(t.children, function(r) {
  72824. mre(r);
  72825. var i = r.value;
  72826. ue(i) && (i = i[0]), e += i;
  72827. });
  72828. var n = t.value;
  72829. ue(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), ue(t.value) ? t.value[0] = n : t.value = n;
  72830. }
  72831. var MW = Math.PI / 180;
  72832. function A7e(t, e, n) {
  72833. e.eachSeriesByType(t, function(r) {
  72834. var i = r.get("center"), a = r.get("radius");
  72835. ue(a) || (a = [0, a]), ue(i) || (i = [i, i]);
  72836. var o = n.getWidth(), s = n.getHeight(), l = Math.min(o, s), u = _e(i[0], o), c = _e(i[1], s), f = _e(a[0], l / 2), d = _e(a[1], l / 2), h = -r.get("startAngle") * MW, p = r.get("minAngle") * MW, v = r.getData().tree.root, g = r.getViewRoot(), m = g.depth, y = r.get("sort");
  72837. y != null && yre(g, y);
  72838. var b = 0;
  72839. k(g.children, function(R) {
  72840. !isNaN(R.getValue()) && b++;
  72841. });
  72842. var _ = g.getValue(), O = Math.PI / (_ || b) * 2, S = g.depth > 0, x = g.height - (S ? -1 : 1), C = (d - f) / (x || 1), T = r.get("clockwise"), w = r.get("stillShowZeroSum"), P = T ? 1 : -1, $ = function(R, N) {
  72843. if (R) {
  72844. var V = N;
  72845. if (R !== v) {
  72846. var B = R.getValue(), W = _ === 0 && w ? O : B * O;
  72847. W < p && (W = p), V = N + P * W;
  72848. var F = R.depth - m - (S ? -1 : 1), Q = f + C * F, Z = f + C * (F + 1), ne = r.getLevelModel(R);
  72849. if (ne) {
  72850. var ee = ne.get("r0", !0), oe = ne.get("r", !0), K = ne.get("radius", !0);
  72851. K != null && (ee = K[0], oe = K[1]), ee != null && (Q = _e(ee, l / 2)), oe != null && (Z = _e(oe, l / 2));
  72852. }
  72853. R.setLayout({
  72854. angle: W,
  72855. startAngle: N,
  72856. endAngle: V,
  72857. clockwise: T,
  72858. cx: u,
  72859. cy: c,
  72860. r0: Q,
  72861. r: Z
  72862. });
  72863. }
  72864. if (R.children && R.children.length) {
  72865. var ie = 0;
  72866. k(R.children, function(X) {
  72867. ie += $(X, N + ie);
  72868. });
  72869. }
  72870. return V - N;
  72871. }
  72872. };
  72873. if (S) {
  72874. var A = f, D = f + C, E = Math.PI * 2;
  72875. v.setLayout({
  72876. angle: E,
  72877. startAngle: h,
  72878. endAngle: h + E,
  72879. clockwise: T,
  72880. cx: u,
  72881. cy: c,
  72882. r0: A,
  72883. r: D
  72884. });
  72885. }
  72886. $(g, h);
  72887. });
  72888. }
  72889. function yre(t, e) {
  72890. var n = t.children || [];
  72891. t.children = E7e(n, e), n.length && k(t.children, function(r) {
  72892. yre(r, e);
  72893. });
  72894. }
  72895. function E7e(t, e) {
  72896. if (Me(e)) {
  72897. var n = ce(t, function(i, a) {
  72898. var o = i.getValue();
  72899. return {
  72900. params: {
  72901. depth: i.depth,
  72902. height: i.height,
  72903. dataIndex: i.dataIndex,
  72904. getValue: function() {
  72905. return o;
  72906. }
  72907. },
  72908. index: a
  72909. };
  72910. });
  72911. return n.sort(function(i, a) {
  72912. return e(i.params, a.params);
  72913. }), ce(n, function(i) {
  72914. return t[i.index];
  72915. });
  72916. } else {
  72917. var r = e === "asc";
  72918. return t.sort(function(i, a) {
  72919. var o = (i.getValue() - a.getValue()) * (r ? 1 : -1);
  72920. return o === 0 ? (i.dataIndex - a.dataIndex) * (r ? -1 : 1) : o;
  72921. });
  72922. }
  72923. }
  72924. function M7e(t) {
  72925. var e = {};
  72926. function n(r, i, a) {
  72927. for (var o = r; o && o.depth > 1; )
  72928. o = o.parentNode;
  72929. var s = i.getColorFromPalette(o.name || o.dataIndex + "", e);
  72930. return r.depth > 1 && Oe(s) && (s = tO(s, (r.depth - 1) / (a - 1) * 0.5)), s;
  72931. }
  72932. t.eachSeriesByType("sunburst", function(r) {
  72933. var i = r.getData(), a = i.tree;
  72934. a.eachNode(function(o) {
  72935. var s = o.getModel(), l = s.getModel("itemStyle").getItemStyle();
  72936. l.fill || (l.fill = n(o, r, a.root.height));
  72937. var u = i.ensureUniqueItemVisual(o.dataIndex, "style");
  72938. le(u, l);
  72939. });
  72940. });
  72941. }
  72942. function I7e(t) {
  72943. t.registerChartView(P7e), t.registerSeriesModel($7e), t.registerLayout(Ue(A7e, "sunburst")), t.registerProcessor(Ue(q0, "sunburst")), t.registerVisual(M7e), T7e(t);
  72944. }
  72945. var IW = {
  72946. color: "fill",
  72947. borderColor: "stroke"
  72948. }, D7e = {
  72949. symbol: 1,
  72950. symbolSize: 1,
  72951. symbolKeepAspect: 1,
  72952. legendIcon: 1,
  72953. visualMeta: 1,
  72954. liftZ: 1,
  72955. decal: 1
  72956. }, ks = bt(), R7e = (
  72957. /** @class */
  72958. function(t) {
  72959. q(e, t);
  72960. function e() {
  72961. var n = t !== null && t.apply(this, arguments) || this;
  72962. return n.type = e.type, n;
  72963. }
  72964. return e.prototype.optionUpdated = function() {
  72965. this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0);
  72966. }, e.prototype.getInitialData = function(n, r) {
  72967. return cs(null, this);
  72968. }, e.prototype.getDataParams = function(n, r, i) {
  72969. var a = t.prototype.getDataParams.call(this, n, r);
  72970. return i && (a.info = ks(i).info), a;
  72971. }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  72972. coordinateSystem: "cartesian2d",
  72973. // zlevel: 0,
  72974. z: 2,
  72975. legendHoverLink: !0,
  72976. // Custom series will not clip by default.
  72977. // Some case will use custom series to draw label
  72978. // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight
  72979. clip: !1
  72980. // Cartesian coordinate system
  72981. // xAxisIndex: 0,
  72982. // yAxisIndex: 0,
  72983. // Polar coordinate system
  72984. // polarIndex: 0,
  72985. // Geo coordinate system
  72986. // geoIndex: 0,
  72987. }, e;
  72988. }(Ht)
  72989. );
  72990. function k7e(t, e) {
  72991. return e = e || [0, 0], ce(["x", "y"], function(n, r) {
  72992. var i = this.getAxis(n), a = e[r], o = t[r] / 2;
  72993. return i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(a - o) - i.dataToCoord(a + o));
  72994. }, this);
  72995. }
  72996. function L7e(t) {
  72997. var e = t.master.getRect();
  72998. return {
  72999. coordSys: {
  73000. // The name exposed to user is always 'cartesian2d' but not 'grid'.
  73001. type: "cartesian2d",
  73002. x: e.x,
  73003. y: e.y,
  73004. width: e.width,
  73005. height: e.height
  73006. },
  73007. api: {
  73008. coord: function(n) {
  73009. return t.dataToPoint(n);
  73010. },
  73011. size: xe(k7e, t)
  73012. }
  73013. };
  73014. }
  73015. function N7e(t, e) {
  73016. return e = e || [0, 0], ce([0, 1], function(n) {
  73017. var r = e[n], i = t[n] / 2, a = [], o = [];
  73018. 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]);
  73019. }, this);
  73020. }
  73021. function B7e(t) {
  73022. var e = t.getBoundingRect();
  73023. return {
  73024. coordSys: {
  73025. type: "geo",
  73026. x: e.x,
  73027. y: e.y,
  73028. width: e.width,
  73029. height: e.height,
  73030. zoom: t.getZoom()
  73031. },
  73032. api: {
  73033. coord: function(n) {
  73034. return t.dataToPoint(n);
  73035. },
  73036. size: xe(N7e, t)
  73037. }
  73038. };
  73039. }
  73040. function z7e(t, e) {
  73041. var n = this.getAxis(), r = e instanceof Array ? e[0] : e, i = (t instanceof Array ? t[0] : t) / 2;
  73042. return n.type === "category" ? n.getBandWidth() : Math.abs(n.dataToCoord(r - i) - n.dataToCoord(r + i));
  73043. }
  73044. function V7e(t) {
  73045. var e = t.getRect();
  73046. return {
  73047. coordSys: {
  73048. type: "singleAxis",
  73049. x: e.x,
  73050. y: e.y,
  73051. width: e.width,
  73052. height: e.height
  73053. },
  73054. api: {
  73055. coord: function(n) {
  73056. return t.dataToPoint(n);
  73057. },
  73058. size: xe(z7e, t)
  73059. }
  73060. };
  73061. }
  73062. function F7e(t, e) {
  73063. return e = e || [0, 0], ce(["Radius", "Angle"], function(n, r) {
  73064. 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));
  73065. return n === "Angle" && (l = l * Math.PI / 180), l;
  73066. }, this);
  73067. }
  73068. function W7e(t) {
  73069. var e = t.getRadiusAxis(), n = t.getAngleAxis(), r = e.getExtent();
  73070. return r[0] > r[1] && r.reverse(), {
  73071. coordSys: {
  73072. type: "polar",
  73073. cx: t.cx,
  73074. cy: t.cy,
  73075. r: r[1],
  73076. r0: r[0]
  73077. },
  73078. api: {
  73079. coord: function(i) {
  73080. var a = e.dataToRadius(i[0]), o = n.dataToAngle(i[1]), s = t.coordToPoint([a, o]);
  73081. return s.push(a, o * Math.PI / 180), s;
  73082. },
  73083. size: xe(F7e, t)
  73084. }
  73085. };
  73086. }
  73087. function Q7e(t) {
  73088. var e = t.getRect(), n = t.getRangeInfo();
  73089. return {
  73090. coordSys: {
  73091. type: "calendar",
  73092. x: e.x,
  73093. y: e.y,
  73094. width: e.width,
  73095. height: e.height,
  73096. cellWidth: t.getCellWidth(),
  73097. cellHeight: t.getCellHeight(),
  73098. rangeInfo: {
  73099. start: n.start,
  73100. end: n.end,
  73101. weeks: n.weeks,
  73102. dayCount: n.allDay
  73103. }
  73104. },
  73105. api: {
  73106. coord: function(r, i) {
  73107. return t.dataToPoint(r, i);
  73108. }
  73109. }
  73110. };
  73111. }
  73112. var DW = {};
  73113. function bre(t, e, n, r) {
  73114. return t && (t.legacy || t.legacy !== !1 && !n && !r && e !== "tspan" && (e === "text" || Ce(t, "text")));
  73115. }
  73116. function _re(t, e, n) {
  73117. var r = t, i, a, o;
  73118. if (e === "text")
  73119. o = r;
  73120. else {
  73121. o = {}, Ce(r, "text") && (o.text = r.text), Ce(r, "rich") && (o.rich = r.rich), Ce(r, "textFill") && (o.fill = r.textFill), Ce(r, "textStroke") && (o.stroke = r.textStroke), Ce(r, "fontFamily") && (o.fontFamily = r.fontFamily), Ce(r, "fontSize") && (o.fontSize = r.fontSize), Ce(r, "fontStyle") && (o.fontStyle = r.fontStyle), Ce(r, "fontWeight") && (o.fontWeight = r.fontWeight), a = {
  73122. type: "text",
  73123. style: o,
  73124. // ec4 does not support rectText trigger.
  73125. // And when text position is different in normal and emphasis
  73126. // => hover text trigger emphasis;
  73127. // => text position changed, leave mouse pointer immediately;
  73128. // That might cause incorrect state.
  73129. silent: !0
  73130. }, i = {};
  73131. var s = Ce(r, "textPosition");
  73132. n ? i.position = s ? r.textPosition : "inside" : s && (i.position = r.textPosition), Ce(r, "textPosition") && (i.position = r.textPosition), Ce(r, "textOffset") && (i.offset = r.textOffset), Ce(r, "textRotation") && (i.rotation = r.textRotation), Ce(r, "textDistance") && (i.distance = r.textDistance);
  73133. }
  73134. return RW(o, t), k(o.rich, function(l) {
  73135. RW(l, l);
  73136. }), {
  73137. textConfig: i,
  73138. textContent: a
  73139. };
  73140. }
  73141. function RW(t, e) {
  73142. e && (e.font = e.textFont || e.font, Ce(e, "textStrokeWidth") && (t.lineWidth = e.textStrokeWidth), Ce(e, "textAlign") && (t.align = e.textAlign), Ce(e, "textVerticalAlign") && (t.verticalAlign = e.textVerticalAlign), Ce(e, "textLineHeight") && (t.lineHeight = e.textLineHeight), Ce(e, "textWidth") && (t.width = e.textWidth), Ce(e, "textHeight") && (t.height = e.textHeight), Ce(e, "textBackgroundColor") && (t.backgroundColor = e.textBackgroundColor), Ce(e, "textPadding") && (t.padding = e.textPadding), Ce(e, "textBorderColor") && (t.borderColor = e.textBorderColor), Ce(e, "textBorderWidth") && (t.borderWidth = e.textBorderWidth), Ce(e, "textBorderRadius") && (t.borderRadius = e.textBorderRadius), Ce(e, "textBoxShadowColor") && (t.shadowColor = e.textBoxShadowColor), Ce(e, "textBoxShadowBlur") && (t.shadowBlur = e.textBoxShadowBlur), Ce(e, "textBoxShadowOffsetX") && (t.shadowOffsetX = e.textBoxShadowOffsetX), Ce(e, "textBoxShadowOffsetY") && (t.shadowOffsetY = e.textBoxShadowOffsetY));
  73143. }
  73144. function kW(t, e, n) {
  73145. var r = t;
  73146. 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);
  73147. var i = r.textPosition.indexOf("inside") >= 0, a = t.fill || "#000";
  73148. LW(r, e);
  73149. var o = r.textFill == null;
  73150. 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, k(e.rich, function(s) {
  73151. LW(s, s);
  73152. }), r;
  73153. }
  73154. function LW(t, e) {
  73155. e && (Ce(e, "fill") && (t.textFill = e.fill), Ce(e, "stroke") && (t.textStroke = e.fill), Ce(e, "lineWidth") && (t.textStrokeWidth = e.lineWidth), Ce(e, "font") && (t.font = e.font), Ce(e, "fontStyle") && (t.fontStyle = e.fontStyle), Ce(e, "fontWeight") && (t.fontWeight = e.fontWeight), Ce(e, "fontSize") && (t.fontSize = e.fontSize), Ce(e, "fontFamily") && (t.fontFamily = e.fontFamily), Ce(e, "align") && (t.textAlign = e.align), Ce(e, "verticalAlign") && (t.textVerticalAlign = e.verticalAlign), Ce(e, "lineHeight") && (t.textLineHeight = e.lineHeight), Ce(e, "width") && (t.textWidth = e.width), Ce(e, "height") && (t.textHeight = e.height), Ce(e, "backgroundColor") && (t.textBackgroundColor = e.backgroundColor), Ce(e, "padding") && (t.textPadding = e.padding), Ce(e, "borderColor") && (t.textBorderColor = e.borderColor), Ce(e, "borderWidth") && (t.textBorderWidth = e.borderWidth), Ce(e, "borderRadius") && (t.textBorderRadius = e.borderRadius), Ce(e, "shadowColor") && (t.textBoxShadowColor = e.shadowColor), Ce(e, "shadowBlur") && (t.textBoxShadowBlur = e.shadowBlur), Ce(e, "shadowOffsetX") && (t.textBoxShadowOffsetX = e.shadowOffsetX), Ce(e, "shadowOffsetY") && (t.textBoxShadowOffsetY = e.shadowOffsetY), Ce(e, "textShadowColor") && (t.textShadowColor = e.textShadowColor), Ce(e, "textShadowBlur") && (t.textShadowBlur = e.textShadowBlur), Ce(e, "textShadowOffsetX") && (t.textShadowOffsetX = e.textShadowOffsetX), Ce(e, "textShadowOffsetY") && (t.textShadowOffsetY = e.textShadowOffsetY));
  73156. }
  73157. function NW(t, e) {
  73158. if (process.env.NODE_ENV !== "production") {
  73159. var n = t + "^_^" + e;
  73160. DW[n] || (console.warn('[ECharts] DEPRECATED: "' + t + '" has been deprecated. ' + e), DW[n] = !0);
  73161. }
  73162. }
  73163. var Ore = {
  73164. position: ["x", "y"],
  73165. scale: ["scaleX", "scaleY"],
  73166. origin: ["originX", "originY"]
  73167. }, BW = st(Ore), BO = Ma(is, function(t, e) {
  73168. return t[e] = 1, t;
  73169. }, {}), zW = is.join(", "), zO = ["", "style", "shape", "extra"], Yh = bt();
  73170. function lL(t, e, n, r, i) {
  73171. var a = t + "Animation", o = bp(t, r, i) || {}, s = Yh(e).userDuring;
  73172. return o.duration > 0 && (o.during = s ? xe(U7e, {
  73173. el: e,
  73174. userDuring: s
  73175. }) : null, o.setToFinal = !0, o.scope = t), le(o, n[a]), o;
  73176. }
  73177. function X_(t, e, n, r) {
  73178. r = r || {};
  73179. var i = r.dataIndex, a = r.isInit, o = r.clearStyle, s = n.isAnimationEnabled(), l = Yh(t), u = e.style;
  73180. l.userDuring = e.during;
  73181. var c = {}, f = {};
  73182. if (Y7e(t, e, f), FW("shape", e, f), FW("extra", e, f), !a && s && (X7e(t, e, c), VW("shape", t, e, c), VW("extra", t, e, c), q7e(t, e, u, c)), f.style = u, H7e(t, f, o), j7e(t, e), s)
  73183. if (a) {
  73184. var d = {};
  73185. k(zO, function(p) {
  73186. var v = p ? e[p] : e;
  73187. v && v.enterFrom && (p && (d[p] = d[p] || {}), le(p ? d[p] : d, v.enterFrom));
  73188. });
  73189. var h = lL("enter", t, e, n, i);
  73190. h.duration > 0 && t.animateFrom(d, h);
  73191. } else
  73192. G7e(t, e, i || 0, n, c);
  73193. Sre(t, e), u ? t.dirty() : t.markRedraw();
  73194. }
  73195. function Sre(t, e) {
  73196. for (var n = Yh(t).leaveToProps, r = 0; r < zO.length; r++) {
  73197. var i = zO[r], a = i ? e[i] : e;
  73198. a && a.leaveTo && (n || (n = Yh(t).leaveToProps = {}), i && (n[i] = n[i] || {}), le(i ? n[i] : n, a.leaveTo));
  73199. }
  73200. }
  73201. function xw(t, e, n, r) {
  73202. if (t) {
  73203. var i = t.parent, a = Yh(t).leaveToProps;
  73204. if (a) {
  73205. var o = lL("update", t, e, n, 0);
  73206. o.done = function() {
  73207. i.remove(t);
  73208. }, t.animateTo(a, o);
  73209. } else
  73210. i.remove(t);
  73211. }
  73212. }
  73213. function af(t) {
  73214. return t === "all";
  73215. }
  73216. function H7e(t, e, n) {
  73217. var r = e.style;
  73218. if (!t.isGroup && r) {
  73219. if (n) {
  73220. t.useStyle({});
  73221. for (var i = t.animators, a = 0; a < i.length; a++) {
  73222. var o = i[a];
  73223. o.targetName === "style" && o.changeTarget(t.style);
  73224. }
  73225. }
  73226. t.setStyle(r);
  73227. }
  73228. e && (e.style = null, e && t.attr(e), e.style = r);
  73229. }
  73230. function G7e(t, e, n, r, i) {
  73231. if (i) {
  73232. var a = lL("update", t, e, r, n);
  73233. a.duration > 0 && t.animateFrom(i, a);
  73234. }
  73235. }
  73236. function j7e(t, e) {
  73237. Ce(e, "silent") && (t.silent = e.silent), Ce(e, "ignore") && (t.ignore = e.ignore), t instanceof Da && Ce(e, "invisible") && (t.invisible = e.invisible), t instanceof ot && Ce(e, "autoBatch") && (t.autoBatch = e.autoBatch);
  73238. }
  73239. var Ao = {}, Z7e = {
  73240. // Usually other props do not need to be changed in animation during.
  73241. setTransform: function(t, e) {
  73242. return process.env.NODE_ENV !== "production" && ke(Ce(BO, t), "Only " + zW + " available in `setTransform`."), Ao.el[t] = e, this;
  73243. },
  73244. getTransform: function(t) {
  73245. return process.env.NODE_ENV !== "production" && ke(Ce(BO, t), "Only " + zW + " available in `getTransform`."), Ao.el[t];
  73246. },
  73247. setShape: function(t, e) {
  73248. process.env.NODE_ENV !== "production" && bd(t);
  73249. var n = Ao.el, r = n.shape || (n.shape = {});
  73250. return r[t] = e, n.dirtyShape && n.dirtyShape(), this;
  73251. },
  73252. getShape: function(t) {
  73253. process.env.NODE_ENV !== "production" && bd(t);
  73254. var e = Ao.el.shape;
  73255. if (e)
  73256. return e[t];
  73257. },
  73258. setStyle: function(t, e) {
  73259. process.env.NODE_ENV !== "production" && bd(t);
  73260. var n = Ao.el, r = n.style;
  73261. return r && (process.env.NODE_ENV !== "production" && ou(e) && dn("style." + t + " must not be assigned with NaN."), r[t] = e, n.dirtyStyle && n.dirtyStyle()), this;
  73262. },
  73263. getStyle: function(t) {
  73264. process.env.NODE_ENV !== "production" && bd(t);
  73265. var e = Ao.el.style;
  73266. if (e)
  73267. return e[t];
  73268. },
  73269. setExtra: function(t, e) {
  73270. process.env.NODE_ENV !== "production" && bd(t);
  73271. var n = Ao.el.extra || (Ao.el.extra = {});
  73272. return n[t] = e, this;
  73273. },
  73274. getExtra: function(t) {
  73275. process.env.NODE_ENV !== "production" && bd(t);
  73276. var e = Ao.el.extra;
  73277. if (e)
  73278. return e[t];
  73279. }
  73280. };
  73281. function bd(t) {
  73282. if (process.env.NODE_ENV !== "production" && (t === "transition" || t === "enterFrom" || t === "leaveTo"))
  73283. throw new Error('key must not be "' + t + '"');
  73284. }
  73285. function U7e() {
  73286. var t = this, e = t.el;
  73287. if (e) {
  73288. var n = Yh(e).userDuring, r = t.userDuring;
  73289. if (n !== r) {
  73290. t.el = t.userDuring = null;
  73291. return;
  73292. }
  73293. Ao.el = e, r(Z7e);
  73294. }
  73295. }
  73296. function VW(t, e, n, r) {
  73297. var i = n[t];
  73298. if (i) {
  73299. var a = e[t], o;
  73300. if (a) {
  73301. var s = n.transition, l = i.transition;
  73302. if (l)
  73303. if (!o && (o = r[t] = {}), af(l))
  73304. le(o, a);
  73305. else
  73306. for (var u = Qt(l), c = 0; c < u.length; c++) {
  73307. var f = u[c], d = a[f];
  73308. o[f] = d;
  73309. }
  73310. else if (af(s) || et(s, t) >= 0) {
  73311. !o && (o = r[t] = {});
  73312. for (var h = st(a), c = 0; c < h.length; c++) {
  73313. var f = h[c], d = a[f];
  73314. K7e(i[f], d) && (o[f] = d);
  73315. }
  73316. }
  73317. }
  73318. }
  73319. }
  73320. function FW(t, e, n) {
  73321. var r = e[t];
  73322. if (r)
  73323. for (var i = n[t] = {}, a = st(r), o = 0; o < a.length; o++) {
  73324. var s = a[o];
  73325. i[s] = Mg(r[s]);
  73326. }
  73327. }
  73328. function X7e(t, e, n) {
  73329. for (var r = e.transition, i = af(r) ? is : Qt(r || []), a = 0; a < i.length; a++) {
  73330. var o = i[a];
  73331. if (!(o === "style" || o === "shape" || o === "extra")) {
  73332. var s = t[o];
  73333. process.env.NODE_ENV !== "production" && xre(o, "el.transition"), n[o] = s;
  73334. }
  73335. }
  73336. }
  73337. function Y7e(t, e, n) {
  73338. for (var r = 0; r < BW.length; r++) {
  73339. var i = BW[r], a = Ore[i], o = e[i];
  73340. o && (n[a[0]] = o[0], n[a[1]] = o[1]);
  73341. }
  73342. for (var r = 0; r < is.length; r++) {
  73343. var s = is[r];
  73344. e[s] != null && (n[s] = e[s]);
  73345. }
  73346. }
  73347. function q7e(t, e, n, r) {
  73348. if (n) {
  73349. var i = t.style, a;
  73350. if (i) {
  73351. var o = n.transition, s = e.transition;
  73352. if (o && !af(o)) {
  73353. var l = Qt(o);
  73354. !a && (a = r.style = {});
  73355. for (var u = 0; u < l.length; u++) {
  73356. var c = l[u], f = i[c];
  73357. a[c] = f;
  73358. }
  73359. } else if (t.getAnimationStyleProps && (af(s) || af(o) || et(s, "style") >= 0)) {
  73360. var d = t.getAnimationStyleProps(), h = d ? d.style : null;
  73361. if (h) {
  73362. !a && (a = r.style = {});
  73363. for (var p = st(n), u = 0; u < p.length; u++) {
  73364. var c = p[u];
  73365. if (h[c]) {
  73366. var f = i[c];
  73367. a[c] = f;
  73368. }
  73369. }
  73370. }
  73371. }
  73372. }
  73373. }
  73374. }
  73375. function K7e(t, e) {
  73376. return wr(t) ? t !== e : t != null && isFinite(t);
  73377. }
  73378. var xre;
  73379. process.env.NODE_ENV !== "production" && (xre = function(t, e) {
  73380. Ce(BO, t) || dn("Prop `" + t + "` is not a permitted in `" + e + "`. Only `" + st(BO).join("`, `") + "` are permitted.");
  73381. });
  73382. var wre = bt(), J7e = ["percent", "easing", "shape", "style", "extra"];
  73383. function Cre(t) {
  73384. t.stopAnimation("keyframe"), t.attr(wre(t));
  73385. }
  73386. function VO(t, e, n) {
  73387. if (!(!n.isAnimationEnabled() || !e)) {
  73388. if (ue(e)) {
  73389. k(e, function(s) {
  73390. VO(t, s, n);
  73391. });
  73392. return;
  73393. }
  73394. var r = e.keyframes, i = e.duration;
  73395. if (n && i == null) {
  73396. var a = bp("enter", n, 0);
  73397. i = a && a.duration;
  73398. }
  73399. if (!(!r || !i)) {
  73400. var o = wre(t);
  73401. k(zO, function(s) {
  73402. if (!(s && !t[s])) {
  73403. var l, u = !1;
  73404. r.sort(function(c, f) {
  73405. return c.percent - f.percent;
  73406. }), k(r, function(c) {
  73407. var f = t.animators, d = s ? c[s] : c;
  73408. if (process.env.NODE_ENV !== "production" && c.percent >= 1 && (u = !0), !!d) {
  73409. var h = st(d);
  73410. if (s || (h = Nt(h, function(g) {
  73411. return et(J7e, g) < 0;
  73412. })), !!h.length) {
  73413. l || (l = t.animate(s, e.loop, !0), l.scope = "keyframe");
  73414. for (var p = 0; p < f.length; p++)
  73415. f[p] !== l && f[p].targetName === l.targetName && f[p].stopTracks(h);
  73416. s && (o[s] = o[s] || {});
  73417. var v = s ? o[s] : o;
  73418. k(h, function(g) {
  73419. v[g] = ((s ? t[s] : t) || {})[g];
  73420. }), l.whenWithKeys(i * c.percent, d, h, c.easing);
  73421. }
  73422. }
  73423. }), l && (process.env.NODE_ENV !== "production" && (u || dn("End frame with percent: 1 is missing in the keyframeAnimation.", !0)), l.delay(e.delay || 0).duration(i).start(e.easing));
  73424. }
  73425. });
  73426. }
  73427. }
  73428. }
  73429. var Ls = "emphasis", Vl = "normal", uL = "blur", cL = "select", du = [Vl, Ls, uL, cL], WP = {
  73430. normal: ["itemStyle"],
  73431. emphasis: [Ls, "itemStyle"],
  73432. blur: [uL, "itemStyle"],
  73433. select: [cL, "itemStyle"]
  73434. }, QP = {
  73435. normal: ["label"],
  73436. emphasis: [Ls, "label"],
  73437. blur: [uL, "label"],
  73438. select: [cL, "label"]
  73439. }, eQe = ["x", "y"], tQe = "e\0\0", oa = {
  73440. normal: {},
  73441. emphasis: {},
  73442. blur: {},
  73443. select: {}
  73444. }, WW = {
  73445. cartesian2d: L7e,
  73446. geo: B7e,
  73447. single: V7e,
  73448. polar: W7e,
  73449. calendar: Q7e
  73450. };
  73451. function FO(t) {
  73452. return t instanceof ot;
  73453. }
  73454. function EE(t) {
  73455. return t instanceof Da;
  73456. }
  73457. function nQe(t, e) {
  73458. e.copyTransform(t), EE(e) && EE(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, FO(e) && FO(t) && e.setShape(t.shape));
  73459. }
  73460. var rQe = (
  73461. /** @class */
  73462. function(t) {
  73463. q(e, t);
  73464. function e() {
  73465. var n = t !== null && t.apply(this, arguments) || this;
  73466. return n.type = e.type, n;
  73467. }
  73468. return e.prototype.render = function(n, r, i, a) {
  73469. this._progressiveEls = null;
  73470. var o = this._data, s = n.getData(), l = this.group, u = QW(n, s, r, i);
  73471. o || l.removeAll(), s.diff(o).add(function(f) {
  73472. HP(i, null, f, u(f, a), n, l, s);
  73473. }).remove(function(f) {
  73474. var d = o.getItemGraphicEl(f);
  73475. d && xw(d, ks(d).option, n);
  73476. }).update(function(f, d) {
  73477. var h = o.getItemGraphicEl(d);
  73478. HP(i, h, f, u(f, a), n, l, s);
  73479. }).execute();
  73480. var c = n.get("clip", !0) ? X0(n.coordinateSystem, !1, n) : null;
  73481. c ? l.setClipPath(c) : l.removeClipPath(), this._data = s;
  73482. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  73483. this.group.removeAll(), this._data = null;
  73484. }, e.prototype.incrementalRender = function(n, r, i, a, o) {
  73485. var s = r.getData(), l = QW(r, s, i, a), u = this._progressiveEls = [];
  73486. function c(h) {
  73487. h.isGroup || (h.incremental = !0, h.ensureState("emphasis").hoverLayer = !0);
  73488. }
  73489. for (var f = n.start; f < n.end; f++) {
  73490. var d = HP(null, null, f, l(f, o), r, this.group, s);
  73491. d && (d.traverse(c), u.push(d));
  73492. }
  73493. }, e.prototype.eachRendered = function(n) {
  73494. Tu(this._progressiveEls || this.group, n);
  73495. }, e.prototype.filterForExposedEvent = function(n, r, i, a) {
  73496. var o = r.element;
  73497. if (o == null || i.name === o)
  73498. return !0;
  73499. for (; (i = i.__hostTarget || i.parent) && i !== this.group; )
  73500. if (i.name === o)
  73501. return !0;
  73502. return !1;
  73503. }, e.type = "custom", e;
  73504. }(zt)
  73505. );
  73506. function fL(t) {
  73507. var e = t.type, n;
  73508. if (e === "path") {
  73509. var r = t.shape, i = r.width != null && r.height != null ? {
  73510. x: r.x || 0,
  73511. y: r.y || 0,
  73512. width: r.width,
  73513. height: r.height
  73514. } : null, a = $re(r);
  73515. n = W0(a, null, i, r.layout || "center"), ks(n).customPathData = a;
  73516. } else if (e === "image")
  73517. n = new lr({}), ks(n).customImagePath = t.style.image;
  73518. else if (e === "text")
  73519. n = new gt({});
  73520. else if (e === "group")
  73521. n = new Ve();
  73522. else {
  73523. if (e === "compoundPath")
  73524. throw new Error('"compoundPath" is not supported yet.');
  73525. var o = Jx(e);
  73526. if (!o) {
  73527. var s = "";
  73528. process.env.NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), Et(s);
  73529. }
  73530. n = new o();
  73531. }
  73532. return ks(n).customGraphicType = e, n.name = t.name, n.z2EmphasisLift = 1, n.z2SelectLift = 1, n;
  73533. }
  73534. function dL(t, e, n, r, i, a, o) {
  73535. Cre(e);
  73536. var s = i && i.normal.cfg;
  73537. s && e.setTextConfig(s), r && r.transition == null && (r.transition = eQe);
  73538. var l = r && r.style;
  73539. if (l) {
  73540. if (e.type === "text") {
  73541. var u = l;
  73542. Ce(u, "textFill") && (u.fill = u.textFill), Ce(u, "textStroke") && (u.stroke = u.textStroke);
  73543. }
  73544. var c = void 0, f = FO(e) ? l.decal : null;
  73545. t && f && (f.dirty = !0, c = jh(f, t)), l.__decalPattern = c;
  73546. }
  73547. if (EE(e) && l) {
  73548. var c = l.__decalPattern;
  73549. c && (l.decal = c);
  73550. }
  73551. X_(e, r, a, {
  73552. dataIndex: n,
  73553. isInit: o,
  73554. clearStyle: !0
  73555. }), VO(e, r.keyframeAnimation, a);
  73556. }
  73557. function Tre(t, e, n, r, i) {
  73558. var a = e.isGroup ? null : e, o = i && i[t].cfg;
  73559. if (a) {
  73560. var s = a.ensureState(t);
  73561. if (r === !1) {
  73562. var l = a.getState(t);
  73563. l && (l.style = null);
  73564. } else
  73565. s.style = r || null;
  73566. o && (s.textConfig = o), _f(a);
  73567. }
  73568. }
  73569. function iQe(t, e, n) {
  73570. if (!t.isGroup) {
  73571. var r = t, i = n.currentZ, a = n.currentZLevel;
  73572. r.z = i, r.zlevel = a;
  73573. var o = e.z2;
  73574. o != null && (r.z2 = o || 0);
  73575. for (var s = 0; s < du.length; s++)
  73576. aQe(r, e, du[s]);
  73577. }
  73578. }
  73579. function aQe(t, e, n) {
  73580. var r = n === Vl, i = r ? e : WO(e, n), a = i ? i.z2 : null, o;
  73581. a != null && (o = r ? t : t.ensureState(n), o.z2 = a || 0);
  73582. }
  73583. function QW(t, e, n, r) {
  73584. var i = t.get("renderItem"), a = t.coordinateSystem, o = {};
  73585. a && (process.env.NODE_ENV !== "production" && (ke(i, "series.render is required."), ke(a.prepareCustoms || WW[a.type], "This coordSys does not support custom series.")), o = a.prepareCustoms ? a.prepareCustoms(a) : WW[a.type](a));
  73586. for (var s = Re({
  73587. getWidth: r.getWidth,
  73588. getHeight: r.getHeight,
  73589. getZr: r.getZr,
  73590. getDevicePixelRatio: r.getDevicePixelRatio,
  73591. value: _,
  73592. style: S,
  73593. ordinalRawValue: O,
  73594. styleEmphasis: x,
  73595. visual: w,
  73596. barLayout: P,
  73597. currentSeriesIndices: $,
  73598. font: A
  73599. }, o.api || {}), l = {
  73600. // The life cycle of context: current round of rendering.
  73601. // The global life cycle is probably not necessary, because
  73602. // user can store global status by themselves.
  73603. context: {},
  73604. seriesId: t.id,
  73605. seriesName: t.name,
  73606. seriesIndex: t.seriesIndex,
  73607. coordSys: o.coordSys,
  73608. dataInsideLength: e.count(),
  73609. encode: oQe(t.getData())
  73610. }, u, c, f = {}, d = {}, h = {}, p = {}, v = 0; v < du.length; v++) {
  73611. var g = du[v];
  73612. h[g] = t.getModel(WP[g]), p[g] = t.getModel(QP[g]);
  73613. }
  73614. function m(D) {
  73615. return D === u ? c || (c = e.getItemModel(D)) : e.getItemModel(D);
  73616. }
  73617. function y(D, E) {
  73618. return e.hasItemOption ? D === u ? f[E] || (f[E] = m(D).getModel(WP[E])) : m(D).getModel(WP[E]) : h[E];
  73619. }
  73620. function b(D, E) {
  73621. return e.hasItemOption ? D === u ? d[E] || (d[E] = m(D).getModel(QP[E])) : m(D).getModel(QP[E]) : p[E];
  73622. }
  73623. return function(D, E) {
  73624. return u = D, c = null, f = {}, d = {}, i && i(Re({
  73625. dataIndexInside: D,
  73626. dataIndex: e.getRawIndex(D),
  73627. // Can be used for optimization when zoom or roam.
  73628. actionType: E ? E.type : null
  73629. }, l), s);
  73630. };
  73631. function _(D, E) {
  73632. return E == null && (E = u), e.getStore().get(e.getDimensionIndex(D || 0), E);
  73633. }
  73634. function O(D, E) {
  73635. E == null && (E = u), D = D || 0;
  73636. var R = e.getDimensionInfo(D);
  73637. if (!R) {
  73638. var N = e.getDimensionIndex(D);
  73639. return N >= 0 ? e.getStore().get(N, E) : void 0;
  73640. }
  73641. var V = e.get(R.name, E), B = R && R.ordinalMeta;
  73642. return B ? B.categories[V] : V;
  73643. }
  73644. function S(D, E) {
  73645. process.env.NODE_ENV !== "production" && NW("api.style", "Please write literal style directly instead."), E == null && (E = u);
  73646. var R = e.getItemVisual(E, "style"), N = R && R.fill, V = R && R.opacity, B = y(E, Vl).getItemStyle();
  73647. N != null && (B.fill = N), V != null && (B.opacity = V);
  73648. var W = {
  73649. inheritColor: Oe(N) ? N : "#000"
  73650. }, F = b(E, Vl), Q = Zt(F, null, W, !1, !0);
  73651. Q.text = F.getShallow("show") ? We(t.getFormattedLabel(E, Vl), Zh(e, E)) : null;
  73652. var Z = dO(F, W, !1);
  73653. return T(D, B), B = kW(B, Q, Z), D && C(B, D), B.legacy = !0, B;
  73654. }
  73655. function x(D, E) {
  73656. process.env.NODE_ENV !== "production" && NW("api.styleEmphasis", "Please write literal style directly instead."), E == null && (E = u);
  73657. var R = y(E, Ls).getItemStyle(), N = b(E, Ls), V = Zt(N, null, null, !0, !0);
  73658. V.text = N.getShallow("show") ? Ui(t.getFormattedLabel(E, Ls), t.getFormattedLabel(E, Vl), Zh(e, E)) : null;
  73659. var B = dO(N, null, !0);
  73660. return T(D, R), R = kW(R, V, B), D && C(R, D), R.legacy = !0, R;
  73661. }
  73662. function C(D, E) {
  73663. for (var R in E)
  73664. Ce(E, R) && (D[R] = E[R]);
  73665. }
  73666. function T(D, E) {
  73667. D && (D.textFill && (E.textFill = D.textFill), D.textPosition && (E.textPosition = D.textPosition));
  73668. }
  73669. function w(D, E) {
  73670. if (E == null && (E = u), Ce(IW, D)) {
  73671. var R = e.getItemVisual(E, "style");
  73672. return R ? R[IW[D]] : null;
  73673. }
  73674. if (Ce(D7e, D))
  73675. return e.getItemVisual(E, D);
  73676. }
  73677. function P(D) {
  73678. if (a.type === "cartesian2d") {
  73679. var E = a.getBaseAxis();
  73680. return kNe(Re({
  73681. axis: E
  73682. }, D));
  73683. }
  73684. }
  73685. function $() {
  73686. return n.getCurrentSeriesIndices();
  73687. }
  73688. function A(D) {
  73689. return jR(D, n);
  73690. }
  73691. }
  73692. function oQe(t) {
  73693. var e = {};
  73694. return k(t.dimensions, function(n) {
  73695. var r = t.getDimensionInfo(n);
  73696. if (!r.isExtraCoord) {
  73697. var i = r.coordDim, a = e[i] = e[i] || [];
  73698. a[r.coordDimIndex] = t.getDimensionIndex(n);
  73699. }
  73700. }), e;
  73701. }
  73702. function HP(t, e, n, r, i, a, o) {
  73703. if (!r) {
  73704. a.remove(e);
  73705. return;
  73706. }
  73707. var s = hL(t, e, n, r, i, a);
  73708. return s && o.setItemGraphicEl(n, s), s && bn(s, r.focus, r.blurScope, r.emphasisDisabled), s;
  73709. }
  73710. function hL(t, e, n, r, i, a) {
  73711. process.env.NODE_ENV !== "production" && ke(r, "should not have an null/undefined element setting");
  73712. var o = -1, s = e;
  73713. e && Pre(e, r, i) && (o = et(a.childrenRef(), e), e = null);
  73714. var l = !e, u = e;
  73715. u ? u.clearStates() : (u = fL(r), s && nQe(s, u)), r.morph === !1 ? u.disableMorphing = !0 : u.disableMorphing && (u.disableMorphing = !1), oa.normal.cfg = oa.normal.conOpt = oa.emphasis.cfg = oa.emphasis.conOpt = oa.blur.cfg = oa.blur.conOpt = oa.select.cfg = oa.select.conOpt = null, oa.isLegacy = !1, lQe(u, n, r, i, l, oa), sQe(u, n, r, i, l), dL(t, u, n, r, oa, i, l), Ce(r, "info") && (ks(u).info = r.info);
  73716. for (var c = 0; c < du.length; c++) {
  73717. var f = du[c];
  73718. if (f !== Vl) {
  73719. var d = WO(r, f), h = pL(r, d, f);
  73720. Tre(f, u, d, h, oa);
  73721. }
  73722. }
  73723. return iQe(u, r, i), r.type === "group" && uQe(t, u, n, r, i), o >= 0 ? a.replaceAt(u, o) : a.add(u), u;
  73724. }
  73725. function Pre(t, e, n) {
  73726. var r = ks(t), i = e.type, a = e.shape, o = e.style;
  73727. return (
  73728. // Always create new if universal transition is enabled.
  73729. // Because we do transition after render. It needs to know what old element is. Replacement will loose it.
  73730. n.isUniversalTransitionEnabled() || i != null && i !== r.customGraphicType || i === "path" && hQe(a) && $re(a) !== r.customPathData || i === "image" && Ce(o, "image") && o.image !== r.customImagePath
  73731. );
  73732. }
  73733. function sQe(t, e, n, r, i) {
  73734. var a = n.clipPath;
  73735. if (a === !1)
  73736. t && t.getClipPath() && t.removeClipPath();
  73737. else if (a) {
  73738. var o = t.getClipPath();
  73739. o && Pre(o, a, r) && (o = null), o || (o = fL(a), process.env.NODE_ENV !== "production" && ke(FO(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), t.setClipPath(o)), dL(null, o, e, a, null, r, i);
  73740. }
  73741. }
  73742. function lQe(t, e, n, r, i, a) {
  73743. if (!t.isGroup) {
  73744. HW(n, null, a), HW(n, Ls, a);
  73745. var o = a.normal.conOpt, s = a.emphasis.conOpt, l = a.blur.conOpt, u = a.select.conOpt;
  73746. if (o != null || s != null || u != null || l != null) {
  73747. var c = t.getTextContent();
  73748. if (o === !1)
  73749. c && t.removeTextContent();
  73750. else {
  73751. o = a.normal.conOpt = o || {
  73752. type: "text"
  73753. }, c ? c.clearStates() : (c = fL(o), t.setTextContent(c)), dL(null, c, e, o, null, r, i);
  73754. for (var f = o && o.style, d = 0; d < du.length; d++) {
  73755. var h = du[d];
  73756. if (h !== Vl) {
  73757. var p = a[h].conOpt;
  73758. Tre(h, c, p, pL(o, p, h), null);
  73759. }
  73760. }
  73761. f ? c.dirty() : c.markRedraw();
  73762. }
  73763. }
  73764. }
  73765. }
  73766. function HW(t, e, n) {
  73767. var r = e ? WO(t, e) : t, i = e ? pL(t, r, Ls) : t.style, a = t.type, o = r ? r.textConfig : null, s = t.textContent, l = s ? e ? WO(s, e) : s : null;
  73768. if (i && // Because emphasis style has little info to detect legacy,
  73769. // if normal is legacy, emphasis is trade as legacy.
  73770. (n.isLegacy || bre(i, a, !!o, !!l))) {
  73771. n.isLegacy = !0;
  73772. var u = _re(i, a, !e);
  73773. !o && u.textConfig && (o = u.textConfig), !l && u.textContent && (l = u.textContent);
  73774. }
  73775. if (!e && l) {
  73776. var c = l;
  73777. !c.type && (c.type = "text"), process.env.NODE_ENV !== "production" && ke(c.type === "text", 'textContent.type must be "text"');
  73778. }
  73779. var f = e ? n[e] : n.normal;
  73780. f.cfg = o, f.conOpt = l;
  73781. }
  73782. function WO(t, e) {
  73783. return e ? t ? t[e] : null : t;
  73784. }
  73785. function pL(t, e, n) {
  73786. var r = e && e.style;
  73787. return r == null && n === Ls && t && (r = t.styleEmphasis), r;
  73788. }
  73789. function uQe(t, e, n, r, i) {
  73790. var a = r.children, o = a ? a.length : 0, s = r.$mergeChildren, l = s === "byName" || r.diffChildrenByName, u = s === !1;
  73791. if (!(!o && !l && !u)) {
  73792. if (l) {
  73793. fQe({
  73794. api: t,
  73795. oldChildren: e.children() || [],
  73796. newChildren: a || [],
  73797. dataIndex: n,
  73798. seriesModel: i,
  73799. group: e
  73800. });
  73801. return;
  73802. }
  73803. u && e.removeAll();
  73804. for (var c = 0; c < o; c++) {
  73805. var f = a[c], d = e.childAt(c);
  73806. f ? (f.ignore == null && (f.ignore = !1), hL(t, d, n, f, i, e)) : (process.env.NODE_ENV !== "production" && ke(d, "renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."), d.ignore = !0);
  73807. }
  73808. for (var h = e.childCount() - 1; h >= c; h--) {
  73809. var p = e.childAt(h);
  73810. cQe(e, p, i);
  73811. }
  73812. }
  73813. }
  73814. function cQe(t, e, n) {
  73815. e && xw(e, ks(t).option, n);
  73816. }
  73817. function fQe(t) {
  73818. new Xs(t.oldChildren, t.newChildren, GW, GW, t).add(jW).update(jW).remove(dQe).execute();
  73819. }
  73820. function GW(t, e) {
  73821. var n = t && t.name;
  73822. return n ?? tQe + e;
  73823. }
  73824. function jW(t, e) {
  73825. var n = this.context, r = t != null ? n.newChildren[t] : null, i = e != null ? n.oldChildren[e] : null;
  73826. hL(n.api, i, n.dataIndex, r, n.seriesModel, n.group);
  73827. }
  73828. function dQe(t) {
  73829. var e = this.context, n = e.oldChildren[t];
  73830. n && xw(n, ks(n).option, e.seriesModel);
  73831. }
  73832. function $re(t) {
  73833. return t && (t.pathData || t.d);
  73834. }
  73835. function hQe(t) {
  73836. return t && (Ce(t, "pathData") || Ce(t, "d"));
  73837. }
  73838. function pQe(t) {
  73839. t.registerChartView(rQe), t.registerSeriesModel(R7e);
  73840. }
  73841. var wc = bt(), ZW = Le, GP = xe, vL = (
  73842. /** @class */
  73843. function() {
  73844. function t() {
  73845. this._dragging = !1, this.animationThreshold = 15;
  73846. }
  73847. return t.prototype.render = function(e, n, r, i) {
  73848. var a = n.get("value"), o = n.get("status");
  73849. if (this._axisModel = e, this._axisPointerModel = n, this._api = r, !(!i && this._lastValue === a && this._lastStatus === o)) {
  73850. this._lastValue = a, this._lastStatus = o;
  73851. var s = this._group, l = this._handle;
  73852. if (!o || o === "hide") {
  73853. s && s.hide(), l && l.hide();
  73854. return;
  73855. }
  73856. s && s.show(), l && l.show();
  73857. var u = {};
  73858. this.makeElOption(u, a, e, n, r);
  73859. var c = u.graphicKey;
  73860. c !== this._lastGraphicKey && this.clear(r), this._lastGraphicKey = c;
  73861. var f = this._moveAnimation = this.determineAnimation(e, n);
  73862. if (!s)
  73863. s = this._group = new Ve(), this.createPointerEl(s, u, e, n), this.createLabelEl(s, u, e, n), r.getZr().add(s);
  73864. else {
  73865. var d = Ue(UW, n, f);
  73866. this.updatePointerEl(s, u, d), this.updateLabelEl(s, u, d, n);
  73867. }
  73868. YW(s, n, !0), this._renderHandle(a);
  73869. }
  73870. }, t.prototype.remove = function(e) {
  73871. this.clear(e);
  73872. }, t.prototype.dispose = function(e) {
  73873. this.clear(e);
  73874. }, t.prototype.determineAnimation = function(e, n) {
  73875. var r = n.get("animation"), i = e.axis, a = i.type === "category", o = n.get("snap");
  73876. if (!o && !a)
  73877. return !1;
  73878. if (r === "auto" || r == null) {
  73879. var s = this.animationThreshold;
  73880. if (a && i.getBandWidth() > s)
  73881. return !0;
  73882. if (o) {
  73883. var l = zk(e).seriesDataCount, u = i.getExtent();
  73884. return Math.abs(u[0] - u[1]) / l > s;
  73885. }
  73886. return !1;
  73887. }
  73888. return r === !0;
  73889. }, t.prototype.makeElOption = function(e, n, r, i, a) {
  73890. }, t.prototype.createPointerEl = function(e, n, r, i) {
  73891. var a = n.pointer;
  73892. if (a) {
  73893. var o = wc(e).pointerEl = new Nf[a.type](ZW(n.pointer));
  73894. e.add(o);
  73895. }
  73896. }, t.prototype.createLabelEl = function(e, n, r, i) {
  73897. if (n.label) {
  73898. var a = wc(e).labelEl = new gt(ZW(n.label));
  73899. e.add(a), XW(a, i);
  73900. }
  73901. }, t.prototype.updatePointerEl = function(e, n, r) {
  73902. var i = wc(e).pointerEl;
  73903. i && n.pointer && (i.setStyle(n.pointer.style), r(i, {
  73904. shape: n.pointer.shape
  73905. }));
  73906. }, t.prototype.updateLabelEl = function(e, n, r, i) {
  73907. var a = wc(e).labelEl;
  73908. a && (a.setStyle(n.label.style), r(a, {
  73909. // Consider text length change in vertical axis, animation should
  73910. // be used on shape, otherwise the effect will be weird.
  73911. // TODOTODO
  73912. // shape: elOption.label.shape,
  73913. x: n.label.x,
  73914. y: n.label.y
  73915. }), XW(a, i));
  73916. }, t.prototype._renderHandle = function(e) {
  73917. if (!(this._dragging || !this.updateHandleTransform)) {
  73918. var n = this._axisPointerModel, r = this._api.getZr(), i = this._handle, a = n.getModel("handle"), o = n.get("status");
  73919. if (!a.get("show") || !o || o === "hide") {
  73920. i && r.remove(i), this._handle = null;
  73921. return;
  73922. }
  73923. var s;
  73924. this._handle || (s = !0, i = this._handle = _p(a.get("icon"), {
  73925. cursor: "move",
  73926. draggable: !0,
  73927. onmousemove: function(u) {
  73928. js(u.event);
  73929. },
  73930. onmousedown: GP(this._onHandleDragMove, this, 0, 0),
  73931. drift: GP(this._onHandleDragMove, this),
  73932. ondragend: GP(this._onHandleDragEnd, this)
  73933. }), r.add(i)), YW(i, n, !1), i.setStyle(a.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
  73934. var l = a.get("size");
  73935. ue(l) || (l = [l, l]), i.scaleX = l[0] / 2, i.scaleY = l[1] / 2, Pp(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
  73936. }
  73937. }, t.prototype._moveHandleToValue = function(e, n) {
  73938. UW(this._axisPointerModel, !n && this._moveAnimation, this._handle, jP(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
  73939. }, t.prototype._onHandleDragMove = function(e, n) {
  73940. var r = this._handle;
  73941. if (r) {
  73942. this._dragging = !0;
  73943. var i = this.updateHandleTransform(jP(r), [e, n], this._axisModel, this._axisPointerModel);
  73944. this._payloadInfo = i, r.stopAnimation(), r.attr(jP(i)), wc(r).lastProp = null, this._doDispatchAxisPointer();
  73945. }
  73946. }, t.prototype._doDispatchAxisPointer = function() {
  73947. var e = this._handle;
  73948. if (e) {
  73949. var n = this._payloadInfo, r = this._axisModel;
  73950. this._api.dispatchAction({
  73951. type: "updateAxisPointer",
  73952. x: n.cursorPoint[0],
  73953. y: n.cursorPoint[1],
  73954. tooltipOption: n.tooltipOption,
  73955. axesInfo: [{
  73956. axisDim: r.axis.dim,
  73957. axisIndex: r.componentIndex
  73958. }]
  73959. });
  73960. }
  73961. }, t.prototype._onHandleDragEnd = function() {
  73962. this._dragging = !1;
  73963. var e = this._handle;
  73964. if (e) {
  73965. var n = this._axisPointerModel.get("value");
  73966. this._moveHandleToValue(n), this._api.dispatchAction({
  73967. type: "hideTip"
  73968. });
  73969. }
  73970. }, t.prototype.clear = function(e) {
  73971. this._lastValue = null, this._lastStatus = null;
  73972. var n = e.getZr(), r = this._group, i = this._handle;
  73973. n && r && (this._lastGraphicKey = null, r && n.remove(r), i && n.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), Im(this, "_doDispatchAxisPointer");
  73974. }, t.prototype.doClear = function() {
  73975. }, t.prototype.buildLabel = function(e, n, r) {
  73976. return r = r || 0, {
  73977. x: e[r],
  73978. y: e[1 - r],
  73979. width: n[r],
  73980. height: n[1 - r]
  73981. };
  73982. }, t;
  73983. }()
  73984. );
  73985. function UW(t, e, n, r) {
  73986. Are(wc(n).lastProp, r) || (wc(n).lastProp = r, e ? Ct(n, r, t) : (n.stopAnimation(), n.attr(r)));
  73987. }
  73988. function Are(t, e) {
  73989. if (Ie(t) && Ie(e)) {
  73990. var n = !0;
  73991. return k(e, function(r, i) {
  73992. n = n && Are(t[i], r);
  73993. }), !!n;
  73994. } else
  73995. return t === e;
  73996. }
  73997. function XW(t, e) {
  73998. t[e.get(["label", "show"]) ? "show" : "hide"]();
  73999. }
  74000. function jP(t) {
  74001. return {
  74002. x: t.x || 0,
  74003. y: t.y || 0,
  74004. rotation: t.rotation || 0
  74005. };
  74006. }
  74007. function YW(t, e, n) {
  74008. var r = e.get("z"), i = e.get("zlevel");
  74009. t && t.traverse(function(a) {
  74010. a.type !== "group" && (r != null && (a.z = r), i != null && (a.zlevel = i), a.silent = n);
  74011. });
  74012. }
  74013. function gL(t) {
  74014. var e = t.get("type"), n = t.getModel(e + "Style"), r;
  74015. return e === "line" ? (r = n.getLineStyle(), r.fill = null) : e === "shadow" && (r = n.getAreaStyle(), r.stroke = null), r;
  74016. }
  74017. function Ere(t, e, n, r, i) {
  74018. var a = n.get("value"), o = Mre(a, e.axis, e.ecModel, n.get("seriesDataIndices"), {
  74019. precision: n.get(["label", "precision"]),
  74020. formatter: n.get(["label", "formatter"])
  74021. }), s = n.getModel("label"), l = zf(s.get("padding") || 0), u = s.getFont(), c = L0(o, u), f = i.position, d = c.width + l[1] + l[3], h = c.height + l[0] + l[2], p = i.align;
  74022. p === "right" && (f[0] -= d), p === "center" && (f[0] -= d / 2);
  74023. var v = i.verticalAlign;
  74024. v === "bottom" && (f[1] -= h), v === "middle" && (f[1] -= h / 2), vQe(f, d, h, r);
  74025. var g = s.get("backgroundColor");
  74026. (!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), t.label = {
  74027. // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
  74028. x: f[0],
  74029. y: f[1],
  74030. style: Zt(s, {
  74031. text: o,
  74032. font: u,
  74033. fill: s.getTextColor(),
  74034. padding: l,
  74035. backgroundColor: g
  74036. }),
  74037. // Label should be over axisPointer.
  74038. z2: 10
  74039. };
  74040. }
  74041. function vQe(t, e, n, r) {
  74042. var i = r.getWidth(), a = r.getHeight();
  74043. 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);
  74044. }
  74045. function Mre(t, e, n, r, i) {
  74046. t = e.scale.parse(t);
  74047. var a = e.scale.getLabel({
  74048. value: t
  74049. }, {
  74050. // If `precision` is set, width can be fixed (like '12.00500'), which
  74051. // helps to debounce when when moving label.
  74052. precision: i.precision
  74053. }), o = i.formatter;
  74054. if (o) {
  74055. var s = {
  74056. value: $k(e, {
  74057. value: t
  74058. }),
  74059. axisDimension: e.dim,
  74060. axisIndex: e.index,
  74061. seriesData: []
  74062. };
  74063. k(r, function(l) {
  74064. var u = n.getSeriesByIndex(l.seriesIndex), c = l.dataIndexInside, f = u && u.getDataParams(c);
  74065. f && s.seriesData.push(f);
  74066. }), Oe(o) ? a = o.replace("{value}", a) : Me(o) && (a = o(s));
  74067. }
  74068. return a;
  74069. }
  74070. function mL(t, e, n) {
  74071. var r = wi();
  74072. return Cu(r, r, n.rotation), so(r, r, n.position), ro([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], r);
  74073. }
  74074. function Ire(t, e, n, r, i, a) {
  74075. var o = Jr.innerTextLayout(n.rotation, 0, n.labelDirection);
  74076. n.labelMargin = i.get(["label", "margin"]), Ere(e, r, i, a, {
  74077. position: mL(r.axis, t, n),
  74078. align: o.textAlign,
  74079. verticalAlign: o.textVerticalAlign
  74080. });
  74081. }
  74082. function yL(t, e, n) {
  74083. return n = n || 0, {
  74084. x1: t[n],
  74085. y1: t[1 - n],
  74086. x2: e[n],
  74087. y2: e[1 - n]
  74088. };
  74089. }
  74090. function Dre(t, e, n) {
  74091. return n = n || 0, {
  74092. x: t[n],
  74093. y: t[1 - n],
  74094. width: e[n],
  74095. height: e[1 - n]
  74096. };
  74097. }
  74098. function qW(t, e, n, r, i, a) {
  74099. return {
  74100. cx: t,
  74101. cy: e,
  74102. r0: n,
  74103. r,
  74104. startAngle: i,
  74105. endAngle: a,
  74106. clockwise: !0
  74107. };
  74108. }
  74109. var gQe = (
  74110. /** @class */
  74111. function(t) {
  74112. q(e, t);
  74113. function e() {
  74114. return t !== null && t.apply(this, arguments) || this;
  74115. }
  74116. return e.prototype.makeElOption = function(n, r, i, a, o) {
  74117. var s = i.axis, l = s.grid, u = a.get("type"), c = KW(l, s).getOtherAxis(s).getGlobalExtent(), f = s.toGlobalCoord(s.dataToCoord(r, !0));
  74118. if (u && u !== "none") {
  74119. var d = gL(a), h = mQe[u](s, f, c);
  74120. h.style = d, n.graphicKey = h.type, n.pointer = h;
  74121. }
  74122. var p = dE(l.model, i);
  74123. Ire(
  74124. // @ts-ignore
  74125. r,
  74126. n,
  74127. p,
  74128. i,
  74129. a,
  74130. o
  74131. );
  74132. }, e.prototype.getHandleTransform = function(n, r, i) {
  74133. var a = dE(r.axis.grid.model, r, {
  74134. labelInside: !1
  74135. });
  74136. a.labelMargin = i.get(["handle", "margin"]);
  74137. var o = mL(r.axis, n, a);
  74138. return {
  74139. x: o[0],
  74140. y: o[1],
  74141. rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
  74142. };
  74143. }, e.prototype.updateHandleTransform = function(n, r, i, a) {
  74144. var o = i.axis, s = o.grid, l = o.getGlobalExtent(!0), u = KW(s, o).getOtherAxis(o).getGlobalExtent(), c = o.dim === "x" ? 0 : 1, f = [n.x, n.y];
  74145. f[c] += r[c], f[c] = Math.min(l[1], f[c]), f[c] = Math.max(l[0], f[c]);
  74146. var d = (u[1] + u[0]) / 2, h = [d, d];
  74147. h[c] = f[c];
  74148. var p = [{
  74149. verticalAlign: "middle"
  74150. }, {
  74151. align: "center"
  74152. }];
  74153. return {
  74154. x: f[0],
  74155. y: f[1],
  74156. rotation: n.rotation,
  74157. cursorPoint: h,
  74158. tooltipOption: p[c]
  74159. };
  74160. }, e;
  74161. }(vL)
  74162. );
  74163. function KW(t, e) {
  74164. var n = {};
  74165. return n[e.dim + "AxisIndex"] = e.index, t.getCartesian(n);
  74166. }
  74167. var mQe = {
  74168. line: function(t, e, n) {
  74169. var r = yL([e, n[0]], [e, n[1]], JW(t));
  74170. return {
  74171. type: "Line",
  74172. subPixelOptimize: !0,
  74173. shape: r
  74174. };
  74175. },
  74176. shadow: function(t, e, n) {
  74177. var r = Math.max(1, t.getBandWidth()), i = n[1] - n[0];
  74178. return {
  74179. type: "Rect",
  74180. shape: Dre([e - r / 2, n[0]], [r, i], JW(t))
  74181. };
  74182. }
  74183. };
  74184. function JW(t) {
  74185. return t.dim === "x" ? 0 : 1;
  74186. }
  74187. var yQe = (
  74188. /** @class */
  74189. function(t) {
  74190. q(e, t);
  74191. function e() {
  74192. var n = t !== null && t.apply(this, arguments) || this;
  74193. return n.type = e.type, n;
  74194. }
  74195. return e.type = "axisPointer", e.defaultOption = {
  74196. // 'auto' means that show when triggered by tooltip or handle.
  74197. show: "auto",
  74198. // zlevel: 0,
  74199. z: 50,
  74200. type: "line",
  74201. // axispointer triggered by tootip determine snap automatically,
  74202. // see `modelHelper`.
  74203. snap: !1,
  74204. triggerTooltip: !0,
  74205. triggerEmphasis: !0,
  74206. value: null,
  74207. status: null,
  74208. link: [],
  74209. // Do not set 'auto' here, otherwise global animation: false
  74210. // will not effect at this axispointer.
  74211. animation: null,
  74212. animationDurationUpdate: 200,
  74213. lineStyle: {
  74214. color: "#B9BEC9",
  74215. width: 1,
  74216. type: "dashed"
  74217. },
  74218. shadowStyle: {
  74219. color: "rgba(210,219,238,0.2)"
  74220. },
  74221. label: {
  74222. show: !0,
  74223. formatter: null,
  74224. precision: "auto",
  74225. margin: 3,
  74226. color: "#fff",
  74227. padding: [5, 7, 5, 7],
  74228. backgroundColor: "auto",
  74229. borderColor: null,
  74230. borderWidth: 0,
  74231. borderRadius: 3
  74232. },
  74233. handle: {
  74234. show: !1,
  74235. // eslint-disable-next-line
  74236. 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",
  74237. size: 45,
  74238. // handle margin is from symbol center to axis, which is stable when circular move.
  74239. margin: 50,
  74240. // color: '#1b8bbd'
  74241. // color: '#2f4554'
  74242. color: "#333",
  74243. shadowBlur: 3,
  74244. shadowColor: "#aaa",
  74245. shadowOffsetX: 0,
  74246. shadowOffsetY: 2,
  74247. // For mobile performance
  74248. throttle: 40
  74249. }
  74250. }, e;
  74251. }(rt)
  74252. ), Ms = bt(), bQe = k;
  74253. function Rre(t, e, n) {
  74254. if (!vt.node) {
  74255. var r = e.getZr();
  74256. Ms(r).records || (Ms(r).records = {}), _Qe(r, e);
  74257. var i = Ms(r).records[t] || (Ms(r).records[t] = {});
  74258. i.handler = n;
  74259. }
  74260. }
  74261. function _Qe(t, e) {
  74262. if (Ms(t).initialized)
  74263. return;
  74264. Ms(t).initialized = !0, n("click", Ue(e7, "click")), n("mousemove", Ue(e7, "mousemove")), n("globalout", SQe);
  74265. function n(r, i) {
  74266. t.on(r, function(a) {
  74267. var o = xQe(e);
  74268. bQe(Ms(t).records, function(s) {
  74269. s && i(s, a, o.dispatchAction);
  74270. }), OQe(o.pendings, e);
  74271. });
  74272. }
  74273. }
  74274. function OQe(t, e) {
  74275. var n = t.showTip.length, r = t.hideTip.length, i;
  74276. n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i));
  74277. }
  74278. function SQe(t, e, n) {
  74279. t.handler("leave", null, n);
  74280. }
  74281. function e7(t, e, n, r) {
  74282. e.handler(t, n, r);
  74283. }
  74284. function xQe(t) {
  74285. var e = {
  74286. showTip: [],
  74287. hideTip: []
  74288. }, n = function(r) {
  74289. var i = e[r.type];
  74290. i ? i.push(r) : (r.dispatchAction = n, t.dispatchAction(r));
  74291. };
  74292. return {
  74293. dispatchAction: n,
  74294. pendings: e
  74295. };
  74296. }
  74297. function ME(t, e) {
  74298. if (!vt.node) {
  74299. var n = e.getZr(), r = (Ms(n).records || {})[t];
  74300. r && (Ms(n).records[t] = null);
  74301. }
  74302. }
  74303. var wQe = (
  74304. /** @class */
  74305. function(t) {
  74306. q(e, t);
  74307. function e() {
  74308. var n = t !== null && t.apply(this, arguments) || this;
  74309. return n.type = e.type, n;
  74310. }
  74311. return e.prototype.render = function(n, r, i) {
  74312. var a = r.getComponent("tooltip"), o = n.get("triggerOn") || a && a.get("triggerOn") || "mousemove|click";
  74313. Rre("axisPointer", i, function(s, l, u) {
  74314. o !== "none" && (s === "leave" || o.indexOf(s) >= 0) && u({
  74315. type: "updateAxisPointer",
  74316. currTrigger: s,
  74317. x: l && l.offsetX,
  74318. y: l && l.offsetY
  74319. });
  74320. });
  74321. }, e.prototype.remove = function(n, r) {
  74322. ME("axisPointer", r);
  74323. }, e.prototype.dispose = function(n, r) {
  74324. ME("axisPointer", r);
  74325. }, e.type = "axisPointer", e;
  74326. }(Xt)
  74327. );
  74328. function kre(t, e) {
  74329. var n = [], r = t.seriesIndex, i;
  74330. if (r == null || !(i = e.getSeriesByIndex(r)))
  74331. return {
  74332. point: []
  74333. };
  74334. var a = i.getData(), o = yf(a, t);
  74335. if (o == null || o < 0 || ue(o))
  74336. return {
  74337. point: []
  74338. };
  74339. var s = a.getItemGraphicEl(o), l = i.coordinateSystem;
  74340. if (i.getTooltipPosition)
  74341. n = i.getTooltipPosition(o) || [];
  74342. else if (l && l.dataToPoint)
  74343. if (t.isStacked) {
  74344. 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 = [];
  74345. v[h] = a.get(p, o), v[1 - h] = a.get(a.getCalculationInfo("stackResultDimension"), o), n = l.dataToPoint(v) || [];
  74346. } else
  74347. n = l.dataToPoint(a.getValues(ce(l.dimensions, function(m) {
  74348. return a.mapDimension(m);
  74349. }), o)) || [];
  74350. else if (s) {
  74351. var g = s.getBoundingRect().clone();
  74352. g.applyTransform(s.transform), n = [g.x + g.width / 2, g.y + g.height / 2];
  74353. }
  74354. return {
  74355. point: n,
  74356. el: s
  74357. };
  74358. }
  74359. var t7 = bt();
  74360. function CQe(t, e, n) {
  74361. var r = t.currTrigger, i = [t.x, t.y], a = t, o = t.dispatchAction || xe(n.dispatchAction, n), s = e.getComponent("axisPointer").coordSysAxesInfo;
  74362. if (s) {
  74363. Y_(i) && (i = kre({
  74364. seriesIndex: a.seriesIndex,
  74365. // Do not use dataIndexInside from other ec instance.
  74366. // FIXME: auto detect it?
  74367. dataIndex: a.dataIndex
  74368. }, e).point);
  74369. var l = Y_(i), u = a.axesInfo, c = s.axesInfo, f = r === "leave" || Y_(i), d = {}, h = {}, p = {
  74370. list: [],
  74371. map: {}
  74372. }, v = {
  74373. showPointer: Ue(PQe, h),
  74374. showTooltip: Ue($Qe, p)
  74375. };
  74376. k(s.coordSysMap, function(m, y) {
  74377. var b = l || m.containPoint(i);
  74378. k(s.coordSysAxesInfo[y], function(_, O) {
  74379. var S = _.axis, x = IQe(u, _);
  74380. if (!f && b && (!u || x)) {
  74381. var C = x && x.value;
  74382. C == null && !l && (C = S.pointToData(i)), C != null && n7(_, C, v, !1, d);
  74383. }
  74384. });
  74385. });
  74386. var g = {};
  74387. return k(c, function(m, y) {
  74388. var b = m.linkGroup;
  74389. b && !h[y] && k(b.axesInfo, function(_, O) {
  74390. var S = h[O];
  74391. if (_ !== m && S) {
  74392. var x = S.value;
  74393. b.mapper && (x = m.axis.scale.parse(b.mapper(x, r7(_), r7(m)))), g[m.key] = x;
  74394. }
  74395. });
  74396. }), k(g, function(m, y) {
  74397. n7(c[y], m, v, !0, d);
  74398. }), AQe(h, c, d), EQe(p, i, t, o), MQe(c, o, n), d;
  74399. }
  74400. }
  74401. function n7(t, e, n, r, i) {
  74402. var a = t.axis;
  74403. if (!(a.scale.isBlank() || !a.containData(e))) {
  74404. if (!t.involveSeries) {
  74405. n.showPointer(t, e);
  74406. return;
  74407. }
  74408. var o = TQe(e, t), s = o.payloadBatch, l = o.snapToValue;
  74409. s[0] && i.seriesIndex == null && le(i, s[0]), !r && t.snap && a.containData(l) && l != null && (e = l), n.showPointer(t, e, s), n.showTooltip(t, o, l);
  74410. }
  74411. }
  74412. function TQe(t, e) {
  74413. var n = e.axis, r = n.dim, i = t, a = [], o = Number.MAX_VALUE, s = -1;
  74414. return k(e.seriesModels, function(l, u) {
  74415. var c = l.getData().mapDimensionsAll(r), f, d;
  74416. if (l.getAxisTooltipData) {
  74417. var h = l.getAxisTooltipData(c, t, n);
  74418. d = h.dataIndices, f = h.nestestValue;
  74419. } else {
  74420. if (d = l.getData().indicesOfNearest(
  74421. c[0],
  74422. t,
  74423. // Add a threshold to avoid find the wrong dataIndex
  74424. // when data length is not same.
  74425. // false,
  74426. n.type === "category" ? 0.5 : null
  74427. ), !d.length)
  74428. return;
  74429. f = l.getData().get(c[0], d[0]);
  74430. }
  74431. if (!(f == null || !isFinite(f))) {
  74432. var p = t - f, v = Math.abs(p);
  74433. v <= o && ((v < o || p >= 0 && s < 0) && (o = v, s = p, i = f, a.length = 0), k(d, function(g) {
  74434. a.push({
  74435. seriesIndex: l.seriesIndex,
  74436. dataIndexInside: g,
  74437. dataIndex: l.getData().getRawIndex(g)
  74438. });
  74439. }));
  74440. }
  74441. }), {
  74442. payloadBatch: a,
  74443. snapToValue: i
  74444. };
  74445. }
  74446. function PQe(t, e, n, r) {
  74447. t[e.key] = {
  74448. value: n,
  74449. payloadBatch: r
  74450. };
  74451. }
  74452. function $Qe(t, e, n, r) {
  74453. var i = n.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel;
  74454. if (!(!e.triggerTooltip || !i.length)) {
  74455. var l = e.coordSys.model, u = zm(l), c = t.map[u];
  74456. c || (c = t.map[u] = {
  74457. coordSysId: l.id,
  74458. coordSysIndex: l.componentIndex,
  74459. coordSysType: l.type,
  74460. coordSysMainType: l.mainType,
  74461. dataByAxis: []
  74462. }, t.list.push(c)), c.dataByAxis.push({
  74463. axisDim: a.dim,
  74464. axisIndex: o.componentIndex,
  74465. axisType: o.type,
  74466. axisId: o.id,
  74467. value: r,
  74468. // Caustion: viewHelper.getValueLabel is actually on "view stage", which
  74469. // depends that all models have been updated. So it should not be performed
  74470. // here. Considering axisPointerModel used here is volatile, which is hard
  74471. // to be retrieve in TooltipView, we prepare parameters here.
  74472. valueLabelOpt: {
  74473. precision: s.get(["label", "precision"]),
  74474. formatter: s.get(["label", "formatter"])
  74475. },
  74476. seriesDataIndices: i.slice()
  74477. });
  74478. }
  74479. }
  74480. function AQe(t, e, n) {
  74481. var r = n.axesInfo = [];
  74482. k(e, function(i, a) {
  74483. var o = i.axisPointerModel.option, s = t[a];
  74484. 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({
  74485. axisDim: i.axis.dim,
  74486. axisIndex: i.axis.model.componentIndex,
  74487. value: o.value
  74488. });
  74489. });
  74490. }
  74491. function EQe(t, e, n, r) {
  74492. if (Y_(e) || !t.list.length) {
  74493. r({
  74494. type: "hideTip"
  74495. });
  74496. return;
  74497. }
  74498. var i = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  74499. r({
  74500. type: "showTip",
  74501. escapeConnect: !0,
  74502. x: e[0],
  74503. y: e[1],
  74504. tooltipOption: n.tooltipOption,
  74505. position: n.position,
  74506. dataIndexInside: i.dataIndexInside,
  74507. dataIndex: i.dataIndex,
  74508. seriesIndex: i.seriesIndex,
  74509. dataByCoordSys: t.list
  74510. });
  74511. }
  74512. function MQe(t, e, n) {
  74513. var r = n.getZr(), i = "axisPointerLastHighlights", a = t7(r)[i] || {}, o = t7(r)[i] = {};
  74514. k(t, function(u, c) {
  74515. var f = u.axisPointerModel.option;
  74516. f.status === "show" && u.triggerEmphasis && k(f.seriesDataIndices, function(d) {
  74517. var h = d.seriesIndex + " | " + d.dataIndex;
  74518. o[h] = d;
  74519. });
  74520. });
  74521. var s = [], l = [];
  74522. k(a, function(u, c) {
  74523. !o[c] && l.push(u);
  74524. }), k(o, function(u, c) {
  74525. !a[c] && s.push(u);
  74526. }), l.length && n.dispatchAction({
  74527. type: "downplay",
  74528. escapeConnect: !0,
  74529. // Not blur others when highlight in axisPointer.
  74530. notBlur: !0,
  74531. batch: l
  74532. }), s.length && n.dispatchAction({
  74533. type: "highlight",
  74534. escapeConnect: !0,
  74535. // Not blur others when highlight in axisPointer.
  74536. notBlur: !0,
  74537. batch: s
  74538. });
  74539. }
  74540. function IQe(t, e) {
  74541. for (var n = 0; n < (t || []).length; n++) {
  74542. var r = t[n];
  74543. if (e.axis.dim === r.axisDim && e.axis.model.componentIndex === r.axisIndex)
  74544. return r;
  74545. }
  74546. }
  74547. function r7(t) {
  74548. var e = t.axis.model, n = {}, r = n.axisDim = t.axis.dim;
  74549. return n.axisIndex = n[r + "AxisIndex"] = e.componentIndex, n.axisName = n[r + "AxisName"] = e.name, n.axisId = n[r + "AxisId"] = e.id, n;
  74550. }
  74551. function Y_(t) {
  74552. return !t || t[0] == null || isNaN(t[0]) || t[1] == null || isNaN(t[1]);
  74553. }
  74554. function ty(t) {
  74555. Qf.registerAxisPointerClass("CartesianAxisPointer", gQe), t.registerComponentModel(yQe), t.registerComponentView(wQe), t.registerPreprocessor(function(e) {
  74556. if (e) {
  74557. (!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {});
  74558. var n = e.axisPointer.link;
  74559. n && !ue(n) && (e.axisPointer.link = [n]);
  74560. }
  74561. }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, function(e, n) {
  74562. e.getComponent("axisPointer").coordSysAxesInfo = Q6e(e, n);
  74563. }), t.registerAction({
  74564. type: "updateAxisPointer",
  74565. event: "updateAxisPointer",
  74566. update: ":updateAxisPointer"
  74567. }, CQe);
  74568. }
  74569. function DQe(t) {
  74570. at(sne), at(ty);
  74571. }
  74572. var RQe = (
  74573. /** @class */
  74574. function(t) {
  74575. q(e, t);
  74576. function e() {
  74577. return t !== null && t.apply(this, arguments) || this;
  74578. }
  74579. return e.prototype.makeElOption = function(n, r, i, a, o) {
  74580. var s = i.axis;
  74581. s.dim === "angle" && (this.animationThreshold = Math.PI / 18);
  74582. var l = s.polar, u = l.getOtherAxis(s), c = u.getExtent(), f = s.dataToCoord(r), d = a.get("type");
  74583. if (d && d !== "none") {
  74584. var h = gL(a), p = LQe[d](s, l, f, c);
  74585. p.style = h, n.graphicKey = p.type, n.pointer = p;
  74586. }
  74587. var v = a.get(["label", "margin"]), g = kQe(r, i, a, l, v);
  74588. Ere(n, i, a, o, g);
  74589. }, e;
  74590. }(vL)
  74591. );
  74592. function kQe(t, e, n, r, i) {
  74593. var a = e.axis, o = a.dataToCoord(t), s = r.getAngleAxis().getExtent()[0];
  74594. s = s / 180 * Math.PI;
  74595. var l = r.getRadiusAxis().getExtent(), u, c, f;
  74596. if (a.dim === "radius") {
  74597. var d = wi();
  74598. Cu(d, d, s), so(d, d, [r.cx, r.cy]), u = ro([o, -i], d);
  74599. var h = e.getModel("axisLabel").get("rotate") || 0, p = Jr.innerTextLayout(s, h * Math.PI / 180, -1);
  74600. c = p.textAlign, f = p.textVerticalAlign;
  74601. } else {
  74602. var v = l[1];
  74603. u = r.coordToPoint([v + i, o]);
  74604. var g = r.cx, m = r.cy;
  74605. 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";
  74606. }
  74607. return {
  74608. position: u,
  74609. align: c,
  74610. verticalAlign: f
  74611. };
  74612. }
  74613. var LQe = {
  74614. line: function(t, e, n, r) {
  74615. return t.dim === "angle" ? {
  74616. type: "Line",
  74617. shape: yL(e.coordToPoint([r[0], n]), e.coordToPoint([r[1], n]))
  74618. } : {
  74619. type: "Circle",
  74620. shape: {
  74621. cx: e.cx,
  74622. cy: e.cy,
  74623. r: n
  74624. }
  74625. };
  74626. },
  74627. shadow: function(t, e, n, r) {
  74628. var i = Math.max(1, t.getBandWidth()), a = Math.PI / 180;
  74629. return t.dim === "angle" ? {
  74630. type: "Sector",
  74631. shape: qW(
  74632. e.cx,
  74633. e.cy,
  74634. r[0],
  74635. r[1],
  74636. // In ECharts y is negative if angle is positive
  74637. (-n - i / 2) * a,
  74638. (-n + i / 2) * a
  74639. )
  74640. } : {
  74641. type: "Sector",
  74642. shape: qW(e.cx, e.cy, n - i / 2, n + i / 2, 0, Math.PI * 2)
  74643. };
  74644. }
  74645. }, NQe = (
  74646. /** @class */
  74647. function(t) {
  74648. q(e, t);
  74649. function e() {
  74650. var n = t !== null && t.apply(this, arguments) || this;
  74651. return n.type = e.type, n;
  74652. }
  74653. return e.prototype.findAxisModel = function(n) {
  74654. var r, i = this.ecModel;
  74655. return i.eachComponent(n, function(a) {
  74656. a.getCoordSysModel() === this && (r = a);
  74657. }, this), r;
  74658. }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
  74659. // zlevel: 0,
  74660. z: 0,
  74661. center: ["50%", "50%"],
  74662. radius: "80%"
  74663. }, e;
  74664. }(rt)
  74665. ), bL = (
  74666. /** @class */
  74667. function(t) {
  74668. q(e, t);
  74669. function e() {
  74670. return t !== null && t.apply(this, arguments) || this;
  74671. }
  74672. return e.prototype.getCoordSysModel = function() {
  74673. return this.getReferringComponents("polar", Dn).models[0];
  74674. }, e.type = "polarAxis", e;
  74675. }(rt)
  74676. );
  74677. xn(bL, Mp);
  74678. var BQe = (
  74679. /** @class */
  74680. function(t) {
  74681. q(e, t);
  74682. function e() {
  74683. var n = t !== null && t.apply(this, arguments) || this;
  74684. return n.type = e.type, n;
  74685. }
  74686. return e.type = "angleAxis", e;
  74687. }(bL)
  74688. ), zQe = (
  74689. /** @class */
  74690. function(t) {
  74691. q(e, t);
  74692. function e() {
  74693. var n = t !== null && t.apply(this, arguments) || this;
  74694. return n.type = e.type, n;
  74695. }
  74696. return e.type = "radiusAxis", e;
  74697. }(bL)
  74698. ), _L = (
  74699. /** @class */
  74700. function(t) {
  74701. q(e, t);
  74702. function e(n, r) {
  74703. return t.call(this, "radius", n, r) || this;
  74704. }
  74705. return e.prototype.pointToData = function(n, r) {
  74706. return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
  74707. }, e;
  74708. }(Va)
  74709. );
  74710. _L.prototype.dataToRadius = Va.prototype.dataToCoord;
  74711. _L.prototype.radiusToData = Va.prototype.coordToData;
  74712. var VQe = bt(), OL = (
  74713. /** @class */
  74714. function(t) {
  74715. q(e, t);
  74716. function e(n, r) {
  74717. return t.call(this, "angle", n, r || [0, 360]) || this;
  74718. }
  74719. return e.prototype.pointToData = function(n, r) {
  74720. return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
  74721. }, e.prototype.calculateCategoryInterval = function() {
  74722. var n = this, r = n.getLabelModel(), i = n.scale, a = i.getExtent(), o = i.count();
  74723. if (a[1] - a[0] < 1)
  74724. return 0;
  74725. var s = a[0], l = n.dataToCoord(s + 1) - n.dataToCoord(s), u = Math.abs(l), c = L0(s == null ? "" : s + "", r.getFont(), "center", "top"), f = Math.max(c.height, 7), d = f / u;
  74726. isNaN(d) && (d = 1 / 0);
  74727. var h = Math.max(0, Math.floor(d)), p = VQe(n.model), v = p.lastAutoInterval, g = p.lastTickCount;
  74728. 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;
  74729. }, e;
  74730. }(Va)
  74731. );
  74732. OL.prototype.dataToAngle = Va.prototype.dataToCoord;
  74733. OL.prototype.angleToData = Va.prototype.coordToData;
  74734. var Lre = ["radius", "angle"], FQe = (
  74735. /** @class */
  74736. function() {
  74737. function t(e) {
  74738. this.dimensions = Lre, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new _L(), this._angleAxis = new OL(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this;
  74739. }
  74740. return t.prototype.containPoint = function(e) {
  74741. var n = this.pointToCoord(e);
  74742. return this._radiusAxis.contain(n[0]) && this._angleAxis.contain(n[1]);
  74743. }, t.prototype.containData = function(e) {
  74744. return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]);
  74745. }, t.prototype.getAxis = function(e) {
  74746. var n = "_" + e + "Axis";
  74747. return this[n];
  74748. }, t.prototype.getAxes = function() {
  74749. return [this._radiusAxis, this._angleAxis];
  74750. }, t.prototype.getAxesByScale = function(e) {
  74751. var n = [], r = this._angleAxis, i = this._radiusAxis;
  74752. return r.scale.type === e && n.push(r), i.scale.type === e && n.push(i), n;
  74753. }, t.prototype.getAngleAxis = function() {
  74754. return this._angleAxis;
  74755. }, t.prototype.getRadiusAxis = function() {
  74756. return this._radiusAxis;
  74757. }, t.prototype.getOtherAxis = function(e) {
  74758. var n = this._angleAxis;
  74759. return e === n ? this._radiusAxis : n;
  74760. }, t.prototype.getBaseAxis = function() {
  74761. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis();
  74762. }, t.prototype.getTooltipAxes = function(e) {
  74763. var n = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis();
  74764. return {
  74765. baseAxes: [n],
  74766. otherAxes: [this.getOtherAxis(n)]
  74767. };
  74768. }, t.prototype.dataToPoint = function(e, n) {
  74769. return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], n), this._angleAxis.dataToAngle(e[1], n)]);
  74770. }, t.prototype.pointToData = function(e, n) {
  74771. var r = this.pointToCoord(e);
  74772. return [this._radiusAxis.radiusToData(r[0], n), this._angleAxis.angleToData(r[1], n)];
  74773. }, t.prototype.pointToCoord = function(e) {
  74774. 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]);
  74775. i.inverse ? o = s - 360 : s = o + 360;
  74776. var l = Math.sqrt(n * n + r * r);
  74777. n /= l, r /= l;
  74778. for (var u = Math.atan2(-r, n) / Math.PI * 180, c = u < o ? 1 : -1; u < o || u > s; )
  74779. u += c * 360;
  74780. return [l, u];
  74781. }, t.prototype.coordToPoint = function(e) {
  74782. var n = e[0], r = e[1] / 180 * Math.PI, i = Math.cos(r) * n + this.cx, a = -Math.sin(r) * n + this.cy;
  74783. return [i, a];
  74784. }, t.prototype.getArea = function() {
  74785. var e = this.getAngleAxis(), n = this.getRadiusAxis(), r = n.getExtent().slice();
  74786. r[0] > r[1] && r.reverse();
  74787. var i = e.getExtent(), a = Math.PI / 180;
  74788. return {
  74789. cx: this.cx,
  74790. cy: this.cy,
  74791. r0: r[0],
  74792. r: r[1],
  74793. startAngle: -i[0] * a,
  74794. endAngle: -i[1] * a,
  74795. clockwise: e.inverse,
  74796. contain: function(o, s) {
  74797. var l = o - this.cx, u = s - this.cy, c = l * l + u * u - 1e-4, f = this.r, d = this.r0;
  74798. return c <= f * f && c >= d * d;
  74799. }
  74800. };
  74801. }, t.prototype.convertToPixel = function(e, n, r) {
  74802. var i = i7(n);
  74803. return i === this ? this.dataToPoint(r) : null;
  74804. }, t.prototype.convertFromPixel = function(e, n, r) {
  74805. var i = i7(n);
  74806. return i === this ? this.pointToData(r) : null;
  74807. }, t;
  74808. }()
  74809. );
  74810. function i7(t) {
  74811. var e = t.seriesModel, n = t.polarModel;
  74812. return n && n.coordinateSystem || e && e.coordinateSystem;
  74813. }
  74814. const WQe = FQe;
  74815. function QQe(t, e, n) {
  74816. var r = e.get("center"), i = n.getWidth(), a = n.getHeight();
  74817. t.cx = _e(r[0], i), t.cy = _e(r[1], a);
  74818. var o = t.getRadiusAxis(), s = Math.min(i, a) / 2, l = e.get("radius");
  74819. l == null ? l = [0, "100%"] : ue(l) || (l = [0, l]);
  74820. var u = [_e(l[0], s), _e(l[1], s)];
  74821. o.inverse ? o.setExtent(u[1], u[0]) : o.setExtent(u[0], u[1]);
  74822. }
  74823. function HQe(t, e) {
  74824. var n = this, r = n.getAngleAxis(), i = n.getRadiusAxis();
  74825. if (r.scale.setExtent(1 / 0, -1 / 0), i.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function(s) {
  74826. if (s.coordinateSystem === n) {
  74827. var l = s.getData();
  74828. k(PO(l, "radius"), function(u) {
  74829. i.scale.unionExtentFromData(l, u);
  74830. }), k(PO(l, "angle"), function(u) {
  74831. r.scale.unionExtentFromData(l, u);
  74832. });
  74833. }
  74834. }), Sf(r.scale, r.model), Sf(i.scale, i.model), r.type === "category" && !r.onBand) {
  74835. var a = r.getExtent(), o = 360 / r.scale.count();
  74836. r.inverse ? a[1] += o : a[1] -= o, r.setExtent(a[0], a[1]);
  74837. }
  74838. }
  74839. function GQe(t) {
  74840. return t.mainType === "angleAxis";
  74841. }
  74842. function a7(t, e) {
  74843. var n;
  74844. if (t.type = e.get("type"), t.scale = j0(e), t.onBand = e.get("boundaryGap") && t.type === "category", t.inverse = e.get("inverse"), GQe(e)) {
  74845. t.inverse = t.inverse !== e.get("clockwise");
  74846. var r = e.get("startAngle"), i = (n = e.get("endAngle")) !== null && n !== void 0 ? n : r + (t.inverse ? -360 : 360);
  74847. t.setExtent(r, i);
  74848. }
  74849. e.axis = t, t.model = e;
  74850. }
  74851. var jQe = {
  74852. dimensions: Lre,
  74853. create: function(t, e) {
  74854. var n = [];
  74855. return t.eachComponent("polar", function(r, i) {
  74856. var a = new WQe(i + "");
  74857. a.update = HQe;
  74858. var o = a.getRadiusAxis(), s = a.getAngleAxis(), l = r.findAxisModel("radiusAxis"), u = r.findAxisModel("angleAxis");
  74859. a7(o, l), a7(s, u), QQe(a, r, e), n.push(a), r.coordinateSystem = a, a.model = r;
  74860. }), t.eachSeries(function(r) {
  74861. if (r.get("coordinateSystem") === "polar") {
  74862. var i = r.getReferringComponents("polar", Dn).models[0];
  74863. if (process.env.NODE_ENV !== "production" && !i)
  74864. throw new Error('Polar "' + Tn(r.get("polarIndex"), r.get("polarId"), 0) + '" not found');
  74865. r.coordinateSystem = i.coordinateSystem;
  74866. }
  74867. }), n;
  74868. }
  74869. }, ZQe = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
  74870. function Db(t, e, n) {
  74871. e[1] > e[0] && (e = e.slice().reverse());
  74872. var r = t.coordToPoint([e[0], n]), i = t.coordToPoint([e[1], n]);
  74873. return {
  74874. x1: r[0],
  74875. y1: r[1],
  74876. x2: i[0],
  74877. y2: i[1]
  74878. };
  74879. }
  74880. function Rb(t) {
  74881. var e = t.getRadiusAxis();
  74882. return e.inverse ? 0 : 1;
  74883. }
  74884. function o7(t) {
  74885. var e = t[0], n = t[t.length - 1];
  74886. e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop();
  74887. }
  74888. var UQe = (
  74889. /** @class */
  74890. function(t) {
  74891. q(e, t);
  74892. function e() {
  74893. var n = t !== null && t.apply(this, arguments) || this;
  74894. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
  74895. }
  74896. return e.prototype.render = function(n, r) {
  74897. if (this.group.removeAll(), !!n.get("show")) {
  74898. var i = n.axis, a = i.polar, o = a.getRadiusAxis().getExtent(), s = i.getTicksCoords(), l = i.getMinorTicksCoords(), u = ce(i.getViewLabels(), function(c) {
  74899. c = Le(c);
  74900. var f = i.scale, d = f.type === "ordinal" ? f.getRawOrdinalNumber(c.tickValue) : c.tickValue;
  74901. return c.coord = i.dataToCoord(d), c;
  74902. });
  74903. o7(u), o7(s), k(ZQe, function(c) {
  74904. n.get([c, "show"]) && (!i.scale.isBlank() || c === "axisLine") && XQe[c](this.group, n, a, s, l, o, u);
  74905. }, this);
  74906. }
  74907. }, e.type = "angleAxis", e;
  74908. }(Qf)
  74909. ), XQe = {
  74910. axisLine: function(t, e, n, r, i, a) {
  74911. var o = e.getModel(["axisLine", "lineStyle"]), s = n.getAngleAxis(), l = Math.PI / 180, u = s.getExtent(), c = Rb(n), f = c ? 0 : 1, d, h = Math.abs(u[1] - u[0]) === 360 ? "Circle" : "Arc";
  74912. a[f] === 0 ? d = new Nf[h]({
  74913. shape: {
  74914. cx: n.cx,
  74915. cy: n.cy,
  74916. r: a[c],
  74917. startAngle: -u[0] * l,
  74918. endAngle: -u[1] * l,
  74919. clockwise: s.inverse
  74920. },
  74921. style: o.getLineStyle(),
  74922. z2: 1,
  74923. silent: !0
  74924. }) : d = new V0({
  74925. shape: {
  74926. cx: n.cx,
  74927. cy: n.cy,
  74928. r: a[c],
  74929. r0: a[f]
  74930. },
  74931. style: o.getLineStyle(),
  74932. z2: 1,
  74933. silent: !0
  74934. }), d.style.fill = null, t.add(d);
  74935. },
  74936. axisTick: function(t, e, n, r, i, a) {
  74937. var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), l = a[Rb(n)], u = ce(r, function(c) {
  74938. return new Un({
  74939. shape: Db(n, [l, l + s], c.coord)
  74940. });
  74941. });
  74942. t.add(Bi(u, {
  74943. style: Re(o.getModel("lineStyle").getLineStyle(), {
  74944. stroke: e.get(["axisLine", "lineStyle", "color"])
  74945. })
  74946. }));
  74947. },
  74948. minorTick: function(t, e, n, r, i, a) {
  74949. if (i.length) {
  74950. for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (o.get("inside") ? -1 : 1) * s.get("length"), u = a[Rb(n)], c = [], f = 0; f < i.length; f++)
  74951. for (var d = 0; d < i[f].length; d++)
  74952. c.push(new Un({
  74953. shape: Db(n, [u, u + l], i[f][d].coord)
  74954. }));
  74955. t.add(Bi(c, {
  74956. style: Re(s.getModel("lineStyle").getLineStyle(), Re(o.getLineStyle(), {
  74957. stroke: e.get(["axisLine", "lineStyle", "color"])
  74958. }))
  74959. }));
  74960. }
  74961. },
  74962. axisLabel: function(t, e, n, r, i, a, o) {
  74963. var s = e.getCategories(!0), l = e.getModel("axisLabel"), u = l.get("margin"), c = e.get("triggerEvent");
  74964. k(o, function(f, d) {
  74965. var h = l, p = f.tickValue, v = a[Rb(n)], g = n.coordToPoint([v + u, f.coord]), m = n.cx, y = n.cy, b = Math.abs(g[0] - m) / v < 0.3 ? "center" : g[0] > m ? "left" : "right", _ = Math.abs(g[1] - y) / v < 0.3 ? "middle" : g[1] > y ? "top" : "bottom";
  74966. if (s && s[p]) {
  74967. var O = s[p];
  74968. Ie(O) && O.textStyle && (h = new Wt(O.textStyle, l, l.ecModel));
  74969. }
  74970. var S = new gt({
  74971. silent: Jr.isLabelSilent(e),
  74972. style: Zt(h, {
  74973. x: g[0],
  74974. y: g[1],
  74975. fill: h.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  74976. text: f.formattedLabel,
  74977. align: b,
  74978. verticalAlign: _
  74979. })
  74980. });
  74981. if (t.add(S), c) {
  74982. var x = Jr.makeAxisEventDataBase(e);
  74983. x.targetType = "axisLabel", x.value = f.rawLabel, Fe(S).eventData = x;
  74984. }
  74985. }, this);
  74986. },
  74987. splitLine: function(t, e, n, r, i, a) {
  74988. var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
  74989. l = l instanceof Array ? l : [l];
  74990. for (var c = [], f = 0; f < r.length; f++) {
  74991. var d = u++ % l.length;
  74992. c[d] = c[d] || [], c[d].push(new Un({
  74993. shape: Db(n, a, r[f].coord)
  74994. }));
  74995. }
  74996. for (var f = 0; f < c.length; f++)
  74997. t.add(Bi(c[f], {
  74998. style: Re({
  74999. stroke: l[f % l.length]
  75000. }, s.getLineStyle()),
  75001. silent: !0,
  75002. z: e.get("z")
  75003. }));
  75004. },
  75005. minorSplitLine: function(t, e, n, r, i, a) {
  75006. if (i.length) {
  75007. for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), l = [], u = 0; u < i.length; u++)
  75008. for (var c = 0; c < i[u].length; c++)
  75009. l.push(new Un({
  75010. shape: Db(n, a, i[u][c].coord)
  75011. }));
  75012. t.add(Bi(l, {
  75013. style: s.getLineStyle(),
  75014. silent: !0,
  75015. z: e.get("z")
  75016. }));
  75017. }
  75018. },
  75019. splitArea: function(t, e, n, r, i, a) {
  75020. if (r.length) {
  75021. var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
  75022. l = l instanceof Array ? l : [l];
  75023. 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++) {
  75024. var y = g === m ? r[0].coord : r[g].coord, b = u++ % l.length;
  75025. c[b] = c[b] || [], c[b].push(new ii({
  75026. shape: {
  75027. cx: n.cx,
  75028. cy: n.cy,
  75029. r0: h,
  75030. r: p,
  75031. startAngle: d,
  75032. endAngle: -y * f,
  75033. clockwise: v
  75034. },
  75035. silent: !0
  75036. })), d = -y * f;
  75037. }
  75038. for (var g = 0; g < c.length; g++)
  75039. t.add(Bi(c[g], {
  75040. style: Re({
  75041. fill: l[g % l.length]
  75042. }, s.getAreaStyle()),
  75043. silent: !0
  75044. }));
  75045. }
  75046. }
  75047. }, YQe = ["axisLine", "axisTickLabel", "axisName"], qQe = ["splitLine", "splitArea", "minorSplitLine"], KQe = (
  75048. /** @class */
  75049. function(t) {
  75050. q(e, t);
  75051. function e() {
  75052. var n = t !== null && t.apply(this, arguments) || this;
  75053. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
  75054. }
  75055. return e.prototype.render = function(n, r) {
  75056. if (this.group.removeAll(), !!n.get("show")) {
  75057. var i = this._axisGroup, a = this._axisGroup = new Ve();
  75058. this.group.add(a);
  75059. var o = n.axis, s = o.polar, l = s.getAngleAxis(), u = o.getTicksCoords(), c = o.getMinorTicksCoords(), f = l.getExtent()[0], d = o.getExtent(), h = eHe(s, n, f), p = new Jr(n, h);
  75060. k(YQe, p.add, p), a.add(p.getGroup()), Q0(i, a, n), k(qQe, function(v) {
  75061. n.get([v, "show"]) && !o.scale.isBlank() && JQe[v](this.group, n, s, f, d, u, c);
  75062. }, this);
  75063. }
  75064. }, e.type = "radiusAxis", e;
  75065. }(Qf)
  75066. ), JQe = {
  75067. splitLine: function(t, e, n, r, i, a) {
  75068. 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";
  75069. l = l instanceof Array ? l : [l];
  75070. for (var p = [], v = 0; v < a.length; v++) {
  75071. var g = u++ % l.length;
  75072. p[g] = p[g] || [], p[g].push(new Nf[h]({
  75073. shape: {
  75074. cx: n.cx,
  75075. cy: n.cy,
  75076. // ensure circle radius >= 0
  75077. r: Math.max(a[v].coord, 0),
  75078. startAngle: -d[0] * f,
  75079. endAngle: -d[1] * f,
  75080. clockwise: c.inverse
  75081. }
  75082. }));
  75083. }
  75084. for (var v = 0; v < p.length; v++)
  75085. t.add(Bi(p[v], {
  75086. style: Re({
  75087. stroke: l[v % l.length],
  75088. fill: null
  75089. }, s.getLineStyle()),
  75090. silent: !0
  75091. }));
  75092. },
  75093. minorSplitLine: function(t, e, n, r, i, a, o) {
  75094. if (o.length) {
  75095. for (var s = e.getModel("minorSplitLine"), l = s.getModel("lineStyle"), u = [], c = 0; c < o.length; c++)
  75096. for (var f = 0; f < o[c].length; f++)
  75097. u.push(new ul({
  75098. shape: {
  75099. cx: n.cx,
  75100. cy: n.cy,
  75101. r: o[c][f].coord
  75102. }
  75103. }));
  75104. t.add(Bi(u, {
  75105. style: Re({
  75106. fill: null
  75107. }, l.getLineStyle()),
  75108. silent: !0
  75109. }));
  75110. }
  75111. },
  75112. splitArea: function(t, e, n, r, i, a) {
  75113. if (a.length) {
  75114. var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
  75115. l = l instanceof Array ? l : [l];
  75116. for (var c = [], f = a[0].coord, d = 1; d < a.length; d++) {
  75117. var h = u++ % l.length;
  75118. c[h] = c[h] || [], c[h].push(new ii({
  75119. shape: {
  75120. cx: n.cx,
  75121. cy: n.cy,
  75122. r0: f,
  75123. r: a[d].coord,
  75124. startAngle: 0,
  75125. endAngle: Math.PI * 2
  75126. },
  75127. silent: !0
  75128. })), f = a[d].coord;
  75129. }
  75130. for (var d = 0; d < c.length; d++)
  75131. t.add(Bi(c[d], {
  75132. style: Re({
  75133. fill: l[d % l.length]
  75134. }, s.getAreaStyle()),
  75135. silent: !0
  75136. }));
  75137. }
  75138. }
  75139. };
  75140. function eHe(t, e, n) {
  75141. return {
  75142. position: [t.cx, t.cy],
  75143. rotation: n / 180 * Math.PI,
  75144. labelDirection: -1,
  75145. tickDirection: -1,
  75146. nameDirection: 1,
  75147. labelRotate: e.getModel("axisLabel").get("rotate"),
  75148. // Over splitLine and splitArea
  75149. z2: 1
  75150. };
  75151. }
  75152. function Nre(t) {
  75153. return t.get("stack") || "__ec_stack_" + t.seriesIndex;
  75154. }
  75155. function Bre(t, e) {
  75156. return e.dim + t.model.componentIndex;
  75157. }
  75158. function tHe(t, e, n) {
  75159. var r = {}, i = nHe(Nt(e.getSeriesByType(t), function(a) {
  75160. return !e.isSeriesFiltered(a) && a.coordinateSystem && a.coordinateSystem.type === "polar";
  75161. }));
  75162. e.eachSeriesByType(t, function(a) {
  75163. if (a.coordinateSystem.type === "polar") {
  75164. var o = a.getData(), s = a.coordinateSystem, l = s.getBaseAxis(), u = Bre(s, l), c = Nre(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;
  75165. r[c] = r[c] || [];
  75166. for (var b = o.mapDimension(p.dim), _ = o.mapDimension(l.dim), O = Ys(
  75167. o,
  75168. b
  75169. /* , baseDim */
  75170. ), S = l.dim !== "radius" || !a.get("roundCap", !0), x = p.model, C = x.get("startValue"), T = p.dataToCoord(C || 0), w = 0, P = o.count(); w < P; w++) {
  75171. var $ = o.get(b, w), A = o.get(_, w), D = $ >= 0 ? "p" : "n", E = T;
  75172. O && (r[c][A] || (r[c][A] = {
  75173. p: T,
  75174. n: T
  75175. // Negative stack
  75176. }), E = r[c][A][D]);
  75177. var R = void 0, N = void 0, V = void 0, B = void 0;
  75178. if (p.dim === "radius") {
  75179. var W = p.dataToCoord($) - T, F = l.dataToCoord(A);
  75180. Math.abs(W) < m && (W = (W < 0 ? -1 : 1) * m), R = E, N = E + W, V = F - d, B = V - h, O && (r[c][A][D] = N);
  75181. } else {
  75182. var Q = p.dataToCoord($, S) - T, Z = l.dataToCoord(A);
  75183. Math.abs(Q) < y && (Q = (Q < 0 ? -1 : 1) * y), R = Z + d, N = R + h, V = E, B = E + Q, O && (r[c][A][D] = B);
  75184. }
  75185. o.setItemLayout(w, {
  75186. cx: v,
  75187. cy: g,
  75188. r0: R,
  75189. r: N,
  75190. // Consider that positive angle is anti-clockwise,
  75191. // while positive radian of sector is clockwise
  75192. startAngle: -V * Math.PI / 180,
  75193. endAngle: -B * Math.PI / 180,
  75194. /**
  75195. * Keep the same logic with bar in catesion: use end value to
  75196. * control direction. Notice that if clockwise is true (by
  75197. * default), the sector will always draw clockwisely, no matter
  75198. * whether endAngle is greater or less than startAngle.
  75199. */
  75200. clockwise: V >= B
  75201. });
  75202. }
  75203. }
  75204. });
  75205. }
  75206. function nHe(t) {
  75207. var e = {};
  75208. k(t, function(r, i) {
  75209. var a = r.getData(), o = r.coordinateSystem, s = o.getBaseAxis(), l = Bre(o, s), u = s.getExtent(), c = s.type === "category" ? s.getBandWidth() : Math.abs(u[1] - u[0]) / a.count(), f = e[l] || {
  75210. bandWidth: c,
  75211. remainedWidth: c,
  75212. autoWidthCount: 0,
  75213. categoryGap: "20%",
  75214. gap: "30%",
  75215. stacks: {}
  75216. }, d = f.stacks;
  75217. e[l] = f;
  75218. var h = Nre(r);
  75219. d[h] || f.autoWidthCount++, d[h] = d[h] || {
  75220. width: 0,
  75221. maxWidth: 0
  75222. };
  75223. var p = _e(r.get("barWidth"), c), v = _e(r.get("barMaxWidth"), c), g = r.get("barGap"), m = r.get("barCategoryGap");
  75224. 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);
  75225. });
  75226. var n = {};
  75227. return k(e, function(r, i) {
  75228. n[i] = {};
  75229. var a = r.stacks, o = r.bandWidth, s = _e(r.categoryGap, o), l = _e(r.gap, 1), u = r.remainedWidth, c = r.autoWidthCount, f = (u - s) / (c + (c - 1) * l);
  75230. f = Math.max(f, 0), k(a, function(v, g) {
  75231. var m = v.maxWidth;
  75232. m && m < f && (m = Math.min(m, u), v.width && (m = Math.min(m, v.width)), u -= m, v.width = m, c--);
  75233. }), f = (u - s) / (c + (c - 1) * l), f = Math.max(f, 0);
  75234. var d = 0, h;
  75235. k(a, function(v, g) {
  75236. v.width || (v.width = f), h = v, d += v.width * (1 + l);
  75237. }), h && (d -= h.width * l);
  75238. var p = -d / 2;
  75239. k(a, function(v, g) {
  75240. n[i][g] = n[i][g] || {
  75241. offset: p,
  75242. width: v.width
  75243. }, p += v.width * (1 + l);
  75244. });
  75245. }), n;
  75246. }
  75247. var rHe = {
  75248. startAngle: 90,
  75249. clockwise: !0,
  75250. splitNumber: 12,
  75251. axisLabel: {
  75252. rotate: 0
  75253. }
  75254. }, iHe = {
  75255. splitNumber: 5
  75256. }, aHe = (
  75257. /** @class */
  75258. function(t) {
  75259. q(e, t);
  75260. function e() {
  75261. var n = t !== null && t.apply(this, arguments) || this;
  75262. return n.type = e.type, n;
  75263. }
  75264. return e.type = "polar", e;
  75265. }(Xt)
  75266. );
  75267. function oHe(t) {
  75268. at(ty), Qf.registerAxisPointerClass("PolarAxisPointer", RQe), t.registerCoordinateSystem("polar", jQe), t.registerComponentModel(NQe), t.registerComponentView(aHe), Uh(t, "angle", BQe, rHe), Uh(t, "radius", zQe, iHe), t.registerComponentView(UQe), t.registerComponentView(KQe), t.registerLayout(Ue(tHe, "bar"));
  75269. }
  75270. function IE(t, e) {
  75271. e = e || {};
  75272. 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 = {
  75273. horizontal: {
  75274. top: l[2],
  75275. bottom: l[3]
  75276. },
  75277. vertical: {
  75278. left: l[0],
  75279. right: l[1]
  75280. }
  75281. };
  75282. i.position = [o === "vertical" ? u.vertical[a] : l[0], o === "horizontal" ? u.horizontal[a] : l[3]];
  75283. var c = {
  75284. horizontal: 0,
  75285. vertical: 1
  75286. };
  75287. i.rotation = Math.PI / 2 * c[o];
  75288. var f = {
  75289. top: -1,
  75290. bottom: 1,
  75291. right: 1,
  75292. left: -1
  75293. };
  75294. i.labelDirection = i.tickDirection = i.nameDirection = f[a], t.get(["axisTick", "inside"]) && (i.tickDirection = -i.tickDirection), Tn(e.labelInside, t.get(["axisLabel", "inside"])) && (i.labelDirection = -i.labelDirection);
  75295. var d = e.rotate;
  75296. return d == null && (d = t.get(["axisLabel", "rotate"])), i.labelRotation = a === "top" ? -d : d, i.z2 = 1, i;
  75297. }
  75298. var sHe = ["axisLine", "axisTickLabel", "axisName"], lHe = ["splitArea", "splitLine"], uHe = (
  75299. /** @class */
  75300. function(t) {
  75301. q(e, t);
  75302. function e() {
  75303. var n = t !== null && t.apply(this, arguments) || this;
  75304. return n.type = e.type, n.axisPointerClass = "SingleAxisPointer", n;
  75305. }
  75306. return e.prototype.render = function(n, r, i, a) {
  75307. var o = this.group;
  75308. o.removeAll();
  75309. var s = this._axisGroup;
  75310. this._axisGroup = new Ve();
  75311. var l = IE(n), u = new Jr(n, l);
  75312. k(sHe, u.add, u), o.add(this._axisGroup), o.add(u.getGroup()), k(lHe, function(c) {
  75313. n.get([c, "show"]) && cHe[c](this, this.group, this._axisGroup, n);
  75314. }, this), Q0(s, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
  75315. }, e.prototype.remove = function() {
  75316. ine(this);
  75317. }, e.type = "singleAxis", e;
  75318. }(Qf)
  75319. ), cHe = {
  75320. splitLine: function(t, e, n, r) {
  75321. var i = r.axis;
  75322. if (!i.scale.isBlank()) {
  75323. var a = r.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
  75324. s = s instanceof Array ? s : [s];
  75325. for (var l = o.get("width"), u = r.coordinateSystem.getRect(), c = i.isHorizontal(), f = [], d = 0, h = i.getTicksCoords({
  75326. tickModel: a
  75327. }), p = [], v = [], g = 0; g < h.length; ++g) {
  75328. var m = i.toGlobalCoord(h[g].coord);
  75329. 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);
  75330. var y = new Un({
  75331. shape: {
  75332. x1: p[0],
  75333. y1: p[1],
  75334. x2: v[0],
  75335. y2: v[1]
  75336. },
  75337. silent: !0
  75338. });
  75339. Hh(y.shape, l);
  75340. var b = d++ % s.length;
  75341. f[b] = f[b] || [], f[b].push(y);
  75342. }
  75343. for (var _ = o.getLineStyle(["color"]), g = 0; g < f.length; ++g)
  75344. e.add(Bi(f[g], {
  75345. style: Re({
  75346. stroke: s[g % s.length]
  75347. }, _),
  75348. silent: !0
  75349. }));
  75350. }
  75351. },
  75352. splitArea: function(t, e, n, r) {
  75353. rne(t, n, r, r);
  75354. }
  75355. }, q_ = (
  75356. /** @class */
  75357. function(t) {
  75358. q(e, t);
  75359. function e() {
  75360. var n = t !== null && t.apply(this, arguments) || this;
  75361. return n.type = e.type, n;
  75362. }
  75363. return e.prototype.getCoordSysModel = function() {
  75364. return this;
  75365. }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
  75366. left: "5%",
  75367. top: "5%",
  75368. right: "5%",
  75369. bottom: "5%",
  75370. type: "value",
  75371. position: "bottom",
  75372. orient: "horizontal",
  75373. axisLine: {
  75374. show: !0,
  75375. lineStyle: {
  75376. width: 1,
  75377. type: "solid"
  75378. }
  75379. },
  75380. // Single coordinate system and single axis is the,
  75381. // which is used as the parent tooltip model.
  75382. // same model, so we set default tooltip show as true.
  75383. tooltip: {
  75384. show: !0
  75385. },
  75386. axisTick: {
  75387. show: !0,
  75388. length: 6,
  75389. lineStyle: {
  75390. width: 1
  75391. }
  75392. },
  75393. axisLabel: {
  75394. show: !0,
  75395. interval: "auto"
  75396. },
  75397. splitLine: {
  75398. show: !0,
  75399. lineStyle: {
  75400. type: "dashed",
  75401. opacity: 0.2
  75402. }
  75403. }
  75404. }, e;
  75405. }(rt)
  75406. );
  75407. xn(q_, Mp.prototype);
  75408. var fHe = (
  75409. /** @class */
  75410. function(t) {
  75411. q(e, t);
  75412. function e(n, r, i, a, o) {
  75413. var s = t.call(this, n, r, i) || this;
  75414. return s.type = a || "value", s.position = o || "bottom", s;
  75415. }
  75416. return e.prototype.isHorizontal = function() {
  75417. var n = this.position;
  75418. return n === "top" || n === "bottom";
  75419. }, e.prototype.pointToData = function(n, r) {
  75420. return this.coordinateSystem.pointToData(n)[0];
  75421. }, e;
  75422. }(Va)
  75423. ), zre = ["single"], dHe = (
  75424. /** @class */
  75425. function() {
  75426. function t(e, n, r) {
  75427. this.type = "single", this.dimension = "single", this.dimensions = zre, this.axisPointerEnabled = !0, this.model = e, this._init(e, n, r);
  75428. }
  75429. return t.prototype._init = function(e, n, r) {
  75430. var i = this.dimension, a = new fHe(i, j0(e), [0, 0], e.get("type"), e.get("position")), o = a.type === "category";
  75431. 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;
  75432. }, t.prototype.update = function(e, n) {
  75433. e.eachSeries(function(r) {
  75434. if (r.coordinateSystem === this) {
  75435. var i = r.getData();
  75436. k(i.mapDimensionsAll(this.dimension), function(a) {
  75437. this._axis.scale.unionExtentFromData(i, a);
  75438. }, this), Sf(this._axis.scale, this._axis.model);
  75439. }
  75440. }, this);
  75441. }, t.prototype.resize = function(e, n) {
  75442. this._rect = Rn({
  75443. left: e.get("left"),
  75444. top: e.get("top"),
  75445. right: e.get("right"),
  75446. bottom: e.get("bottom"),
  75447. width: e.get("width"),
  75448. height: e.get("height")
  75449. }, {
  75450. width: n.getWidth(),
  75451. height: n.getHeight()
  75452. }), this._adjustAxis();
  75453. }, t.prototype.getRect = function() {
  75454. return this._rect;
  75455. }, t.prototype._adjustAxis = function() {
  75456. var e = this._rect, n = this._axis, r = n.isHorizontal(), i = r ? [0, e.width] : [0, e.height], a = n.inverse ? 1 : 0;
  75457. n.setExtent(i[a], i[1 - a]), this._updateAxisTransform(n, r ? e.x : e.y);
  75458. }, t.prototype._updateAxisTransform = function(e, n) {
  75459. var r = e.getExtent(), i = r[0] + r[1], a = e.isHorizontal();
  75460. e.toGlobalCoord = a ? function(o) {
  75461. return o + n;
  75462. } : function(o) {
  75463. return i - o + n;
  75464. }, e.toLocalCoord = a ? function(o) {
  75465. return o - n;
  75466. } : function(o) {
  75467. return i - o + n;
  75468. };
  75469. }, t.prototype.getAxis = function() {
  75470. return this._axis;
  75471. }, t.prototype.getBaseAxis = function() {
  75472. return this._axis;
  75473. }, t.prototype.getAxes = function() {
  75474. return [this._axis];
  75475. }, t.prototype.getTooltipAxes = function() {
  75476. return {
  75477. baseAxes: [this.getAxis()],
  75478. // Empty otherAxes
  75479. otherAxes: []
  75480. };
  75481. }, t.prototype.containPoint = function(e) {
  75482. var n = this.getRect(), r = this.getAxis(), i = r.orient;
  75483. 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;
  75484. }, t.prototype.pointToData = function(e) {
  75485. var n = this.getAxis();
  75486. return [n.coordToData(n.toLocalCoord(e[n.orient === "horizontal" ? 0 : 1]))];
  75487. }, t.prototype.dataToPoint = function(e) {
  75488. var n = this.getAxis(), r = this.getRect(), i = [], a = n.orient === "horizontal" ? 0 : 1;
  75489. 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;
  75490. }, t.prototype.convertToPixel = function(e, n, r) {
  75491. var i = s7(n);
  75492. return i === this ? this.dataToPoint(r) : null;
  75493. }, t.prototype.convertFromPixel = function(e, n, r) {
  75494. var i = s7(n);
  75495. return i === this ? this.pointToData(r) : null;
  75496. }, t;
  75497. }()
  75498. );
  75499. function s7(t) {
  75500. var e = t.seriesModel, n = t.singleAxisModel;
  75501. return n && n.coordinateSystem || e && e.coordinateSystem;
  75502. }
  75503. function hHe(t, e) {
  75504. var n = [];
  75505. return t.eachComponent("singleAxis", function(r, i) {
  75506. var a = new dHe(r, t, e);
  75507. a.name = "single_" + i, a.resize(r, e), r.coordinateSystem = a, n.push(a);
  75508. }), t.eachSeries(function(r) {
  75509. if (r.get("coordinateSystem") === "singleAxis") {
  75510. var i = r.getReferringComponents("singleAxis", Dn).models[0];
  75511. r.coordinateSystem = i && i.coordinateSystem;
  75512. }
  75513. }), n;
  75514. }
  75515. var pHe = {
  75516. create: hHe,
  75517. dimensions: zre
  75518. }, l7 = ["x", "y"], vHe = ["width", "height"], gHe = (
  75519. /** @class */
  75520. function(t) {
  75521. q(e, t);
  75522. function e() {
  75523. return t !== null && t.apply(this, arguments) || this;
  75524. }
  75525. return e.prototype.makeElOption = function(n, r, i, a, o) {
  75526. var s = i.axis, l = s.coordinateSystem, u = ZP(l, 1 - QO(s)), c = l.dataToPoint(r)[0], f = a.get("type");
  75527. if (f && f !== "none") {
  75528. var d = gL(a), h = mHe[f](s, c, u);
  75529. h.style = d, n.graphicKey = h.type, n.pointer = h;
  75530. }
  75531. var p = IE(i);
  75532. Ire(
  75533. // @ts-ignore
  75534. r,
  75535. n,
  75536. p,
  75537. i,
  75538. a,
  75539. o
  75540. );
  75541. }, e.prototype.getHandleTransform = function(n, r, i) {
  75542. var a = IE(r, {
  75543. labelInside: !1
  75544. });
  75545. a.labelMargin = i.get(["handle", "margin"]);
  75546. var o = mL(r.axis, n, a);
  75547. return {
  75548. x: o[0],
  75549. y: o[1],
  75550. rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
  75551. };
  75552. }, e.prototype.updateHandleTransform = function(n, r, i, a) {
  75553. var o = i.axis, s = o.coordinateSystem, l = QO(o), u = ZP(s, l), c = [n.x, n.y];
  75554. c[l] += r[l], c[l] = Math.min(u[1], c[l]), c[l] = Math.max(u[0], c[l]);
  75555. var f = ZP(s, 1 - l), d = (f[1] + f[0]) / 2, h = [d, d];
  75556. return h[l] = c[l], {
  75557. x: c[0],
  75558. y: c[1],
  75559. rotation: n.rotation,
  75560. cursorPoint: h,
  75561. tooltipOption: {
  75562. verticalAlign: "middle"
  75563. }
  75564. };
  75565. }, e;
  75566. }(vL)
  75567. ), mHe = {
  75568. line: function(t, e, n) {
  75569. var r = yL([e, n[0]], [e, n[1]], QO(t));
  75570. return {
  75571. type: "Line",
  75572. subPixelOptimize: !0,
  75573. shape: r
  75574. };
  75575. },
  75576. shadow: function(t, e, n) {
  75577. var r = t.getBandWidth(), i = n[1] - n[0];
  75578. return {
  75579. type: "Rect",
  75580. shape: Dre([e - r / 2, n[0]], [r, i], QO(t))
  75581. };
  75582. }
  75583. };
  75584. function QO(t) {
  75585. return t.isHorizontal() ? 0 : 1;
  75586. }
  75587. function ZP(t, e) {
  75588. var n = t.getRect();
  75589. return [n[l7[e]], n[l7[e]] + n[vHe[e]]];
  75590. }
  75591. var yHe = (
  75592. /** @class */
  75593. function(t) {
  75594. q(e, t);
  75595. function e() {
  75596. var n = t !== null && t.apply(this, arguments) || this;
  75597. return n.type = e.type, n;
  75598. }
  75599. return e.type = "single", e;
  75600. }(Xt)
  75601. );
  75602. function bHe(t) {
  75603. at(ty), Qf.registerAxisPointerClass("SingleAxisPointer", gHe), t.registerComponentView(yHe), t.registerComponentView(uHe), t.registerComponentModel(q_), Uh(t, "single", q_, q_.defaultOption), t.registerCoordinateSystem("single", pHe);
  75604. }
  75605. var _He = (
  75606. /** @class */
  75607. function(t) {
  75608. q(e, t);
  75609. function e() {
  75610. var n = t !== null && t.apply(this, arguments) || this;
  75611. return n.type = e.type, n;
  75612. }
  75613. return e.prototype.init = function(n, r, i) {
  75614. var a = wp(n);
  75615. t.prototype.init.apply(this, arguments), u7(n, a);
  75616. }, e.prototype.mergeOption = function(n) {
  75617. t.prototype.mergeOption.apply(this, arguments), u7(this.option, n);
  75618. }, e.prototype.getCellSize = function() {
  75619. return this.option.cellSize;
  75620. }, e.type = "calendar", e.defaultOption = {
  75621. // zlevel: 0,
  75622. z: 2,
  75623. left: 80,
  75624. top: 60,
  75625. cellSize: 20,
  75626. // horizontal vertical
  75627. orient: "horizontal",
  75628. // month separate line style
  75629. splitLine: {
  75630. show: !0,
  75631. lineStyle: {
  75632. color: "#000",
  75633. width: 1,
  75634. type: "solid"
  75635. }
  75636. },
  75637. // rect style temporarily unused emphasis
  75638. itemStyle: {
  75639. color: "#fff",
  75640. borderWidth: 1,
  75641. borderColor: "#ccc"
  75642. },
  75643. // week text style
  75644. dayLabel: {
  75645. show: !0,
  75646. firstDay: 0,
  75647. // start end
  75648. position: "start",
  75649. margin: "50%",
  75650. color: "#000"
  75651. },
  75652. // month text style
  75653. monthLabel: {
  75654. show: !0,
  75655. // start end
  75656. position: "start",
  75657. margin: 5,
  75658. // center or left
  75659. align: "center",
  75660. formatter: null,
  75661. color: "#000"
  75662. },
  75663. // year text style
  75664. yearLabel: {
  75665. show: !0,
  75666. // top bottom left right
  75667. position: null,
  75668. margin: 30,
  75669. formatter: null,
  75670. color: "#ccc",
  75671. fontFamily: "sans-serif",
  75672. fontWeight: "bolder",
  75673. fontSize: 20
  75674. }
  75675. }, e;
  75676. }(rt)
  75677. );
  75678. function u7(t, e) {
  75679. var n = t.cellSize, r;
  75680. ue(n) ? r = n : r = t.cellSize = [n, n], r.length === 1 && (r[1] = r[0]);
  75681. var i = ce([0, 1], function(a) {
  75682. return OLe(e, a) && (r[a] = "auto"), r[a] != null && r[a] !== "auto";
  75683. });
  75684. cu(t, e, {
  75685. type: "box",
  75686. ignoreSize: i
  75687. });
  75688. }
  75689. var OHe = (
  75690. /** @class */
  75691. function(t) {
  75692. q(e, t);
  75693. function e() {
  75694. var n = t !== null && t.apply(this, arguments) || this;
  75695. return n.type = e.type, n;
  75696. }
  75697. return e.prototype.render = function(n, r, i) {
  75698. var a = this.group;
  75699. a.removeAll();
  75700. var o = n.coordinateSystem, s = o.getRangeInfo(), l = o.getOrient(), u = r.getLocaleModel();
  75701. 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);
  75702. }, e.prototype._renderDayRect = function(n, r, i) {
  75703. 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) {
  75704. var c = a.dataToRect([u], !1).tl, f = new mt({
  75705. shape: {
  75706. x: c[0],
  75707. y: c[1],
  75708. width: s,
  75709. height: l
  75710. },
  75711. cursor: "default",
  75712. style: o
  75713. });
  75714. i.add(f);
  75715. }
  75716. }, e.prototype._renderLines = function(n, r, i, a) {
  75717. var o = this, s = n.coordinateSystem, l = n.getModel(["splitLine", "lineStyle"]).getLineStyle(), u = n.get(["splitLine", "show"]), c = l.lineWidth;
  75718. this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
  75719. for (var f = r.start, d = 0; f.time <= r.end.time; d++) {
  75720. p(f.formatedDate), d === 0 && (f = s.getDateInfo(r.start.y + "-" + r.start.m));
  75721. var h = f.date;
  75722. h.setMonth(h.getMonth() + 1), f = s.getDateInfo(h);
  75723. }
  75724. p(s.getNextNDay(r.end.time, 1).formatedDate);
  75725. function p(v) {
  75726. o._firstDayOfMonth.push(s.getDateInfo(v)), o._firstDayPoints.push(s.dataToRect([v], !1).tl);
  75727. var g = o._getLinePointsOfOneWeek(n, v, i);
  75728. o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), u && o._drawSplitline(g, l, a);
  75729. }
  75730. u && this._drawSplitline(o._getEdgesPoints(o._tlpoints, c, i), l, a), u && this._drawSplitline(o._getEdgesPoints(o._blpoints, c, i), l, a);
  75731. }, e.prototype._getEdgesPoints = function(n, r, i) {
  75732. var a = [n[0].slice(), n[n.length - 1].slice()], o = i === "horizontal" ? 0 : 1;
  75733. return a[0][o] = a[0][o] - r / 2, a[1][o] = a[1][o] + r / 2, a;
  75734. }, e.prototype._drawSplitline = function(n, r, i) {
  75735. var a = new oi({
  75736. z2: 20,
  75737. shape: {
  75738. points: n
  75739. },
  75740. style: r
  75741. });
  75742. i.add(a);
  75743. }, e.prototype._getLinePointsOfOneWeek = function(n, r, i) {
  75744. for (var a = n.coordinateSystem, o = a.getDateInfo(r), s = [], l = 0; l < 7; l++) {
  75745. var u = a.getNextNDay(o.time, l), c = a.dataToRect([u.time], !1);
  75746. s[2 * u.day] = c.tl, s[2 * u.day + 1] = c[i === "horizontal" ? "bl" : "tr"];
  75747. }
  75748. return s;
  75749. }, e.prototype._formatterLabel = function(n, r) {
  75750. return Oe(n) && n ? mLe(n, r) : Me(n) ? n(r) : r.nameMap;
  75751. }, e.prototype._yearTextPositionControl = function(n, r, i, a, o) {
  75752. var s = r[0], l = r[1], u = ["center", "bottom"];
  75753. a === "bottom" ? (l += o, u = ["center", "top"]) : a === "left" ? s -= o : a === "right" ? (s += o, u = ["center", "top"]) : l -= o;
  75754. var c = 0;
  75755. return (a === "left" || a === "right") && (c = Math.PI / 2), {
  75756. rotation: c,
  75757. x: s,
  75758. y: l,
  75759. style: {
  75760. align: u[0],
  75761. verticalAlign: u[1]
  75762. }
  75763. };
  75764. }, e.prototype._renderYearText = function(n, r, i, a) {
  75765. var o = n.getModel("yearLabel");
  75766. if (o.get("show")) {
  75767. var s = o.get("margin"), l = o.get("position");
  75768. l || (l = i !== "horizontal" ? "top" : "left");
  75769. 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 = {
  75770. top: [c, u[d][1]],
  75771. bottom: [c, u[1 - d][1]],
  75772. left: [u[1 - d][0], f],
  75773. right: [u[d][0], f]
  75774. }, p = r.start.y;
  75775. +r.end.y > +r.start.y && (p = p + "-" + r.end.y);
  75776. var v = o.get("formatter"), g = {
  75777. start: r.start.y,
  75778. end: r.end.y,
  75779. nameMap: p
  75780. }, m = this._formatterLabel(v, g), y = new gt({
  75781. z2: 30,
  75782. style: Zt(o, {
  75783. text: m
  75784. })
  75785. });
  75786. y.attr(this._yearTextPositionControl(y, h[l], i, l, s)), a.add(y);
  75787. }
  75788. }, e.prototype._monthTextPositionControl = function(n, r, i, a, o) {
  75789. var s = "left", l = "top", u = n[0], c = n[1];
  75790. return i === "horizontal" ? (c = c + o, r && (s = "center"), a === "start" && (l = "bottom")) : (u = u + o, r && (l = "middle"), a === "start" && (s = "right")), {
  75791. x: u,
  75792. y: c,
  75793. align: s,
  75794. verticalAlign: l
  75795. };
  75796. }, e.prototype._renderMonthText = function(n, r, i, a) {
  75797. var o = n.getModel("monthLabel");
  75798. if (o.get("show")) {
  75799. var s = o.get("nameMap"), l = o.get("margin"), u = o.get("position"), c = o.get("align"), f = [this._tlpoints, this._blpoints];
  75800. (!s || Oe(s)) && (s && (r = VA(s) || r), s = r.get(["time", "monthAbbr"]) || []);
  75801. var d = u === "start" ? 0 : 1, h = i === "horizontal" ? 0 : 1;
  75802. l = u === "start" ? -l : l;
  75803. for (var p = c === "center", v = 0; v < f[d].length - 1; v++) {
  75804. var g = f[d][v].slice(), m = this._firstDayOfMonth[v];
  75805. if (p) {
  75806. var y = this._firstDayPoints[v];
  75807. g[h] = (y[h] + f[0][v + 1][h]) / 2;
  75808. }
  75809. var b = o.get("formatter"), _ = s[+m.m - 1], O = {
  75810. yyyy: m.y,
  75811. yy: (m.y + "").slice(2),
  75812. MM: m.m,
  75813. M: +m.m,
  75814. nameMap: _
  75815. }, S = this._formatterLabel(b, O), x = new gt({
  75816. z2: 30,
  75817. style: le(Zt(o, {
  75818. text: S
  75819. }), this._monthTextPositionControl(g, p, i, u, l))
  75820. });
  75821. a.add(x);
  75822. }
  75823. }
  75824. }, e.prototype._weekTextPositionControl = function(n, r, i, a, o) {
  75825. var s = "center", l = "middle", u = n[0], c = n[1], f = i === "start";
  75826. 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"), {
  75827. x: u,
  75828. y: c,
  75829. align: s,
  75830. verticalAlign: l
  75831. };
  75832. }, e.prototype._renderWeekText = function(n, r, i, a, o) {
  75833. var s = n.getModel("dayLabel");
  75834. if (s.get("show")) {
  75835. var l = n.coordinateSystem, u = s.get("position"), c = s.get("nameMap"), f = s.get("margin"), d = l.getFirstDayOfWeek();
  75836. if (!c || Oe(c)) {
  75837. c && (r = VA(c) || r);
  75838. var h = r.get(["time", "dayOfWeekShort"]);
  75839. c = h || ce(r.get(["time", "dayOfWeekAbbr"]), function(O) {
  75840. return O[0];
  75841. });
  75842. }
  75843. var p = l.getNextNDay(i.end.time, 7 - i.lweek).time, v = [l.getCellWidth(), l.getCellHeight()];
  75844. f = _e(f, Math.min(v[1], v[0])), u === "start" && (p = l.getNextNDay(i.start.time, -(7 + i.fweek)).time, f = -f);
  75845. for (var g = 0; g < 7; g++) {
  75846. var m = l.getNextNDay(p, g), y = l.dataToRect([m.time], !1).center, b = g;
  75847. b = Math.abs((g + d) % 7);
  75848. var _ = new gt({
  75849. z2: 30,
  75850. style: le(Zt(s, {
  75851. text: c[b]
  75852. }), this._weekTextPositionControl(y, a, u, f, v))
  75853. });
  75854. o.add(_);
  75855. }
  75856. }
  75857. }, e.type = "calendar", e;
  75858. }(Xt)
  75859. ), UP = 864e5, SHe = (
  75860. /** @class */
  75861. function() {
  75862. function t(e, n, r) {
  75863. this.type = "calendar", this.dimensions = t.dimensions, this.getDimensionsInfo = t.getDimensionsInfo, this._model = e;
  75864. }
  75865. return t.getDimensionsInfo = function() {
  75866. return [{
  75867. name: "time",
  75868. type: "time"
  75869. }, "value"];
  75870. }, t.prototype.getRangeInfo = function() {
  75871. return this._rangeInfo;
  75872. }, t.prototype.getModel = function() {
  75873. return this._model;
  75874. }, t.prototype.getRect = function() {
  75875. return this._rect;
  75876. }, t.prototype.getCellWidth = function() {
  75877. return this._sw;
  75878. }, t.prototype.getCellHeight = function() {
  75879. return this._sh;
  75880. }, t.prototype.getOrient = function() {
  75881. return this._orient;
  75882. }, t.prototype.getFirstDayOfWeek = function() {
  75883. return this._firstDayOfWeek;
  75884. }, t.prototype.getDateInfo = function(e) {
  75885. e = Ki(e);
  75886. 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();
  75887. return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), {
  75888. y: n + "",
  75889. m: i,
  75890. d: o,
  75891. day: s,
  75892. time: e.getTime(),
  75893. formatedDate: n + "-" + i + "-" + o,
  75894. date: e
  75895. };
  75896. }, t.prototype.getNextNDay = function(e, n) {
  75897. return n = n || 0, n === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + n), this.getDateInfo(e));
  75898. }, t.prototype.update = function(e, n) {
  75899. 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());
  75900. 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];
  75901. k([0, 1], function(f) {
  75902. c(a, f) && (o[i[f]] = a[f] * s[f]);
  75903. });
  75904. var l = {
  75905. width: n.getWidth(),
  75906. height: n.getHeight()
  75907. }, u = this._rect = Rn(o, l);
  75908. k([0, 1], function(f) {
  75909. c(a, f) || (a[f] = u[i[f]] / s[f]);
  75910. });
  75911. function c(f, d) {
  75912. return f[d] != null && f[d] !== "auto";
  75913. }
  75914. this._sw = a[0], this._sh = a[1];
  75915. }, t.prototype.dataToPoint = function(e, n) {
  75916. ue(e) && (e = e[0]), n == null && (n = !0);
  75917. var r = this.getDateInfo(e), i = this._rangeInfo, a = r.formatedDate;
  75918. if (n && !(r.time >= i.start.time && r.time < i.end.time + UP))
  75919. return [NaN, NaN];
  75920. var o = r.day, s = this._getRangeInfo([i.start.time, a]).nthWeek;
  75921. 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];
  75922. }, t.prototype.pointToData = function(e) {
  75923. var n = this.pointToDate(e);
  75924. return n && n.time;
  75925. }, t.prototype.dataToRect = function(e, n) {
  75926. var r = this.dataToPoint(e, n);
  75927. return {
  75928. contentShape: {
  75929. x: r[0] - (this._sw - this._lineWidth) / 2,
  75930. y: r[1] - (this._sh - this._lineWidth) / 2,
  75931. width: this._sw - this._lineWidth,
  75932. height: this._sh - this._lineWidth
  75933. },
  75934. center: r,
  75935. tl: [r[0] - this._sw / 2, r[1] - this._sh / 2],
  75936. tr: [r[0] + this._sw / 2, r[1] - this._sh / 2],
  75937. br: [r[0] + this._sw / 2, r[1] + this._sh / 2],
  75938. bl: [r[0] - this._sw / 2, r[1] + this._sh / 2]
  75939. };
  75940. }, t.prototype.pointToDate = function(e) {
  75941. 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;
  75942. return this._orient === "vertical" ? this._getDateByWeeksAndDay(r, n - 1, i) : this._getDateByWeeksAndDay(n, r - 1, i);
  75943. }, t.prototype.convertToPixel = function(e, n, r) {
  75944. var i = c7(n);
  75945. return i === this ? i.dataToPoint(r) : null;
  75946. }, t.prototype.convertFromPixel = function(e, n, r) {
  75947. var i = c7(n);
  75948. return i === this ? i.pointToData(r) : null;
  75949. }, t.prototype.containPoint = function(e) {
  75950. return console.warn("Not implemented."), !1;
  75951. }, t.prototype._initRangeOption = function() {
  75952. var e = this._model.get("range"), n;
  75953. if (ue(e) && e.length === 1 && (e = e[0]), ue(e))
  75954. n = e;
  75955. else {
  75956. var r = e.toString();
  75957. if (/^\d{4}$/.test(r) && (n = [r + "-01-01", r + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(r)) {
  75958. var i = this.getDateInfo(r), a = i.date;
  75959. a.setMonth(a.getMonth() + 1);
  75960. var o = this.getNextNDay(a, -1);
  75961. n = [i.formatedDate, o.formatedDate];
  75962. }
  75963. /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r) && (n = [r, r]);
  75964. }
  75965. if (!n)
  75966. return process.env.NODE_ENV !== "production" && xa("Invalid date range."), e;
  75967. var s = this._getRangeInfo(n);
  75968. return s.start.time > s.end.time && n.reverse(), n;
  75969. }, t.prototype._getRangeInfo = function(e) {
  75970. var n = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], r;
  75971. n[0].time > n[1].time && (r = !0, n.reverse());
  75972. var i = Math.floor(n[1].time / UP) - Math.floor(n[0].time / UP) + 1, a = new Date(n[0].time), o = a.getDate(), s = n[1].date.getDate();
  75973. a.setDate(o + i - 1);
  75974. var l = a.getDate();
  75975. if (l !== s)
  75976. for (var u = a.getTime() - n[1].time > 0 ? 1 : -1; (l = a.getDate()) !== s && (a.getTime() - n[1].time) * u > 0; )
  75977. i -= u, a.setDate(l - u);
  75978. var c = Math.floor((i + n[0].day + 6) / 7), f = r ? -c + 1 : c - 1;
  75979. return r && n.reverse(), {
  75980. range: [n[0].formatedDate, n[1].formatedDate],
  75981. start: n[0],
  75982. end: n[1],
  75983. allDay: i,
  75984. weeks: c,
  75985. // From 0.
  75986. nthWeek: f,
  75987. fweek: n[0].day,
  75988. lweek: n[1].day
  75989. };
  75990. }, t.prototype._getDateByWeeksAndDay = function(e, n, r) {
  75991. var i = this._getRangeInfo(r);
  75992. if (e > i.weeks || e === 0 && n < i.fweek || e === i.weeks && n > i.lweek)
  75993. return null;
  75994. var a = (e - 1) * 7 - i.fweek + n, o = new Date(i.start.time);
  75995. return o.setDate(+i.start.d + a), this.getDateInfo(o);
  75996. }, t.create = function(e, n) {
  75997. var r = [];
  75998. return e.eachComponent("calendar", function(i) {
  75999. var a = new t(i);
  76000. r.push(a), i.coordinateSystem = a;
  76001. }), e.eachSeries(function(i) {
  76002. i.get("coordinateSystem") === "calendar" && (i.coordinateSystem = r[i.get("calendarIndex") || 0]);
  76003. }), r;
  76004. }, t.dimensions = ["time", "value"], t;
  76005. }()
  76006. );
  76007. function c7(t) {
  76008. var e = t.calendarModel, n = t.seriesModel, r = e ? e.coordinateSystem : n ? n.coordinateSystem : null;
  76009. return r;
  76010. }
  76011. function xHe(t) {
  76012. t.registerComponentModel(_He), t.registerComponentView(OHe), t.registerCoordinateSystem("calendar", SHe);
  76013. }
  76014. function wHe(t, e) {
  76015. var n = t.existing;
  76016. if (e.id = t.keyInfo.id, !e.type && n && (e.type = n.type), e.parentId == null) {
  76017. var r = e.parentOption;
  76018. r ? e.parentId = r.id : n && (e.parentId = n.parentId);
  76019. }
  76020. e.parentOption = null;
  76021. }
  76022. function f7(t, e) {
  76023. var n;
  76024. return k(e, function(r) {
  76025. t[r] != null && t[r] !== "auto" && (n = !0);
  76026. }), n;
  76027. }
  76028. function CHe(t, e, n) {
  76029. var r = le({}, n), i = t[e], a = n.$action || "merge";
  76030. if (a === "merge")
  76031. if (i) {
  76032. if (process.env.NODE_ENV !== "production") {
  76033. var o = n.type;
  76034. ke(!o || i.type === o, 'Please set $action: "replace" to change `type`');
  76035. }
  76036. qe(i, r, !0), cu(i, r, {
  76037. ignoreSize: !0
  76038. }), $J(n, i), kb(n, i), kb(n, i, "shape"), kb(n, i, "style"), kb(n, i, "extra"), n.clipPath = i.clipPath;
  76039. } else
  76040. t[e] = r;
  76041. else a === "replace" ? t[e] = r : a === "remove" && i && (t[e] = null);
  76042. }
  76043. var Vre = ["transition", "enterFrom", "leaveTo"], THe = Vre.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
  76044. function kb(t, e, n) {
  76045. if (n && (!t[n] && e[n] && (t[n] = {}), t = t[n], e = e[n]), !(!t || !e))
  76046. for (var r = n ? Vre : THe, i = 0; i < r.length; i++) {
  76047. var a = r[i];
  76048. t[a] == null && e[a] != null && (t[a] = e[a]);
  76049. }
  76050. }
  76051. function PHe(t, e) {
  76052. if (t && (t.hv = e.hv = [
  76053. // Rigid body, don't care about `width`.
  76054. f7(e, ["left", "right"]),
  76055. // Rigid body, don't care about `height`.
  76056. f7(e, ["top", "bottom"])
  76057. ], t.type === "group")) {
  76058. var n = t, r = e;
  76059. n.width == null && (n.width = r.width = 0), n.height == null && (n.height = r.height = 0);
  76060. }
  76061. }
  76062. var $He = (
  76063. /** @class */
  76064. function(t) {
  76065. q(e, t);
  76066. function e() {
  76067. var n = t !== null && t.apply(this, arguments) || this;
  76068. return n.type = e.type, n.preventAutoZ = !0, n;
  76069. }
  76070. return e.prototype.mergeOption = function(n, r) {
  76071. var i = this.option.elements;
  76072. this.option.elements = null, t.prototype.mergeOption.call(this, n, r), this.option.elements = i;
  76073. }, e.prototype.optionUpdated = function(n, r) {
  76074. var i = this.option, a = (r ? i : n).elements, o = i.elements = r ? [] : i.elements, s = [];
  76075. this._flatten(a, s, null);
  76076. var l = pK(o, s, "normalMerge"), u = this._elOptionsToUpdate = [];
  76077. k(l, function(c, f) {
  76078. var d = c.newOption;
  76079. process.env.NODE_ENV !== "production" && ke(Ie(d) || c.existing, "Empty graphic option definition"), d && (u.push(d), wHe(c, d), CHe(o, f, d), PHe(o[f], d));
  76080. }, this), i.elements = Nt(o, function(c) {
  76081. return c && delete c.$action, c != null;
  76082. });
  76083. }, e.prototype._flatten = function(n, r, i) {
  76084. k(n, function(a) {
  76085. if (a) {
  76086. i && (a.parentOption = i), r.push(a);
  76087. var o = a.children;
  76088. o && o.length && this._flatten(o, r, a), delete a.children;
  76089. }
  76090. }, this);
  76091. }, e.prototype.useElOptionsToUpdate = function() {
  76092. var n = this._elOptionsToUpdate;
  76093. return this._elOptionsToUpdate = null, n;
  76094. }, e.type = "graphic", e.defaultOption = {
  76095. elements: []
  76096. // parentId: null
  76097. }, e;
  76098. }(rt)
  76099. ), d7 = {
  76100. // Reserved but not supported in graphic component.
  76101. path: null,
  76102. compoundPath: null,
  76103. // Supported in graphic component.
  76104. group: Ve,
  76105. image: lr,
  76106. text: gt
  76107. }, da = bt(), AHe = (
  76108. /** @class */
  76109. function(t) {
  76110. q(e, t);
  76111. function e() {
  76112. var n = t !== null && t.apply(this, arguments) || this;
  76113. return n.type = e.type, n;
  76114. }
  76115. return e.prototype.init = function() {
  76116. this._elMap = Pe();
  76117. }, e.prototype.render = function(n, r, i) {
  76118. n !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = n, this._updateElements(n), this._relocate(n, i);
  76119. }, e.prototype._updateElements = function(n) {
  76120. var r = n.useElOptionsToUpdate();
  76121. if (r) {
  76122. var i = this._elMap, a = this.group, o = n.get("z"), s = n.get("zlevel");
  76123. k(r, function(l) {
  76124. var u = Vn(l.id, null), c = u != null ? i.get(u) : null, f = Vn(l.parentId, null), d = f != null ? i.get(f) : a, h = l.type, p = l.style;
  76125. h === "text" && p && l.hv && l.hv[1] && (p.textVerticalAlign = p.textBaseline = p.verticalAlign = p.align = null);
  76126. var v = l.textContent, g = l.textConfig;
  76127. if (p && bre(p, h, !!g, !!v)) {
  76128. var m = _re(p, h, !0);
  76129. !g && m.textConfig && (g = l.textConfig = m.textConfig), !v && m.textContent && (v = m.textContent);
  76130. }
  76131. var y = EHe(l);
  76132. process.env.NODE_ENV !== "production" && c && ke(d === c.parent, "Changing parent is not supported.");
  76133. var b = l.$action || "merge", _ = b === "merge", O = b === "replace";
  76134. if (_) {
  76135. var S = !c, x = c;
  76136. S ? x = h7(u, d, l.type, i) : (x && (da(x).isNew = !1), Cre(x)), x && (X_(x, y, n, {
  76137. isInit: S
  76138. }), p7(x, l, o, s));
  76139. } else if (O) {
  76140. K_(c, l, i, n);
  76141. var C = h7(u, d, l.type, i);
  76142. C && (X_(C, y, n, {
  76143. isInit: !0
  76144. }), p7(C, l, o, s));
  76145. } else b === "remove" && (Sre(c, l), K_(c, l, i, n));
  76146. var T = i.get(u);
  76147. if (T && v)
  76148. if (_) {
  76149. var w = T.getTextContent();
  76150. w ? w.attr(v) : T.setTextContent(new gt(v));
  76151. } else O && T.setTextContent(new gt(v));
  76152. if (T) {
  76153. var P = l.clipPath;
  76154. if (P) {
  76155. var $ = P.type, A = void 0, S = !1;
  76156. if (_) {
  76157. var D = T.getClipPath();
  76158. S = !D || da(D).type !== $, A = S ? DE($) : D;
  76159. } else O && (S = !0, A = DE($));
  76160. T.setClipPath(A), X_(A, P, n, {
  76161. isInit: S
  76162. }), VO(A, P.keyframeAnimation, n);
  76163. }
  76164. var E = da(T);
  76165. T.setTextConfig(g), E.option = l, MHe(T, n, l), Op({
  76166. el: T,
  76167. componentModel: n,
  76168. itemName: T.name,
  76169. itemTooltipOption: l.tooltip
  76170. }), VO(T, l.keyframeAnimation, n);
  76171. }
  76172. });
  76173. }
  76174. }, e.prototype._relocate = function(n, r) {
  76175. 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++) {
  76176. var f = i[c], d = Vn(f.id, null), h = d != null ? o.get(d) : null;
  76177. if (!(!h || !h.isGroup)) {
  76178. var p = h.parent, v = p === a, g = da(h), m = da(p);
  76179. g.width = _e(g.option.width, v ? s : m.width) || 0, g.height = _e(g.option.height, v ? l : m.height) || 0;
  76180. }
  76181. }
  76182. for (var c = i.length - 1; c >= 0; c--) {
  76183. var f = i[c], d = Vn(f.id, null), h = d != null ? o.get(d) : null;
  76184. if (h) {
  76185. var p = h.parent, m = da(p), y = p === a ? {
  76186. width: s,
  76187. height: l
  76188. } : {
  76189. width: m.width,
  76190. height: m.height
  76191. }, b = {}, _ = ow(h, f, y, null, {
  76192. hv: f.hv,
  76193. boundingMode: f.bounding
  76194. }, b);
  76195. if (!da(h).isNew && _) {
  76196. for (var O = f.transition, S = {}, x = 0; x < u.length; x++) {
  76197. var C = u[x], T = b[C];
  76198. O && (af(O) || et(O, C) >= 0) ? S[C] = T : h[C] = T;
  76199. }
  76200. Ct(h, S, n, 0);
  76201. } else
  76202. h.attr(b);
  76203. }
  76204. }
  76205. }, e.prototype._clear = function() {
  76206. var n = this, r = this._elMap;
  76207. r.each(function(i) {
  76208. K_(i, da(i).option, r, n._lastGraphicModel);
  76209. }), this._elMap = Pe();
  76210. }, e.prototype.dispose = function() {
  76211. this._clear();
  76212. }, e.type = "graphic", e;
  76213. }(Xt)
  76214. );
  76215. function DE(t) {
  76216. process.env.NODE_ENV !== "production" && ke(t, "graphic type MUST be set");
  76217. var e = Ce(d7, t) ? d7[t] : Jx(t);
  76218. process.env.NODE_ENV !== "production" && ke(e, "graphic type " + t + " can not be found");
  76219. var n = new e({});
  76220. return da(n).type = t, n;
  76221. }
  76222. function h7(t, e, n, r) {
  76223. var i = DE(n);
  76224. return e.add(i), r.set(t, i), da(i).id = t, da(i).isNew = !0, i;
  76225. }
  76226. function K_(t, e, n, r) {
  76227. var i = t && t.parent;
  76228. i && (t.type === "group" && t.traverse(function(a) {
  76229. K_(a, e, n, r);
  76230. }), xw(t, e, r), n.removeKey(da(t).id));
  76231. }
  76232. function p7(t, e, n, r) {
  76233. t.isGroup || k([
  76234. ["cursor", Da.prototype.cursor],
  76235. // We should not support configure z and zlevel in the element level.
  76236. // But seems we didn't limit it previously. So here still use it to avoid breaking.
  76237. ["zlevel", r || 0],
  76238. ["z", n || 0],
  76239. // z2 must not be null/undefined, otherwise sort error may occur.
  76240. ["z2", 0]
  76241. ], function(i) {
  76242. var a = i[0];
  76243. Ce(e, a) ? t[a] = We(e[a], i[1]) : t[a] == null && (t[a] = i[1]);
  76244. }), k(st(e), function(i) {
  76245. if (i.indexOf("on") === 0) {
  76246. var a = e[i];
  76247. t[i] = Me(a) ? a : null;
  76248. }
  76249. }), Ce(e, "draggable") && (t.draggable = e.draggable), e.name != null && (t.name = e.name), e.id != null && (t.id = e.id);
  76250. }
  76251. function EHe(t) {
  76252. return t = le({}, t), k(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(PJ), function(e) {
  76253. delete t[e];
  76254. }), t;
  76255. }
  76256. function MHe(t, e, n) {
  76257. var r = Fe(t).eventData;
  76258. !t.silent && !t.ignore && !r && (r = Fe(t).eventData = {
  76259. componentType: "graphic",
  76260. componentIndex: e.componentIndex,
  76261. name: t.name
  76262. }), r && (r.info = n.info);
  76263. }
  76264. function IHe(t) {
  76265. t.registerComponentModel($He), t.registerComponentView(AHe), t.registerPreprocessor(function(e) {
  76266. var n = e.graphic;
  76267. ue(n) ? !n[0] || !n[0].elements ? e.graphic = [{
  76268. elements: n
  76269. }] : e.graphic = [e.graphic[0]] : n && !n.elements && (e.graphic = [{
  76270. elements: [n]
  76271. }]);
  76272. });
  76273. }
  76274. var v7 = ["x", "y", "radius", "angle", "single"], DHe = ["cartesian2d", "polar", "singleAxis"];
  76275. function RHe(t) {
  76276. var e = t.get("coordinateSystem");
  76277. return et(DHe, e) >= 0;
  76278. }
  76279. function Fl(t) {
  76280. return process.env.NODE_ENV !== "production" && ke(t), t + "Axis";
  76281. }
  76282. function kHe(t, e) {
  76283. var n = Pe(), r = [], i = Pe();
  76284. t.eachComponent({
  76285. mainType: "dataZoom",
  76286. query: e
  76287. }, function(c) {
  76288. i.get(c.uid) || s(c);
  76289. });
  76290. var a;
  76291. do
  76292. a = !1, t.eachComponent("dataZoom", o);
  76293. while (a);
  76294. function o(c) {
  76295. !i.get(c.uid) && l(c) && (s(c), a = !0);
  76296. }
  76297. function s(c) {
  76298. i.set(c.uid, !0), r.push(c), u(c);
  76299. }
  76300. function l(c) {
  76301. var f = !1;
  76302. return c.eachTargetAxis(function(d, h) {
  76303. var p = n.get(d);
  76304. p && p[h] && (f = !0);
  76305. }), f;
  76306. }
  76307. function u(c) {
  76308. c.eachTargetAxis(function(f, d) {
  76309. (n.get(f) || n.set(f, []))[d] = !0;
  76310. });
  76311. }
  76312. return r;
  76313. }
  76314. function Fre(t) {
  76315. var e = t.ecModel, n = {
  76316. infoList: [],
  76317. infoMap: Pe()
  76318. };
  76319. return t.eachTargetAxis(function(r, i) {
  76320. var a = e.getComponent(Fl(r), i);
  76321. if (a) {
  76322. var o = a.getCoordSysModel();
  76323. if (o) {
  76324. var s = o.uid, l = n.infoMap.get(s);
  76325. l || (l = {
  76326. model: o,
  76327. axisModels: []
  76328. }, n.infoList.push(l), n.infoMap.set(s, l)), l.axisModels.push(a);
  76329. }
  76330. }
  76331. }), n;
  76332. }
  76333. var XP = (
  76334. /** @class */
  76335. function() {
  76336. function t() {
  76337. this.indexList = [], this.indexMap = [];
  76338. }
  76339. return t.prototype.add = function(e) {
  76340. this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0);
  76341. }, t;
  76342. }()
  76343. ), Gm = (
  76344. /** @class */
  76345. function(t) {
  76346. q(e, t);
  76347. function e() {
  76348. var n = t !== null && t.apply(this, arguments) || this;
  76349. return n.type = e.type, n._autoThrottle = !0, n._noTarget = !0, n._rangePropMode = ["percent", "percent"], n;
  76350. }
  76351. return e.prototype.init = function(n, r, i) {
  76352. var a = g7(n);
  76353. this.settledOption = a, this.mergeDefaultAndTheme(n, i), this._doInit(a);
  76354. }, e.prototype.mergeOption = function(n) {
  76355. var r = g7(n);
  76356. qe(this.option, n, !0), qe(this.settledOption, r, !0), this._doInit(r);
  76357. }, e.prototype._doInit = function(n) {
  76358. var r = this.option;
  76359. this._setDefaultThrottle(n), this._updateRangeUse(n);
  76360. var i = this.settledOption;
  76361. k([["start", "startValue"], ["end", "endValue"]], function(a, o) {
  76362. this._rangePropMode[o] === "value" && (r[a[0]] = i[a[0]] = null);
  76363. }, this), this._resetTarget();
  76364. }, e.prototype._resetTarget = function() {
  76365. var n = this.get("orient", !0), r = this._targetAxisInfoMap = Pe(), i = this._fillSpecifiedTargetAxis(r);
  76366. i ? this._orient = n || this._makeAutoOrientByTargetAxis() : (this._orient = n || "horizontal", this._fillAutoTargetAxisByOrient(r, this._orient)), this._noTarget = !0, r.each(function(a) {
  76367. a.indexList.length && (this._noTarget = !1);
  76368. }, this);
  76369. }, e.prototype._fillSpecifiedTargetAxis = function(n) {
  76370. var r = !1;
  76371. return k(v7, function(i) {
  76372. var a = this.getReferringComponents(Fl(i), iRe);
  76373. if (a.specified) {
  76374. r = !0;
  76375. var o = new XP();
  76376. k(a.models, function(s) {
  76377. o.add(s.componentIndex);
  76378. }), n.set(i, o);
  76379. }
  76380. }, this), r;
  76381. }, e.prototype._fillAutoTargetAxisByOrient = function(n, r) {
  76382. var i = this.ecModel, a = !0;
  76383. if (a) {
  76384. var o = r === "vertical" ? "y" : "x", s = i.findComponents({
  76385. mainType: o + "Axis"
  76386. });
  76387. l(s, o);
  76388. }
  76389. if (a) {
  76390. var s = i.findComponents({
  76391. mainType: "singleAxis",
  76392. filter: function(c) {
  76393. return c.get("orient", !0) === r;
  76394. }
  76395. });
  76396. l(s, "single");
  76397. }
  76398. function l(u, c) {
  76399. var f = u[0];
  76400. if (f) {
  76401. var d = new XP();
  76402. if (d.add(f.componentIndex), n.set(c, d), a = !1, c === "x" || c === "y") {
  76403. var h = f.getReferringComponents("grid", Dn).models[0];
  76404. h && k(u, function(p) {
  76405. f.componentIndex !== p.componentIndex && h === p.getReferringComponents("grid", Dn).models[0] && d.add(p.componentIndex);
  76406. });
  76407. }
  76408. }
  76409. }
  76410. a && k(v7, function(u) {
  76411. if (a) {
  76412. var c = i.findComponents({
  76413. mainType: Fl(u),
  76414. filter: function(d) {
  76415. return d.get("type", !0) === "category";
  76416. }
  76417. });
  76418. if (c[0]) {
  76419. var f = new XP();
  76420. f.add(c[0].componentIndex), n.set(u, f), a = !1;
  76421. }
  76422. }
  76423. }, this);
  76424. }, e.prototype._makeAutoOrientByTargetAxis = function() {
  76425. var n;
  76426. return this.eachTargetAxis(function(r) {
  76427. !n && (n = r);
  76428. }, this), n === "y" ? "vertical" : "horizontal";
  76429. }, e.prototype._setDefaultThrottle = function(n) {
  76430. if (n.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
  76431. var r = this.ecModel.option;
  76432. this.option.throttle = r.animation && r.animationDurationUpdate > 0 ? 100 : 20;
  76433. }
  76434. }, e.prototype._updateRangeUse = function(n) {
  76435. var r = this._rangePropMode, i = this.get("rangeMode");
  76436. k([["start", "startValue"], ["end", "endValue"]], function(a, o) {
  76437. var s = n[a[0]] != null, l = n[a[1]] != null;
  76438. s && !l ? r[o] = "percent" : !s && l ? r[o] = "value" : i ? r[o] = i[o] : s && (r[o] = "percent");
  76439. });
  76440. }, e.prototype.noTarget = function() {
  76441. return this._noTarget;
  76442. }, e.prototype.getFirstTargetAxisModel = function() {
  76443. var n;
  76444. return this.eachTargetAxis(function(r, i) {
  76445. n == null && (n = this.ecModel.getComponent(Fl(r), i));
  76446. }, this), n;
  76447. }, e.prototype.eachTargetAxis = function(n, r) {
  76448. this._targetAxisInfoMap.each(function(i, a) {
  76449. k(i.indexList, function(o) {
  76450. n.call(r, a, o);
  76451. });
  76452. });
  76453. }, e.prototype.getAxisProxy = function(n, r) {
  76454. var i = this.getAxisModel(n, r);
  76455. if (i)
  76456. return i.__dzAxisProxy;
  76457. }, e.prototype.getAxisModel = function(n, r) {
  76458. process.env.NODE_ENV !== "production" && ke(n && r != null);
  76459. var i = this._targetAxisInfoMap.get(n);
  76460. if (i && i.indexMap[r])
  76461. return this.ecModel.getComponent(Fl(n), r);
  76462. }, e.prototype.setRawRange = function(n) {
  76463. var r = this.option, i = this.settledOption;
  76464. k([["start", "startValue"], ["end", "endValue"]], function(a) {
  76465. (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]]);
  76466. }, this), this._updateRangeUse(n);
  76467. }, e.prototype.setCalculatedRange = function(n) {
  76468. var r = this.option;
  76469. k(["start", "startValue", "end", "endValue"], function(i) {
  76470. r[i] = n[i];
  76471. });
  76472. }, e.prototype.getPercentRange = function() {
  76473. var n = this.findRepresentativeAxisProxy();
  76474. if (n)
  76475. return n.getDataPercentWindow();
  76476. }, e.prototype.getValueRange = function(n, r) {
  76477. if (n == null && r == null) {
  76478. var i = this.findRepresentativeAxisProxy();
  76479. if (i)
  76480. return i.getDataValueWindow();
  76481. } else
  76482. return this.getAxisProxy(n, r).getDataValueWindow();
  76483. }, e.prototype.findRepresentativeAxisProxy = function(n) {
  76484. if (n)
  76485. return n.__dzAxisProxy;
  76486. for (var r, i = this._targetAxisInfoMap.keys(), a = 0; a < i.length; a++)
  76487. for (var o = i[a], s = this._targetAxisInfoMap.get(o), l = 0; l < s.indexList.length; l++) {
  76488. var u = this.getAxisProxy(o, s.indexList[l]);
  76489. if (u.hostedBy(this))
  76490. return u;
  76491. r || (r = u);
  76492. }
  76493. return r;
  76494. }, e.prototype.getRangePropMode = function() {
  76495. return this._rangePropMode.slice();
  76496. }, e.prototype.getOrient = function() {
  76497. return process.env.NODE_ENV !== "production" && ke(this._orient), this._orient;
  76498. }, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = {
  76499. // zlevel: 0,
  76500. z: 4,
  76501. filterMode: "filter",
  76502. start: 0,
  76503. end: 100
  76504. }, e;
  76505. }(rt)
  76506. );
  76507. function g7(t) {
  76508. var e = {};
  76509. return k(["start", "end", "startValue", "endValue", "throttle"], function(n) {
  76510. t.hasOwnProperty(n) && (e[n] = t[n]);
  76511. }), e;
  76512. }
  76513. var LHe = (
  76514. /** @class */
  76515. function(t) {
  76516. q(e, t);
  76517. function e() {
  76518. var n = t !== null && t.apply(this, arguments) || this;
  76519. return n.type = e.type, n;
  76520. }
  76521. return e.type = "dataZoom.select", e;
  76522. }(Gm)
  76523. ), SL = (
  76524. /** @class */
  76525. function(t) {
  76526. q(e, t);
  76527. function e() {
  76528. var n = t !== null && t.apply(this, arguments) || this;
  76529. return n.type = e.type, n;
  76530. }
  76531. return e.prototype.render = function(n, r, i, a) {
  76532. this.dataZoomModel = n, this.ecModel = r, this.api = i;
  76533. }, e.type = "dataZoom", e;
  76534. }(Xt)
  76535. ), NHe = (
  76536. /** @class */
  76537. function(t) {
  76538. q(e, t);
  76539. function e() {
  76540. var n = t !== null && t.apply(this, arguments) || this;
  76541. return n.type = e.type, n;
  76542. }
  76543. return e.type = "dataZoom.select", e;
  76544. }(SL)
  76545. ), Id = k, m7 = Wi, BHe = (
  76546. /** @class */
  76547. function() {
  76548. function t(e, n, r, i) {
  76549. this._dimName = e, this._axisIndex = n, this.ecModel = i, this._dataZoomModel = r;
  76550. }
  76551. return t.prototype.hostedBy = function(e) {
  76552. return this._dataZoomModel === e;
  76553. }, t.prototype.getDataValueWindow = function() {
  76554. return this._valueWindow.slice();
  76555. }, t.prototype.getDataPercentWindow = function() {
  76556. return this._percentWindow.slice();
  76557. }, t.prototype.getTargetSeriesModels = function() {
  76558. var e = [];
  76559. return this.ecModel.eachSeries(function(n) {
  76560. if (RHe(n)) {
  76561. var r = Fl(this._dimName), i = n.getReferringComponents(r, Dn).models[0];
  76562. i && this._axisIndex === i.componentIndex && e.push(n);
  76563. }
  76564. }, this), e;
  76565. }, t.prototype.getAxisModel = function() {
  76566. return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex);
  76567. }, t.prototype.getMinMaxSpan = function() {
  76568. return Le(this._minMaxSpan);
  76569. }, t.prototype.calculateDataWindow = function(e) {
  76570. var n = this._dataExtent, r = this.getAxisModel(), i = r.axis.scale, a = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], l = [], u;
  76571. Id(["start", "end"], function(d, h) {
  76572. var p = e[d], v = e[d + "Value"];
  76573. a[h] === "percent" ? (p == null && (p = o[h]), v = i.parse(Lt(p, o, n))) : (u = !0, v = v == null ? n[h] : i.parse(v), p = Lt(v, n, o)), l[h] = v == null || isNaN(v) ? n[h] : v, s[h] = p == null || isNaN(p) ? o[h] : p;
  76574. }), m7(l), m7(s);
  76575. var c = this._minMaxSpan;
  76576. u ? f(l, s, n, o, !1) : f(s, l, o, n, !0);
  76577. function f(d, h, p, v, g) {
  76578. var m = g ? "Span" : "ValueSpan";
  76579. Hf(0, d, p, "all", c["min" + m], c["max" + m]);
  76580. for (var y = 0; y < 2; y++)
  76581. h[y] = Lt(d[y], p, v, !0), g && (h[y] = i.parse(h[y]));
  76582. }
  76583. return {
  76584. valueWindow: l,
  76585. percentWindow: s
  76586. };
  76587. }, t.prototype.reset = function(e) {
  76588. if (e === this._dataZoomModel) {
  76589. var n = this.getTargetSeriesModels();
  76590. this._dataExtent = zHe(this, this._dimName, n), this._updateMinMaxSpan();
  76591. var r = this.calculateDataWindow(e.settledOption);
  76592. this._valueWindow = r.valueWindow, this._percentWindow = r.percentWindow, this._setAxisModel();
  76593. }
  76594. }, t.prototype.filterData = function(e, n) {
  76595. if (e !== this._dataZoomModel)
  76596. return;
  76597. var r = this._dimName, i = this.getTargetSeriesModels(), a = e.get("filterMode"), o = this._valueWindow;
  76598. if (a === "none")
  76599. return;
  76600. Id(i, function(l) {
  76601. var u = l.getData(), c = u.mapDimensionsAll(r);
  76602. if (c.length) {
  76603. if (a === "weakFilter") {
  76604. var f = u.getStore(), d = ce(c, function(h) {
  76605. return u.getDimensionIndex(h);
  76606. }, u);
  76607. u.filterSelf(function(h) {
  76608. for (var p, v, g, m = 0; m < c.length; m++) {
  76609. var y = f.get(d[m], h), b = !isNaN(y), _ = y < o[0], O = y > o[1];
  76610. if (b && !_ && !O)
  76611. return !0;
  76612. b && (g = !0), _ && (p = !0), O && (v = !0);
  76613. }
  76614. return g && p && v;
  76615. });
  76616. } else
  76617. Id(c, function(h) {
  76618. if (a === "empty")
  76619. l.setData(u = u.map(h, function(v) {
  76620. return s(v) ? v : NaN;
  76621. }));
  76622. else {
  76623. var p = {};
  76624. p[h] = o, u.selectRange(p);
  76625. }
  76626. });
  76627. Id(c, function(h) {
  76628. u.setApproximateExtent(o, h);
  76629. });
  76630. }
  76631. });
  76632. function s(l) {
  76633. return l >= o[0] && l <= o[1];
  76634. }
  76635. }, t.prototype._updateMinMaxSpan = function() {
  76636. var e = this._minMaxSpan = {}, n = this._dataZoomModel, r = this._dataExtent;
  76637. Id(["min", "max"], function(i) {
  76638. var a = n.get(i + "Span"), o = n.get(i + "ValueSpan");
  76639. o != null && (o = this.getAxisModel().axis.scale.parse(o)), o != null ? a = Lt(r[0] + o, r, [0, 100], !0) : a != null && (o = Lt(a, [0, 100], r, !0) - r[0]), e[i + "Span"] = a, e[i + "ValueSpan"] = o;
  76640. }, this);
  76641. }, t.prototype._setAxisModel = function() {
  76642. var e = this.getAxisModel(), n = this._percentWindow, r = this._valueWindow;
  76643. if (n) {
  76644. var i = PR(r, [0, 500]);
  76645. i = Math.min(i, 20);
  76646. var a = e.axis.scale.rawExtentInfo;
  76647. n[0] !== 0 && a.setDeterminedMinMax("min", +r[0].toFixed(i)), n[1] !== 100 && a.setDeterminedMinMax("max", +r[1].toFixed(i)), a.freeze();
  76648. }
  76649. }, t;
  76650. }()
  76651. );
  76652. function zHe(t, e, n) {
  76653. var r = [1 / 0, -1 / 0];
  76654. Id(n, function(o) {
  76655. r5e(r, o.getData(), e);
  76656. });
  76657. var i = t.getAxisModel(), a = rte(i.axis.scale, i, r).calculate();
  76658. return [a.min, a.max];
  76659. }
  76660. var VHe = {
  76661. // `dataZoomProcessor` will only be performed in needed series. Consider if
  76662. // there is a line series and a pie series, it is better not to update the
  76663. // line series if only pie series is needed to be updated.
  76664. getTargetSeries: function(t) {
  76665. function e(i) {
  76666. t.eachComponent("dataZoom", function(a) {
  76667. a.eachTargetAxis(function(o, s) {
  76668. var l = t.getComponent(Fl(o), s);
  76669. i(o, s, l, a);
  76670. });
  76671. });
  76672. }
  76673. e(function(i, a, o, s) {
  76674. o.__dzAxisProxy = null;
  76675. });
  76676. var n = [];
  76677. e(function(i, a, o, s) {
  76678. o.__dzAxisProxy || (o.__dzAxisProxy = new BHe(i, a, s, t), n.push(o.__dzAxisProxy));
  76679. });
  76680. var r = Pe();
  76681. return k(n, function(i) {
  76682. k(i.getTargetSeriesModels(), function(a) {
  76683. r.set(a.uid, a);
  76684. });
  76685. }), r;
  76686. },
  76687. // Consider appendData, where filter should be performed. Because data process is
  76688. // in block mode currently, it is not need to worry about that the overallProgress
  76689. // execute every frame.
  76690. overallReset: function(t, e) {
  76691. t.eachComponent("dataZoom", function(n) {
  76692. n.eachTargetAxis(function(r, i) {
  76693. n.getAxisProxy(r, i).reset(n);
  76694. }), n.eachTargetAxis(function(r, i) {
  76695. n.getAxisProxy(r, i).filterData(n, e);
  76696. });
  76697. }), t.eachComponent("dataZoom", function(n) {
  76698. var r = n.findRepresentativeAxisProxy();
  76699. if (r) {
  76700. var i = r.getDataPercentWindow(), a = r.getDataValueWindow();
  76701. n.setCalculatedRange({
  76702. start: i[0],
  76703. end: i[1],
  76704. startValue: a[0],
  76705. endValue: a[1]
  76706. });
  76707. }
  76708. });
  76709. }
  76710. };
  76711. function FHe(t) {
  76712. t.registerAction("dataZoom", function(e, n) {
  76713. var r = kHe(n, e);
  76714. k(r, function(i) {
  76715. i.setRawRange({
  76716. start: e.start,
  76717. end: e.end,
  76718. startValue: e.startValue,
  76719. endValue: e.endValue
  76720. });
  76721. });
  76722. });
  76723. }
  76724. var y7 = !1;
  76725. function xL(t) {
  76726. y7 || (y7 = !0, t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, VHe), FHe(t), t.registerSubTypeDefaulter("dataZoom", function() {
  76727. return "slider";
  76728. }));
  76729. }
  76730. function WHe(t) {
  76731. t.registerComponentModel(LHe), t.registerComponentView(NHe), xL(t);
  76732. }
  76733. var ga = (
  76734. /** @class */
  76735. /* @__PURE__ */ function() {
  76736. function t() {
  76737. }
  76738. return t;
  76739. }()
  76740. ), Wre = {};
  76741. function Dd(t, e) {
  76742. Wre[t] = e;
  76743. }
  76744. function Qre(t) {
  76745. return Wre[t];
  76746. }
  76747. var QHe = (
  76748. /** @class */
  76749. function(t) {
  76750. q(e, t);
  76751. function e() {
  76752. var n = t !== null && t.apply(this, arguments) || this;
  76753. return n.type = e.type, n;
  76754. }
  76755. return e.prototype.optionUpdated = function() {
  76756. t.prototype.optionUpdated.apply(this, arguments);
  76757. var n = this.ecModel;
  76758. k(this.option.feature, function(r, i) {
  76759. var a = Qre(i);
  76760. a && (a.getDefaultOption && (a.defaultOption = a.getDefaultOption(n)), qe(r, a.defaultOption));
  76761. });
  76762. }, e.type = "toolbox", e.layoutMode = {
  76763. type: "box",
  76764. ignoreSize: !0
  76765. }, e.defaultOption = {
  76766. show: !0,
  76767. z: 6,
  76768. // zlevel: 0,
  76769. orient: "horizontal",
  76770. left: "right",
  76771. top: "top",
  76772. // right
  76773. // bottom
  76774. backgroundColor: "transparent",
  76775. borderColor: "#ccc",
  76776. borderRadius: 0,
  76777. borderWidth: 0,
  76778. padding: 5,
  76779. itemSize: 15,
  76780. itemGap: 8,
  76781. showTitle: !0,
  76782. iconStyle: {
  76783. borderColor: "#666",
  76784. color: "none"
  76785. },
  76786. emphasis: {
  76787. iconStyle: {
  76788. borderColor: "#3E98C5"
  76789. }
  76790. },
  76791. // textStyle: {},
  76792. // feature
  76793. tooltip: {
  76794. show: !1,
  76795. position: "bottom"
  76796. }
  76797. }, e;
  76798. }(rt)
  76799. );
  76800. function HHe(t, e, n) {
  76801. var r = e.getBoxLayoutParams(), i = e.get("padding"), a = {
  76802. width: n.getWidth(),
  76803. height: n.getHeight()
  76804. }, o = Rn(r, a, i);
  76805. tf(e.get("orient"), t, e.get("itemGap"), o.width, o.height), ow(t, r, a, i);
  76806. }
  76807. function Hre(t, e) {
  76808. var n = zf(e.get("padding")), r = e.getItemStyle(["color", "opacity"]);
  76809. return r.fill = e.get("backgroundColor"), t = new mt({
  76810. shape: {
  76811. x: t.x - n[3],
  76812. y: t.y - n[0],
  76813. width: t.width + n[1] + n[3],
  76814. height: t.height + n[0] + n[2],
  76815. r: e.get("borderRadius")
  76816. },
  76817. style: r,
  76818. silent: !0,
  76819. z2: -1
  76820. }), t;
  76821. }
  76822. var GHe = (
  76823. /** @class */
  76824. function(t) {
  76825. q(e, t);
  76826. function e() {
  76827. return t !== null && t.apply(this, arguments) || this;
  76828. }
  76829. return e.prototype.render = function(n, r, i, a) {
  76830. var o = this.group;
  76831. if (o.removeAll(), !n.get("show"))
  76832. return;
  76833. var s = +n.get("itemSize"), l = n.get("orient") === "vertical", u = n.get("feature") || {}, c = this._features || (this._features = {}), f = [];
  76834. k(u, function(p, v) {
  76835. f.push(v);
  76836. }), new Xs(this._featureNames || [], f).add(d).update(d).remove(Ue(d, null)).execute(), this._featureNames = f;
  76837. function d(p, v) {
  76838. var g = f[p], m = f[v], y = u[g], b = new Wt(y, n, n.ecModel), _;
  76839. if (a && a.newTitle != null && a.featureName === g && (y.title = a.newTitle), g && !m) {
  76840. if (jHe(g))
  76841. _ = {
  76842. onclick: b.option.onclick,
  76843. featureName: g
  76844. };
  76845. else {
  76846. var O = Qre(g);
  76847. if (!O)
  76848. return;
  76849. _ = new O();
  76850. }
  76851. c[g] = _;
  76852. } else if (_ = c[m], !_)
  76853. return;
  76854. _.uid = xp("toolbox-feature"), _.model = b, _.ecModel = r, _.api = i;
  76855. var S = _ instanceof ga;
  76856. if (!g && m) {
  76857. S && _.dispose && _.dispose(r, i);
  76858. return;
  76859. }
  76860. if (!b.get("show") || S && _.unusable) {
  76861. S && _.remove && _.remove(r, i);
  76862. return;
  76863. }
  76864. h(b, _, g), b.setIconStatus = function(x, C) {
  76865. var T = this.option, w = this.iconPaths;
  76866. T.iconStatus = T.iconStatus || {}, T.iconStatus[x] = C, w[x] && (C === "emphasis" ? Zs : Us)(w[x]);
  76867. }, _ instanceof ga && _.render && _.render(b, r, i, a);
  76868. }
  76869. function h(p, v, g) {
  76870. var m = p.getModel("iconStyle"), y = p.getModel(["emphasis", "iconStyle"]), b = v instanceof ga && v.getIcons ? v.getIcons() : p.get("icon"), _ = p.get("title") || {}, O, S;
  76871. Oe(b) ? (O = {}, O[g] = b) : O = b, Oe(_) ? (S = {}, S[g] = _) : S = _;
  76872. var x = p.iconPaths = {};
  76873. k(O, function(C, T) {
  76874. var w = _p(C, {}, {
  76875. x: -s / 2,
  76876. y: -s / 2,
  76877. width: s,
  76878. height: s
  76879. });
  76880. w.setStyle(m.getItemStyle());
  76881. var P = w.ensureState("emphasis");
  76882. P.style = y.getItemStyle();
  76883. var $ = new gt({
  76884. style: {
  76885. text: S[T],
  76886. align: y.get("textAlign"),
  76887. borderRadius: y.get("textBorderRadius"),
  76888. padding: y.get("textPadding"),
  76889. fill: null,
  76890. font: jR({
  76891. fontStyle: y.get("textFontStyle"),
  76892. fontFamily: y.get("textFontFamily"),
  76893. fontSize: y.get("textFontSize"),
  76894. fontWeight: y.get("textFontWeight")
  76895. }, r)
  76896. },
  76897. ignore: !0
  76898. });
  76899. w.setTextContent($), Op({
  76900. el: w,
  76901. componentModel: n,
  76902. itemName: T,
  76903. formatterParamsExtra: {
  76904. title: S[T]
  76905. }
  76906. }), w.__title = S[T], w.on("mouseover", function() {
  76907. var A = y.getItemStyle(), D = l ? n.get("right") == null && n.get("left") !== "right" ? "right" : "left" : n.get("bottom") == null && n.get("top") !== "bottom" ? "bottom" : "top";
  76908. $.setStyle({
  76909. fill: y.get("textFill") || A.fill || A.stroke || "#000",
  76910. backgroundColor: y.get("textBackgroundColor")
  76911. }), w.setTextConfig({
  76912. position: y.get("textPosition") || D
  76913. }), $.ignore = !n.get("showTitle"), i.enterEmphasis(this);
  76914. }).on("mouseout", function() {
  76915. p.get(["iconStatus", T]) !== "emphasis" && i.leaveEmphasis(this), $.hide();
  76916. }), (p.get(["iconStatus", T]) === "emphasis" ? Zs : Us)(w), o.add(w), w.on("click", xe(v.onclick, v, r, i, T)), x[T] = w;
  76917. });
  76918. }
  76919. HHe(o, n, i), o.add(Hre(o.getBoundingRect(), n)), l || o.eachChild(function(p) {
  76920. var v = p.__title, g = p.ensureState("emphasis"), m = g.textConfig || (g.textConfig = {}), y = p.getTextContent(), b = y && y.ensureState("emphasis");
  76921. if (b && !Me(b) && v) {
  76922. var _ = b.style || (b.style = {}), O = L0(v, gt.makeFont(_)), S = p.x + o.x, x = p.y + o.y + s, C = !1;
  76923. x + O.height > i.getHeight() && (m.position = "top", C = !0);
  76924. var T = C ? -5 - O.height : s + 10;
  76925. S + O.width / 2 > i.getWidth() ? (m.position = ["100%", T], _.align = "right") : S - O.width / 2 < 0 && (m.position = [0, T], _.align = "left");
  76926. }
  76927. });
  76928. }, e.prototype.updateView = function(n, r, i, a) {
  76929. k(this._features, function(o) {
  76930. o instanceof ga && o.updateView && o.updateView(o.model, r, i, a);
  76931. });
  76932. }, e.prototype.remove = function(n, r) {
  76933. k(this._features, function(i) {
  76934. i instanceof ga && i.remove && i.remove(n, r);
  76935. }), this.group.removeAll();
  76936. }, e.prototype.dispose = function(n, r) {
  76937. k(this._features, function(i) {
  76938. i instanceof ga && i.dispose && i.dispose(n, r);
  76939. });
  76940. }, e.type = "toolbox", e;
  76941. }(Xt)
  76942. );
  76943. function jHe(t) {
  76944. return t.indexOf("my") === 0;
  76945. }
  76946. var ZHe = (
  76947. /** @class */
  76948. function(t) {
  76949. q(e, t);
  76950. function e() {
  76951. return t !== null && t.apply(this, arguments) || this;
  76952. }
  76953. return e.prototype.onclick = function(n, r) {
  76954. 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({
  76955. type: s,
  76956. backgroundColor: i.get("backgroundColor", !0) || n.get("backgroundColor") || "#fff",
  76957. connectedBackgroundColor: i.get("connectedBackgroundColor"),
  76958. excludeComponents: i.get("excludeComponents"),
  76959. pixelRatio: i.get("pixelRatio")
  76960. }), u = vt.browser;
  76961. if (typeof MouseEvent == "function" && (u.newEdge || !u.ie && !u.edge)) {
  76962. var c = document.createElement("a");
  76963. c.download = a + "." + s, c.target = "_blank", c.href = l;
  76964. var f = new MouseEvent("click", {
  76965. // some micro front-end framework, window maybe is a Proxy
  76966. view: document.defaultView,
  76967. bubbles: !0,
  76968. cancelable: !1
  76969. });
  76970. c.dispatchEvent(f);
  76971. } else if (window.navigator.msSaveOrOpenBlob || o) {
  76972. var d = l.split(","), h = d[0].indexOf("base64") > -1, p = o ? decodeURIComponent(d[1]) : d[1];
  76973. h && (p = window.atob(p));
  76974. var v = a + "." + s;
  76975. if (window.navigator.msSaveOrOpenBlob) {
  76976. for (var g = p.length, m = new Uint8Array(g); g--; )
  76977. m[g] = p.charCodeAt(g);
  76978. var y = new Blob([m]);
  76979. window.navigator.msSaveOrOpenBlob(y, v);
  76980. } else {
  76981. var b = document.createElement("iframe");
  76982. document.body.appendChild(b);
  76983. var _ = b.contentWindow, O = _.document;
  76984. O.open("image/svg+xml", "replace"), O.write(p), O.close(), _.focus(), O.execCommand("SaveAs", !0, v), document.body.removeChild(b);
  76985. }
  76986. } else {
  76987. var S = i.get("lang"), x = '<body style="margin:0;"><img src="' + l + '" style="max-width:100%;" title="' + (S && S[0] || "") + '" /></body>', C = window.open();
  76988. C.document.write(x), C.document.title = a;
  76989. }
  76990. }, e.getDefaultOption = function(n) {
  76991. var r = {
  76992. show: !0,
  76993. 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",
  76994. title: n.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
  76995. type: "png",
  76996. // Default use option.backgroundColor
  76997. // backgroundColor: '#fff',
  76998. connectedBackgroundColor: "#fff",
  76999. name: "",
  77000. excludeComponents: ["toolbox"],
  77001. // use current pixel ratio of device by default
  77002. // pixelRatio: 1,
  77003. lang: n.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
  77004. };
  77005. return r;
  77006. }, e;
  77007. }(ga)
  77008. ), b7 = "__ec_magicType_stack__", UHe = [["line", "bar"], ["stack"]], XHe = (
  77009. /** @class */
  77010. function(t) {
  77011. q(e, t);
  77012. function e() {
  77013. return t !== null && t.apply(this, arguments) || this;
  77014. }
  77015. return e.prototype.getIcons = function() {
  77016. var n = this.model, r = n.get("icon"), i = {};
  77017. return k(n.get("type"), function(a) {
  77018. r[a] && (i[a] = r[a]);
  77019. }), i;
  77020. }, e.getDefaultOption = function(n) {
  77021. var r = {
  77022. show: !0,
  77023. type: [],
  77024. // Icon group
  77025. icon: {
  77026. line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
  77027. bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
  77028. // eslint-disable-next-line
  77029. 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"
  77030. // jshint ignore:line
  77031. },
  77032. // `line`, `bar`, `stack`, `tiled`
  77033. title: n.getLocaleModel().get(["toolbox", "magicType", "title"]),
  77034. option: {},
  77035. seriesIndex: {}
  77036. };
  77037. return r;
  77038. }, e.prototype.onclick = function(n, r, i) {
  77039. var a = this.model, o = a.get(["seriesIndex", i]);
  77040. if (_7[i]) {
  77041. var s = {
  77042. series: []
  77043. }, l = function(f) {
  77044. var d = f.subType, h = f.id, p = _7[i](d, h, f, a);
  77045. p && (Re(p, f.option), s.series.push(p));
  77046. var v = f.coordinateSystem;
  77047. if (v && v.type === "cartesian2d" && (i === "line" || i === "bar")) {
  77048. var g = v.getAxesByScale("ordinal")[0];
  77049. if (g) {
  77050. var m = g.dim, y = m + "Axis", b = f.getReferringComponents(y, Dn).models[0], _ = b.componentIndex;
  77051. s[y] = s[y] || [];
  77052. for (var O = 0; O <= _; O++)
  77053. s[y][_] = s[y][_] || {};
  77054. s[y][_].boundaryGap = i === "bar";
  77055. }
  77056. }
  77057. };
  77058. k(UHe, function(f) {
  77059. et(f, i) >= 0 && k(f, function(d) {
  77060. a.setIconStatus(d, "normal");
  77061. });
  77062. }), a.setIconStatus(i, "emphasis"), n.eachComponent({
  77063. mainType: "series",
  77064. query: o == null ? null : {
  77065. seriesIndex: o
  77066. }
  77067. }, l);
  77068. var u, c = i;
  77069. i === "stack" && (u = qe({
  77070. stack: a.option.title.tiled,
  77071. tiled: a.option.title.stack
  77072. }, a.option.title), a.get(["iconStatus", i]) !== "emphasis" && (c = "tiled")), r.dispatchAction({
  77073. type: "changeMagicType",
  77074. currentType: c,
  77075. newOption: s,
  77076. newTitle: u,
  77077. featureName: "magicType"
  77078. });
  77079. }
  77080. }, e;
  77081. }(ga)
  77082. ), _7 = {
  77083. line: function(t, e, n, r) {
  77084. if (t === "bar")
  77085. return qe({
  77086. id: e,
  77087. type: "line",
  77088. // Preserve data related option
  77089. data: n.get("data"),
  77090. stack: n.get("stack"),
  77091. markPoint: n.get("markPoint"),
  77092. markLine: n.get("markLine")
  77093. }, r.get(["option", "line"]) || {}, !0);
  77094. },
  77095. bar: function(t, e, n, r) {
  77096. if (t === "line")
  77097. return qe({
  77098. id: e,
  77099. type: "bar",
  77100. // Preserve data related option
  77101. data: n.get("data"),
  77102. stack: n.get("stack"),
  77103. markPoint: n.get("markPoint"),
  77104. markLine: n.get("markLine")
  77105. }, r.get(["option", "bar"]) || {}, !0);
  77106. },
  77107. stack: function(t, e, n, r) {
  77108. var i = n.get("stack") === b7;
  77109. if (t === "line" || t === "bar")
  77110. return r.setIconStatus("stack", i ? "normal" : "emphasis"), qe({
  77111. id: e,
  77112. stack: i ? "" : b7
  77113. }, r.get(["option", "stack"]) || {}, !0);
  77114. }
  77115. };
  77116. go({
  77117. type: "changeMagicType",
  77118. event: "magicTypeChanged",
  77119. update: "prepareAndUpdate"
  77120. }, function(t, e) {
  77121. e.mergeOption(t.newOption);
  77122. });
  77123. var ww = new Array(60).join("-"), qh = " ";
  77124. function YHe(t) {
  77125. var e = {}, n = [], r = [];
  77126. return t.eachRawSeries(function(i) {
  77127. var a = i.coordinateSystem;
  77128. if (a && (a.type === "cartesian2d" || a.type === "polar")) {
  77129. var o = a.getBaseAxis();
  77130. if (o.type === "category") {
  77131. var s = o.dim + "_" + o.index;
  77132. e[s] || (e[s] = {
  77133. categoryAxis: o,
  77134. valueAxis: a.getOtherAxis(o),
  77135. series: []
  77136. }, r.push({
  77137. axisDim: o.dim,
  77138. axisIndex: o.index
  77139. })), e[s].series.push(i);
  77140. } else
  77141. n.push(i);
  77142. } else
  77143. n.push(i);
  77144. }), {
  77145. seriesGroupByCategoryAxis: e,
  77146. other: n,
  77147. meta: r
  77148. };
  77149. }
  77150. function qHe(t) {
  77151. var e = [];
  77152. return k(t, function(n, r) {
  77153. var i = n.categoryAxis, a = n.valueAxis, o = a.dim, s = [" "].concat(ce(n.series, function(h) {
  77154. return h.name;
  77155. })), l = [i.model.getCategories()];
  77156. k(n.series, function(h) {
  77157. var p = h.getRawData();
  77158. l.push(h.getRawData().mapArray(p.mapDimension(o), function(v) {
  77159. return v;
  77160. }));
  77161. });
  77162. for (var u = [s.join(qh)], c = 0; c < l[0].length; c++) {
  77163. for (var f = [], d = 0; d < l.length; d++)
  77164. f.push(l[d][c]);
  77165. u.push(f.join(qh));
  77166. }
  77167. e.push(u.join(`
  77168. `));
  77169. }), e.join(`
  77170. ` + ww + `
  77171. `);
  77172. }
  77173. function KHe(t) {
  77174. return ce(t, function(e) {
  77175. var n = e.getRawData(), r = [e.name], i = [];
  77176. return n.each(n.dimensions, function() {
  77177. for (var a = arguments.length, o = arguments[a - 1], s = n.getName(o), l = 0; l < a - 1; l++)
  77178. i[l] = arguments[l];
  77179. r.push((s ? s + qh : "") + i.join(qh));
  77180. }), r.join(`
  77181. `);
  77182. }).join(`
  77183. ` + ww + `
  77184. `);
  77185. }
  77186. function JHe(t) {
  77187. var e = YHe(t);
  77188. return {
  77189. value: Nt([qHe(e.seriesGroupByCategoryAxis), KHe(e.other)], function(n) {
  77190. return !!n.replace(/[\n\t\s]/g, "");
  77191. }).join(`
  77192. ` + ww + `
  77193. `),
  77194. meta: e.meta
  77195. };
  77196. }
  77197. function HO(t) {
  77198. return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
  77199. }
  77200. function eGe(t) {
  77201. var e = t.slice(0, t.indexOf(`
  77202. `));
  77203. if (e.indexOf(qh) >= 0)
  77204. return !0;
  77205. }
  77206. var RE = new RegExp("[" + qh + "]+", "g");
  77207. function tGe(t) {
  77208. for (var e = t.split(/\n+/g), n = HO(e.shift()).split(RE), r = [], i = ce(n, function(l) {
  77209. return {
  77210. name: l,
  77211. data: []
  77212. };
  77213. }), a = 0; a < e.length; a++) {
  77214. var o = HO(e[a]).split(RE);
  77215. r.push(o.shift());
  77216. for (var s = 0; s < o.length; s++)
  77217. i[s] && (i[s].data[a] = o[s]);
  77218. }
  77219. return {
  77220. series: i,
  77221. categories: r
  77222. };
  77223. }
  77224. function nGe(t) {
  77225. for (var e = t.split(/\n+/g), n = HO(e.shift()), r = [], i = 0; i < e.length; i++) {
  77226. var a = HO(e[i]);
  77227. if (a) {
  77228. var o = a.split(RE), s = "", l = void 0, u = !1;
  77229. isNaN(o[0]) ? (u = !0, s = o[0], o = o.slice(1), r[i] = {
  77230. name: s,
  77231. value: []
  77232. }, l = r[i].value) : l = r[i] = [];
  77233. for (var c = 0; c < o.length; c++)
  77234. l.push(+o[c]);
  77235. l.length === 1 && (u ? r[i].value = l[0] : r[i] = l[0]);
  77236. }
  77237. }
  77238. return {
  77239. name: n,
  77240. data: r
  77241. };
  77242. }
  77243. function rGe(t, e) {
  77244. var n = t.split(new RegExp(`
  77245. *` + ww + `
  77246. *`, "g")), r = {
  77247. series: []
  77248. };
  77249. return k(n, function(i, a) {
  77250. if (eGe(i)) {
  77251. var o = tGe(i), s = e[a], l = s.axisDim + "Axis";
  77252. s && (r[l] = r[l] || [], r[l][s.axisIndex] = {
  77253. data: o.categories
  77254. }, r.series = r.series.concat(o.series));
  77255. } else {
  77256. var o = nGe(i);
  77257. r.series.push(o);
  77258. }
  77259. }), r;
  77260. }
  77261. var iGe = (
  77262. /** @class */
  77263. function(t) {
  77264. q(e, t);
  77265. function e() {
  77266. return t !== null && t.apply(this, arguments) || this;
  77267. }
  77268. return e.prototype.onclick = function(n, r) {
  77269. setTimeout(function() {
  77270. r.dispatchAction({
  77271. type: "hideTip"
  77272. });
  77273. });
  77274. var i = r.getDom(), a = this.model;
  77275. this._dom && i.removeChild(this._dom);
  77276. var o = document.createElement("div");
  77277. o.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", o.style.backgroundColor = a.get("backgroundColor") || "#fff";
  77278. var s = document.createElement("h4"), l = a.get("lang") || [];
  77279. s.innerHTML = l[0] || a.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = a.get("textColor");
  77280. var u = document.createElement("div"), c = document.createElement("textarea");
  77281. u.style.cssText = "overflow:auto";
  77282. var f = a.get("optionToContent"), d = a.get("contentToOption"), h = JHe(n);
  77283. if (Me(f)) {
  77284. var p = f(r.getOption());
  77285. Oe(p) ? u.innerHTML = p : au(p) && u.appendChild(p);
  77286. } else {
  77287. c.readOnly = a.get("readOnly");
  77288. var v = c.style;
  77289. 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);
  77290. }
  77291. var g = h.meta, m = document.createElement("div");
  77292. m.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
  77293. var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", b = document.createElement("div"), _ = document.createElement("div");
  77294. y += ";background-color:" + a.get("buttonColor"), y += ";color:" + a.get("buttonTextColor");
  77295. var O = this;
  77296. function S() {
  77297. i.removeChild(o), O._dom = null;
  77298. }
  77299. fA(b, "click", S), fA(_, "click", function() {
  77300. if (d == null && f != null || d != null && f == null) {
  77301. process.env.NODE_ENV !== "production" && dn("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."), S();
  77302. return;
  77303. }
  77304. var x;
  77305. try {
  77306. Me(d) ? x = d(u, r.getOption()) : x = rGe(c.value, g);
  77307. } catch (C) {
  77308. throw S(), new Error("Data view format error " + C);
  77309. }
  77310. x && r.dispatchAction({
  77311. type: "changeDataView",
  77312. newOption: x
  77313. }), S();
  77314. }), b.innerHTML = l[1], _.innerHTML = l[2], _.style.cssText = b.style.cssText = y, !a.get("readOnly") && m.appendChild(_), m.appendChild(b), o.appendChild(s), o.appendChild(u), o.appendChild(m), u.style.height = i.clientHeight - 80 + "px", i.appendChild(o), this._dom = o;
  77315. }, e.prototype.remove = function(n, r) {
  77316. this._dom && r.getDom().removeChild(this._dom);
  77317. }, e.prototype.dispose = function(n, r) {
  77318. this.remove(n, r);
  77319. }, e.getDefaultOption = function(n) {
  77320. var r = {
  77321. show: !0,
  77322. readOnly: !1,
  77323. optionToContent: null,
  77324. contentToOption: null,
  77325. // eslint-disable-next-line
  77326. 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",
  77327. title: n.getLocaleModel().get(["toolbox", "dataView", "title"]),
  77328. lang: n.getLocaleModel().get(["toolbox", "dataView", "lang"]),
  77329. backgroundColor: "#fff",
  77330. textColor: "#000",
  77331. textareaColor: "#fff",
  77332. textareaBorderColor: "#333",
  77333. buttonColor: "#c23531",
  77334. buttonTextColor: "#fff"
  77335. };
  77336. return r;
  77337. }, e;
  77338. }(ga)
  77339. );
  77340. function aGe(t, e) {
  77341. return ce(t, function(n, r) {
  77342. var i = e && e[r];
  77343. if (Ie(i) && !ue(i)) {
  77344. var a = Ie(n) && !ue(n);
  77345. a || (n = {
  77346. value: n
  77347. });
  77348. var o = i.name != null && n.name == null;
  77349. return n = Re(n, i), o && delete n.name, n;
  77350. } else
  77351. return n;
  77352. });
  77353. }
  77354. go({
  77355. type: "changeDataView",
  77356. event: "dataViewChanged",
  77357. update: "prepareAndUpdate"
  77358. }, function(t, e) {
  77359. var n = [];
  77360. k(t.newOption.series, function(r) {
  77361. var i = e.getSeriesByName(r.name)[0];
  77362. if (!i)
  77363. n.push(le({
  77364. // Default is scatter
  77365. type: "scatter"
  77366. }, r));
  77367. else {
  77368. var a = i.get("data");
  77369. n.push({
  77370. name: r.name,
  77371. data: aGe(r.data, a)
  77372. });
  77373. }
  77374. }), e.mergeOption(Re({
  77375. series: n
  77376. }, t.newOption));
  77377. });
  77378. var Gre = k, jre = bt();
  77379. function oGe(t, e) {
  77380. var n = wL(t);
  77381. Gre(e, function(r, i) {
  77382. for (var a = n.length - 1; a >= 0; a--) {
  77383. var o = n[a];
  77384. if (o[i])
  77385. break;
  77386. }
  77387. if (a < 0) {
  77388. var s = t.queryComponents({
  77389. mainType: "dataZoom",
  77390. subType: "select",
  77391. id: i
  77392. })[0];
  77393. if (s) {
  77394. var l = s.getPercentRange();
  77395. n[0][i] = {
  77396. dataZoomId: i,
  77397. start: l[0],
  77398. end: l[1]
  77399. };
  77400. }
  77401. }
  77402. }), n.push(e);
  77403. }
  77404. function sGe(t) {
  77405. var e = wL(t), n = e[e.length - 1];
  77406. e.length > 1 && e.pop();
  77407. var r = {};
  77408. return Gre(n, function(i, a) {
  77409. for (var o = e.length - 1; o >= 0; o--)
  77410. if (i = e[o][a], i) {
  77411. r[a] = i;
  77412. break;
  77413. }
  77414. }), r;
  77415. }
  77416. function lGe(t) {
  77417. jre(t).snapshots = null;
  77418. }
  77419. function uGe(t) {
  77420. return wL(t).length;
  77421. }
  77422. function wL(t) {
  77423. var e = jre(t);
  77424. return e.snapshots || (e.snapshots = [{}]), e.snapshots;
  77425. }
  77426. var cGe = (
  77427. /** @class */
  77428. function(t) {
  77429. q(e, t);
  77430. function e() {
  77431. return t !== null && t.apply(this, arguments) || this;
  77432. }
  77433. return e.prototype.onclick = function(n, r) {
  77434. lGe(n), r.dispatchAction({
  77435. type: "restore",
  77436. from: this.uid
  77437. });
  77438. }, e.getDefaultOption = function(n) {
  77439. var r = {
  77440. show: !0,
  77441. // eslint-disable-next-line
  77442. 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",
  77443. title: n.getLocaleModel().get(["toolbox", "restore", "title"])
  77444. };
  77445. return r;
  77446. }, e;
  77447. }(ga)
  77448. );
  77449. go({
  77450. type: "restore",
  77451. event: "restore",
  77452. update: "prepareAndUpdate"
  77453. }, function(t, e) {
  77454. e.resetOption("recreate");
  77455. });
  77456. var fGe = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], CL = (
  77457. /** @class */
  77458. function() {
  77459. function t(e, n, r) {
  77460. var i = this;
  77461. this._targetInfoList = [];
  77462. var a = O7(n, e);
  77463. k(dGe, function(o, s) {
  77464. (!r || !r.include || et(r.include, s) >= 0) && o(a, i._targetInfoList);
  77465. });
  77466. }
  77467. return t.prototype.setOutputRanges = function(e, n) {
  77468. return this.matchOutputRanges(e, n, function(r, i, a) {
  77469. if ((r.coordRanges || (r.coordRanges = [])).push(i), !r.coordRange) {
  77470. r.coordRange = i;
  77471. var o = YP[r.brushType](0, a, i);
  77472. r.__rangeOffset = {
  77473. offset: C7[r.brushType](o.values, r.range, [1, 1]),
  77474. xyMinMax: o.xyMinMax
  77475. };
  77476. }
  77477. }), e;
  77478. }, t.prototype.matchOutputRanges = function(e, n, r) {
  77479. k(e, function(i) {
  77480. var a = this.findTargetInfo(i, n);
  77481. a && a !== !0 && k(a.coordSyses, function(o) {
  77482. var s = YP[i.brushType](1, o, i.range, !0);
  77483. r(i, s.values, o, n);
  77484. });
  77485. }, this);
  77486. }, t.prototype.setInputRanges = function(e, n) {
  77487. k(e, function(r) {
  77488. var i = this.findTargetInfo(r, n);
  77489. if (process.env.NODE_ENV !== "production" && (ke(!i || i === !0 || r.coordRange, "coordRange must be specified when coord index specified."), ke(!i || i !== !0 || r.range, "range must be specified in global brush.")), r.range = r.range || [], i && i !== !0) {
  77490. r.panelId = i.panelId;
  77491. var a = YP[r.brushType](0, i.coordSys, r.coordRange), o = r.__rangeOffset;
  77492. r.range = o ? C7[r.brushType](a.values, o.offset, hGe(a.xyMinMax, o.xyMinMax)) : a.values;
  77493. }
  77494. }, this);
  77495. }, t.prototype.makePanelOpts = function(e, n) {
  77496. return ce(this._targetInfoList, function(r) {
  77497. var i = r.getPanelRect();
  77498. return {
  77499. panelId: r.panelId,
  77500. defaultBrushType: n ? n(r) : null,
  77501. clipPath: Jne(i),
  77502. isTargetByCursor: tre(i, e, r.coordSysModel),
  77503. getLinearBrushOtherExtent: ere(i)
  77504. };
  77505. });
  77506. }, t.prototype.controlSeries = function(e, n, r) {
  77507. var i = this.findTargetInfo(e, r);
  77508. return i === !0 || i && et(i.coordSyses, n.coordinateSystem) >= 0;
  77509. }, t.prototype.findTargetInfo = function(e, n) {
  77510. for (var r = this._targetInfoList, i = O7(n, e), a = 0; a < r.length; a++) {
  77511. var o = r[a], s = e.panelId;
  77512. if (s) {
  77513. if (o.panelId === s)
  77514. return o;
  77515. } else
  77516. for (var l = 0; l < S7.length; l++)
  77517. if (S7[l](i, o))
  77518. return o;
  77519. }
  77520. return !0;
  77521. }, t;
  77522. }()
  77523. );
  77524. function kE(t) {
  77525. return t[0] > t[1] && t.reverse(), t;
  77526. }
  77527. function O7(t, e) {
  77528. return Dg(t, e, {
  77529. includeMainTypes: fGe
  77530. });
  77531. }
  77532. var dGe = {
  77533. grid: function(t, e) {
  77534. var n = t.xAxisModels, r = t.yAxisModels, i = t.gridModels, a = Pe(), o = {}, s = {};
  77535. !n && !r && !i || (k(n, function(l) {
  77536. var u = l.axis.grid.model;
  77537. a.set(u.id, u), o[u.id] = !0;
  77538. }), k(r, function(l) {
  77539. var u = l.axis.grid.model;
  77540. a.set(u.id, u), s[u.id] = !0;
  77541. }), k(i, function(l) {
  77542. a.set(l.id, l), o[l.id] = !0, s[l.id] = !0;
  77543. }), a.each(function(l) {
  77544. var u = l.coordinateSystem, c = [];
  77545. k(u.getCartesians(), function(f, d) {
  77546. (et(n, f.getAxis("x").model) >= 0 || et(r, f.getAxis("y").model) >= 0) && c.push(f);
  77547. }), e.push({
  77548. panelId: "grid--" + l.id,
  77549. gridModel: l,
  77550. coordSysModel: l,
  77551. // Use the first one as the representitive coordSys.
  77552. coordSys: c[0],
  77553. coordSyses: c,
  77554. getPanelRect: x7.grid,
  77555. xAxisDeclared: o[l.id],
  77556. yAxisDeclared: s[l.id]
  77557. });
  77558. }));
  77559. },
  77560. geo: function(t, e) {
  77561. k(t.geoModels, function(n) {
  77562. var r = n.coordinateSystem;
  77563. e.push({
  77564. panelId: "geo--" + n.id,
  77565. geoModel: n,
  77566. coordSysModel: n,
  77567. coordSys: r,
  77568. coordSyses: [r],
  77569. getPanelRect: x7.geo
  77570. });
  77571. });
  77572. }
  77573. }, S7 = [
  77574. // grid
  77575. function(t, e) {
  77576. var n = t.xAxisModel, r = t.yAxisModel, i = t.gridModel;
  77577. return !i && n && (i = n.axis.grid.model), !i && r && (i = r.axis.grid.model), i && i === e.gridModel;
  77578. },
  77579. // geo
  77580. function(t, e) {
  77581. var n = t.geoModel;
  77582. return n && n === e.geoModel;
  77583. }
  77584. ], x7 = {
  77585. grid: function() {
  77586. return this.coordSys.master.getRect().clone();
  77587. },
  77588. geo: function() {
  77589. var t = this.coordSys, e = t.getBoundingRect().clone();
  77590. return e.applyTransform(ql(t)), e;
  77591. }
  77592. }, YP = {
  77593. lineX: Ue(w7, 0),
  77594. lineY: Ue(w7, 1),
  77595. rect: function(t, e, n, r) {
  77596. 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 = [kE([i[0], a[0]]), kE([i[1], a[1]])];
  77597. return {
  77598. values: o,
  77599. xyMinMax: o
  77600. };
  77601. },
  77602. polygon: function(t, e, n, r) {
  77603. var i = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], a = ce(n, function(o) {
  77604. var s = t ? e.pointToData(o, r) : e.dataToPoint(o, r);
  77605. 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;
  77606. });
  77607. return {
  77608. values: a,
  77609. xyMinMax: i
  77610. };
  77611. }
  77612. };
  77613. function w7(t, e, n, r) {
  77614. process.env.NODE_ENV !== "production" && ke(n.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d.");
  77615. var i = n.getAxis(["x", "y"][t]), a = kE(ce([0, 1], function(s) {
  77616. return e ? i.coordToData(i.toLocalCoord(r[s]), !0) : i.toGlobalCoord(i.dataToCoord(r[s]));
  77617. })), o = [];
  77618. return o[t] = a, o[1 - t] = [NaN, NaN], {
  77619. values: a,
  77620. xyMinMax: o
  77621. };
  77622. }
  77623. var C7 = {
  77624. lineX: Ue(T7, 0),
  77625. lineY: Ue(T7, 1),
  77626. rect: function(t, e, n) {
  77627. 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]]];
  77628. },
  77629. polygon: function(t, e, n) {
  77630. return ce(t, function(r, i) {
  77631. return [r[0] - n[0] * e[i][0], r[1] - n[1] * e[i][1]];
  77632. });
  77633. }
  77634. };
  77635. function T7(t, e, n, r) {
  77636. return [e[0] - r[t] * n[0], e[1] - r[t] * n[1]];
  77637. }
  77638. function hGe(t, e) {
  77639. var n = P7(t), r = P7(e), i = [n[0] / r[0], n[1] / r[1]];
  77640. return isNaN(i[0]) && (i[0] = 1), isNaN(i[1]) && (i[1] = 1), i;
  77641. }
  77642. function P7(t) {
  77643. return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN];
  77644. }
  77645. var LE = k, pGe = JDe("toolbox-dataZoom_"), vGe = (
  77646. /** @class */
  77647. function(t) {
  77648. q(e, t);
  77649. function e() {
  77650. return t !== null && t.apply(this, arguments) || this;
  77651. }
  77652. return e.prototype.render = function(n, r, i, a) {
  77653. this._brushController || (this._brushController = new eL(i.getZr()), this._brushController.on("brush", xe(this._onBrush, this)).mount()), yGe(n, r, this, a, i), mGe(n, r);
  77654. }, e.prototype.onclick = function(n, r, i) {
  77655. gGe[i].call(this);
  77656. }, e.prototype.remove = function(n, r) {
  77657. this._brushController && this._brushController.unmount();
  77658. }, e.prototype.dispose = function(n, r) {
  77659. this._brushController && this._brushController.dispose();
  77660. }, e.prototype._onBrush = function(n) {
  77661. var r = n.areas;
  77662. if (!n.isEnd || !r.length)
  77663. return;
  77664. var i = {}, a = this.ecModel;
  77665. this._brushController.updateCovers([]);
  77666. var o = new CL(TL(this.model), a, {
  77667. include: ["grid"]
  77668. });
  77669. o.matchOutputRanges(r, a, function(u, c, f) {
  77670. if (f.type === "cartesian2d") {
  77671. var d = u.brushType;
  77672. d === "rect" ? (s("x", f, c[0]), s("y", f, c[1])) : s({
  77673. lineX: "x",
  77674. lineY: "y"
  77675. }[d], f, c);
  77676. }
  77677. }), oGe(a, i), this._dispatchZoomAction(i);
  77678. function s(u, c, f) {
  77679. var d = c.getAxis(u), h = d.model, p = l(u, h, a), v = p.findRepresentativeAxisProxy(h).getMinMaxSpan();
  77680. (v.minValueSpan != null || v.maxValueSpan != null) && (f = Hf(0, f.slice(), d.scale.getExtent(), 0, v.minValueSpan, v.maxValueSpan)), p && (i[p.id] = {
  77681. dataZoomId: p.id,
  77682. startValue: f[0],
  77683. endValue: f[1]
  77684. });
  77685. }
  77686. function l(u, c, f) {
  77687. var d;
  77688. return f.eachComponent({
  77689. mainType: "dataZoom",
  77690. subType: "select"
  77691. }, function(h) {
  77692. var p = h.getAxisModel(u, c.componentIndex);
  77693. p && (d = h);
  77694. }), d;
  77695. }
  77696. }, e.prototype._dispatchZoomAction = function(n) {
  77697. var r = [];
  77698. LE(n, function(i, a) {
  77699. r.push(Le(i));
  77700. }), r.length && this.api.dispatchAction({
  77701. type: "dataZoom",
  77702. from: this.uid,
  77703. batch: r
  77704. });
  77705. }, e.getDefaultOption = function(n) {
  77706. var r = {
  77707. show: !0,
  77708. filterMode: "filter",
  77709. // Icon group
  77710. icon: {
  77711. zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
  77712. back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
  77713. },
  77714. // `zoom`, `back`
  77715. title: n.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
  77716. brushStyle: {
  77717. borderWidth: 0,
  77718. color: "rgba(210,219,238,0.2)"
  77719. }
  77720. };
  77721. return r;
  77722. }, e;
  77723. }(ga)
  77724. ), gGe = {
  77725. zoom: function() {
  77726. var t = !this._isZoomActive;
  77727. this.api.dispatchAction({
  77728. type: "takeGlobalCursor",
  77729. key: "dataZoomSelect",
  77730. dataZoomSelectActive: t
  77731. });
  77732. },
  77733. back: function() {
  77734. this._dispatchZoomAction(sGe(this.ecModel));
  77735. }
  77736. };
  77737. function TL(t) {
  77738. var e = {
  77739. xAxisIndex: t.get("xAxisIndex", !0),
  77740. yAxisIndex: t.get("yAxisIndex", !0),
  77741. xAxisId: t.get("xAxisId", !0),
  77742. yAxisId: t.get("yAxisId", !0)
  77743. };
  77744. return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e;
  77745. }
  77746. function mGe(t, e) {
  77747. t.setIconStatus("back", uGe(e) > 1 ? "emphasis" : "normal");
  77748. }
  77749. function yGe(t, e, n, r, i) {
  77750. var a = n._isZoomActive;
  77751. r && r.type === "takeGlobalCursor" && (a = r.key === "dataZoomSelect" ? r.dataZoomSelectActive : !1), n._isZoomActive = a, t.setIconStatus("zoom", a ? "emphasis" : "normal");
  77752. var o = new CL(TL(t), e, {
  77753. include: ["grid"]
  77754. }), s = o.makePanelOpts(i, function(l) {
  77755. return l.xAxisDeclared && !l.yAxisDeclared ? "lineX" : !l.xAxisDeclared && l.yAxisDeclared ? "lineY" : "rect";
  77756. });
  77757. n._brushController.setPanels(s).enableBrush(a && s.length ? {
  77758. brushType: "auto",
  77759. brushStyle: t.getModel("brushStyle").getItemStyle()
  77760. } : !1);
  77761. }
  77762. PLe("dataZoom", function(t) {
  77763. var e = t.getComponent("toolbox", 0), n = ["feature", "dataZoom"];
  77764. if (!e || e.get(n) == null)
  77765. return;
  77766. var r = e.getModel(n), i = [], a = TL(r), o = Dg(t, a);
  77767. LE(o.xAxisModels, function(l) {
  77768. return s(l, "xAxis", "xAxisIndex");
  77769. }), LE(o.yAxisModels, function(l) {
  77770. return s(l, "yAxis", "yAxisIndex");
  77771. });
  77772. function s(l, u, c) {
  77773. var f = l.componentIndex, d = {
  77774. type: "select",
  77775. $fromToolbox: !0,
  77776. // Default to be filter
  77777. filterMode: r.get("filterMode", !0) || "filter",
  77778. // Id for merge mapping.
  77779. id: pGe + u + f
  77780. };
  77781. d[c] = f, i.push(d);
  77782. }
  77783. return i;
  77784. });
  77785. function bGe(t) {
  77786. t.registerComponentModel(QHe), t.registerComponentView(GHe), Dd("saveAsImage", ZHe), Dd("magicType", XHe), Dd("dataView", iGe), Dd("dataZoom", vGe), Dd("restore", cGe), at(WHe);
  77787. }
  77788. var _Ge = (
  77789. /** @class */
  77790. function(t) {
  77791. q(e, t);
  77792. function e() {
  77793. var n = t !== null && t.apply(this, arguments) || this;
  77794. return n.type = e.type, n;
  77795. }
  77796. return e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
  77797. // zlevel: 0,
  77798. z: 60,
  77799. show: !0,
  77800. // tooltip main content
  77801. showContent: !0,
  77802. // 'trigger' only works on coordinate system.
  77803. // 'item' | 'axis' | 'none'
  77804. trigger: "item",
  77805. // 'click' | 'mousemove' | 'none'
  77806. triggerOn: "mousemove|click",
  77807. alwaysShowContent: !1,
  77808. displayMode: "single",
  77809. renderMode: "auto",
  77810. // whether restraint content inside viewRect.
  77811. // If renderMode: 'richText', default true.
  77812. // If renderMode: 'html', defaut false (for backward compat).
  77813. confine: null,
  77814. showDelay: 0,
  77815. hideDelay: 100,
  77816. // Animation transition time, unit is second
  77817. transitionDuration: 0.4,
  77818. enterable: !1,
  77819. backgroundColor: "#fff",
  77820. // box shadow
  77821. shadowBlur: 10,
  77822. shadowColor: "rgba(0, 0, 0, .2)",
  77823. shadowOffsetX: 1,
  77824. shadowOffsetY: 2,
  77825. // tooltip border radius, unit is px, default is 4
  77826. borderRadius: 4,
  77827. // tooltip border width, unit is px, default is 0 (no border)
  77828. borderWidth: 1,
  77829. // Tooltip inside padding, default is 5 for all direction
  77830. // Array is allowed to set up, right, bottom, left, same with css
  77831. // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.
  77832. padding: null,
  77833. // Extra css text
  77834. extraCssText: "",
  77835. // axis indicator, trigger by axis
  77836. axisPointer: {
  77837. // default is line
  77838. // legal values: 'line' | 'shadow' | 'cross'
  77839. type: "line",
  77840. // Valid when type is line, appoint tooltip line locate on which line. Optional
  77841. // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'
  77842. // default is 'auto', chose the axis which type is category.
  77843. // for multiply y axis, cartesian coord chose x axis, polar chose angle axis
  77844. axis: "auto",
  77845. animation: "auto",
  77846. animationDurationUpdate: 200,
  77847. animationEasingUpdate: "exponentialOut",
  77848. crossStyle: {
  77849. color: "#999",
  77850. width: 1,
  77851. type: "dashed",
  77852. // TODO formatter
  77853. textStyle: {}
  77854. }
  77855. // lineStyle and shadowStyle should not be specified here,
  77856. // otherwise it will always override those styles on option.axisPointer.
  77857. },
  77858. textStyle: {
  77859. color: "#666",
  77860. fontSize: 14
  77861. }
  77862. }, e;
  77863. }(rt)
  77864. );
  77865. function Zre(t) {
  77866. var e = t.get("confine");
  77867. return e != null ? !!e : t.get("renderMode") === "richText";
  77868. }
  77869. function Ure(t) {
  77870. if (vt.domSupported) {
  77871. for (var e = document.documentElement.style, n = 0, r = t.length; n < r; n++)
  77872. if (t[n] in e)
  77873. return t[n];
  77874. }
  77875. }
  77876. var Xre = Ure(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), OGe = Ure(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
  77877. function Yre(t, e) {
  77878. if (!t)
  77879. return e;
  77880. e = ek(e, !0);
  77881. var n = t.indexOf(e);
  77882. return t = n === -1 ? e : "-" + t.slice(0, n) + "-" + e, t.toLowerCase();
  77883. }
  77884. function SGe(t, e) {
  77885. var n = t.currentStyle || document.defaultView && document.defaultView.getComputedStyle(t);
  77886. return n ? n[e] : null;
  77887. }
  77888. var xGe = Yre(OGe, "transition"), PL = Yre(Xre, "transform"), wGe = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (vt.transform3dSupported ? "will-change:transform;" : "");
  77889. function CGe(t) {
  77890. return t = t === "left" ? "right" : t === "right" ? "left" : t === "top" ? "bottom" : "top", t;
  77891. }
  77892. function TGe(t, e, n) {
  77893. if (!Oe(n) || n === "inside")
  77894. return "";
  77895. var r = t.get("backgroundColor"), i = t.get("borderWidth");
  77896. e = Of(e);
  77897. var a = CGe(n), o = Math.max(Math.round(i) * 1.5, 6), s = "", l = PL + ":", u;
  77898. et(["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)");
  77899. 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;
  77900. s += ";" + a + ":-" + h + "px";
  77901. 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 + ";"];
  77902. return '<div style="' + v.join("") + '"></div>';
  77903. }
  77904. function PGe(t, e) {
  77905. var n = "cubic-bezier(0.23,1,0.32,1)", r = " " + t / 2 + "s " + n, i = "opacity" + r + ",visibility" + r;
  77906. return e || (r = " " + t + "s " + n, i += vt.transformSupported ? "," + PL + r : ",left" + r + ",top" + r), xGe + ":" + i;
  77907. }
  77908. function $7(t, e, n) {
  77909. var r = t.toFixed(0) + "px", i = e.toFixed(0) + "px";
  77910. if (!vt.transformSupported)
  77911. return n ? "top:" + i + ";left:" + r + ";" : [["top", i], ["left", r]];
  77912. var a = vt.transform3dSupported, o = "translate" + (a ? "3d" : "") + "(" + r + "," + i + (a ? ",0" : "") + ")";
  77913. return n ? "top:0;left:0;" + PL + ":" + o + ";" : [["top", 0], ["left", 0], [Xre, o]];
  77914. }
  77915. function $Ge(t) {
  77916. var e = [], n = t.get("fontSize"), r = t.getTextColor();
  77917. r && e.push("color:" + r), e.push("font:" + t.getFont()), n && e.push("line-height:" + Math.round(n * 3 / 2) + "px");
  77918. var i = t.get("textShadowColor"), a = t.get("textShadowBlur") || 0, o = t.get("textShadowOffsetX") || 0, s = t.get("textShadowOffsetY") || 0;
  77919. return i && a && e.push("text-shadow:" + o + "px " + s + "px " + a + "px " + i), k(["decoration", "align"], function(l) {
  77920. var u = t.get(l);
  77921. u && e.push("text-" + l + ":" + u);
  77922. }), e.join(";");
  77923. }
  77924. function AGe(t, e, n) {
  77925. 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 = iee(t, "html"), d = l + "px " + u + "px " + o + "px " + s;
  77926. return r.push("box-shadow:" + d), e && i && r.push(PGe(i, n)), a && r.push("background-color:" + a), k(["width", "color", "radius"], function(h) {
  77927. var p = "border-" + h, v = ek(p), g = t.get(v);
  77928. g != null && r.push(p + ":" + g + (h === "color" ? "" : "px"));
  77929. }), r.push($Ge(c)), f != null && r.push("padding:" + zf(f).join("px ") + "px"), r.join(";") + ";";
  77930. }
  77931. function A7(t, e, n, r, i) {
  77932. var a = e && e.painter;
  77933. if (n) {
  77934. var o = a && a.getViewportRoot();
  77935. o && SIe(t, o, n, r, i);
  77936. } else {
  77937. t[0] = r, t[1] = i;
  77938. var s = a && a.getViewportRootOffset();
  77939. s && (t[0] += s.offsetLeft, t[1] += s.offsetTop);
  77940. }
  77941. t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
  77942. }
  77943. var EGe = (
  77944. /** @class */
  77945. function() {
  77946. function t(e, n) {
  77947. if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, vt.wxa)
  77948. return null;
  77949. var r = document.createElement("div");
  77950. r.domBelongToZr = !0, this.el = r;
  77951. var i = this._zr = e.getZr(), a = n.appendTo, o = a && (Oe(a) ? document.querySelector(a) : au(a) ? a : Me(a) && a(e.getDom()));
  77952. A7(this._styleCoord, i, o, e.getWidth() / 2, e.getHeight() / 2), (o || e.getDom()).appendChild(r), this._api = e, this._container = o;
  77953. var s = this;
  77954. r.onmouseenter = function() {
  77955. s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0;
  77956. }, r.onmousemove = function(l) {
  77957. if (l = l || window.event, !s._enterable) {
  77958. var u = i.handler, c = i.painter.getViewportRoot();
  77959. ua(c, l, !0), u.dispatch("mousemove", l);
  77960. }
  77961. }, r.onmouseleave = function() {
  77962. s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay);
  77963. };
  77964. }
  77965. return t.prototype.update = function(e) {
  77966. if (!this._container) {
  77967. var n = this._api.getDom(), r = SGe(n, "position"), i = n.style;
  77968. i.position !== "absolute" && r !== "absolute" && (i.position = "relative");
  77969. }
  77970. var a = e.get("alwaysShowContent");
  77971. a && this._moveIfResized(), this._alwaysShowContent = a, this.el.className = e.get("className") || "";
  77972. }, t.prototype.show = function(e, n) {
  77973. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  77974. var r = this.el, i = r.style, a = this._styleCoord;
  77975. r.innerHTML ? i.cssText = wGe + AGe(e, !this._firstShow, this._longHide) + $7(a[0], a[1], !0) + ("border-color:" + Of(n) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
  77976. }, t.prototype.setContent = function(e, n, r, i, a) {
  77977. var o = this.el;
  77978. if (e == null) {
  77979. o.innerHTML = "";
  77980. return;
  77981. }
  77982. var s = "";
  77983. if (Oe(a) && r.get("trigger") === "item" && !Zre(r) && (s = TGe(r, i, a)), Oe(e))
  77984. o.innerHTML = e + s;
  77985. else if (e) {
  77986. o.innerHTML = "", ue(e) || (e = [e]);
  77987. for (var l = 0; l < e.length; l++)
  77988. au(e[l]) && e[l].parentNode !== o && o.appendChild(e[l]);
  77989. if (s && o.childNodes.length) {
  77990. var u = document.createElement("div");
  77991. u.innerHTML = s, o.appendChild(u);
  77992. }
  77993. }
  77994. }, t.prototype.setEnterable = function(e) {
  77995. this._enterable = e;
  77996. }, t.prototype.getSize = function() {
  77997. var e = this.el;
  77998. return [e.offsetWidth, e.offsetHeight];
  77999. }, t.prototype.moveTo = function(e, n) {
  78000. var r = this._styleCoord;
  78001. if (A7(r, this._zr, this._container, e, n), r[0] != null && r[1] != null) {
  78002. var i = this.el.style, a = $7(r[0], r[1]);
  78003. k(a, function(o) {
  78004. i[o[0]] = o[1];
  78005. });
  78006. }
  78007. }, t.prototype._moveIfResized = function() {
  78008. var e = this._styleCoord[2], n = this._styleCoord[3];
  78009. this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
  78010. }, t.prototype.hide = function() {
  78011. var e = this, n = this.el.style;
  78012. n.visibility = "hidden", n.opacity = "0", vt.transform3dSupported && (n.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
  78013. return e._longHide = !0;
  78014. }, 500);
  78015. }, t.prototype.hideLater = function(e) {
  78016. this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(xe(this.hide, this), e)) : this.hide());
  78017. }, t.prototype.isShow = function() {
  78018. return this._show;
  78019. }, t.prototype.dispose = function() {
  78020. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  78021. var e = this.el.parentNode;
  78022. e && e.removeChild(this.el), this.el = this._container = null;
  78023. }, t;
  78024. }()
  78025. ), MGe = (
  78026. /** @class */
  78027. function() {
  78028. function t(e) {
  78029. this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = e.getZr(), M7(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
  78030. }
  78031. return t.prototype.update = function(e) {
  78032. var n = e.get("alwaysShowContent");
  78033. n && this._moveIfResized(), this._alwaysShowContent = n;
  78034. }, t.prototype.show = function() {
  78035. this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
  78036. }, t.prototype.setContent = function(e, n, r, i, a) {
  78037. var o = this;
  78038. Ie(e) && Et(process.env.NODE_ENV !== "production" ? "Passing DOM nodes as content is not supported in richText tooltip!" : ""), this.el && this._zr.remove(this.el);
  78039. var s = r.getModel("textStyle");
  78040. this.el = new gt({
  78041. style: {
  78042. rich: n.richTextStyles,
  78043. text: e,
  78044. lineHeight: 22,
  78045. borderWidth: 1,
  78046. borderColor: i,
  78047. textShadowColor: s.get("textShadowColor"),
  78048. fill: r.get(["textStyle", "color"]),
  78049. padding: iee(r, "richText"),
  78050. verticalAlign: "top",
  78051. align: "left"
  78052. },
  78053. z: r.get("z")
  78054. }), k(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(u) {
  78055. o.el.style[u] = r.get(u);
  78056. }), k(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], function(u) {
  78057. o.el.style[u] = s.get(u) || 0;
  78058. }), this._zr.add(this.el);
  78059. var l = this;
  78060. this.el.on("mouseover", function() {
  78061. l._enterable && (clearTimeout(l._hideTimeout), l._show = !0), l._inContent = !0;
  78062. }), this.el.on("mouseout", function() {
  78063. l._enterable && l._show && l.hideLater(l._hideDelay), l._inContent = !1;
  78064. });
  78065. }, t.prototype.setEnterable = function(e) {
  78066. this._enterable = e;
  78067. }, t.prototype.getSize = function() {
  78068. var e = this.el, n = this.el.getBoundingRect(), r = E7(e.style);
  78069. return [n.width + r.left + r.right, n.height + r.top + r.bottom];
  78070. }, t.prototype.moveTo = function(e, n) {
  78071. var r = this.el;
  78072. if (r) {
  78073. var i = this._styleCoord;
  78074. M7(i, this._zr, e, n), e = i[0], n = i[1];
  78075. var a = r.style, o = xl(a.borderWidth || 0), s = E7(a);
  78076. r.x = e + o + s.left, r.y = n + o + s.top, r.markRedraw();
  78077. }
  78078. }, t.prototype._moveIfResized = function() {
  78079. var e = this._styleCoord[2], n = this._styleCoord[3];
  78080. this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
  78081. }, t.prototype.hide = function() {
  78082. this.el && this.el.hide(), this._show = !1;
  78083. }, t.prototype.hideLater = function(e) {
  78084. this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(xe(this.hide, this), e)) : this.hide());
  78085. }, t.prototype.isShow = function() {
  78086. return this._show;
  78087. }, t.prototype.dispose = function() {
  78088. this._zr.remove(this.el);
  78089. }, t;
  78090. }()
  78091. );
  78092. function xl(t) {
  78093. return Math.max(0, t);
  78094. }
  78095. function E7(t) {
  78096. var e = xl(t.shadowBlur || 0), n = xl(t.shadowOffsetX || 0), r = xl(t.shadowOffsetY || 0);
  78097. return {
  78098. left: xl(e - n),
  78099. right: xl(e + n),
  78100. top: xl(e - r),
  78101. bottom: xl(e + r)
  78102. };
  78103. }
  78104. function M7(t, e, n, r) {
  78105. t[0] = n, t[1] = r, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
  78106. }
  78107. var IGe = new mt({
  78108. shape: {
  78109. x: -1,
  78110. y: -1,
  78111. width: 2,
  78112. height: 2
  78113. }
  78114. }), DGe = (
  78115. /** @class */
  78116. function(t) {
  78117. q(e, t);
  78118. function e() {
  78119. var n = t !== null && t.apply(this, arguments) || this;
  78120. return n.type = e.type, n;
  78121. }
  78122. return e.prototype.init = function(n, r) {
  78123. if (!(vt.node || !r.getDom())) {
  78124. var i = n.getComponent("tooltip"), a = this._renderMode = oRe(i.get("renderMode"));
  78125. this._tooltipContent = a === "richText" ? new MGe(r) : new EGe(r, {
  78126. appendTo: i.get("appendToBody", !0) ? "body" : i.get("appendTo", !0)
  78127. });
  78128. }
  78129. }, e.prototype.render = function(n, r, i) {
  78130. if (!(vt.node || !i.getDom())) {
  78131. this.group.removeAll(), this._tooltipModel = n, this._ecModel = r, this._api = i;
  78132. var a = this._tooltipContent;
  78133. a.update(n), a.setEnterable(n.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && n.get("transitionDuration") ? Pp(this, "_updatePosition", 50, "fixRate") : Im(this, "_updatePosition");
  78134. }
  78135. }, e.prototype._initGlobalListener = function() {
  78136. var n = this._tooltipModel, r = n.get("triggerOn");
  78137. Rre("itemTooltip", this._api, xe(function(i, a, o) {
  78138. r !== "none" && (r.indexOf(i) >= 0 ? this._tryShow(a, o) : i === "leave" && this._hide(o));
  78139. }, this));
  78140. }, e.prototype._keepShow = function() {
  78141. var n = this._tooltipModel, r = this._ecModel, i = this._api, a = n.get("triggerOn");
  78142. if (this._lastX != null && this._lastY != null && a !== "none" && a !== "click") {
  78143. var o = this;
  78144. clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
  78145. !i.isDisposed() && o.manuallyShowTip(n, r, i, {
  78146. x: o._lastX,
  78147. y: o._lastY,
  78148. dataByCoordSys: o._lastDataByCoordSys
  78149. });
  78150. });
  78151. }
  78152. }, e.prototype.manuallyShowTip = function(n, r, i, a) {
  78153. if (!(a.from === this.uid || vt.node || !i.getDom())) {
  78154. var o = I7(a, i);
  78155. this._ticket = "";
  78156. var s = a.dataByCoordSys, l = NGe(a, r, i);
  78157. if (l) {
  78158. var u = l.el.getBoundingRect().clone();
  78159. u.applyTransform(l.el.transform), this._tryShow({
  78160. offsetX: u.x + u.width / 2,
  78161. offsetY: u.y + u.height / 2,
  78162. target: l.el,
  78163. position: a.position,
  78164. // When manully trigger, the mouse is not on the el, so we'd better to
  78165. // position tooltip on the bottom of the el and display arrow is possible.
  78166. positionDefault: "bottom"
  78167. }, o);
  78168. } else if (a.tooltip && a.x != null && a.y != null) {
  78169. var c = IGe;
  78170. c.x = a.x, c.y = a.y, c.update(), Fe(c).tooltipConfig = {
  78171. name: null,
  78172. option: a.tooltip
  78173. }, this._tryShow({
  78174. offsetX: a.x,
  78175. offsetY: a.y,
  78176. target: c
  78177. }, o);
  78178. } else if (s)
  78179. this._tryShow({
  78180. offsetX: a.x,
  78181. offsetY: a.y,
  78182. position: a.position,
  78183. dataByCoordSys: s,
  78184. tooltipOption: a.tooltipOption
  78185. }, o);
  78186. else if (a.seriesIndex != null) {
  78187. if (this._manuallyAxisShowTip(n, r, i, a))
  78188. return;
  78189. var f = kre(a, r), d = f.point[0], h = f.point[1];
  78190. d != null && h != null && this._tryShow({
  78191. offsetX: d,
  78192. offsetY: h,
  78193. target: f.el,
  78194. position: a.position,
  78195. // When manully trigger, the mouse is not on the el, so we'd better to
  78196. // position tooltip on the bottom of the el and display arrow is possible.
  78197. positionDefault: "bottom"
  78198. }, o);
  78199. } else a.x != null && a.y != null && (i.dispatchAction({
  78200. type: "updateAxisPointer",
  78201. x: a.x,
  78202. y: a.y
  78203. }), this._tryShow({
  78204. offsetX: a.x,
  78205. offsetY: a.y,
  78206. position: a.position,
  78207. target: i.getZr().findHover(a.x, a.y).target
  78208. }, o));
  78209. }
  78210. }, e.prototype.manuallyHideTip = function(n, r, i, a) {
  78211. var o = this._tooltipContent;
  78212. this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, a.from !== this.uid && this._hide(I7(a, i));
  78213. }, e.prototype._manuallyAxisShowTip = function(n, r, i, a) {
  78214. var o = a.seriesIndex, s = a.dataIndex, l = r.getComponent("axisPointer").coordSysAxesInfo;
  78215. if (!(o == null || s == null || l == null)) {
  78216. var u = r.getSeriesByIndex(o);
  78217. if (u) {
  78218. var c = u.getData(), f = Tv([c.getItemModel(s), u, (u.coordinateSystem || {}).model], this._tooltipModel);
  78219. if (f.get("trigger") === "axis")
  78220. return i.dispatchAction({
  78221. type: "updateAxisPointer",
  78222. seriesIndex: o,
  78223. dataIndex: s,
  78224. position: a.position
  78225. }), !0;
  78226. }
  78227. }
  78228. }, e.prototype._tryShow = function(n, r) {
  78229. var i = n.target, a = this._tooltipModel;
  78230. if (a) {
  78231. this._lastX = n.offsetX, this._lastY = n.offsetY;
  78232. var o = n.dataByCoordSys;
  78233. if (o && o.length)
  78234. this._showAxisTooltip(o, n);
  78235. else if (i) {
  78236. var s = Fe(i);
  78237. if (s.ssrType === "legend")
  78238. return;
  78239. this._lastDataByCoordSys = null;
  78240. var l, u;
  78241. Bc(i, function(c) {
  78242. if (Fe(c).dataIndex != null)
  78243. return l = c, !0;
  78244. if (Fe(c).tooltipConfig != null)
  78245. return u = c, !0;
  78246. }, !0), l ? this._showSeriesItemTooltip(n, l, r) : u ? this._showComponentItemTooltip(n, u, r) : this._hide(r);
  78247. } else
  78248. this._lastDataByCoordSys = null, this._hide(r);
  78249. }
  78250. }, e.prototype._showOrMove = function(n, r) {
  78251. var i = n.get("showDelay");
  78252. r = xe(r, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(r, i) : r();
  78253. }, e.prototype._showAxisTooltip = function(n, r) {
  78254. var i = this._ecModel, a = this._tooltipModel, o = [r.offsetX, r.offsetY], s = Tv([r.tooltipOption], a), l = this._renderMode, u = [], c = tr("section", {
  78255. blocks: [],
  78256. noHeader: !0
  78257. }), f = [], d = new RT();
  78258. k(n, function(y) {
  78259. k(y.dataByAxis, function(b) {
  78260. var _ = i.getComponent(b.axisDim + "Axis", b.axisIndex), O = b.value;
  78261. if (!(!_ || O == null)) {
  78262. var S = Mre(O, _.axis, i, b.seriesDataIndices, b.valueLabelOpt), x = tr("section", {
  78263. header: S,
  78264. noHeader: !ba(S),
  78265. sortBlocks: !0,
  78266. blocks: []
  78267. });
  78268. c.blocks.push(x), k(b.seriesDataIndices, function(C) {
  78269. var T = i.getSeriesByIndex(C.seriesIndex), w = C.dataIndexInside, P = T.getDataParams(w);
  78270. if (!(P.dataIndex < 0)) {
  78271. P.axisDim = b.axisDim, P.axisIndex = b.axisIndex, P.axisType = b.axisType, P.axisId = b.axisId, P.axisValue = $k(_.axis, {
  78272. value: O
  78273. }), P.axisValueLabel = S, P.marker = d.makeTooltipMarker("item", Of(P.color), l);
  78274. var $ = vz(T.formatTooltip(w, !0, null)), A = $.frag;
  78275. if (A) {
  78276. var D = Tv([T], a).get("valueFormatter");
  78277. x.blocks.push(D ? le({
  78278. valueFormatter: D
  78279. }, A) : A);
  78280. }
  78281. $.text && f.push($.text), u.push(P);
  78282. }
  78283. });
  78284. }
  78285. });
  78286. }), c.blocks.reverse(), f.reverse();
  78287. var h = r.position, p = s.get("order"), v = Oz(c, d, l, p, i.get("useUTC"), s.get("textStyle"));
  78288. v && f.unshift(v);
  78289. var g = l === "richText" ? `
  78290. ` : "<br/>", m = f.join(g);
  78291. this._showOrMove(s, function() {
  78292. 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);
  78293. });
  78294. }, e.prototype._showSeriesItemTooltip = function(n, r, i) {
  78295. var a = this._ecModel, o = Fe(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 = Tv([d.getItemModel(c), u, l && (l.coordinateSystem || {}).model], this._tooltipModel, p ? {
  78296. position: p
  78297. } : null), g = v.get("trigger");
  78298. if (!(g != null && g !== "item")) {
  78299. var m = u.getDataParams(c, f), y = new RT();
  78300. m.marker = y.makeTooltipMarker("item", Of(m.color), h);
  78301. var b = vz(u.formatTooltip(c, !1, f)), _ = v.get("order"), O = v.get("valueFormatter"), S = b.frag, x = S ? Oz(O ? le({
  78302. valueFormatter: O
  78303. }, S) : S, y, h, _, a.get("useUTC"), v.get("textStyle")) : b.text, C = "item_" + u.name + "_" + c;
  78304. this._showOrMove(v, function() {
  78305. this._showTooltipContent(v, x, m, C, n.offsetX, n.offsetY, n.position, n.target, y);
  78306. }), i({
  78307. type: "showTip",
  78308. dataIndexInside: c,
  78309. dataIndex: d.getRawIndex(c),
  78310. seriesIndex: s,
  78311. from: this.uid
  78312. });
  78313. }
  78314. }, e.prototype._showComponentItemTooltip = function(n, r, i) {
  78315. var a = this._renderMode === "html", o = Fe(r), s = o.tooltipConfig, l = s.option || {}, u = l.encodeHTMLContent;
  78316. if (Oe(l)) {
  78317. var c = l;
  78318. l = {
  78319. content: c,
  78320. // Fixed formatter
  78321. formatter: c
  78322. }, u = !0;
  78323. }
  78324. u && a && l.content && (l = Le(l), l.content = jr(l.content));
  78325. var f = [l], d = this._ecModel.getComponent(o.componentMainType, o.componentIndex);
  78326. d && f.push(d), f.push({
  78327. formatter: l.content
  78328. });
  78329. var h = n.positionDefault, p = Tv(f, this._tooltipModel, h ? {
  78330. position: h
  78331. } : null), v = p.get("content"), g = Math.random() + "", m = new RT();
  78332. this._showOrMove(p, function() {
  78333. var y = Le(p.get("formatterParams") || {});
  78334. this._showTooltipContent(p, v, y, g, n.offsetX, n.offsetY, n.position, r, m);
  78335. }), i({
  78336. type: "showTip",
  78337. from: this.uid
  78338. });
  78339. }, e.prototype._showTooltipContent = function(n, r, i, a, o, s, l, u, c) {
  78340. if (this._ticket = "", !(!n.get("showContent") || !n.get("show"))) {
  78341. var f = this._tooltipContent;
  78342. f.setEnterable(n.get("enterable"));
  78343. var d = n.get("formatter");
  78344. l = l || n.get("position");
  78345. var h = r, p = this._getNearestPoint([o, s], i, n.get("trigger"), n.get("borderColor")), v = p.color;
  78346. if (d)
  78347. if (Oe(d)) {
  78348. var g = n.ecModel.get("useUTC"), m = ue(i) ? i[0] : i, y = m && m.axisType && m.axisType.indexOf("time") >= 0;
  78349. h = d, y && (h = H0(m.axisValue, h, g)), h = tk(h, i, !0);
  78350. } else if (Me(d)) {
  78351. var b = xe(function(_, O) {
  78352. _ === this._ticket && (f.setContent(O, c, n, v, l), this._updatePosition(n, l, o, s, f, i, u));
  78353. }, this);
  78354. this._ticket = a, h = d(i, a, b);
  78355. } else
  78356. h = d;
  78357. f.setContent(h, c, n, v, l), f.show(n, v), this._updatePosition(n, l, o, s, f, i, u);
  78358. }
  78359. }, e.prototype._getNearestPoint = function(n, r, i, a) {
  78360. if (i === "axis" || ue(r))
  78361. return {
  78362. color: a || (this._renderMode === "html" ? "#fff" : "none")
  78363. };
  78364. if (!ue(r))
  78365. return {
  78366. color: a || r.color || r.borderColor
  78367. };
  78368. }, e.prototype._updatePosition = function(n, r, i, a, o, s, l) {
  78369. var u = this._api.getWidth(), c = this._api.getHeight();
  78370. r = r || n.get("position");
  78371. var f = o.getSize(), d = n.get("align"), h = n.get("verticalAlign"), p = l && l.getBoundingRect().clone();
  78372. if (l && p.applyTransform(l.transform), Me(r) && (r = r([i, a], s, o.el, p, {
  78373. viewSize: [u, c],
  78374. contentSize: f.slice()
  78375. })), ue(r))
  78376. i = _e(r[0], u), a = _e(r[1], c);
  78377. else if (Ie(r)) {
  78378. var v = r;
  78379. v.width = f[0], v.height = f[1];
  78380. var g = Rn(v, {
  78381. width: u,
  78382. height: c
  78383. });
  78384. i = g.x, a = g.y, d = null, h = null;
  78385. } else if (Oe(r) && l) {
  78386. var m = LGe(r, p, f, n.get("borderWidth"));
  78387. i = m[0], a = m[1];
  78388. } else {
  78389. var m = RGe(i, a, o, u, c, d ? null : 20, h ? null : 20);
  78390. i = m[0], a = m[1];
  78391. }
  78392. if (d && (i -= D7(d) ? f[0] / 2 : d === "right" ? f[0] : 0), h && (a -= D7(h) ? f[1] / 2 : h === "bottom" ? f[1] : 0), Zre(n)) {
  78393. var m = kGe(i, a, o, u, c);
  78394. i = m[0], a = m[1];
  78395. }
  78396. o.moveTo(i, a);
  78397. }, e.prototype._updateContentNotChangedOnAxis = function(n, r) {
  78398. var i = this._lastDataByCoordSys, a = this._cbParamsList, o = !!i && i.length === n.length;
  78399. return o && k(i, function(s, l) {
  78400. var u = s.dataByAxis || [], c = n[l] || {}, f = c.dataByAxis || [];
  78401. o = o && u.length === f.length, o && k(u, function(d, h) {
  78402. var p = f[h] || {}, v = d.seriesDataIndices || [], g = p.seriesDataIndices || [];
  78403. o = o && d.value === p.value && d.axisType === p.axisType && d.axisId === p.axisId && v.length === g.length, o && k(v, function(m, y) {
  78404. var b = g[y];
  78405. o = o && m.seriesIndex === b.seriesIndex && m.dataIndex === b.dataIndex;
  78406. }), a && k(d.seriesDataIndices, function(m) {
  78407. var y = m.seriesIndex, b = r[y], _ = a[y];
  78408. b && _ && _.data !== b.data && (o = !1);
  78409. });
  78410. });
  78411. }), this._lastDataByCoordSys = n, this._cbParamsList = r, !!o;
  78412. }, e.prototype._hide = function(n) {
  78413. this._lastDataByCoordSys = null, n({
  78414. type: "hideTip",
  78415. from: this.uid
  78416. });
  78417. }, e.prototype.dispose = function(n, r) {
  78418. vt.node || !r.getDom() || (Im(this, "_updatePosition"), this._tooltipContent.dispose(), ME("itemTooltip", r));
  78419. }, e.type = "tooltip", e;
  78420. }(Xt)
  78421. );
  78422. function Tv(t, e, n) {
  78423. var r = e.ecModel, i;
  78424. n ? (i = new Wt(n, r, r), i = new Wt(e.option, i, r)) : i = e;
  78425. for (var a = t.length - 1; a >= 0; a--) {
  78426. var o = t[a];
  78427. o && (o instanceof Wt && (o = o.get("tooltip", !0)), Oe(o) && (o = {
  78428. formatter: o
  78429. }), o && (i = new Wt(o, i, r)));
  78430. }
  78431. return i;
  78432. }
  78433. function I7(t, e) {
  78434. return t.dispatchAction || xe(e.dispatchAction, e);
  78435. }
  78436. function RGe(t, e, n, r, i, a, o) {
  78437. var s = n.getSize(), l = s[0], u = s[1];
  78438. 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];
  78439. }
  78440. function kGe(t, e, n, r, i) {
  78441. var a = n.getSize(), o = a[0], s = a[1];
  78442. 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];
  78443. }
  78444. function LGe(t, e, n, r) {
  78445. var i = n[0], a = n[1], o = Math.ceil(Math.SQRT2 * r) + 8, s = 0, l = 0, u = e.width, c = e.height;
  78446. switch (t) {
  78447. case "inside":
  78448. s = e.x + u / 2 - i / 2, l = e.y + c / 2 - a / 2;
  78449. break;
  78450. case "top":
  78451. s = e.x + u / 2 - i / 2, l = e.y - a - o;
  78452. break;
  78453. case "bottom":
  78454. s = e.x + u / 2 - i / 2, l = e.y + c + o;
  78455. break;
  78456. case "left":
  78457. s = e.x - i - o, l = e.y + c / 2 - a / 2;
  78458. break;
  78459. case "right":
  78460. s = e.x + u + o, l = e.y + c / 2 - a / 2;
  78461. }
  78462. return [s, l];
  78463. }
  78464. function D7(t) {
  78465. return t === "center" || t === "middle";
  78466. }
  78467. function NGe(t, e, n) {
  78468. var r = MR(t).queryOptionMap, i = r.keys()[0];
  78469. if (!(!i || i === "series")) {
  78470. var a = B0(e, i, r.get(i), {
  78471. useDefault: !1,
  78472. enableAll: !1,
  78473. enableNone: !1
  78474. }), o = a.models[0];
  78475. if (o) {
  78476. var s = n.getViewOfComponentModel(o), l;
  78477. if (s.group.traverse(function(u) {
  78478. var c = Fe(u).tooltipConfig;
  78479. if (c && c.name === t.name)
  78480. return l = u, !0;
  78481. }), l)
  78482. return {
  78483. componentMainType: i,
  78484. componentIndex: o.componentIndex,
  78485. el: l
  78486. };
  78487. }
  78488. }
  78489. }
  78490. function BGe(t) {
  78491. at(ty), t.registerComponentModel(_Ge), t.registerComponentView(DGe), t.registerAction({
  78492. type: "showTip",
  78493. event: "showTip",
  78494. update: "tooltip:manuallyShowTip"
  78495. }, On), t.registerAction({
  78496. type: "hideTip",
  78497. event: "hideTip",
  78498. update: "tooltip:manuallyHideTip"
  78499. }, On);
  78500. }
  78501. var zGe = ["rect", "polygon", "keep", "clear"];
  78502. function VGe(t, e) {
  78503. var n = Qt(t ? t.brush : []);
  78504. if (n.length) {
  78505. var r = [];
  78506. k(n, function(l) {
  78507. var u = l.hasOwnProperty("toolbox") ? l.toolbox : [];
  78508. u instanceof Array && (r = r.concat(u));
  78509. });
  78510. var i = t && t.toolbox;
  78511. ue(i) && (i = i[0]), i || (i = {
  78512. feature: {}
  78513. }, t.toolbox = [i]);
  78514. var a = i.feature || (i.feature = {}), o = a.brush || (a.brush = {}), s = o.type || (o.type = []);
  78515. s.push.apply(s, r), FGe(s), e && !s.length && s.push.apply(s, zGe);
  78516. }
  78517. }
  78518. function FGe(t) {
  78519. var e = {};
  78520. k(t, function(n) {
  78521. e[n] = 1;
  78522. }), t.length = 0, k(e, function(n, r) {
  78523. t.push(r);
  78524. });
  78525. }
  78526. var R7 = k;
  78527. function k7(t) {
  78528. if (t) {
  78529. for (var e in t)
  78530. if (t.hasOwnProperty(e))
  78531. return !0;
  78532. }
  78533. }
  78534. function NE(t, e, n) {
  78535. var r = {};
  78536. return R7(e, function(a) {
  78537. var o = r[a] = i();
  78538. R7(t[a], function(s, l) {
  78539. if (qn.isValidType(l)) {
  78540. var u = {
  78541. type: l,
  78542. visual: s
  78543. };
  78544. n && n(u, a), o[l] = new qn(u), l === "opacity" && (u = Le(u), u.type = "colorAlpha", o.__hidden.__alphaForOpacity = new qn(u));
  78545. }
  78546. });
  78547. }), r;
  78548. function i() {
  78549. var a = function() {
  78550. };
  78551. a.prototype.__hidden = a.prototype;
  78552. var o = new a();
  78553. return o;
  78554. }
  78555. }
  78556. function qre(t, e, n) {
  78557. var r;
  78558. k(n, function(i) {
  78559. e.hasOwnProperty(i) && k7(e[i]) && (r = !0);
  78560. }), r && k(n, function(i) {
  78561. e.hasOwnProperty(i) && k7(e[i]) ? t[i] = Le(e[i]) : delete t[i];
  78562. });
  78563. }
  78564. function WGe(t, e, n, r, i, a) {
  78565. var o = {};
  78566. k(t, function(f) {
  78567. var d = qn.prepareVisualTypes(e[f]);
  78568. o[f] = d;
  78569. });
  78570. var s;
  78571. function l(f) {
  78572. return fk(n, s, f);
  78573. }
  78574. function u(f, d) {
  78575. pee(n, s, f, d);
  78576. }
  78577. n.each(c);
  78578. function c(f, d) {
  78579. s = f;
  78580. var h = n.getRawDataItem(s);
  78581. if (!(h && h.visualMap === !1))
  78582. for (var p = r.call(i, f), v = e[p], g = o[p], m = 0, y = g.length; m < y; m++) {
  78583. var b = g[m];
  78584. v[b] && v[b].applyVisual(f, l, u);
  78585. }
  78586. }
  78587. }
  78588. function QGe(t, e, n, r) {
  78589. var i = {};
  78590. return k(t, function(a) {
  78591. var o = qn.prepareVisualTypes(e[a]);
  78592. i[a] = o;
  78593. }), {
  78594. progress: function(o, s) {
  78595. var l;
  78596. r != null && (l = s.getDimensionIndex(r));
  78597. function u(O) {
  78598. return fk(s, f, O);
  78599. }
  78600. function c(O, S) {
  78601. pee(s, f, O, S);
  78602. }
  78603. for (var f, d = s.getStore(); (f = o.next()) != null; ) {
  78604. var h = s.getRawDataItem(f);
  78605. if (!(h && h.visualMap === !1))
  78606. for (var p = r != null ? d.get(l, f) : f, v = n(p), g = e[v], m = i[v], y = 0, b = m.length; y < b; y++) {
  78607. var _ = m[y];
  78608. g[_] && g[_].applyVisual(p, u, c);
  78609. }
  78610. }
  78611. }
  78612. };
  78613. }
  78614. function HGe(t) {
  78615. var e = t.brushType, n = {
  78616. point: function(r) {
  78617. return L7[e].point(r, n, t);
  78618. },
  78619. rect: function(r) {
  78620. return L7[e].rect(r, n, t);
  78621. }
  78622. };
  78623. return n;
  78624. }
  78625. var L7 = {
  78626. lineX: N7(0),
  78627. lineY: N7(1),
  78628. rect: {
  78629. point: function(t, e, n) {
  78630. return t && n.boundingRect.contain(t[0], t[1]);
  78631. },
  78632. rect: function(t, e, n) {
  78633. return t && n.boundingRect.intersect(t);
  78634. }
  78635. },
  78636. polygon: {
  78637. point: function(t, e, n) {
  78638. return t && n.boundingRect.contain(t[0], t[1]) && Sc(n.range, t[0], t[1]);
  78639. },
  78640. rect: function(t, e, n) {
  78641. var r = n.range;
  78642. if (!t || r.length <= 1)
  78643. return !1;
  78644. var i = t.x, a = t.y, o = t.width, s = t.height, l = r[0];
  78645. if (Sc(r, i, a) || Sc(r, i + o, a) || Sc(r, i, a + s) || Sc(r, i + o, a + s) || Je.create(t).contain(l[0], l[1]) || Yv(i, a, i + o, a, r) || Yv(i, a, i, a + s, r) || Yv(i + o, a, i + o, a + s, r) || Yv(i, a + s, i + o, a + s, r))
  78646. return !0;
  78647. }
  78648. }
  78649. };
  78650. function N7(t) {
  78651. var e = ["x", "y"], n = ["width", "height"];
  78652. return {
  78653. point: function(r, i, a) {
  78654. if (r) {
  78655. var o = a.range, s = r[t];
  78656. return Pv(s, o);
  78657. }
  78658. },
  78659. rect: function(r, i, a) {
  78660. if (r) {
  78661. var o = a.range, s = [r[e[t]], r[e[t]] + r[n[t]]];
  78662. return s[1] < s[0] && s.reverse(), Pv(s[0], o) || Pv(s[1], o) || Pv(o[0], s) || Pv(o[1], s);
  78663. }
  78664. }
  78665. };
  78666. }
  78667. function Pv(t, e) {
  78668. return e[0] <= t && t <= e[1];
  78669. }
  78670. var B7 = ["inBrush", "outOfBrush"], qP = "__ecBrushSelect", BE = "__ecInBrushSelectEvent";
  78671. function Kre(t) {
  78672. t.eachComponent({
  78673. mainType: "brush"
  78674. }, function(e) {
  78675. var n = e.brushTargetManager = new CL(e.option, t);
  78676. n.setInputRanges(e.areas, t);
  78677. });
  78678. }
  78679. function GGe(t, e, n) {
  78680. var r = [], i, a;
  78681. t.eachComponent({
  78682. mainType: "brush"
  78683. }, function(o) {
  78684. n && n.type === "takeGlobalCursor" && o.setBrushOption(n.key === "brush" ? n.brushOption : {
  78685. brushType: !1
  78686. });
  78687. }), Kre(t), t.eachComponent({
  78688. mainType: "brush"
  78689. }, function(o, s) {
  78690. var l = {
  78691. brushId: o.id,
  78692. brushIndex: s,
  78693. brushName: o.name,
  78694. areas: Le(o.areas),
  78695. selected: []
  78696. };
  78697. r.push(l);
  78698. var u = o.option, c = u.brushLink, f = [], d = [], h = [], p = !1;
  78699. s || (i = u.throttleType, a = u.throttleDelay);
  78700. var v = ce(o.areas, function(O) {
  78701. var S = XGe[O.brushType], x = Re({
  78702. boundingRect: S ? S(O) : void 0
  78703. }, O);
  78704. return x.selectors = HGe(x), x;
  78705. }), g = NE(o.option, B7, function(O) {
  78706. O.mappingMethod = "fixed";
  78707. });
  78708. ue(c) && k(c, function(O) {
  78709. f[O] = 1;
  78710. });
  78711. function m(O) {
  78712. return c === "all" || !!f[O];
  78713. }
  78714. function y(O) {
  78715. return !!O.length;
  78716. }
  78717. t.eachSeries(function(O, S) {
  78718. var x = h[S] = [];
  78719. O.subType === "parallel" ? b(O, S) : _(O, S, x);
  78720. });
  78721. function b(O, S) {
  78722. var x = O.coordinateSystem;
  78723. p = p || x.hasAxisBrushed(), m(S) && x.eachActiveState(O.getData(), function(C, T) {
  78724. C === "active" && (d[T] = 1);
  78725. });
  78726. }
  78727. function _(O, S, x) {
  78728. if (!(!O.brushSelector || UGe(o, S)) && (k(v, function(T) {
  78729. o.brushTargetManager.controlSeries(T, O, t) && x.push(T), p = p || y(x);
  78730. }), m(S) && y(x))) {
  78731. var C = O.getData();
  78732. C.each(function(T) {
  78733. z7(O, x, C, T) && (d[T] = 1);
  78734. });
  78735. }
  78736. }
  78737. t.eachSeries(function(O, S) {
  78738. var x = {
  78739. seriesId: O.id,
  78740. seriesIndex: S,
  78741. seriesName: O.name,
  78742. dataIndex: []
  78743. };
  78744. l.selected.push(x);
  78745. var C = h[S], T = O.getData(), w = m(S) ? function(P) {
  78746. return d[P] ? (x.dataIndex.push(T.getRawIndex(P)), "inBrush") : "outOfBrush";
  78747. } : function(P) {
  78748. return z7(O, C, T, P) ? (x.dataIndex.push(T.getRawIndex(P)), "inBrush") : "outOfBrush";
  78749. };
  78750. (m(S) ? p : y(C)) && WGe(B7, g, T, w);
  78751. });
  78752. }), jGe(e, i, a, r, n);
  78753. }
  78754. function jGe(t, e, n, r, i) {
  78755. if (i) {
  78756. var a = t.getZr();
  78757. if (!a[BE]) {
  78758. a[qP] || (a[qP] = ZGe);
  78759. var o = Pp(a, qP, n, e);
  78760. o(t, r);
  78761. }
  78762. }
  78763. }
  78764. function ZGe(t, e) {
  78765. if (!t.isDisposed()) {
  78766. var n = t.getZr();
  78767. n[BE] = !0, t.dispatchAction({
  78768. type: "brushSelect",
  78769. batch: e
  78770. }), n[BE] = !1;
  78771. }
  78772. }
  78773. function z7(t, e, n, r) {
  78774. for (var i = 0, a = e.length; i < a; i++) {
  78775. var o = e[i];
  78776. if (t.brushSelector(r, n, o.selectors, o))
  78777. return !0;
  78778. }
  78779. }
  78780. function UGe(t, e) {
  78781. var n = t.option.seriesIndex;
  78782. return n != null && n !== "all" && (ue(n) ? et(n, e) < 0 : e !== n);
  78783. }
  78784. var XGe = {
  78785. rect: function(t) {
  78786. return V7(t.range);
  78787. },
  78788. polygon: function(t) {
  78789. for (var e, n = t.range, r = 0, i = n.length; r < i; r++) {
  78790. e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
  78791. var a = n[r];
  78792. 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]);
  78793. }
  78794. return e && V7(e);
  78795. }
  78796. };
  78797. function V7(t) {
  78798. return new Je(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]);
  78799. }
  78800. var YGe = (
  78801. /** @class */
  78802. function(t) {
  78803. q(e, t);
  78804. function e() {
  78805. var n = t !== null && t.apply(this, arguments) || this;
  78806. return n.type = e.type, n;
  78807. }
  78808. return e.prototype.init = function(n, r) {
  78809. this.ecModel = n, this.api = r, this.model, (this._brushController = new eL(r.getZr())).on("brush", xe(this._onBrush, this)).mount();
  78810. }, e.prototype.render = function(n, r, i, a) {
  78811. this.model = n, this._updateController(n, r, i, a);
  78812. }, e.prototype.updateTransform = function(n, r, i, a) {
  78813. Kre(r), this._updateController(n, r, i, a);
  78814. }, e.prototype.updateVisual = function(n, r, i, a) {
  78815. this.updateTransform(n, r, i, a);
  78816. }, e.prototype.updateView = function(n, r, i, a) {
  78817. this._updateController(n, r, i, a);
  78818. }, e.prototype._updateController = function(n, r, i, a) {
  78819. (!a || a.$from !== n.id) && this._brushController.setPanels(n.brushTargetManager.makePanelOpts(i)).enableBrush(n.brushOption).updateCovers(n.areas.slice());
  78820. }, e.prototype.dispose = function() {
  78821. this._brushController.dispose();
  78822. }, e.prototype._onBrush = function(n) {
  78823. var r = this.model.id, i = this.model.brushTargetManager.setOutputRanges(n.areas, this.ecModel);
  78824. (!n.isEnd || n.removeOnClick) && this.api.dispatchAction({
  78825. type: "brush",
  78826. brushId: r,
  78827. areas: Le(i),
  78828. $from: r
  78829. }), n.isEnd && this.api.dispatchAction({
  78830. type: "brushEnd",
  78831. brushId: r,
  78832. areas: Le(i),
  78833. $from: r
  78834. });
  78835. }, e.type = "brush", e;
  78836. }(Xt)
  78837. ), qGe = "#ddd", KGe = (
  78838. /** @class */
  78839. function(t) {
  78840. q(e, t);
  78841. function e() {
  78842. var n = t !== null && t.apply(this, arguments) || this;
  78843. return n.type = e.type, n.areas = [], n.brushOption = {}, n;
  78844. }
  78845. return e.prototype.optionUpdated = function(n, r) {
  78846. var i = this.option;
  78847. !r && qre(i, n, ["inBrush", "outOfBrush"]);
  78848. var a = i.inBrush = i.inBrush || {};
  78849. i.outOfBrush = i.outOfBrush || {
  78850. color: qGe
  78851. }, a.hasOwnProperty("liftZ") || (a.liftZ = 5);
  78852. }, e.prototype.setAreas = function(n) {
  78853. process.env.NODE_ENV !== "production" && (ke(ue(n)), k(n, function(r) {
  78854. ke(r.brushType, "Illegal areas");
  78855. })), n && (this.areas = ce(n, function(r) {
  78856. return F7(this.option, r);
  78857. }, this));
  78858. }, e.prototype.setBrushOption = function(n) {
  78859. this.brushOption = F7(this.option, n), this.brushType = this.brushOption.brushType;
  78860. }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
  78861. seriesIndex: "all",
  78862. brushType: "rect",
  78863. brushMode: "single",
  78864. transformable: !0,
  78865. brushStyle: {
  78866. borderWidth: 1,
  78867. color: "rgba(210,219,238,0.3)",
  78868. borderColor: "#D2DBEE"
  78869. },
  78870. throttleType: "fixRate",
  78871. throttleDelay: 0,
  78872. removeOnClick: !0,
  78873. z: 1e4
  78874. }, e;
  78875. }(rt)
  78876. );
  78877. function F7(t, e) {
  78878. return qe({
  78879. brushType: t.brushType,
  78880. brushMode: t.brushMode,
  78881. transformable: t.transformable,
  78882. brushStyle: new Wt(t.brushStyle).getItemStyle(),
  78883. removeOnClick: t.removeOnClick,
  78884. z: t.z
  78885. }, e, !0);
  78886. }
  78887. var JGe = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], e9e = (
  78888. /** @class */
  78889. function(t) {
  78890. q(e, t);
  78891. function e() {
  78892. return t !== null && t.apply(this, arguments) || this;
  78893. }
  78894. return e.prototype.render = function(n, r, i) {
  78895. var a, o, s;
  78896. r.eachComponent({
  78897. mainType: "brush"
  78898. }, function(l) {
  78899. a = l.brushType, o = l.brushOption.brushMode || "single", s = s || !!l.areas.length;
  78900. }), this._brushType = a, this._brushMode = o, k(n.get("type", !0), function(l) {
  78901. n.setIconStatus(l, (l === "keep" ? o === "multiple" : l === "clear" ? s : l === a) ? "emphasis" : "normal");
  78902. });
  78903. }, e.prototype.updateView = function(n, r, i) {
  78904. this.render(n, r, i);
  78905. }, e.prototype.getIcons = function() {
  78906. var n = this.model, r = n.get("icon", !0), i = {};
  78907. return k(n.get("type", !0), function(a) {
  78908. r[a] && (i[a] = r[a]);
  78909. }), i;
  78910. }, e.prototype.onclick = function(n, r, i) {
  78911. var a = this._brushType, o = this._brushMode;
  78912. i === "clear" ? (r.dispatchAction({
  78913. type: "axisAreaSelect",
  78914. intervals: []
  78915. }), r.dispatchAction({
  78916. type: "brush",
  78917. command: "clear",
  78918. // Clear all areas of all brush components.
  78919. areas: []
  78920. })) : r.dispatchAction({
  78921. type: "takeGlobalCursor",
  78922. key: "brush",
  78923. brushOption: {
  78924. brushType: i === "keep" ? a : a === i ? !1 : i,
  78925. brushMode: i === "keep" ? o === "multiple" ? "single" : "multiple" : o
  78926. }
  78927. });
  78928. }, e.getDefaultOption = function(n) {
  78929. var r = {
  78930. show: !0,
  78931. type: JGe.slice(),
  78932. icon: {
  78933. /* eslint-disable */
  78934. 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",
  78935. 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",
  78936. 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",
  78937. 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",
  78938. 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",
  78939. 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"
  78940. // jshint ignore:line
  78941. /* eslint-enable */
  78942. },
  78943. // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`
  78944. title: n.getLocaleModel().get(["toolbox", "brush", "title"])
  78945. };
  78946. return r;
  78947. }, e;
  78948. }(ga)
  78949. );
  78950. function t9e(t) {
  78951. t.registerComponentView(YGe), t.registerComponentModel(KGe), t.registerPreprocessor(VGe), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, GGe), t.registerAction({
  78952. type: "brush",
  78953. event: "brush",
  78954. update: "updateVisual"
  78955. }, function(e, n) {
  78956. n.eachComponent({
  78957. mainType: "brush",
  78958. query: e
  78959. }, function(r) {
  78960. r.setAreas(e.areas);
  78961. });
  78962. }), t.registerAction({
  78963. type: "brushSelect",
  78964. event: "brushSelected",
  78965. update: "none"
  78966. }, On), t.registerAction({
  78967. type: "brushEnd",
  78968. event: "brushEnd",
  78969. update: "none"
  78970. }, On), Dd("brush", e9e);
  78971. }
  78972. var n9e = (
  78973. /** @class */
  78974. function(t) {
  78975. q(e, t);
  78976. function e() {
  78977. var n = t !== null && t.apply(this, arguments) || this;
  78978. return n.type = e.type, n.layoutMode = {
  78979. type: "box",
  78980. ignoreSize: !0
  78981. }, n;
  78982. }
  78983. return e.type = "title", e.defaultOption = {
  78984. // zlevel: 0,
  78985. z: 6,
  78986. show: !0,
  78987. text: "",
  78988. target: "blank",
  78989. subtext: "",
  78990. subtarget: "blank",
  78991. left: 0,
  78992. top: 0,
  78993. backgroundColor: "rgba(0,0,0,0)",
  78994. borderColor: "#ccc",
  78995. borderWidth: 0,
  78996. padding: 5,
  78997. itemGap: 10,
  78998. textStyle: {
  78999. fontSize: 18,
  79000. fontWeight: "bold",
  79001. color: "#464646"
  79002. },
  79003. subtextStyle: {
  79004. fontSize: 12,
  79005. color: "#6E7079"
  79006. }
  79007. }, e;
  79008. }(rt)
  79009. ), r9e = (
  79010. /** @class */
  79011. function(t) {
  79012. q(e, t);
  79013. function e() {
  79014. var n = t !== null && t.apply(this, arguments) || this;
  79015. return n.type = e.type, n;
  79016. }
  79017. return e.prototype.render = function(n, r, i) {
  79018. if (this.group.removeAll(), !!n.get("show")) {
  79019. var a = this.group, o = n.getModel("textStyle"), s = n.getModel("subtextStyle"), l = n.get("textAlign"), u = We(n.get("textBaseline"), n.get("textVerticalAlign")), c = new gt({
  79020. style: Zt(o, {
  79021. text: n.get("text"),
  79022. fill: o.getTextColor()
  79023. }, {
  79024. disableBox: !0
  79025. }),
  79026. z2: 10
  79027. }), f = c.getBoundingRect(), d = n.get("subtext"), h = new gt({
  79028. style: Zt(s, {
  79029. text: d,
  79030. fill: s.getTextColor(),
  79031. y: f.height + n.get("itemGap"),
  79032. verticalAlign: "top"
  79033. }, {
  79034. disableBox: !0
  79035. }),
  79036. z2: 10
  79037. }), p = n.get("link"), v = n.get("sublink"), g = n.get("triggerEvent", !0);
  79038. c.silent = !p && !g, h.silent = !v && !g, p && c.on("click", function() {
  79039. pO(p, "_" + n.get("target"));
  79040. }), v && h.on("click", function() {
  79041. pO(v, "_" + n.get("subtarget"));
  79042. }), Fe(c).eventData = Fe(h).eventData = g ? {
  79043. componentType: "title",
  79044. componentIndex: n.componentIndex
  79045. } : null, a.add(c), d && a.add(h);
  79046. var m = a.getBoundingRect(), y = n.getBoxLayoutParams();
  79047. y.width = m.width, y.height = m.height;
  79048. var b = Rn(y, {
  79049. width: i.getWidth(),
  79050. height: i.getHeight()
  79051. }, n.get("padding"));
  79052. l || (l = n.get("left") || n.get("right"), l === "middle" && (l = "center"), l === "right" ? b.x += b.width : l === "center" && (b.x += b.width / 2)), u || (u = n.get("top") || n.get("bottom"), u === "center" && (u = "middle"), u === "bottom" ? b.y += b.height : u === "middle" && (b.y += b.height / 2), u = u || "top"), a.x = b.x, a.y = b.y, a.markRedraw();
  79053. var _ = {
  79054. align: l,
  79055. verticalAlign: u
  79056. };
  79057. c.setStyle(_), h.setStyle(_), m = a.getBoundingRect();
  79058. var O = b.margin, S = n.getItemStyle(["color", "opacity"]);
  79059. S.fill = n.get("backgroundColor");
  79060. var x = new mt({
  79061. shape: {
  79062. x: m.x - O[3],
  79063. y: m.y - O[0],
  79064. width: m.width + O[1] + O[3],
  79065. height: m.height + O[0] + O[2],
  79066. r: n.get("borderRadius")
  79067. },
  79068. style: S,
  79069. subPixelOptimize: !0,
  79070. silent: !0
  79071. });
  79072. a.add(x);
  79073. }
  79074. }, e.type = "title", e;
  79075. }(Xt)
  79076. );
  79077. function i9e(t) {
  79078. t.registerComponentModel(n9e), t.registerComponentView(r9e);
  79079. }
  79080. var W7 = (
  79081. /** @class */
  79082. function(t) {
  79083. q(e, t);
  79084. function e() {
  79085. var n = t !== null && t.apply(this, arguments) || this;
  79086. return n.type = e.type, n.layoutMode = "box", n;
  79087. }
  79088. return e.prototype.init = function(n, r, i) {
  79089. this.mergeDefaultAndTheme(n, i), this._initData();
  79090. }, e.prototype.mergeOption = function(n) {
  79091. t.prototype.mergeOption.apply(this, arguments), this._initData();
  79092. }, e.prototype.setCurrentIndex = function(n) {
  79093. n == null && (n = this.option.currentIndex);
  79094. var r = this._data.count();
  79095. this.option.loop ? n = (n % r + r) % r : (n >= r && (n = r - 1), n < 0 && (n = 0)), this.option.currentIndex = n;
  79096. }, e.prototype.getCurrentIndex = function() {
  79097. return this.option.currentIndex;
  79098. }, e.prototype.isIndexMax = function() {
  79099. return this.getCurrentIndex() >= this._data.count() - 1;
  79100. }, e.prototype.setPlayState = function(n) {
  79101. this.option.autoPlay = !!n;
  79102. }, e.prototype.getPlayState = function() {
  79103. return !!this.option.autoPlay;
  79104. }, e.prototype._initData = function() {
  79105. var n = this.option, r = n.data || [], i = n.axisType, a = this._names = [], o;
  79106. i === "category" ? (o = [], k(r, function(u, c) {
  79107. var f = Vn(gp(u), ""), d;
  79108. Ie(u) ? (d = Le(u), d.value = c) : d = c, o.push(d), a.push(f);
  79109. })) : o = r;
  79110. var s = {
  79111. category: "ordinal",
  79112. time: "time",
  79113. value: "number"
  79114. }[i] || "number", l = this._data = new Nr([{
  79115. name: "value",
  79116. type: s
  79117. }], this);
  79118. l.initData(o, a);
  79119. }, e.prototype.getData = function() {
  79120. return this._data;
  79121. }, e.prototype.getCategories = function() {
  79122. if (this.get("axisType") === "category")
  79123. return this._names.slice();
  79124. }, e.type = "timeline", e.defaultOption = {
  79125. // zlevel: 0, // 一级层叠
  79126. z: 4,
  79127. show: !0,
  79128. axisType: "time",
  79129. realtime: !0,
  79130. left: "20%",
  79131. top: null,
  79132. right: "20%",
  79133. bottom: 0,
  79134. width: null,
  79135. height: 40,
  79136. padding: 5,
  79137. controlPosition: "left",
  79138. autoPlay: !1,
  79139. rewind: !1,
  79140. loop: !0,
  79141. playInterval: 2e3,
  79142. currentIndex: 0,
  79143. itemStyle: {},
  79144. label: {
  79145. color: "#000"
  79146. },
  79147. data: []
  79148. }, e;
  79149. }(rt)
  79150. ), Jre = (
  79151. /** @class */
  79152. function(t) {
  79153. q(e, t);
  79154. function e() {
  79155. var n = t !== null && t.apply(this, arguments) || this;
  79156. return n.type = e.type, n;
  79157. }
  79158. return e.type = "timeline.slider", e.defaultOption = Pu(W7.defaultOption, {
  79159. backgroundColor: "rgba(0,0,0,0)",
  79160. borderColor: "#ccc",
  79161. borderWidth: 0,
  79162. orient: "horizontal",
  79163. inverse: !1,
  79164. tooltip: {
  79165. trigger: "item"
  79166. // data item may also have tootip attr.
  79167. },
  79168. symbol: "circle",
  79169. symbolSize: 12,
  79170. lineStyle: {
  79171. show: !0,
  79172. width: 2,
  79173. color: "#DAE1F5"
  79174. },
  79175. label: {
  79176. position: "auto",
  79177. // When using number, label position is not
  79178. // restricted by viewRect.
  79179. // positive: right/bottom, negative: left/top
  79180. show: !0,
  79181. interval: "auto",
  79182. rotate: 0,
  79183. // formatter: null,
  79184. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  79185. color: "#A4B1D7"
  79186. },
  79187. itemStyle: {
  79188. color: "#A4B1D7",
  79189. borderWidth: 1
  79190. },
  79191. checkpointStyle: {
  79192. symbol: "circle",
  79193. symbolSize: 15,
  79194. color: "#316bf3",
  79195. borderColor: "#fff",
  79196. borderWidth: 2,
  79197. shadowBlur: 2,
  79198. shadowOffsetX: 1,
  79199. shadowOffsetY: 1,
  79200. shadowColor: "rgba(0, 0, 0, 0.3)",
  79201. // borderColor: 'rgba(194,53,49, 0.5)',
  79202. animation: !0,
  79203. animationDuration: 300,
  79204. animationEasing: "quinticInOut"
  79205. },
  79206. controlStyle: {
  79207. show: !0,
  79208. showPlayBtn: !0,
  79209. showPrevBtn: !0,
  79210. showNextBtn: !0,
  79211. itemSize: 24,
  79212. itemGap: 12,
  79213. position: "left",
  79214. 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",
  79215. 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",
  79216. // eslint-disable-next-line max-len
  79217. 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",
  79218. // eslint-disable-next-line max-len
  79219. 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",
  79220. prevBtnSize: 18,
  79221. nextBtnSize: 18,
  79222. color: "#A4B1D7",
  79223. borderColor: "#A4B1D7",
  79224. borderWidth: 1
  79225. },
  79226. emphasis: {
  79227. label: {
  79228. show: !0,
  79229. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  79230. color: "#6f778d"
  79231. },
  79232. itemStyle: {
  79233. color: "#316BF3"
  79234. },
  79235. controlStyle: {
  79236. color: "#316BF3",
  79237. borderColor: "#316BF3",
  79238. borderWidth: 2
  79239. }
  79240. },
  79241. progress: {
  79242. lineStyle: {
  79243. color: "#316BF3"
  79244. },
  79245. itemStyle: {
  79246. color: "#316BF3"
  79247. },
  79248. label: {
  79249. color: "#6f778d"
  79250. }
  79251. },
  79252. data: []
  79253. }), e;
  79254. }(W7)
  79255. );
  79256. xn(Jre, lw.prototype);
  79257. var a9e = (
  79258. /** @class */
  79259. function(t) {
  79260. q(e, t);
  79261. function e() {
  79262. var n = t !== null && t.apply(this, arguments) || this;
  79263. return n.type = e.type, n;
  79264. }
  79265. return e.type = "timeline", e;
  79266. }(Xt)
  79267. ), o9e = (
  79268. /** @class */
  79269. function(t) {
  79270. q(e, t);
  79271. function e(n, r, i, a) {
  79272. var o = t.call(this, n, r, i) || this;
  79273. return o.type = a || "value", o;
  79274. }
  79275. return e.prototype.getLabelModel = function() {
  79276. return this.model.getModel("label");
  79277. }, e.prototype.isHorizontal = function() {
  79278. return this.model.get("orient") === "horizontal";
  79279. }, e;
  79280. }(Va)
  79281. ), KP = Math.PI, Q7 = bt(), s9e = (
  79282. /** @class */
  79283. function(t) {
  79284. q(e, t);
  79285. function e() {
  79286. var n = t !== null && t.apply(this, arguments) || this;
  79287. return n.type = e.type, n;
  79288. }
  79289. return e.prototype.init = function(n, r) {
  79290. this.api = r;
  79291. }, e.prototype.render = function(n, r, i) {
  79292. if (this.model = n, this.api = i, this.ecModel = r, this.group.removeAll(), n.get("show", !0)) {
  79293. var a = this._layout(n, i), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), l = this._axis = this._createAxis(a, n);
  79294. n.formatTooltip = function(u) {
  79295. var c = l.scale.getLabel({
  79296. value: u
  79297. });
  79298. return tr("nameValue", {
  79299. noName: !0,
  79300. value: c
  79301. });
  79302. }, k(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(u) {
  79303. this["_render" + u](a, o, l, n);
  79304. }, this), this._renderAxisLabel(a, s, l, n), this._position(a, n);
  79305. }
  79306. this._doPlayStop(), this._updateTicksStatus();
  79307. }, e.prototype.remove = function() {
  79308. this._clearTimer(), this.group.removeAll();
  79309. }, e.prototype.dispose = function() {
  79310. this._clearTimer();
  79311. }, e.prototype._layout = function(n, r) {
  79312. var i = n.get(["label", "position"]), a = n.get("orient"), o = u9e(n, r), s;
  79313. i == null || i === "auto" ? s = a === "horizontal" ? o.y + o.height / 2 < r.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < r.getWidth() / 2 ? "+" : "-" : Oe(i) ? s = {
  79314. horizontal: {
  79315. top: "-",
  79316. bottom: "+"
  79317. },
  79318. vertical: {
  79319. left: "-",
  79320. right: "+"
  79321. }
  79322. }[a][i] : s = i;
  79323. var l = {
  79324. horizontal: "center",
  79325. vertical: s >= 0 || s === "+" ? "left" : "right"
  79326. }, u = {
  79327. horizontal: s >= 0 || s === "+" ? "top" : "bottom",
  79328. vertical: "middle"
  79329. }, c = {
  79330. horizontal: 0,
  79331. vertical: KP / 2
  79332. }, 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;
  79333. m = m * KP / 180;
  79334. var y, b, _, O = d.get("position", !0), S = h && d.get("showPlayBtn", !0), x = h && d.get("showPrevBtn", !0), C = h && d.get("showNextBtn", !0), T = 0, w = f;
  79335. O === "left" || O === "bottom" ? (S && (y = [0, 0], T += g), x && (b = [T, 0], T += g), C && (_ = [w - p, 0], w -= g)) : (S && (y = [w - p, 0], w -= g), x && (b = [0, 0], T += g), C && (_ = [w - p, 0], w -= g));
  79336. var P = [T, w];
  79337. return n.get("inverse") && P.reverse(), {
  79338. viewRect: o,
  79339. mainLength: f,
  79340. orient: a,
  79341. rotation: c[a],
  79342. labelRotation: m,
  79343. labelPosOpt: s,
  79344. labelAlign: n.get(["label", "align"]) || l[a],
  79345. labelBaseline: n.get(["label", "verticalAlign"]) || n.get(["label", "baseline"]) || u[a],
  79346. // Based on mainGroup.
  79347. playPosition: y,
  79348. prevBtnPosition: b,
  79349. nextBtnPosition: _,
  79350. axisExtent: P,
  79351. controlSize: p,
  79352. controlGap: v
  79353. };
  79354. }, e.prototype._position = function(n, r) {
  79355. var i = this._mainGroup, a = this._labelGroup, o = n.viewRect;
  79356. if (n.orient === "vertical") {
  79357. var s = wi(), l = o.x, u = o.y + o.height;
  79358. so(s, s, [-l, -u]), Cu(s, s, -KP / 2), so(s, s, [l, u]), o = o.clone(), o.applyTransform(s);
  79359. }
  79360. var c = y(o), f = y(i.getBoundingRect()), d = y(a.getBoundingRect()), h = [i.x, i.y], p = [a.x, a.y];
  79361. p[0] = h[0] = c[0][0];
  79362. var v = n.labelPosOpt;
  79363. if (v == null || Oe(v)) {
  79364. var g = v === "+" ? 0 : 1;
  79365. b(h, f, c, 1, g), b(p, d, c, 1, 1 - g);
  79366. } else {
  79367. var g = v >= 0 ? 0 : 1;
  79368. b(h, f, c, 1, g), p[1] = h[1] + v;
  79369. }
  79370. i.setPosition(h), a.setPosition(p), i.rotation = a.rotation = n.rotation, m(i), m(a);
  79371. function m(_) {
  79372. _.originX = c[0][0] - _.x, _.originY = c[1][0] - _.y;
  79373. }
  79374. function y(_) {
  79375. return [[_.x, _.x + _.width], [_.y, _.y + _.height]];
  79376. }
  79377. function b(_, O, S, x, C) {
  79378. _[x] += S[x][C] - O[x][C];
  79379. }
  79380. }, e.prototype._createAxis = function(n, r) {
  79381. var i = r.getData(), a = r.get("axisType"), o = l9e(r, a);
  79382. o.getTicks = function() {
  79383. return i.mapArray(["value"], function(u) {
  79384. return {
  79385. value: u
  79386. };
  79387. });
  79388. };
  79389. var s = i.getDataExtent("value");
  79390. o.setExtent(s[0], s[1]), o.calcNiceTicks();
  79391. var l = new o9e("value", o, n.axisExtent, a);
  79392. return l.model = r, l;
  79393. }, e.prototype._createGroup = function(n) {
  79394. var r = this[n] = new Ve();
  79395. return this.group.add(r), r;
  79396. }, e.prototype._renderAxisLine = function(n, r, i, a) {
  79397. var o = i.getExtent();
  79398. if (a.get(["lineStyle", "show"])) {
  79399. var s = new Un({
  79400. shape: {
  79401. x1: o[0],
  79402. y1: 0,
  79403. x2: o[1],
  79404. y2: 0
  79405. },
  79406. style: le({
  79407. lineCap: "round"
  79408. }, a.getModel("lineStyle").getLineStyle()),
  79409. silent: !0,
  79410. z2: 1
  79411. });
  79412. r.add(s);
  79413. var l = this._progressLine = new Un({
  79414. shape: {
  79415. x1: o[0],
  79416. x2: this._currentPointer ? this._currentPointer.x : o[0],
  79417. y1: 0,
  79418. y2: 0
  79419. },
  79420. style: Re({
  79421. lineCap: "round",
  79422. lineWidth: s.style.lineWidth
  79423. }, a.getModel(["progress", "lineStyle"]).getLineStyle()),
  79424. silent: !0,
  79425. z2: 1
  79426. });
  79427. r.add(l);
  79428. }
  79429. }, e.prototype._renderAxisTick = function(n, r, i, a) {
  79430. var o = this, s = a.getData(), l = i.scale.getTicks();
  79431. this._tickSymbols = [], k(l, function(u) {
  79432. 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 = {
  79433. x: c,
  79434. y: 0,
  79435. onclick: xe(o._changeTimeline, o, u.value)
  79436. }, g = H7(f, d, r, v);
  79437. g.ensureState("emphasis").style = h.getItemStyle(), g.ensureState("progress").style = p.getItemStyle(), Yl(g);
  79438. var m = Fe(g);
  79439. f.get("tooltip") ? (m.dataIndex = u.value, m.dataModel = a) : m.dataIndex = m.dataModel = null, o._tickSymbols.push(g);
  79440. });
  79441. }, e.prototype._renderAxisLabel = function(n, r, i, a) {
  79442. var o = this, s = i.getLabelModel();
  79443. if (s.get("show")) {
  79444. var l = a.getData(), u = i.getViewLabels();
  79445. this._tickLabels = [], k(u, function(c) {
  79446. 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 gt({
  79447. x: g,
  79448. y: 0,
  79449. rotation: n.labelRotation - n.rotation,
  79450. onclick: xe(o._changeTimeline, o, f),
  79451. silent: !1,
  79452. style: Zt(h, {
  79453. text: c.formattedLabel,
  79454. align: n.labelAlign,
  79455. verticalAlign: n.labelBaseline
  79456. })
  79457. });
  79458. m.ensureState("emphasis").style = Zt(p), m.ensureState("progress").style = Zt(v), r.add(m), Yl(m), Q7(m).dataIndex = f, o._tickLabels.push(m);
  79459. });
  79460. }
  79461. }, e.prototype._renderControl = function(n, r, i, a) {
  79462. 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);
  79463. d(n.nextBtnPosition, "next", xe(this._changeTimeline, this, f ? "-" : "+")), d(n.prevBtnPosition, "prev", xe(this._changeTimeline, this, f ? "+" : "-")), d(n.playPosition, c ? "stop" : "play", xe(this._handlePlayClick, this, !c), !0);
  79464. function d(h, p, v, g) {
  79465. if (h) {
  79466. var m = lo(We(a.get(["controlStyle", p + "BtnSize"]), o), o), y = [0, -m / 2, m, m], b = c9e(a, p + "Icon", y, {
  79467. x: h[0],
  79468. y: h[1],
  79469. originX: o / 2,
  79470. originY: 0,
  79471. rotation: g ? -s : 0,
  79472. rectHover: !0,
  79473. style: l,
  79474. onclick: v
  79475. });
  79476. b.ensureState("emphasis").style = u, r.add(b), Yl(b);
  79477. }
  79478. }
  79479. }, e.prototype._renderCurrentPointer = function(n, r, i, a) {
  79480. var o = a.getData(), s = a.getCurrentIndex(), l = o.getItemModel(s).getModel("checkpointStyle"), u = this, c = {
  79481. onCreate: function(f) {
  79482. f.draggable = !0, f.drift = xe(u._handlePointerDrag, u), f.ondragend = xe(u._handlePointerDragend, u), G7(f, u._progressLine, s, i, a, !0);
  79483. },
  79484. onUpdate: function(f) {
  79485. G7(f, u._progressLine, s, i, a);
  79486. }
  79487. };
  79488. this._currentPointer = H7(l, l, this._mainGroup, {}, this._currentPointer, c);
  79489. }, e.prototype._handlePlayClick = function(n) {
  79490. this._clearTimer(), this.api.dispatchAction({
  79491. type: "timelinePlayChange",
  79492. playState: n,
  79493. from: this.uid
  79494. });
  79495. }, e.prototype._handlePointerDrag = function(n, r, i) {
  79496. this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY]);
  79497. }, e.prototype._handlePointerDragend = function(n) {
  79498. this._pointerChangeTimeline([n.offsetX, n.offsetY], !0);
  79499. }, e.prototype._pointerChangeTimeline = function(n, r) {
  79500. var i = this._toAxisCoord(n)[0], a = this._axis, o = Wi(a.getExtent().slice());
  79501. i > o[1] && (i = o[1]), i < o[0] && (i = o[0]), this._currentPointer.x = i, this._currentPointer.markRedraw();
  79502. var s = this._progressLine;
  79503. s && (s.shape.x2 = i, s.dirty());
  79504. var l = this._findNearestTick(i), u = this.model;
  79505. (r || l !== u.getCurrentIndex() && u.get("realtime")) && this._changeTimeline(l);
  79506. }, e.prototype._doPlayStop = function() {
  79507. var n = this;
  79508. this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() {
  79509. var r = n.model;
  79510. n._changeTimeline(r.getCurrentIndex() + (r.get("rewind", !0) ? -1 : 1));
  79511. }, this.model.get("playInterval")));
  79512. }, e.prototype._toAxisCoord = function(n) {
  79513. var r = this._mainGroup.getLocalTransform();
  79514. return ro(n, r, !0);
  79515. }, e.prototype._findNearestTick = function(n) {
  79516. var r = this.model.getData(), i = 1 / 0, a, o = this._axis;
  79517. return r.each(["value"], function(s, l) {
  79518. var u = o.dataToCoord(s), c = Math.abs(u - n);
  79519. c < i && (i = c, a = l);
  79520. }), a;
  79521. }, e.prototype._clearTimer = function() {
  79522. this._timer && (clearTimeout(this._timer), this._timer = null);
  79523. }, e.prototype._changeTimeline = function(n) {
  79524. var r = this.model.getCurrentIndex();
  79525. n === "+" ? n = r + 1 : n === "-" && (n = r - 1), this.api.dispatchAction({
  79526. type: "timelineChange",
  79527. currentIndex: n,
  79528. from: this.uid
  79529. });
  79530. }, e.prototype._updateTicksStatus = function() {
  79531. var n = this.model.getCurrentIndex(), r = this._tickSymbols, i = this._tickLabels;
  79532. if (r)
  79533. for (var a = 0; a < r.length; a++)
  79534. r && r[a] && r[a].toggleState("progress", a < n);
  79535. if (i)
  79536. for (var a = 0; a < i.length; a++)
  79537. i && i[a] && i[a].toggleState("progress", Q7(i[a]).dataIndex <= n);
  79538. }, e.type = "timeline.slider", e;
  79539. }(a9e)
  79540. );
  79541. function l9e(t, e) {
  79542. if (e = e || t.get("type"), e)
  79543. switch (e) {
  79544. case "category":
  79545. return new gw({
  79546. ordinalMeta: t.getCategories(),
  79547. extent: [1 / 0, -1 / 0]
  79548. });
  79549. case "time":
  79550. return new Tk({
  79551. locale: t.ecModel.getLocaleModel(),
  79552. useUTC: t.ecModel.get("useUTC")
  79553. });
  79554. default:
  79555. return new qs();
  79556. }
  79557. }
  79558. function u9e(t, e) {
  79559. return Rn(t.getBoxLayoutParams(), {
  79560. width: e.getWidth(),
  79561. height: e.getHeight()
  79562. }, t.get("padding"));
  79563. }
  79564. function c9e(t, e, n, r) {
  79565. var i = r.style, a = _p(t.get(["controlStyle", e]), r || {}, new Je(n[0], n[1], n[2], n[3]));
  79566. return i && a.setStyle(i), a;
  79567. }
  79568. function H7(t, e, n, r, i, a) {
  79569. var o = e.get("color");
  79570. if (i)
  79571. i.setColor(o), n.add(i), a && a.onUpdate(i);
  79572. else {
  79573. var s = t.get("symbol");
  79574. i = $n(s, -1, -1, 2, 2, o), i.setStyle("strokeNoScale", !0), n.add(i), a && a.onCreate(i);
  79575. }
  79576. var l = e.getItemStyle(["color"]);
  79577. i.setStyle(l), r = qe({
  79578. rectHover: !0,
  79579. z2: 100
  79580. }, r, !0);
  79581. var u = $p(t.get("symbolSize"));
  79582. r.scaleX = u[0] / 2, r.scaleY = u[1] / 2;
  79583. var c = Ff(t.get("symbolOffset"), u);
  79584. c && (r.x = (r.x || 0) + c[0], r.y = (r.y || 0) + c[1]);
  79585. var f = t.get("symbolRotate");
  79586. return r.rotation = (f || 0) * Math.PI / 180 || 0, i.attr(r), i.updateTransform(), i;
  79587. }
  79588. function G7(t, e, n, r, i, a) {
  79589. if (!t.dragging) {
  79590. var o = i.getModel("checkpointStyle"), s = r.dataToCoord(i.getData().get("value", n));
  79591. if (a || !o.get("animation", !0))
  79592. t.attr({
  79593. x: s,
  79594. y: 0
  79595. }), e && e.attr({
  79596. shape: {
  79597. x2: s
  79598. }
  79599. });
  79600. else {
  79601. var l = {
  79602. duration: o.get("animationDuration", !0),
  79603. easing: o.get("animationEasing", !0)
  79604. };
  79605. t.stopAnimation(null, !0), t.animateTo({
  79606. x: s,
  79607. y: 0
  79608. }, l), e && e.animateTo({
  79609. shape: {
  79610. x2: s
  79611. }
  79612. }, l);
  79613. }
  79614. }
  79615. }
  79616. function f9e(t) {
  79617. t.registerAction({
  79618. type: "timelineChange",
  79619. event: "timelineChanged",
  79620. update: "prepareAndUpdate"
  79621. }, function(e, n, r) {
  79622. var i = n.getComponent("timeline");
  79623. return i && e.currentIndex != null && (i.setCurrentIndex(e.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), r.dispatchAction({
  79624. type: "timelinePlayChange",
  79625. playState: !1,
  79626. from: e.from
  79627. }))), n.resetOption("timeline", {
  79628. replaceMerge: i.get("replaceMerge", !0)
  79629. }), Re({
  79630. currentIndex: i.option.currentIndex
  79631. }, e);
  79632. }), t.registerAction({
  79633. type: "timelinePlayChange",
  79634. event: "timelinePlayChanged",
  79635. update: "update"
  79636. }, function(e, n) {
  79637. var r = n.getComponent("timeline");
  79638. r && e.playState != null && r.setPlayState(e.playState);
  79639. });
  79640. }
  79641. function d9e(t) {
  79642. var e = t && t.timeline;
  79643. ue(e) || (e = e ? [e] : []), k(e, function(n) {
  79644. n && h9e(n);
  79645. });
  79646. }
  79647. function h9e(t) {
  79648. var e = t.type, n = {
  79649. number: "value",
  79650. time: "time"
  79651. };
  79652. if (n[e] && (t.axisType = n[e], delete t.type), j7(t), Cc(t, "controlPosition")) {
  79653. var r = t.controlStyle || (t.controlStyle = {});
  79654. Cc(r, "position") || (r.position = t.controlPosition), r.position === "none" && !Cc(r, "show") && (r.show = !1, delete r.position), delete t.controlPosition;
  79655. }
  79656. k(t.data || [], function(i) {
  79657. Ie(i) && !ue(i) && (!Cc(i, "value") && Cc(i, "name") && (i.value = i.name), j7(i));
  79658. });
  79659. }
  79660. function j7(t) {
  79661. var e = t.itemStyle || (t.itemStyle = {}), n = e.emphasis || (e.emphasis = {}), r = t.label || t.label || {}, i = r.normal || (r.normal = {}), a = {
  79662. normal: 1,
  79663. emphasis: 1
  79664. };
  79665. k(r, function(o, s) {
  79666. !a[s] && !Cc(i, s) && (i[s] = o);
  79667. }), n.label && !Cc(r, "emphasis") && (r.emphasis = n.label, delete n.label);
  79668. }
  79669. function Cc(t, e) {
  79670. return t.hasOwnProperty(e);
  79671. }
  79672. function p9e(t) {
  79673. t.registerComponentModel(Jre), t.registerComponentView(s9e), t.registerSubTypeDefaulter("timeline", function() {
  79674. return "slider";
  79675. }), f9e(t), t.registerPreprocessor(d9e);
  79676. }
  79677. function $L(t, e) {
  79678. if (!t)
  79679. return !1;
  79680. for (var n = ue(t) ? t : [t], r = 0; r < n.length; r++)
  79681. if (n[r] && n[r][e])
  79682. return !0;
  79683. return !1;
  79684. }
  79685. function Lb(t) {
  79686. mf(t, "label", ["show"]);
  79687. }
  79688. var Nb = bt(), Js = (
  79689. /** @class */
  79690. function(t) {
  79691. q(e, t);
  79692. function e() {
  79693. var n = t !== null && t.apply(this, arguments) || this;
  79694. return n.type = e.type, n.createdBySelf = !1, n;
  79695. }
  79696. return e.prototype.init = function(n, r, i) {
  79697. if (process.env.NODE_ENV !== "production" && this.type === "marker")
  79698. throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");
  79699. this.mergeDefaultAndTheme(n, i), this._mergeOption(n, i, !1, !0);
  79700. }, e.prototype.isAnimationEnabled = function() {
  79701. if (vt.node)
  79702. return !1;
  79703. var n = this.__hostSeries;
  79704. return this.getShallow("animation") && n && n.isAnimationEnabled();
  79705. }, e.prototype.mergeOption = function(n, r) {
  79706. this._mergeOption(n, r, !1, !1);
  79707. }, e.prototype._mergeOption = function(n, r, i, a) {
  79708. var o = this.mainType;
  79709. i || r.eachSeries(function(s) {
  79710. var l = s.get(this.mainType, !0), u = Nb(s)[o];
  79711. if (!l || !l.data) {
  79712. Nb(s)[o] = null;
  79713. return;
  79714. }
  79715. u ? u._mergeOption(l, r, !0) : (a && Lb(l), k(l.data, function(c) {
  79716. c instanceof Array ? (Lb(c[0]), Lb(c[1])) : Lb(c);
  79717. }), u = this.createMarkerModelFromSeries(l, this, r), le(u, {
  79718. mainType: this.mainType,
  79719. // Use the same series index and name
  79720. seriesIndex: s.seriesIndex,
  79721. name: s.name,
  79722. createdBySelf: !0
  79723. }), u.__hostSeries = s), Nb(s)[o] = u;
  79724. }, this);
  79725. }, e.prototype.formatTooltip = function(n, r, i) {
  79726. var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
  79727. return tr("section", {
  79728. header: this.name,
  79729. blocks: [tr("nameValue", {
  79730. name: s,
  79731. value: o,
  79732. noName: !s,
  79733. noValue: o == null
  79734. })]
  79735. });
  79736. }, e.prototype.getData = function() {
  79737. return this._data;
  79738. }, e.prototype.setData = function(n) {
  79739. this._data = n;
  79740. }, e.prototype.getDataParams = function(n, r) {
  79741. var i = lw.prototype.getDataParams.call(this, n, r), a = this.__hostSeries;
  79742. return a && (i.seriesId = a.id, i.seriesName = a.name, i.seriesType = a.subType), i;
  79743. }, e.getMarkerModelFromSeries = function(n, r) {
  79744. return Nb(n)[r];
  79745. }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e;
  79746. }(rt)
  79747. );
  79748. xn(Js, lw.prototype);
  79749. var v9e = (
  79750. /** @class */
  79751. function(t) {
  79752. q(e, t);
  79753. function e() {
  79754. var n = t !== null && t.apply(this, arguments) || this;
  79755. return n.type = e.type, n;
  79756. }
  79757. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  79758. return new e(n, r, i);
  79759. }, e.type = "markPoint", e.defaultOption = {
  79760. // zlevel: 0,
  79761. z: 5,
  79762. symbol: "pin",
  79763. symbolSize: 50,
  79764. // symbolRotate: 0,
  79765. // symbolOffset: [0, 0]
  79766. tooltip: {
  79767. trigger: "item"
  79768. },
  79769. label: {
  79770. show: !0,
  79771. position: "inside"
  79772. },
  79773. itemStyle: {
  79774. borderWidth: 2
  79775. },
  79776. emphasis: {
  79777. label: {
  79778. show: !0
  79779. }
  79780. }
  79781. }, e;
  79782. }(Js)
  79783. );
  79784. function zE(t) {
  79785. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)));
  79786. }
  79787. function g9e(t) {
  79788. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y));
  79789. }
  79790. function Bb(t, e, n, r, i, a) {
  79791. var o = [], s = Ys(
  79792. e,
  79793. r
  79794. /* , otherDataDim */
  79795. ), l = s ? e.getCalculationInfo("stackResultDimension") : r, u = AL(e, l, t), c = e.indicesOfNearest(l, u)[0];
  79796. o[i] = e.get(n, c), o[a] = e.get(l, c);
  79797. var f = e.get(r, c), d = Ya(e.get(r, c));
  79798. return d = Math.min(d, 20), d >= 0 && (o[a] = +o[a].toFixed(d)), [o, f];
  79799. }
  79800. var JP = {
  79801. min: Ue(Bb, "min"),
  79802. max: Ue(Bb, "max"),
  79803. average: Ue(Bb, "average"),
  79804. median: Ue(Bb, "median")
  79805. };
  79806. function jm(t, e) {
  79807. if (e) {
  79808. var n = t.getData(), r = t.coordinateSystem, i = r && r.dimensions;
  79809. if (!g9e(e) && !ue(e.coord) && ue(i)) {
  79810. var a = eie(e, n, r, t);
  79811. if (e = Le(e), e.type && JP[e.type] && a.baseAxis && a.valueAxis) {
  79812. var o = et(i, a.baseAxis.dim), s = et(i, a.valueAxis.dim), l = JP[e.type](n, a.baseDataDim, a.valueDataDim, o, s);
  79813. e.coord = l[0], e.value = l[1];
  79814. } else
  79815. e.coord = [e.xAxis != null ? e.xAxis : e.radiusAxis, e.yAxis != null ? e.yAxis : e.angleAxis];
  79816. }
  79817. if (e.coord == null || !ue(i))
  79818. e.coord = [];
  79819. else
  79820. for (var u = e.coord, c = 0; c < 2; c++)
  79821. JP[u[c]] && (u[c] = AL(n, n.mapDimension(i[c]), u[c]));
  79822. return e;
  79823. }
  79824. }
  79825. function eie(t, e, n, r) {
  79826. var i = {};
  79827. return t.valueIndex != null || t.valueDim != null ? (i.valueDataDim = t.valueIndex != null ? e.getDimension(t.valueIndex) : t.valueDim, i.valueAxis = n.getAxis(m9e(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;
  79828. }
  79829. function m9e(t, e) {
  79830. var n = t.getData().getDimensionInfo(e);
  79831. return n && n.coordDim;
  79832. }
  79833. function Zm(t, e) {
  79834. return t && t.containData && e.coord && !zE(e) ? t.containData(e.coord) : !0;
  79835. }
  79836. function y9e(t, e, n) {
  79837. return t && t.containZone && e.coord && n.coord && !zE(e) && !zE(n) ? t.containZone(e.coord, n.coord) : !0;
  79838. }
  79839. function tie(t, e) {
  79840. return t ? function(n, r, i, a) {
  79841. var o = a < 2 ? n.coord && n.coord[a] : n.value;
  79842. return Kl(o, e[a]);
  79843. } : function(n, r, i, a) {
  79844. return Kl(n.value, e[a]);
  79845. };
  79846. }
  79847. function AL(t, e, n) {
  79848. if (n === "average") {
  79849. var r = 0, i = 0;
  79850. return t.each(e, function(a, o) {
  79851. isNaN(a) || (r += a, i++);
  79852. }), r / i;
  79853. } else return n === "median" ? t.getMedian(e) : t.getDataExtent(e)[n === "max" ? 1 : 0];
  79854. }
  79855. var e$ = bt(), EL = (
  79856. /** @class */
  79857. function(t) {
  79858. q(e, t);
  79859. function e() {
  79860. var n = t !== null && t.apply(this, arguments) || this;
  79861. return n.type = e.type, n;
  79862. }
  79863. return e.prototype.init = function() {
  79864. this.markerGroupMap = Pe();
  79865. }, e.prototype.render = function(n, r, i) {
  79866. var a = this, o = this.markerGroupMap;
  79867. o.each(function(s) {
  79868. e$(s).keep = !1;
  79869. }), r.eachSeries(function(s) {
  79870. var l = Js.getMarkerModelFromSeries(s, a.type);
  79871. l && a.renderSeries(s, l, r, i);
  79872. }), o.each(function(s) {
  79873. !e$(s).keep && a.group.remove(s.group);
  79874. });
  79875. }, e.prototype.markKeep = function(n) {
  79876. e$(n).keep = !0;
  79877. }, e.prototype.toggleBlurSeries = function(n, r) {
  79878. var i = this;
  79879. k(n, function(a) {
  79880. var o = Js.getMarkerModelFromSeries(a, i.type);
  79881. if (o) {
  79882. var s = o.getData();
  79883. s.eachItemGraphicEl(function(l) {
  79884. l && (r ? NK(l) : BR(l));
  79885. });
  79886. }
  79887. });
  79888. }, e.type = "marker", e;
  79889. }(Xt)
  79890. );
  79891. function Z7(t, e, n) {
  79892. var r = e.coordinateSystem;
  79893. t.each(function(i) {
  79894. var a = t.getItemModel(i), o, s = _e(a.get("x"), n.getWidth()), l = _e(a.get("y"), n.getHeight());
  79895. if (!isNaN(s) && !isNaN(l))
  79896. o = [s, l];
  79897. else if (e.getMarkerPosition)
  79898. o = e.getMarkerPosition(t.getValues(t.dimensions, i));
  79899. else if (r) {
  79900. var u = t.get(r.dimensions[0], i), c = t.get(r.dimensions[1], i);
  79901. o = r.dataToPoint([u, c]);
  79902. }
  79903. isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), t.setItemLayout(i, o);
  79904. });
  79905. }
  79906. var b9e = (
  79907. /** @class */
  79908. function(t) {
  79909. q(e, t);
  79910. function e() {
  79911. var n = t !== null && t.apply(this, arguments) || this;
  79912. return n.type = e.type, n;
  79913. }
  79914. return e.prototype.updateTransform = function(n, r, i) {
  79915. r.eachSeries(function(a) {
  79916. var o = Js.getMarkerModelFromSeries(a, "markPoint");
  79917. o && (Z7(o.getData(), a, i), this.markerGroupMap.get(a.id).updateLayout());
  79918. }, this);
  79919. }, e.prototype.renderSeries = function(n, r, i, a) {
  79920. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new U0()), f = _9e(o, n, r);
  79921. r.setData(f), Z7(r.getData(), n, a), f.each(function(d) {
  79922. 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");
  79923. if (Me(p) || Me(v) || Me(g) || Me(m)) {
  79924. var b = r.getRawValue(d), _ = r.getDataParams(d);
  79925. Me(p) && (p = p(b, _)), Me(v) && (v = v(b, _)), Me(g) && (g = g(b, _)), Me(m) && (m = m(b, _));
  79926. }
  79927. var O = h.getModel("itemStyle").getItemStyle(), S = G0(l, "color");
  79928. O.fill || (O.fill = S), f.setItemVisual(d, {
  79929. symbol: p,
  79930. symbolSize: v,
  79931. symbolRotate: g,
  79932. symbolOffset: m,
  79933. symbolKeepAspect: y,
  79934. style: O
  79935. });
  79936. }), c.updateData(f), this.group.add(c.group), f.eachItemGraphicEl(function(d) {
  79937. d.traverse(function(h) {
  79938. Fe(h).dataModel = r;
  79939. });
  79940. }), this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
  79941. }, e.type = "markPoint", e;
  79942. }(EL)
  79943. );
  79944. function _9e(t, e, n) {
  79945. var r;
  79946. t ? r = ce(t && t.dimensions, function(s) {
  79947. var l = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {};
  79948. return le(le({}, l), {
  79949. name: s,
  79950. // DON'T use ordinalMeta to parse and collect ordinal.
  79951. ordinalMeta: null
  79952. });
  79953. }) : r = [{
  79954. name: "value",
  79955. type: "float"
  79956. }];
  79957. var i = new Nr(r, n), a = ce(n.get("data"), Ue(jm, e));
  79958. t && (a = Nt(a, Ue(Zm, t)));
  79959. var o = tie(!!t, r);
  79960. return i.initData(a, null, o), i;
  79961. }
  79962. function O9e(t) {
  79963. t.registerComponentModel(v9e), t.registerComponentView(b9e), t.registerPreprocessor(function(e) {
  79964. $L(e.series, "markPoint") && (e.markPoint = e.markPoint || {});
  79965. });
  79966. }
  79967. var S9e = (
  79968. /** @class */
  79969. function(t) {
  79970. q(e, t);
  79971. function e() {
  79972. var n = t !== null && t.apply(this, arguments) || this;
  79973. return n.type = e.type, n;
  79974. }
  79975. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  79976. return new e(n, r, i);
  79977. }, e.type = "markLine", e.defaultOption = {
  79978. // zlevel: 0,
  79979. z: 5,
  79980. symbol: ["circle", "arrow"],
  79981. symbolSize: [8, 16],
  79982. // symbolRotate: 0,
  79983. symbolOffset: 0,
  79984. precision: 2,
  79985. tooltip: {
  79986. trigger: "item"
  79987. },
  79988. label: {
  79989. show: !0,
  79990. position: "end",
  79991. distance: 5
  79992. },
  79993. lineStyle: {
  79994. type: "dashed"
  79995. },
  79996. emphasis: {
  79997. label: {
  79998. show: !0
  79999. },
  80000. lineStyle: {
  80001. width: 3
  80002. }
  80003. },
  80004. animationEasing: "linear"
  80005. }, e;
  80006. }(Js)
  80007. ), zb = bt(), x9e = function(t, e, n, r) {
  80008. var i = t.getData(), a;
  80009. if (ue(r))
  80010. a = r;
  80011. else {
  80012. var o = r.type;
  80013. if (o === "min" || o === "max" || o === "average" || o === "median" || r.xAxis != null || r.yAxis != null) {
  80014. var s = void 0, l = void 0;
  80015. if (r.yAxis != null || r.xAxis != null)
  80016. s = e.getAxis(r.yAxis != null ? "y" : "x"), l = Tn(r.yAxis, r.xAxis);
  80017. else {
  80018. var u = eie(r, i, e, t);
  80019. s = u.valueAxis;
  80020. var c = xk(i, u.valueDataDim);
  80021. l = AL(i, c, o);
  80022. }
  80023. var f = s.dim === "x" ? 0 : 1, d = 1 - f, h = Le(r), p = {
  80024. coord: []
  80025. };
  80026. h.type = null, h.coord = [], h.coord[d] = -1 / 0, p.coord[d] = 1 / 0;
  80027. var v = n.get("precision");
  80028. v >= 0 && St(l) && (l = +l.toFixed(Math.min(v, 20))), h.coord[f] = p.coord[f] = l, a = [h, p, {
  80029. type: o,
  80030. valueIndex: r.valueIndex,
  80031. // Force to use the value of calculated value.
  80032. value: l
  80033. }];
  80034. } else
  80035. process.env.NODE_ENV !== "production" && xa("Invalid markLine data."), a = [];
  80036. }
  80037. var g = [jm(t, a[0]), jm(t, a[1]), le({}, a[2])];
  80038. return g[2].type = g[2].type || null, qe(g[2], g[0]), qe(g[2], g[1]), g;
  80039. };
  80040. function GO(t) {
  80041. return !isNaN(t) && !isFinite(t);
  80042. }
  80043. function U7(t, e, n, r) {
  80044. var i = 1 - t, a = r.dimensions[t];
  80045. return GO(e[i]) && GO(n[i]) && e[t] === n[t] && r.getAxis(a).containData(e[t]);
  80046. }
  80047. function w9e(t, e) {
  80048. if (t.type === "cartesian2d") {
  80049. var n = e[0].coord, r = e[1].coord;
  80050. if (n && r && (U7(1, n, r, t) || U7(0, n, r, t)))
  80051. return !0;
  80052. }
  80053. return Zm(t, e[0]) && Zm(t, e[1]);
  80054. }
  80055. function t$(t, e, n, r, i) {
  80056. var a = r.coordinateSystem, o = t.getItemModel(e), s, l = _e(o.get("x"), i.getWidth()), u = _e(o.get("y"), i.getHeight());
  80057. if (!isNaN(l) && !isNaN(u))
  80058. s = [l, u];
  80059. else {
  80060. if (r.getMarkerPosition)
  80061. s = r.getMarkerPosition(t.getValues(t.dimensions, e));
  80062. else {
  80063. var c = a.dimensions, f = t.get(c[0], e), d = t.get(c[1], e);
  80064. s = a.dataToPoint([f, d]);
  80065. }
  80066. if (Wf(a, "cartesian2d")) {
  80067. var h = a.getAxis("x"), p = a.getAxis("y"), c = a.dimensions;
  80068. GO(t.get(c[0], e)) ? s[0] = h.toGlobalCoord(h.getExtent()[n ? 0 : 1]) : GO(t.get(c[1], e)) && (s[1] = p.toGlobalCoord(p.getExtent()[n ? 0 : 1]));
  80069. }
  80070. isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  80071. }
  80072. t.setItemLayout(e, s);
  80073. }
  80074. var C9e = (
  80075. /** @class */
  80076. function(t) {
  80077. q(e, t);
  80078. function e() {
  80079. var n = t !== null && t.apply(this, arguments) || this;
  80080. return n.type = e.type, n;
  80081. }
  80082. return e.prototype.updateTransform = function(n, r, i) {
  80083. r.eachSeries(function(a) {
  80084. var o = Js.getMarkerModelFromSeries(a, "markLine");
  80085. if (o) {
  80086. var s = o.getData(), l = zb(o).from, u = zb(o).to;
  80087. l.each(function(c) {
  80088. t$(l, c, !0, a, i), t$(u, c, !1, a, i);
  80089. }), s.each(function(c) {
  80090. s.setItemLayout(c, [l.getItemLayout(c), u.getItemLayout(c)]);
  80091. }), this.markerGroupMap.get(a.id).updateLayout();
  80092. }
  80093. }, this);
  80094. }, e.prototype.renderSeries = function(n, r, i, a) {
  80095. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new Jk());
  80096. this.group.add(c.group);
  80097. var f = T9e(o, n, r), d = f.from, h = f.to, p = f.line;
  80098. zb(r).from = d, zb(r).to = h, r.setData(p);
  80099. var v = r.get("symbol"), g = r.get("symbolSize"), m = r.get("symbolRotate"), y = r.get("symbolOffset");
  80100. ue(v) || (v = [v, v]), ue(g) || (g = [g, g]), ue(m) || (m = [m, m]), ue(y) || (y = [y, y]), f.from.each(function(_) {
  80101. b(d, _, !0), b(h, _, !1);
  80102. }), p.each(function(_) {
  80103. var O = p.getItemModel(_).getModel("lineStyle").getLineStyle();
  80104. p.setItemLayout(_, [d.getItemLayout(_), h.getItemLayout(_)]), O.stroke == null && (O.stroke = d.getItemVisual(_, "style").fill), p.setItemVisual(_, {
  80105. fromSymbolKeepAspect: d.getItemVisual(_, "symbolKeepAspect"),
  80106. fromSymbolOffset: d.getItemVisual(_, "symbolOffset"),
  80107. fromSymbolRotate: d.getItemVisual(_, "symbolRotate"),
  80108. fromSymbolSize: d.getItemVisual(_, "symbolSize"),
  80109. fromSymbol: d.getItemVisual(_, "symbol"),
  80110. toSymbolKeepAspect: h.getItemVisual(_, "symbolKeepAspect"),
  80111. toSymbolOffset: h.getItemVisual(_, "symbolOffset"),
  80112. toSymbolRotate: h.getItemVisual(_, "symbolRotate"),
  80113. toSymbolSize: h.getItemVisual(_, "symbolSize"),
  80114. toSymbol: h.getItemVisual(_, "symbol"),
  80115. style: O
  80116. });
  80117. }), c.updateData(p), f.line.eachItemGraphicEl(function(_) {
  80118. Fe(_).dataModel = r, _.traverse(function(O) {
  80119. Fe(O).dataModel = r;
  80120. });
  80121. });
  80122. function b(_, O, S) {
  80123. var x = _.getItemModel(O);
  80124. t$(_, O, S, n, a);
  80125. var C = x.getModel("itemStyle").getItemStyle();
  80126. C.fill == null && (C.fill = G0(l, "color")), _.setItemVisual(O, {
  80127. symbolKeepAspect: x.get("symbolKeepAspect"),
  80128. // `0` should be considered as a valid value, so use `retrieve2` instead of `||`
  80129. symbolOffset: We(x.get("symbolOffset", !0), y[S ? 0 : 1]),
  80130. symbolRotate: We(x.get("symbolRotate", !0), m[S ? 0 : 1]),
  80131. // TODO: when 2d array is supported, it should ignore parent
  80132. symbolSize: We(x.get("symbolSize"), g[S ? 0 : 1]),
  80133. symbol: We(x.get("symbol", !0), v[S ? 0 : 1]),
  80134. style: C
  80135. });
  80136. }
  80137. this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
  80138. }, e.type = "markLine", e;
  80139. }(EL)
  80140. );
  80141. function T9e(t, e, n) {
  80142. var r;
  80143. t ? r = ce(t && t.dimensions, function(u) {
  80144. var c = e.getData().getDimensionInfo(e.getData().mapDimension(u)) || {};
  80145. return le(le({}, c), {
  80146. name: u,
  80147. // DON'T use ordinalMeta to parse and collect ordinal.
  80148. ordinalMeta: null
  80149. });
  80150. }) : r = [{
  80151. name: "value",
  80152. type: "float"
  80153. }];
  80154. var i = new Nr(r, n), a = new Nr(r, n), o = new Nr([], n), s = ce(n.get("data"), Ue(x9e, e, t, n));
  80155. t && (s = Nt(s, Ue(w9e, t)));
  80156. var l = tie(!!t, r);
  80157. return i.initData(ce(s, function(u) {
  80158. return u[0];
  80159. }), null, l), a.initData(ce(s, function(u) {
  80160. return u[1];
  80161. }), null, l), o.initData(ce(s, function(u) {
  80162. return u[2];
  80163. })), o.hasItemOption = !0, {
  80164. from: i,
  80165. to: a,
  80166. line: o
  80167. };
  80168. }
  80169. function P9e(t) {
  80170. t.registerComponentModel(S9e), t.registerComponentView(C9e), t.registerPreprocessor(function(e) {
  80171. $L(e.series, "markLine") && (e.markLine = e.markLine || {});
  80172. });
  80173. }
  80174. var $9e = (
  80175. /** @class */
  80176. function(t) {
  80177. q(e, t);
  80178. function e() {
  80179. var n = t !== null && t.apply(this, arguments) || this;
  80180. return n.type = e.type, n;
  80181. }
  80182. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  80183. return new e(n, r, i);
  80184. }, e.type = "markArea", e.defaultOption = {
  80185. // zlevel: 0,
  80186. // PENDING
  80187. z: 1,
  80188. tooltip: {
  80189. trigger: "item"
  80190. },
  80191. // markArea should fixed on the coordinate system
  80192. animation: !1,
  80193. label: {
  80194. show: !0,
  80195. position: "top"
  80196. },
  80197. itemStyle: {
  80198. // color and borderColor default to use color from series
  80199. // color: 'auto'
  80200. // borderColor: 'auto'
  80201. borderWidth: 0
  80202. },
  80203. emphasis: {
  80204. label: {
  80205. show: !0,
  80206. position: "top"
  80207. }
  80208. }
  80209. }, e;
  80210. }(Js)
  80211. ), Vb = bt(), A9e = function(t, e, n, r) {
  80212. var i = r[0], a = r[1];
  80213. if (!(!i || !a)) {
  80214. var o = jm(t, i), s = jm(t, a), l = o.coord, u = s.coord;
  80215. l[0] = Tn(l[0], -1 / 0), l[1] = Tn(l[1], -1 / 0), u[0] = Tn(u[0], 1 / 0), u[1] = Tn(u[1], 1 / 0);
  80216. var c = Rx([{}, o, s]);
  80217. return c.coord = [o.coord, s.coord], c.x0 = o.x, c.y0 = o.y, c.x1 = s.x, c.y1 = s.y, c;
  80218. }
  80219. };
  80220. function jO(t) {
  80221. return !isNaN(t) && !isFinite(t);
  80222. }
  80223. function X7(t, e, n, r) {
  80224. var i = 1 - t;
  80225. return jO(e[i]) && jO(n[i]);
  80226. }
  80227. function E9e(t, e) {
  80228. var n = e.coord[0], r = e.coord[1], i = {
  80229. coord: n,
  80230. x: e.x0,
  80231. y: e.y0
  80232. }, a = {
  80233. coord: r,
  80234. x: e.x1,
  80235. y: e.y1
  80236. };
  80237. return Wf(t, "cartesian2d") ? n && r && (X7(1, n, r) || X7(0, n, r)) ? !0 : y9e(t, i, a) : Zm(t, i) || Zm(t, a);
  80238. }
  80239. function Y7(t, e, n, r, i) {
  80240. var a = r.coordinateSystem, o = t.getItemModel(e), s, l = _e(o.get(n[0]), i.getWidth()), u = _e(o.get(n[1]), i.getHeight());
  80241. if (!isNaN(l) && !isNaN(u))
  80242. s = [l, u];
  80243. else {
  80244. if (r.getMarkerPosition) {
  80245. var c = t.getValues(["x0", "y0"], e), f = t.getValues(["x1", "y1"], e), d = a.clampData(c), h = a.clampData(f), p = [];
  80246. 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);
  80247. } else {
  80248. var v = t.get(n[0], e), g = t.get(n[1], e), m = [v, g];
  80249. a.clampData && a.clampData(m, m), s = a.dataToPoint(m, !0);
  80250. }
  80251. if (Wf(a, "cartesian2d")) {
  80252. var y = a.getAxis("x"), b = a.getAxis("y"), v = t.get(n[0], e), g = t.get(n[1], e);
  80253. jO(v) ? s[0] = y.toGlobalCoord(y.getExtent()[n[0] === "x0" ? 0 : 1]) : jO(g) && (s[1] = b.toGlobalCoord(b.getExtent()[n[1] === "y0" ? 0 : 1]));
  80254. }
  80255. isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  80256. }
  80257. return s;
  80258. }
  80259. var q7 = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], M9e = (
  80260. /** @class */
  80261. function(t) {
  80262. q(e, t);
  80263. function e() {
  80264. var n = t !== null && t.apply(this, arguments) || this;
  80265. return n.type = e.type, n;
  80266. }
  80267. return e.prototype.updateTransform = function(n, r, i) {
  80268. r.eachSeries(function(a) {
  80269. var o = Js.getMarkerModelFromSeries(a, "markArea");
  80270. if (o) {
  80271. var s = o.getData();
  80272. s.each(function(l) {
  80273. var u = ce(q7, function(f) {
  80274. return Y7(s, l, f, a, i);
  80275. });
  80276. s.setItemLayout(l, u);
  80277. var c = s.getItemGraphicEl(l);
  80278. c.setShape("points", u);
  80279. });
  80280. }
  80281. }, this);
  80282. }, e.prototype.renderSeries = function(n, r, i, a) {
  80283. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, {
  80284. group: new Ve()
  80285. });
  80286. this.group.add(c.group), this.markKeep(c);
  80287. var f = I9e(o, n, r);
  80288. r.setData(f), f.each(function(d) {
  80289. var h = ce(q7, function(C) {
  80290. return Y7(f, d, C, n, a);
  80291. }), 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))], b = [v.parse(f.get("y0", d)), v.parse(f.get("y1", d))];
  80292. Wi(y), Wi(b);
  80293. var _ = !(g[0] > y[1] || g[1] < y[0] || m[0] > b[1] || m[1] < b[0]), O = !_;
  80294. f.setItemLayout(d, {
  80295. points: h,
  80296. allClipped: O
  80297. });
  80298. var S = f.getItemModel(d).getModel("itemStyle").getItemStyle(), x = G0(l, "color");
  80299. S.fill || (S.fill = x, Oe(S.fill) && (S.fill = wm(S.fill, 0.4))), S.stroke || (S.stroke = x), f.setItemVisual(d, "style", S);
  80300. }), f.diff(Vb(c).data).add(function(d) {
  80301. var h = f.getItemLayout(d);
  80302. if (!h.allClipped) {
  80303. var p = new ai({
  80304. shape: {
  80305. points: h.points
  80306. }
  80307. });
  80308. f.setItemGraphicEl(d, p), c.group.add(p);
  80309. }
  80310. }).update(function(d, h) {
  80311. var p = Vb(c).data.getItemGraphicEl(h), v = f.getItemLayout(d);
  80312. v.allClipped ? p && c.group.remove(p) : (p ? Ct(p, {
  80313. shape: {
  80314. points: v.points
  80315. }
  80316. }, r, d) : p = new ai({
  80317. shape: {
  80318. points: v.points
  80319. }
  80320. }), f.setItemGraphicEl(d, p), c.group.add(p));
  80321. }).remove(function(d) {
  80322. var h = Vb(c).data.getItemGraphicEl(d);
  80323. c.group.remove(h);
  80324. }).execute(), f.eachItemGraphicEl(function(d, h) {
  80325. var p = f.getItemModel(h), v = f.getItemVisual(h, "style");
  80326. d.useStyle(f.getItemVisual(h, "style")), Pr(d, er(p), {
  80327. labelFetcher: r,
  80328. labelDataIndex: h,
  80329. defaultText: f.getName(h) || "",
  80330. inheritColor: Oe(v.fill) ? wm(v.fill, 1) : "#000"
  80331. }), Tr(d, p), bn(d, null, null, p.get(["emphasis", "disabled"])), Fe(d).dataModel = r;
  80332. }), Vb(c).data = f, c.group.silent = r.get("silent") || n.get("silent");
  80333. }, e.type = "markArea", e;
  80334. }(EL)
  80335. );
  80336. function I9e(t, e, n) {
  80337. var r, i, a = ["x0", "y0", "x1", "y1"];
  80338. if (t) {
  80339. var o = ce(t && t.dimensions, function(u) {
  80340. var c = e.getData(), f = c.getDimensionInfo(c.mapDimension(u)) || {};
  80341. return le(le({}, f), {
  80342. name: u,
  80343. // DON'T use ordinalMeta to parse and collect ordinal.
  80344. ordinalMeta: null
  80345. });
  80346. });
  80347. i = ce(a, function(u, c) {
  80348. return {
  80349. name: u,
  80350. type: o[c % 2].type
  80351. };
  80352. }), r = new Nr(i, n);
  80353. } else
  80354. i = [{
  80355. name: "value",
  80356. type: "float"
  80357. }], r = new Nr(i, n);
  80358. var s = ce(n.get("data"), Ue(A9e, e, t, n));
  80359. t && (s = Nt(s, Ue(E9e, t)));
  80360. var l = t ? function(u, c, f, d) {
  80361. var h = u.coord[Math.floor(d / 2)][d % 2];
  80362. return Kl(h, i[d]);
  80363. } : function(u, c, f, d) {
  80364. return Kl(u.value, i[d]);
  80365. };
  80366. return r.initData(s, null, l), r.hasItemOption = !0, r;
  80367. }
  80368. function D9e(t) {
  80369. t.registerComponentModel($9e), t.registerComponentView(M9e), t.registerPreprocessor(function(e) {
  80370. $L(e.series, "markArea") && (e.markArea = e.markArea || {});
  80371. });
  80372. }
  80373. var R9e = function(t, e) {
  80374. if (e === "all")
  80375. return {
  80376. type: "all",
  80377. title: t.getLocaleModel().get(["legend", "selector", "all"])
  80378. };
  80379. if (e === "inverse")
  80380. return {
  80381. type: "inverse",
  80382. title: t.getLocaleModel().get(["legend", "selector", "inverse"])
  80383. };
  80384. }, VE = (
  80385. /** @class */
  80386. function(t) {
  80387. q(e, t);
  80388. function e() {
  80389. var n = t !== null && t.apply(this, arguments) || this;
  80390. return n.type = e.type, n.layoutMode = {
  80391. type: "box",
  80392. // legend.width/height are maxWidth/maxHeight actually,
  80393. // whereas real width/height is calculated by its content.
  80394. // (Setting {left: 10, right: 10} does not make sense).
  80395. // So consider the case:
  80396. // `setOption({legend: {left: 10});`
  80397. // then `setOption({legend: {right: 10});`
  80398. // The previous `left` should be cleared by setting `ignoreSize`.
  80399. ignoreSize: !0
  80400. }, n;
  80401. }
  80402. return e.prototype.init = function(n, r, i) {
  80403. this.mergeDefaultAndTheme(n, i), n.selected = n.selected || {}, this._updateSelector(n);
  80404. }, e.prototype.mergeOption = function(n, r) {
  80405. t.prototype.mergeOption.call(this, n, r), this._updateSelector(n);
  80406. }, e.prototype._updateSelector = function(n) {
  80407. var r = n.selector, i = this.ecModel;
  80408. r === !0 && (r = n.selector = ["all", "inverse"]), ue(r) && k(r, function(a, o) {
  80409. Oe(a) && (a = {
  80410. type: a
  80411. }), r[o] = qe(a, R9e(i, a.type));
  80412. });
  80413. }, e.prototype.optionUpdated = function() {
  80414. this._updateData(this.ecModel);
  80415. var n = this._data;
  80416. if (n[0] && this.get("selectedMode") === "single") {
  80417. for (var r = !1, i = 0; i < n.length; i++) {
  80418. var a = n[i].get("name");
  80419. if (this.isSelected(a)) {
  80420. this.select(a), r = !0;
  80421. break;
  80422. }
  80423. }
  80424. !r && this.select(n[0].get("name"));
  80425. }
  80426. }, e.prototype._updateData = function(n) {
  80427. var r = [], i = [];
  80428. n.eachRawSeries(function(l) {
  80429. var u = l.name;
  80430. i.push(u);
  80431. var c;
  80432. if (l.legendVisualProvider) {
  80433. var f = l.legendVisualProvider, d = f.getAllNames();
  80434. n.isSeriesFiltered(l) || (i = i.concat(d)), d.length ? r = r.concat(d) : c = !0;
  80435. } else
  80436. c = !0;
  80437. c && ER(l) && r.push(l.name);
  80438. }), this._availableNames = i;
  80439. var a = this.get("data") || r, o = Pe(), s = ce(a, function(l) {
  80440. return (Oe(l) || St(l)) && (l = {
  80441. name: l
  80442. }), o.get(l.name) ? null : (o.set(l.name, !0), new Wt(l, this, this.ecModel));
  80443. }, this);
  80444. this._data = Nt(s, function(l) {
  80445. return !!l;
  80446. });
  80447. }, e.prototype.getData = function() {
  80448. return this._data;
  80449. }, e.prototype.select = function(n) {
  80450. var r = this.option.selected, i = this.get("selectedMode");
  80451. if (i === "single") {
  80452. var a = this._data;
  80453. k(a, function(o) {
  80454. r[o.get("name")] = !1;
  80455. });
  80456. }
  80457. r[n] = !0;
  80458. }, e.prototype.unSelect = function(n) {
  80459. this.get("selectedMode") !== "single" && (this.option.selected[n] = !1);
  80460. }, e.prototype.toggleSelected = function(n) {
  80461. var r = this.option.selected;
  80462. r.hasOwnProperty(n) || (r[n] = !0), this[r[n] ? "unSelect" : "select"](n);
  80463. }, e.prototype.allSelect = function() {
  80464. var n = this._data, r = this.option.selected;
  80465. k(n, function(i) {
  80466. r[i.get("name", !0)] = !0;
  80467. });
  80468. }, e.prototype.inverseSelect = function() {
  80469. var n = this._data, r = this.option.selected;
  80470. k(n, function(i) {
  80471. var a = i.get("name", !0);
  80472. r.hasOwnProperty(a) || (r[a] = !0), r[a] = !r[a];
  80473. });
  80474. }, e.prototype.isSelected = function(n) {
  80475. var r = this.option.selected;
  80476. return !(r.hasOwnProperty(n) && !r[n]) && et(this._availableNames, n) >= 0;
  80477. }, e.prototype.getOrient = function() {
  80478. return this.get("orient") === "vertical" ? {
  80479. index: 1,
  80480. name: "vertical"
  80481. } : {
  80482. index: 0,
  80483. name: "horizontal"
  80484. };
  80485. }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
  80486. // zlevel: 0,
  80487. z: 4,
  80488. show: !0,
  80489. orient: "horizontal",
  80490. left: "center",
  80491. // right: 'center',
  80492. top: 0,
  80493. // bottom: null,
  80494. align: "auto",
  80495. backgroundColor: "rgba(0,0,0,0)",
  80496. borderColor: "#ccc",
  80497. borderRadius: 0,
  80498. borderWidth: 0,
  80499. padding: 5,
  80500. itemGap: 10,
  80501. itemWidth: 25,
  80502. itemHeight: 14,
  80503. symbolRotate: "inherit",
  80504. symbolKeepAspect: !0,
  80505. inactiveColor: "#ccc",
  80506. inactiveBorderColor: "#ccc",
  80507. inactiveBorderWidth: "auto",
  80508. itemStyle: {
  80509. color: "inherit",
  80510. opacity: "inherit",
  80511. borderColor: "inherit",
  80512. borderWidth: "auto",
  80513. borderCap: "inherit",
  80514. borderJoin: "inherit",
  80515. borderDashOffset: "inherit",
  80516. borderMiterLimit: "inherit"
  80517. },
  80518. lineStyle: {
  80519. width: "auto",
  80520. color: "inherit",
  80521. inactiveColor: "#ccc",
  80522. inactiveWidth: 2,
  80523. opacity: "inherit",
  80524. type: "inherit",
  80525. cap: "inherit",
  80526. join: "inherit",
  80527. dashOffset: "inherit",
  80528. miterLimit: "inherit"
  80529. },
  80530. textStyle: {
  80531. color: "#333"
  80532. },
  80533. selectedMode: !0,
  80534. selector: !1,
  80535. selectorLabel: {
  80536. show: !0,
  80537. borderRadius: 10,
  80538. padding: [3, 5, 3, 5],
  80539. fontSize: 12,
  80540. fontFamily: "sans-serif",
  80541. color: "#666",
  80542. borderWidth: 1,
  80543. borderColor: "#666"
  80544. },
  80545. emphasis: {
  80546. selectorLabel: {
  80547. show: !0,
  80548. color: "#eee",
  80549. backgroundColor: "#666"
  80550. }
  80551. },
  80552. selectorPosition: "auto",
  80553. selectorItemGap: 7,
  80554. selectorButtonGap: 10,
  80555. tooltip: {
  80556. show: !1
  80557. }
  80558. }, e;
  80559. }(rt)
  80560. ), _d = Ue, FE = k, Fb = Ve, nie = (
  80561. /** @class */
  80562. function(t) {
  80563. q(e, t);
  80564. function e() {
  80565. var n = t !== null && t.apply(this, arguments) || this;
  80566. return n.type = e.type, n.newlineDisabled = !1, n;
  80567. }
  80568. return e.prototype.init = function() {
  80569. this.group.add(this._contentGroup = new Fb()), this.group.add(this._selectorGroup = new Fb()), this._isFirstRender = !0;
  80570. }, e.prototype.getContentGroup = function() {
  80571. return this._contentGroup;
  80572. }, e.prototype.getSelectorGroup = function() {
  80573. return this._selectorGroup;
  80574. }, e.prototype.render = function(n, r, i) {
  80575. var a = this._isFirstRender;
  80576. if (this._isFirstRender = !1, this.resetInner(), !!n.get("show", !0)) {
  80577. var o = n.get("align"), s = n.get("orient");
  80578. (!o || o === "auto") && (o = n.get("left") === "right" && s === "vertical" ? "right" : "left");
  80579. var l = n.get("selector", !0), u = n.get("selectorPosition", !0);
  80580. l && (!u || u === "auto") && (u = s === "horizontal" ? "end" : "start"), this.renderInner(o, n, r, i, l, s, u);
  80581. var c = n.getBoxLayoutParams(), f = {
  80582. width: i.getWidth(),
  80583. height: i.getHeight()
  80584. }, d = n.get("padding"), h = Rn(c, f, d), p = this.layoutInner(n, o, h, a, l, u), v = Rn(Re({
  80585. width: p.width,
  80586. height: p.height
  80587. }, c), f, d);
  80588. this.group.x = v.x - p.x, this.group.y = v.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = Hre(p, n));
  80589. }
  80590. }, e.prototype.resetInner = function() {
  80591. this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
  80592. }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
  80593. var u = this.getContentGroup(), c = Pe(), f = r.get("selectedMode"), d = [];
  80594. i.eachRawSeries(function(h) {
  80595. !h.get("legendHoverLink") && d.push(h.id);
  80596. }), FE(r.getData(), function(h, p) {
  80597. var v = h.get("name");
  80598. if (!this.newlineDisabled && (v === "" || v === `
  80599. `)) {
  80600. var g = new Fb();
  80601. g.newline = !0, u.add(g);
  80602. return;
  80603. }
  80604. var m = i.getSeriesByName(v)[0];
  80605. if (!c.get(v)) {
  80606. if (m) {
  80607. var y = m.getData(), b = y.getVisual("legendLineStyle") || {}, _ = y.getVisual("legendIcon"), O = y.getVisual("style"), S = this._createItem(m, v, p, h, r, n, b, O, _, f, a);
  80608. S.on("click", _d(K7, v, null, a, d)).on("mouseover", _d(WE, m.name, null, a, d)).on("mouseout", _d(QE, m.name, null, a, d)), i.ssr && S.eachChild(function(x) {
  80609. var C = Fe(x);
  80610. C.seriesIndex = m.seriesIndex, C.dataIndex = p, C.ssrType = "legend";
  80611. }), c.set(v, !0);
  80612. } else
  80613. i.eachRawSeries(function(x) {
  80614. if (!c.get(v) && x.legendVisualProvider) {
  80615. var C = x.legendVisualProvider;
  80616. if (!C.containName(v))
  80617. return;
  80618. var T = C.indexOfName(v), w = C.getItemVisual(T, "style"), P = C.getItemVisual(T, "legendIcon"), $ = Kr(w.fill);
  80619. $ && $[3] === 0 && ($[3] = 0.2, w = le(le({}, w), {
  80620. fill: no($, "rgba")
  80621. }));
  80622. var A = this._createItem(x, v, p, h, r, n, {}, w, P, f, a);
  80623. A.on("click", _d(K7, null, v, a, d)).on("mouseover", _d(WE, null, v, a, d)).on("mouseout", _d(QE, null, v, a, d)), i.ssr && A.eachChild(function(D) {
  80624. var E = Fe(D);
  80625. E.seriesIndex = x.seriesIndex, E.dataIndex = p, E.ssrType = "legend";
  80626. }), c.set(v, !0);
  80627. }
  80628. }, this);
  80629. 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."));
  80630. }
  80631. }, this), o && this._createSelector(o, r, a, s, l);
  80632. }, e.prototype._createSelector = function(n, r, i, a, o) {
  80633. var s = this.getSelectorGroup();
  80634. FE(n, function(u) {
  80635. var c = u.type, f = new gt({
  80636. style: {
  80637. x: 0,
  80638. y: 0,
  80639. align: "center",
  80640. verticalAlign: "middle"
  80641. },
  80642. onclick: function() {
  80643. i.dispatchAction({
  80644. type: c === "all" ? "legendAllSelect" : "legendInverseSelect"
  80645. });
  80646. }
  80647. });
  80648. s.add(f);
  80649. var d = r.getModel("selectorLabel"), h = r.getModel(["emphasis", "selectorLabel"]);
  80650. Pr(f, {
  80651. normal: d,
  80652. emphasis: h
  80653. }, {
  80654. defaultText: u.title
  80655. }), Yl(f);
  80656. });
  80657. }, e.prototype._createItem = function(n, r, i, a, o, s, l, u, c, f, d) {
  80658. var h = n.visualDrawType, p = o.get("itemWidth"), v = o.get("itemHeight"), g = o.isSelected(r), m = a.get("symbolRotate"), y = a.get("symbolKeepAspect"), b = a.get("icon");
  80659. c = b || c || "roundRect";
  80660. var _ = k9e(c, a, l, u, h, g, d), O = new Fb(), S = a.getModel("textStyle");
  80661. if (Me(n.getLegendIcon) && (!b || b === "inherit"))
  80662. O.add(n.getLegendIcon({
  80663. itemWidth: p,
  80664. itemHeight: v,
  80665. icon: c,
  80666. iconRotate: m,
  80667. itemStyle: _.itemStyle,
  80668. lineStyle: _.lineStyle,
  80669. symbolKeepAspect: y
  80670. }));
  80671. else {
  80672. var x = b === "inherit" && n.getData().getVisual("symbol") ? m === "inherit" ? n.getData().getVisual("symbolRotate") : m : 0;
  80673. O.add(L9e({
  80674. itemWidth: p,
  80675. itemHeight: v,
  80676. icon: c,
  80677. iconRotate: x,
  80678. itemStyle: _.itemStyle,
  80679. lineStyle: _.lineStyle,
  80680. symbolKeepAspect: y
  80681. }));
  80682. }
  80683. var C = s === "left" ? p + 5 : -5, T = s, w = o.get("formatter"), P = r;
  80684. Oe(w) && w ? P = w.replace("{name}", r ?? "") : Me(w) && (P = w(r));
  80685. var $ = g ? S.getTextColor() : a.get("inactiveColor");
  80686. O.add(new gt({
  80687. style: Zt(S, {
  80688. text: P,
  80689. x: C,
  80690. y: v / 2,
  80691. fill: $,
  80692. align: T,
  80693. verticalAlign: "middle"
  80694. }, {
  80695. inheritColor: $
  80696. })
  80697. }));
  80698. var A = new mt({
  80699. shape: O.getBoundingRect(),
  80700. style: {
  80701. // Cannot use 'invisible' because SVG SSR will miss the node
  80702. fill: "transparent"
  80703. }
  80704. }), D = a.getModel("tooltip");
  80705. return D.get("show") && Op({
  80706. el: A,
  80707. componentModel: o,
  80708. itemName: r,
  80709. itemTooltipOption: D.option
  80710. }), O.add(A), O.eachChild(function(E) {
  80711. E.silent = !0;
  80712. }), A.silent = !f, this.getContentGroup().add(O), Yl(O), O.__legendDataIndex = i, O;
  80713. }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
  80714. var l = this.getContentGroup(), u = this.getSelectorGroup();
  80715. tf(n.get("orient"), l, n.get("itemGap"), i.width, i.height);
  80716. var c = l.getBoundingRect(), f = [-c.x, -c.y];
  80717. if (u.markRedraw(), l.markRedraw(), o) {
  80718. tf(
  80719. // Buttons in selectorGroup always layout horizontally
  80720. "horizontal",
  80721. u,
  80722. n.get("selectorItemGap", !0)
  80723. );
  80724. 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";
  80725. 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];
  80726. var b = {
  80727. x: 0,
  80728. y: 0
  80729. };
  80730. return b[g] = c[g] + p + d[g], b[m] = Math.max(c[m], d[m]), b[y] = Math.min(0, d[y] + h[1 - v]), b;
  80731. } else
  80732. return l.x = f[0], l.y = f[1], this.group.getBoundingRect();
  80733. }, e.prototype.remove = function() {
  80734. this.getContentGroup().removeAll(), this._isFirstRender = !0;
  80735. }, e.type = "legend.plain", e;
  80736. }(Xt)
  80737. );
  80738. function k9e(t, e, n, r, i, a, o) {
  80739. function s(g, m) {
  80740. g.lineWidth === "auto" && (g.lineWidth = m.lineWidth > 0 ? 2 : 0), FE(g, function(y, b) {
  80741. g[b] === "inherit" && (g[b] = m[b]);
  80742. });
  80743. }
  80744. var l = e.getModel("itemStyle"), u = l.getItemStyle(), c = t.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", f = l.getShallow("decal");
  80745. u.decal = !f || f === "inherit" ? r.decal : jh(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);
  80746. var d = e.getModel("lineStyle"), h = d.getLineStyle();
  80747. 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) {
  80748. var p = e.get("inactiveBorderWidth"), v = u[c];
  80749. 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");
  80750. }
  80751. return {
  80752. itemStyle: u,
  80753. lineStyle: h
  80754. };
  80755. }
  80756. function L9e(t) {
  80757. var e = t.icon || "roundRect", n = $n(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
  80758. 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;
  80759. }
  80760. function K7(t, e, n, r) {
  80761. QE(t, e, n, r), n.dispatchAction({
  80762. type: "legendToggleSelect",
  80763. name: t ?? e
  80764. }), WE(t, e, n, r);
  80765. }
  80766. function rie(t) {
  80767. for (var e = t.getZr().storage.getDisplayList(), n, r = 0, i = e.length; r < i && !(n = e[r].states.emphasis); )
  80768. r++;
  80769. return n && n.hoverLayer;
  80770. }
  80771. function WE(t, e, n, r) {
  80772. rie(n) || n.dispatchAction({
  80773. type: "highlight",
  80774. seriesName: t,
  80775. name: e,
  80776. excludeSeriesId: r
  80777. });
  80778. }
  80779. function QE(t, e, n, r) {
  80780. rie(n) || n.dispatchAction({
  80781. type: "downplay",
  80782. seriesName: t,
  80783. name: e,
  80784. excludeSeriesId: r
  80785. });
  80786. }
  80787. function N9e(t) {
  80788. var e = t.findComponents({
  80789. mainType: "legend"
  80790. });
  80791. e && e.length && t.filterSeries(function(n) {
  80792. for (var r = 0; r < e.length; r++)
  80793. if (!e[r].isSelected(n.name))
  80794. return !1;
  80795. return !0;
  80796. });
  80797. }
  80798. function $v(t, e, n) {
  80799. var r = {}, i = t === "toggleSelected", a;
  80800. return n.eachComponent("legend", function(o) {
  80801. i && a != null ? o[a ? "select" : "unSelect"](e.name) : t === "allSelect" || t === "inverseSelect" ? o[t]() : (o[t](e.name), a = o.isSelected(e.name));
  80802. var s = o.getData();
  80803. k(s, function(l) {
  80804. var u = l.get("name");
  80805. if (!(u === `
  80806. ` || u === "")) {
  80807. var c = o.isSelected(u);
  80808. r.hasOwnProperty(u) ? r[u] = r[u] && c : r[u] = c;
  80809. }
  80810. });
  80811. }), t === "allSelect" || t === "inverseSelect" ? {
  80812. selected: r
  80813. } : {
  80814. name: e.name,
  80815. selected: r
  80816. };
  80817. }
  80818. function B9e(t) {
  80819. t.registerAction("legendToggleSelect", "legendselectchanged", Ue($v, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", Ue($v, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", Ue($v, "inverseSelect")), t.registerAction("legendSelect", "legendselected", Ue($v, "select")), t.registerAction("legendUnSelect", "legendunselected", Ue($v, "unSelect"));
  80820. }
  80821. function iie(t) {
  80822. t.registerComponentModel(VE), t.registerComponentView(nie), t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, N9e), t.registerSubTypeDefaulter("legend", function() {
  80823. return "plain";
  80824. }), B9e(t);
  80825. }
  80826. var z9e = (
  80827. /** @class */
  80828. function(t) {
  80829. q(e, t);
  80830. function e() {
  80831. var n = t !== null && t.apply(this, arguments) || this;
  80832. return n.type = e.type, n;
  80833. }
  80834. return e.prototype.setScrollDataIndex = function(n) {
  80835. this.option.scrollDataIndex = n;
  80836. }, e.prototype.init = function(n, r, i) {
  80837. var a = wp(n);
  80838. t.prototype.init.call(this, n, r, i), J7(this, n, a);
  80839. }, e.prototype.mergeOption = function(n, r) {
  80840. t.prototype.mergeOption.call(this, n, r), J7(this, this.option, n);
  80841. }, e.type = "legend.scroll", e.defaultOption = Pu(VE.defaultOption, {
  80842. scrollDataIndex: 0,
  80843. pageButtonItemGap: 5,
  80844. pageButtonGap: null,
  80845. pageButtonPosition: "end",
  80846. pageFormatter: "{current}/{total}",
  80847. pageIcons: {
  80848. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  80849. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  80850. },
  80851. pageIconColor: "#2f4554",
  80852. pageIconInactiveColor: "#aaa",
  80853. pageIconSize: 15,
  80854. pageTextStyle: {
  80855. color: "#333"
  80856. },
  80857. animationDurationUpdate: 800
  80858. }), e;
  80859. }(VE)
  80860. );
  80861. function J7(t, e, n) {
  80862. var r = t.getOrient(), i = [1, 1];
  80863. i[r.index] = 0, cu(e, n, {
  80864. type: "box",
  80865. ignoreSize: !!i
  80866. });
  80867. }
  80868. var eQ = Ve, n$ = ["width", "height"], r$ = ["x", "y"], V9e = (
  80869. /** @class */
  80870. function(t) {
  80871. q(e, t);
  80872. function e() {
  80873. var n = t !== null && t.apply(this, arguments) || this;
  80874. return n.type = e.type, n.newlineDisabled = !0, n._currentIndex = 0, n;
  80875. }
  80876. return e.prototype.init = function() {
  80877. t.prototype.init.call(this), this.group.add(this._containerGroup = new eQ()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new eQ());
  80878. }, e.prototype.resetInner = function() {
  80879. t.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
  80880. }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
  80881. var u = this;
  80882. t.prototype.renderInner.call(this, n, r, i, a, o, s, l);
  80883. var c = this._controllerGroup, f = r.get("pageIconSize", !0), d = ue(f) ? f : [f, f];
  80884. p("pagePrev", 0);
  80885. var h = r.getModel("pageTextStyle");
  80886. c.add(new gt({
  80887. name: "pageText",
  80888. style: {
  80889. // Placeholder to calculate a proper layout.
  80890. text: "xx/xx",
  80891. fill: h.getTextColor(),
  80892. font: h.getFont(),
  80893. verticalAlign: "middle",
  80894. align: "center"
  80895. },
  80896. silent: !0
  80897. })), p("pageNext", 1);
  80898. function p(v, g) {
  80899. var m = v + "DataIndex", y = _p(r.get("pageIcons", !0)[r.getOrient().name][g], {
  80900. // Buttons will be created in each render, so we do not need
  80901. // to worry about avoiding using legendModel kept in scope.
  80902. onclick: xe(u._pageGo, u, m, r, a)
  80903. }, {
  80904. x: -d[0] / 2,
  80905. y: -d[1] / 2,
  80906. width: d[0],
  80907. height: d[1]
  80908. });
  80909. y.name = v, c.add(y);
  80910. }
  80911. }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
  80912. var l = this.getSelectorGroup(), u = n.getOrient().index, c = n$[u], f = r$[u], d = n$[1 - u], h = r$[1 - u];
  80913. o && tf(
  80914. // Buttons in selectorGroup always layout horizontally
  80915. "horizontal",
  80916. l,
  80917. n.get("selectorItemGap", !0)
  80918. );
  80919. var p = n.get("selectorButtonGap", !0), v = l.getBoundingRect(), g = [-v.x, -v.y], m = Le(i);
  80920. o && (m[c] = i[c] - v[c] - p);
  80921. var y = this._layoutContentAndController(n, a, m, u, c, d, h, f);
  80922. if (o) {
  80923. if (s === "end")
  80924. g[u] += y[c] + p;
  80925. else {
  80926. var b = v[c] + p;
  80927. g[u] -= b, y[f] -= b;
  80928. }
  80929. 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();
  80930. }
  80931. return y;
  80932. }, e.prototype._layoutContentAndController = function(n, r, i, a, o, s, l, u) {
  80933. var c = this.getContentGroup(), f = this._containerGroup, d = this._controllerGroup;
  80934. tf(n.get("orient"), c, n.get("itemGap"), a ? i.width : null, a ? null : i.height), tf(
  80935. // Buttons in controller are layout always horizontally.
  80936. "horizontal",
  80937. d,
  80938. n.get("pageButtonItemGap", !0)
  80939. );
  80940. var h = c.getBoundingRect(), p = d.getBoundingRect(), v = this._showController = h[o] > i[o], g = [-h.x, -h.y];
  80941. r || (g[a] = c[u]);
  80942. var m = [0, 0], y = [-p.x, -p.y], b = We(n.get("pageButtonGap", !0), n.get("itemGap", !0));
  80943. if (v) {
  80944. var _ = n.get("pageButtonPosition", !0);
  80945. _ === "end" ? y[a] += i[o] - p[o] : m[a] += p[o] + b;
  80946. }
  80947. y[1 - a] += h[s] / 2 - p[s] / 2, c.setPosition(g), f.setPosition(m), d.setPosition(y);
  80948. var O = {
  80949. x: 0,
  80950. y: 0
  80951. };
  80952. if (O[o] = v ? i[o] : h[o], O[s] = Math.max(h[s], p[s]), O[l] = Math.min(0, p[l] + y[1 - a]), f.__rectSize = i[o], v) {
  80953. var S = {
  80954. x: 0,
  80955. y: 0
  80956. };
  80957. S[o] = Math.max(i[o] - p[o] - b, 0), S[s] = O[s], f.setClipPath(new mt({
  80958. shape: S
  80959. })), f.__rectSize = S[o];
  80960. } else
  80961. d.eachChild(function(C) {
  80962. C.attr({
  80963. invisible: !0,
  80964. silent: !0
  80965. });
  80966. });
  80967. var x = this._getPageInfo(n);
  80968. return x.pageIndex != null && Ct(
  80969. c,
  80970. {
  80971. x: x.contentPosition[0],
  80972. y: x.contentPosition[1]
  80973. },
  80974. // When switch from "show controller" to "not show controller", view should be
  80975. // updated immediately without animation, otherwise causes weird effect.
  80976. v ? n : null
  80977. ), this._updatePageInfoView(n, x), O;
  80978. }, e.prototype._pageGo = function(n, r, i) {
  80979. var a = this._getPageInfo(r)[n];
  80980. a != null && i.dispatchAction({
  80981. type: "legendScroll",
  80982. scrollDataIndex: a,
  80983. legendId: r.id
  80984. });
  80985. }, e.prototype._updatePageInfoView = function(n, r) {
  80986. var i = this._controllerGroup;
  80987. k(["pagePrev", "pageNext"], function(c) {
  80988. var f = c + "DataIndex", d = r[f] != null, h = i.childOfName(c);
  80989. h && (h.setStyle("fill", d ? n.get("pageIconColor", !0) : n.get("pageIconInactiveColor", !0)), h.cursor = d ? "pointer" : "default");
  80990. });
  80991. var a = i.childOfName("pageText"), o = n.get("pageFormatter"), s = r.pageIndex, l = s != null ? s + 1 : 0, u = r.pageCount;
  80992. a && o && a.setStyle("text", Oe(o) ? o.replace("{current}", l == null ? "" : l + "").replace("{total}", u == null ? "" : u + "") : o({
  80993. current: l,
  80994. total: u
  80995. }));
  80996. }, e.prototype._getPageInfo = function(n) {
  80997. var r = n.get("scrollDataIndex", !0), i = this.getContentGroup(), a = this._containerGroup.__rectSize, o = n.getOrient().index, s = n$[o], l = r$[o], u = this._findTargetItemIndex(r), c = i.children(), f = c[u], d = c.length, h = d ? 1 : 0, p = {
  80998. contentPosition: [i.x, i.y],
  80999. pageCount: h,
  81000. pageIndex: h - 1,
  81001. pagePrevDataIndex: null,
  81002. pageNextDataIndex: null
  81003. };
  81004. if (!f)
  81005. return p;
  81006. var v = _(f);
  81007. p.contentPosition[o] = -v.s;
  81008. for (var g = u + 1, m = v, y = v, b = null; g <= d; ++g)
  81009. b = _(c[g]), // Half of the last item is out of the window.
  81010. (!b && y.e > m.s + a || b && !O(b, m.s)) && (y.i > m.i ? m = y : m = b, m && (p.pageNextDataIndex == null && (p.pageNextDataIndex = m.i), ++p.pageCount)), y = b;
  81011. for (var g = u - 1, m = v, y = v, b = null; g >= -1; --g)
  81012. b = _(c[g]), // If the the end item does not intersect with the window started
  81013. // from the current item, a page can be settled.
  81014. (!b || !O(y, b.s)) && m.i < y.i && (y = m, p.pagePrevDataIndex == null && (p.pagePrevDataIndex = m.i), ++p.pageCount, ++p.pageIndex), m = b;
  81015. return p;
  81016. function _(S) {
  81017. if (S) {
  81018. var x = S.getBoundingRect(), C = x[l] + S[l];
  81019. return {
  81020. s: C,
  81021. e: C + x[s],
  81022. i: S.__legendDataIndex
  81023. };
  81024. }
  81025. }
  81026. function O(S, x) {
  81027. return S.e >= x && S.s <= x + a;
  81028. }
  81029. }, e.prototype._findTargetItemIndex = function(n) {
  81030. if (!this._showController)
  81031. return 0;
  81032. var r, i = this.getContentGroup(), a;
  81033. return i.eachChild(function(o, s) {
  81034. var l = o.__legendDataIndex;
  81035. a == null && l != null && (a = s), l === n && (r = s);
  81036. }), r ?? a;
  81037. }, e.type = "legend.scroll", e;
  81038. }(nie)
  81039. );
  81040. function F9e(t) {
  81041. t.registerAction("legendScroll", "legendscroll", function(e, n) {
  81042. var r = e.scrollDataIndex;
  81043. r != null && n.eachComponent({
  81044. mainType: "legend",
  81045. subType: "scroll",
  81046. query: e
  81047. }, function(i) {
  81048. i.setScrollDataIndex(r);
  81049. });
  81050. });
  81051. }
  81052. function W9e(t) {
  81053. at(iie), t.registerComponentModel(z9e), t.registerComponentView(V9e), F9e(t);
  81054. }
  81055. function Q9e(t) {
  81056. at(iie), at(W9e);
  81057. }
  81058. var H9e = (
  81059. /** @class */
  81060. function(t) {
  81061. q(e, t);
  81062. function e() {
  81063. var n = t !== null && t.apply(this, arguments) || this;
  81064. return n.type = e.type, n;
  81065. }
  81066. return e.type = "dataZoom.inside", e.defaultOption = Pu(Gm.defaultOption, {
  81067. disabled: !1,
  81068. zoomLock: !1,
  81069. zoomOnMouseWheel: !0,
  81070. moveOnMouseMove: !0,
  81071. moveOnMouseWheel: !1,
  81072. preventDefaultMouseMove: !0
  81073. }), e;
  81074. }(Gm)
  81075. ), ML = bt();
  81076. function G9e(t, e, n) {
  81077. ML(t).coordSysRecordMap.each(function(r) {
  81078. var i = r.dataZoomInfoMap.get(e.uid);
  81079. i && (i.getRange = n);
  81080. });
  81081. }
  81082. function j9e(t, e) {
  81083. for (var n = ML(t).coordSysRecordMap, r = n.keys(), i = 0; i < r.length; i++) {
  81084. var a = r[i], o = n.get(a), s = o.dataZoomInfoMap;
  81085. if (s) {
  81086. var l = e.uid, u = s.get(l);
  81087. u && (s.removeKey(l), s.keys().length || aie(n, o));
  81088. }
  81089. }
  81090. }
  81091. function aie(t, e) {
  81092. if (e) {
  81093. t.removeKey(e.model.uid);
  81094. var n = e.controller;
  81095. n && n.dispose();
  81096. }
  81097. }
  81098. function Z9e(t, e) {
  81099. var n = {
  81100. model: e,
  81101. containsPoint: Ue(X9e, e),
  81102. dispatchAction: Ue(U9e, t),
  81103. dataZoomInfoMap: null,
  81104. controller: null
  81105. }, r = n.controller = new J0(t.getZr());
  81106. return k(["pan", "zoom", "scrollMove"], function(i) {
  81107. r.on(i, function(a) {
  81108. var o = [];
  81109. n.dataZoomInfoMap.each(function(s) {
  81110. if (a.isAvailableBehavior(s.model.option)) {
  81111. var l = (s.getRange || {})[i], u = l && l(s.dzReferCoordSysInfo, n.model.mainType, n.controller, a);
  81112. !s.model.get("disabled", !0) && u && o.push({
  81113. dataZoomId: s.model.id,
  81114. start: u[0],
  81115. end: u[1]
  81116. });
  81117. }
  81118. }), o.length && n.dispatchAction(o);
  81119. });
  81120. }), n;
  81121. }
  81122. function U9e(t, e) {
  81123. t.isDisposed() || t.dispatchAction({
  81124. type: "dataZoom",
  81125. animation: {
  81126. easing: "cubicOut",
  81127. duration: 100
  81128. },
  81129. batch: e
  81130. });
  81131. }
  81132. function X9e(t, e, n, r) {
  81133. return t.coordinateSystem.containPoint([n, r]);
  81134. }
  81135. function Y9e(t) {
  81136. var e, n = "type_", r = {
  81137. type_true: 2,
  81138. type_move: 1,
  81139. type_false: 0,
  81140. type_undefined: -1
  81141. }, i = !0;
  81142. return t.each(function(a) {
  81143. var o = a.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0;
  81144. r[n + s] > r[n + e] && (e = s), i = i && o.get("preventDefaultMouseMove", !0);
  81145. }), {
  81146. controlType: e,
  81147. opt: {
  81148. // RoamController will enable all of these functionalities,
  81149. // and the final behavior is determined by its event listener
  81150. // provided by each inside zoom.
  81151. zoomOnMouseWheel: !0,
  81152. moveOnMouseMove: !0,
  81153. moveOnMouseWheel: !0,
  81154. preventDefaultMouseMove: !!i
  81155. }
  81156. };
  81157. }
  81158. function q9e(t) {
  81159. t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, function(e, n) {
  81160. var r = ML(n), i = r.coordSysRecordMap || (r.coordSysRecordMap = Pe());
  81161. i.each(function(a) {
  81162. a.dataZoomInfoMap = null;
  81163. }), e.eachComponent({
  81164. mainType: "dataZoom",
  81165. subType: "inside"
  81166. }, function(a) {
  81167. var o = Fre(a);
  81168. k(o.infoList, function(s) {
  81169. var l = s.model.uid, u = i.get(l) || i.set(l, Z9e(n, s.model)), c = u.dataZoomInfoMap || (u.dataZoomInfoMap = Pe());
  81170. c.set(a.uid, {
  81171. dzReferCoordSysInfo: s,
  81172. model: a,
  81173. getRange: null
  81174. });
  81175. });
  81176. }), i.each(function(a) {
  81177. var o = a.controller, s, l = a.dataZoomInfoMap;
  81178. if (l) {
  81179. var u = l.keys()[0];
  81180. u != null && (s = l.get(u));
  81181. }
  81182. if (!s) {
  81183. aie(i, a);
  81184. return;
  81185. }
  81186. var c = Y9e(l);
  81187. o.enable(c.controlType, c.opt), o.setPointerChecker(a.containsPoint), Pp(a, "dispatchAction", s.model.get("throttle", !0), "fixRate");
  81188. });
  81189. });
  81190. }
  81191. var K9e = (
  81192. /** @class */
  81193. function(t) {
  81194. q(e, t);
  81195. function e() {
  81196. var n = t !== null && t.apply(this, arguments) || this;
  81197. return n.type = "dataZoom.inside", n;
  81198. }
  81199. return e.prototype.render = function(n, r, i) {
  81200. if (t.prototype.render.apply(this, arguments), n.noTarget()) {
  81201. this._clear();
  81202. return;
  81203. }
  81204. this.range = n.getPercentRange(), G9e(i, n, {
  81205. pan: xe(i$.pan, this),
  81206. zoom: xe(i$.zoom, this),
  81207. scrollMove: xe(i$.scrollMove, this)
  81208. });
  81209. }, e.prototype.dispose = function() {
  81210. this._clear(), t.prototype.dispose.apply(this, arguments);
  81211. }, e.prototype._clear = function() {
  81212. j9e(this.api, this.dataZoomModel), this.range = null;
  81213. }, e.type = "dataZoom.inside", e;
  81214. }(SL)
  81215. ), i$ = {
  81216. zoom: function(t, e, n, r) {
  81217. var i = this.range, a = i.slice(), o = t.axisModels[0];
  81218. if (o) {
  81219. var s = a$[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);
  81220. a[0] = (a[0] - l) * u + l, a[1] = (a[1] - l) * u + l;
  81221. var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
  81222. if (Hf(0, a, [0, 100], 0, c.minSpan, c.maxSpan), this.range = a, i[0] !== a[0] || i[1] !== a[1])
  81223. return a;
  81224. }
  81225. },
  81226. pan: tQ(function(t, e, n, r, i, a) {
  81227. var o = a$[r]([a.oldX, a.oldY], [a.newX, a.newY], e, i, n);
  81228. return o.signal * (t[1] - t[0]) * o.pixel / o.pixelLength;
  81229. }),
  81230. scrollMove: tQ(function(t, e, n, r, i, a) {
  81231. var o = a$[r]([0, 0], [a.scrollDelta, a.scrollDelta], e, i, n);
  81232. return o.signal * (t[1] - t[0]) * a.scrollDelta;
  81233. })
  81234. };
  81235. function tQ(t) {
  81236. return function(e, n, r, i) {
  81237. var a = this.range, o = a.slice(), s = e.axisModels[0];
  81238. if (s) {
  81239. var l = t(o, s, e, n, r, i);
  81240. if (Hf(l, o, [0, 100], "all"), this.range = o, a[0] !== o[0] || a[1] !== o[1])
  81241. return o;
  81242. }
  81243. };
  81244. }
  81245. var a$ = {
  81246. grid: function(t, e, n, r, i) {
  81247. var a = n.axis, o = {}, s = i.model.coordinateSystem.getRect();
  81248. 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;
  81249. },
  81250. polar: function(t, e, n, r, i) {
  81251. var a = n.axis, o = {}, s = i.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), u = s.getAngleAxis().getExtent();
  81252. 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;
  81253. },
  81254. singleAxis: function(t, e, n, r, i) {
  81255. var a = n.axis, o = i.model.coordinateSystem.getRect(), s = {};
  81256. 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;
  81257. }
  81258. };
  81259. function oie(t) {
  81260. xL(t), t.registerComponentModel(H9e), t.registerComponentView(K9e), q9e(t);
  81261. }
  81262. var J9e = (
  81263. /** @class */
  81264. function(t) {
  81265. q(e, t);
  81266. function e() {
  81267. var n = t !== null && t.apply(this, arguments) || this;
  81268. return n.type = e.type, n;
  81269. }
  81270. return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = Pu(Gm.defaultOption, {
  81271. show: !0,
  81272. // deault value can only be drived in view stage.
  81273. right: "ph",
  81274. top: "ph",
  81275. width: "ph",
  81276. height: "ph",
  81277. left: null,
  81278. bottom: null,
  81279. borderColor: "#d2dbee",
  81280. borderRadius: 3,
  81281. backgroundColor: "rgba(47,69,84,0)",
  81282. // dataBackgroundColor: '#ddd',
  81283. dataBackground: {
  81284. lineStyle: {
  81285. color: "#d2dbee",
  81286. width: 0.5
  81287. },
  81288. areaStyle: {
  81289. color: "#d2dbee",
  81290. opacity: 0.2
  81291. }
  81292. },
  81293. selectedDataBackground: {
  81294. lineStyle: {
  81295. color: "#8fb0f7",
  81296. width: 0.5
  81297. },
  81298. areaStyle: {
  81299. color: "#8fb0f7",
  81300. opacity: 0.2
  81301. }
  81302. },
  81303. // Color of selected window.
  81304. fillerColor: "rgba(135,175,274,0.2)",
  81305. 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",
  81306. // Percent of the slider height
  81307. handleSize: "100%",
  81308. handleStyle: {
  81309. color: "#fff",
  81310. borderColor: "#ACB8D1"
  81311. },
  81312. moveHandleSize: 7,
  81313. 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",
  81314. moveHandleStyle: {
  81315. color: "#D2DBEE",
  81316. opacity: 0.7
  81317. },
  81318. showDetail: !0,
  81319. showDataShadow: "auto",
  81320. realtime: !0,
  81321. zoomLock: !1,
  81322. textStyle: {
  81323. color: "#6E7079"
  81324. },
  81325. brushSelect: !0,
  81326. brushStyle: {
  81327. color: "rgba(135,175,274,0.15)"
  81328. },
  81329. emphasis: {
  81330. handleStyle: {
  81331. borderColor: "#8FB0F7"
  81332. },
  81333. moveHandleStyle: {
  81334. color: "#8FB0F7"
  81335. }
  81336. }
  81337. }), e;
  81338. }(Gm)
  81339. ), Av = mt, nQ = 7, eje = 1, o$ = 30, tje = 7, Ev = "horizontal", rQ = "vertical", nje = 5, rje = ["line", "bar", "candlestick", "scatter"], ije = {
  81340. easing: "cubicOut",
  81341. duration: 100,
  81342. delay: 0
  81343. }, aje = (
  81344. /** @class */
  81345. function(t) {
  81346. q(e, t);
  81347. function e() {
  81348. var n = t !== null && t.apply(this, arguments) || this;
  81349. return n.type = e.type, n._displayables = {}, n;
  81350. }
  81351. return e.prototype.init = function(n, r) {
  81352. this.api = r, this._onBrush = xe(this._onBrush, this), this._onBrushEnd = xe(this._onBrushEnd, this);
  81353. }, e.prototype.render = function(n, r, i, a) {
  81354. if (t.prototype.render.apply(this, arguments), Pp(this, "_dispatchZoomAction", n.get("throttle"), "fixRate"), this._orient = n.getOrient(), n.get("show") === !1) {
  81355. this.group.removeAll();
  81356. return;
  81357. }
  81358. if (n.noTarget()) {
  81359. this._clear(), this.group.removeAll();
  81360. return;
  81361. }
  81362. (!a || a.type !== "dataZoom" || a.from !== this.uid) && this._buildView(), this._updateView();
  81363. }, e.prototype.dispose = function() {
  81364. this._clear(), t.prototype.dispose.apply(this, arguments);
  81365. }, e.prototype._clear = function() {
  81366. Im(this, "_dispatchZoomAction");
  81367. var n = this.api.getZr();
  81368. n.off("mousemove", this._onBrush), n.off("mouseup", this._onBrushEnd);
  81369. }, e.prototype._buildView = function() {
  81370. var n = this.group;
  81371. n.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
  81372. var r = this._displayables.sliderGroup = new Ve();
  81373. this._renderBackground(), this._renderHandle(), this._renderDataShadow(), n.add(r), this._positionGroup();
  81374. }, e.prototype._resetLocation = function() {
  81375. var n = this.dataZoomModel, r = this.api, i = n.get("brushSelect"), a = i ? tje : 0, o = this._findCoordRect(), s = {
  81376. width: r.getWidth(),
  81377. height: r.getHeight()
  81378. }, l = this._orient === Ev ? {
  81379. // Why using 'right', because right should be used in vertical,
  81380. // and it is better to be consistent for dealing with position param merge.
  81381. right: s.width - o.x - o.width,
  81382. top: s.height - o$ - nQ - a,
  81383. width: o.width,
  81384. height: o$
  81385. } : {
  81386. right: nQ,
  81387. top: o.y,
  81388. width: o$,
  81389. height: o.height
  81390. }, u = wp(n.option);
  81391. k(["right", "top", "width", "height"], function(f) {
  81392. u[f] === "ph" && (u[f] = l[f]);
  81393. });
  81394. var c = Rn(u, s);
  81395. this._location = {
  81396. x: c.x,
  81397. y: c.y
  81398. }, this._size = [c.width, c.height], this._orient === rQ && this._size.reverse();
  81399. }, e.prototype._positionGroup = function() {
  81400. 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;
  81401. s.attr(i === Ev && !o ? {
  81402. scaleY: l ? 1 : -1,
  81403. scaleX: 1
  81404. } : i === Ev && o ? {
  81405. scaleY: l ? 1 : -1,
  81406. scaleX: -1
  81407. } : i === rQ && !o ? {
  81408. scaleY: l ? -1 : 1,
  81409. scaleX: 1,
  81410. rotation: Math.PI / 2
  81411. } : {
  81412. scaleY: l ? -1 : 1,
  81413. scaleX: -1,
  81414. rotation: Math.PI / 2
  81415. });
  81416. var u = n.getBoundingRect([s]);
  81417. n.x = r.x - u.x, n.y = r.y - u.y, n.markRedraw();
  81418. }, e.prototype._getViewExtent = function() {
  81419. return [0, this._size[0]];
  81420. }, e.prototype._renderBackground = function() {
  81421. var n = this.dataZoomModel, r = this._size, i = this._displayables.sliderGroup, a = n.get("brushSelect");
  81422. i.add(new Av({
  81423. silent: !0,
  81424. shape: {
  81425. x: 0,
  81426. y: 0,
  81427. width: r[0],
  81428. height: r[1]
  81429. },
  81430. style: {
  81431. fill: n.get("backgroundColor")
  81432. },
  81433. z2: -40
  81434. }));
  81435. var o = new Av({
  81436. shape: {
  81437. x: 0,
  81438. y: 0,
  81439. width: r[0],
  81440. height: r[1]
  81441. },
  81442. style: {
  81443. fill: "transparent"
  81444. },
  81445. z2: 0,
  81446. onclick: xe(this._onClickPanel, this)
  81447. }), s = this.api.getZr();
  81448. 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);
  81449. }, e.prototype._renderDataShadow = function() {
  81450. var n = this._dataShadowInfo = this._prepareDataShadowInfo();
  81451. if (this._displayables.dataShadowSegs = [], !n)
  81452. return;
  81453. 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;
  81454. if (l == null)
  81455. return;
  81456. var u = this._shadowPolygonPts, c = this._shadowPolylinePts;
  81457. if (o !== this._shadowData || l !== this._shadowDim || r[0] !== i[0] || r[1] !== i[1]) {
  81458. var f = o.getDataExtent(l), d = (f[1] - f[0]) * 0.3;
  81459. f = [f[0] - d, f[1] + d];
  81460. var h = [0, r[1]], p = [0, r[0]], v = [[r[0], 0], [0, 0]], g = [], m = p[1] / (o.count() - 1), y = 0, b = Math.round(o.count() / r[0]), _;
  81461. o.each([l], function(T, w) {
  81462. if (b > 0 && w % b) {
  81463. y += m;
  81464. return;
  81465. }
  81466. var P = T == null || isNaN(T) || T === "", $ = P ? 0 : Lt(T, f, h, !0);
  81467. P && !_ && w ? (v.push([v[v.length - 1][0], 0]), g.push([g[g.length - 1][0], 0])) : !P && _ && (v.push([y, 0]), g.push([y, 0])), v.push([y, $]), g.push([y, $]), y += m, _ = P;
  81468. }), u = this._shadowPolygonPts = v, c = this._shadowPolylinePts = g;
  81469. }
  81470. this._shadowData = o, this._shadowDim = l, this._shadowSize = [r[0], r[1]];
  81471. var O = this.dataZoomModel;
  81472. function S(T) {
  81473. var w = O.getModel(T ? "selectedDataBackground" : "dataBackground"), P = new Ve(), $ = new ai({
  81474. shape: {
  81475. points: u
  81476. },
  81477. segmentIgnoreThreshold: 1,
  81478. style: w.getModel("areaStyle").getAreaStyle(),
  81479. silent: !0,
  81480. z2: -20
  81481. }), A = new oi({
  81482. shape: {
  81483. points: c
  81484. },
  81485. segmentIgnoreThreshold: 1,
  81486. style: w.getModel("lineStyle").getLineStyle(),
  81487. silent: !0,
  81488. z2: -19
  81489. });
  81490. return P.add($), P.add(A), P;
  81491. }
  81492. for (var x = 0; x < 3; x++) {
  81493. var C = S(x === 1);
  81494. this._displayables.sliderGroup.add(C), this._displayables.dataShadowSegs.push(C);
  81495. }
  81496. }, e.prototype._prepareDataShadowInfo = function() {
  81497. var n = this.dataZoomModel, r = n.get("showDataShadow");
  81498. if (r !== !1) {
  81499. var i, a = this.ecModel;
  81500. return n.eachTargetAxis(function(o, s) {
  81501. var l = n.getAxisProxy(o, s).getTargetSeriesModels();
  81502. k(l, function(u) {
  81503. if (!i && !(r !== !0 && et(rje, u.get("type")) < 0)) {
  81504. var c = a.getComponent(Fl(o), s).axis, f = oje(o), d, h = u.coordinateSystem;
  81505. f != null && h.getOtherAxis && (d = h.getOtherAxis(c).inverse), f = u.getData().mapDimension(f), i = {
  81506. thisAxis: c,
  81507. series: u,
  81508. thisDim: o,
  81509. otherDim: f,
  81510. otherAxisInverse: d
  81511. };
  81512. }
  81513. }, this);
  81514. }, this), i;
  81515. }
  81516. }, e.prototype._renderHandle = function() {
  81517. 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 Av({
  81518. silent: f,
  81519. style: {
  81520. fill: l.get("fillerColor")
  81521. },
  81522. textConfig: {
  81523. position: "inside"
  81524. }
  81525. });
  81526. o.add(d), o.add(new Av({
  81527. silent: !0,
  81528. subPixelOptimize: !0,
  81529. shape: {
  81530. x: 0,
  81531. y: 0,
  81532. width: s[0],
  81533. height: s[1],
  81534. r: c
  81535. },
  81536. style: {
  81537. // deprecated option
  81538. stroke: l.get("dataBackgroundColor") || l.get("borderColor"),
  81539. lineWidth: eje,
  81540. fill: "rgba(0,0,0,0)"
  81541. }
  81542. })), k([0, 1], function(b) {
  81543. var _ = l.get("handleIcon");
  81544. !yO[_] && _.indexOf("path://") < 0 && _.indexOf("image://") < 0 && (_ = "path://" + _, process.env.NODE_ENV !== "production" && Ia("handleIcon now needs 'path://' prefix when using a path string"));
  81545. var O = $n(_, -1, 0, 2, 2, null, !0);
  81546. O.attr({
  81547. cursor: iQ(this._orient),
  81548. draggable: !0,
  81549. drift: xe(this._onDragMove, this, b),
  81550. ondragend: xe(this._onDragEnd, this),
  81551. onmouseover: xe(this._showDataInfo, this, !0),
  81552. onmouseout: xe(this._showDataInfo, this, !1),
  81553. z2: 5
  81554. });
  81555. var S = O.getBoundingRect(), x = l.get("handleSize");
  81556. this._handleHeight = _e(x, this._size[1]), this._handleWidth = S.width / S.height * this._handleHeight, O.setStyle(l.getModel("handleStyle").getItemStyle()), O.style.strokeNoScale = !0, O.rectHover = !0, O.ensureState("emphasis").style = l.getModel(["emphasis", "handleStyle"]).getItemStyle(), Yl(O);
  81557. var C = l.get("handleColor");
  81558. C != null && (O.style.fill = C), o.add(i[b] = O);
  81559. var T = l.getModel("textStyle");
  81560. n.add(a[b] = new gt({
  81561. silent: !0,
  81562. invisible: !0,
  81563. style: Zt(T, {
  81564. x: 0,
  81565. y: 0,
  81566. text: "",
  81567. verticalAlign: "middle",
  81568. align: "center",
  81569. fill: T.getTextColor(),
  81570. font: T.getFont()
  81571. }),
  81572. z2: 10
  81573. }));
  81574. }, this);
  81575. var h = d;
  81576. if (f) {
  81577. var p = _e(l.get("moveHandleSize"), s[1]), v = r.moveHandle = new mt({
  81578. style: l.getModel("moveHandleStyle").getItemStyle(),
  81579. silent: !0,
  81580. shape: {
  81581. r: [0, 0, 2, 2],
  81582. y: s[1] - 0.5,
  81583. height: p
  81584. }
  81585. }), g = p * 0.8, m = r.moveHandleIcon = $n(l.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0);
  81586. m.silent = !0, m.y = s[1] + p / 2 - 0.5, v.ensureState("emphasis").style = l.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
  81587. var y = Math.min(s[1] / 2, Math.max(p, 10));
  81588. h = r.moveZone = new mt({
  81589. invisible: !0,
  81590. shape: {
  81591. y: s[1] - y,
  81592. height: p + y
  81593. }
  81594. }), h.on("mouseover", function() {
  81595. u.enterEmphasis(v);
  81596. }).on("mouseout", function() {
  81597. u.leaveEmphasis(v);
  81598. }), o.add(v), o.add(m), o.add(h);
  81599. }
  81600. h.attr({
  81601. draggable: !0,
  81602. cursor: iQ(this._orient),
  81603. drift: xe(this._onDragMove, this, "all"),
  81604. ondragstart: xe(this._showDataInfo, this, !0),
  81605. ondragend: xe(this._onDragEnd, this),
  81606. onmouseover: xe(this._showDataInfo, this, !0),
  81607. onmouseout: xe(this._showDataInfo, this, !1)
  81608. });
  81609. }, e.prototype._resetInterval = function() {
  81610. var n = this._range = this.dataZoomModel.getPercentRange(), r = this._getViewExtent();
  81611. this._handleEnds = [Lt(n[0], [0, 100], r, !0), Lt(n[1], [0, 100], r, !0)];
  81612. }, e.prototype._updateInterval = function(n, r) {
  81613. var i = this.dataZoomModel, a = this._handleEnds, o = this._getViewExtent(), s = i.findRepresentativeAxisProxy().getMinMaxSpan(), l = [0, 100];
  81614. Hf(r, a, o, i.get("zoomLock") ? "all" : n, s.minSpan != null ? Lt(s.minSpan, l, o, !0) : null, s.maxSpan != null ? Lt(s.maxSpan, l, o, !0) : null);
  81615. var u = this._range, c = this._range = Wi([Lt(a[0], o, l, !0), Lt(a[1], o, l, !0)]);
  81616. return !u || u[0] !== c[0] || u[1] !== c[1];
  81617. }, e.prototype._updateView = function(n) {
  81618. var r = this._displayables, i = this._handleEnds, a = Wi(i.slice()), o = this._size;
  81619. k([0, 1], function(h) {
  81620. var p = r.handles[h], v = this._handleHeight;
  81621. p.attr({
  81622. scaleX: v / 2,
  81623. scaleY: v / 2,
  81624. // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.
  81625. // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.
  81626. x: i[h] + (h ? -1 : 1),
  81627. y: o[1] / 2 - v / 2
  81628. });
  81629. }, this), r.filler.setShape({
  81630. x: a[0],
  81631. y: 0,
  81632. width: a[1] - a[0],
  81633. height: o[1]
  81634. });
  81635. var s = {
  81636. x: a[0],
  81637. width: a[1] - a[0]
  81638. };
  81639. r.moveHandle && (r.moveHandle.setShape(s), r.moveZone.setShape(s), r.moveZone.getBoundingRect(), r.moveHandleIcon && r.moveHandleIcon.attr("x", s.x + s.width / 2));
  81640. for (var l = r.dataShadowSegs, u = [0, a[0], a[1], o[0]], c = 0; c < l.length; c++) {
  81641. var f = l[c], d = f.getClipPath();
  81642. d || (d = new mt(), f.setClipPath(d)), d.setShape({
  81643. x: u[c],
  81644. y: 0,
  81645. width: u[c + 1] - u[c],
  81646. height: o[1]
  81647. });
  81648. }
  81649. this._updateDataInfo(n);
  81650. }, e.prototype._updateDataInfo = function(n) {
  81651. var r = this.dataZoomModel, i = this._displayables, a = i.handleLabels, o = this._orient, s = ["", ""];
  81652. if (r.get("showDetail")) {
  81653. var l = r.findRepresentativeAxisProxy();
  81654. if (l) {
  81655. var u = l.getAxisModel().axis, c = this._range, f = n ? l.calculateDataWindow({
  81656. start: c[0],
  81657. end: c[1]
  81658. }).valueWindow : l.getDataValueWindow();
  81659. s = [this._formatLabel(f[0], u), this._formatLabel(f[1], u)];
  81660. }
  81661. }
  81662. var d = Wi(this._handleEnds.slice());
  81663. h.call(this, 0), h.call(this, 1);
  81664. function h(p) {
  81665. var v = ql(i.handles[p].parent, this.group), g = ew(p === 0 ? "right" : "left", v), m = this._handleWidth / 2 + nje, y = ro([d[p] + (p === 0 ? -m : m), this._size[1] / 2], v);
  81666. a[p].setStyle({
  81667. x: y[0],
  81668. y: y[1],
  81669. verticalAlign: o === Ev ? "middle" : g,
  81670. align: o === Ev ? g : "center",
  81671. text: s[p]
  81672. });
  81673. }
  81674. }, e.prototype._formatLabel = function(n, r) {
  81675. var i = this.dataZoomModel, a = i.get("labelFormatter"), o = i.get("labelPrecision");
  81676. (o == null || o === "auto") && (o = r.getPixelPrecision());
  81677. var s = n == null || isNaN(n) ? "" : r.type === "category" || r.type === "time" ? r.scale.getLabel({
  81678. value: Math.round(n)
  81679. }) : n.toFixed(Math.min(o, 20));
  81680. return Me(a) ? a(n, s) : Oe(a) ? a.replace("{value}", s) : s;
  81681. }, e.prototype._showDataInfo = function(n) {
  81682. n = this._dragging || n;
  81683. var r = this._displayables, i = r.handleLabels;
  81684. i[0].attr("invisible", !n), i[1].attr("invisible", !n), r.moveHandle && this.api[n ? "enterEmphasis" : "leaveEmphasis"](r.moveHandle, 1);
  81685. }, e.prototype._onDragMove = function(n, r, i, a) {
  81686. this._dragging = !0, js(a.event);
  81687. var o = this._displayables.sliderGroup.getLocalTransform(), s = ro([r, i], o, !0), l = this._updateInterval(n, s[0]), u = this.dataZoomModel.get("realtime");
  81688. this._updateView(!u), l && u && this._dispatchZoomAction(!0);
  81689. }, e.prototype._onDragEnd = function() {
  81690. this._dragging = !1, this._showDataInfo(!1);
  81691. var n = this.dataZoomModel.get("realtime");
  81692. !n && this._dispatchZoomAction(!1);
  81693. }, e.prototype._onClickPanel = function(n) {
  81694. var r = this._size, i = this._displayables.sliderGroup.transformCoordToLocal(n.offsetX, n.offsetY);
  81695. if (!(i[0] < 0 || i[0] > r[0] || i[1] < 0 || i[1] > r[1])) {
  81696. var a = this._handleEnds, o = (a[0] + a[1]) / 2, s = this._updateInterval("all", i[0] - o);
  81697. this._updateView(), s && this._dispatchZoomAction(!1);
  81698. }
  81699. }, e.prototype._onBrushStart = function(n) {
  81700. var r = n.offsetX, i = n.offsetY;
  81701. this._brushStart = new Ke(r, i), this._brushing = !0, this._brushStartTime = +/* @__PURE__ */ new Date();
  81702. }, e.prototype._onBrushEnd = function(n) {
  81703. if (this._brushing) {
  81704. var r = this._displayables.brushRect;
  81705. if (this._brushing = !1, !!r) {
  81706. r.attr("ignore", !0);
  81707. var i = r.shape, a = +/* @__PURE__ */ new Date();
  81708. if (!(a - this._brushStartTime < 200 && Math.abs(i.width) < 5)) {
  81709. var o = this._getViewExtent(), s = [0, 100];
  81710. this._range = Wi([Lt(i.x, o, s, !0), Lt(i.x + i.width, o, s, !0)]), this._handleEnds = [i.x, i.x + i.width], this._updateView(), this._dispatchZoomAction(!1);
  81711. }
  81712. }
  81713. }
  81714. }, e.prototype._onBrush = function(n) {
  81715. this._brushing && (js(n.event), this._updateBrushRect(n.offsetX, n.offsetY));
  81716. }, e.prototype._updateBrushRect = function(n, r) {
  81717. var i = this._displayables, a = this.dataZoomModel, o = i.brushRect;
  81718. o || (o = i.brushRect = new Av({
  81719. silent: !0,
  81720. style: a.getModel("brushStyle").getItemStyle()
  81721. }), i.sliderGroup.add(o)), o.attr("ignore", !1);
  81722. var s = this._brushStart, l = this._displayables.sliderGroup, u = l.transformCoordToLocal(n, r), c = l.transformCoordToLocal(s.x, s.y), f = this._size;
  81723. u[0] = Math.max(Math.min(f[0], u[0]), 0), o.setShape({
  81724. x: c[0],
  81725. y: 0,
  81726. width: u[0] - c[0],
  81727. height: f[1]
  81728. });
  81729. }, e.prototype._dispatchZoomAction = function(n) {
  81730. var r = this._range;
  81731. this.api.dispatchAction({
  81732. type: "dataZoom",
  81733. from: this.uid,
  81734. dataZoomId: this.dataZoomModel.id,
  81735. animation: n ? ije : null,
  81736. start: r[0],
  81737. end: r[1]
  81738. });
  81739. }, e.prototype._findCoordRect = function() {
  81740. var n, r = Fre(this.dataZoomModel).infoList;
  81741. if (!n && r.length) {
  81742. var i = r[0].model.coordinateSystem;
  81743. n = i.getRect && i.getRect();
  81744. }
  81745. if (!n) {
  81746. var a = this.api.getWidth(), o = this.api.getHeight();
  81747. n = {
  81748. x: a * 0.2,
  81749. y: o * 0.2,
  81750. width: a * 0.6,
  81751. height: o * 0.6
  81752. };
  81753. }
  81754. return n;
  81755. }, e.type = "dataZoom.slider", e;
  81756. }(SL)
  81757. );
  81758. function oje(t) {
  81759. var e = {
  81760. x: "y",
  81761. y: "x",
  81762. radius: "angle",
  81763. angle: "radius"
  81764. };
  81765. return e[t];
  81766. }
  81767. function iQ(t) {
  81768. return t === "vertical" ? "ns-resize" : "ew-resize";
  81769. }
  81770. function sie(t) {
  81771. t.registerComponentModel(J9e), t.registerComponentView(aje), xL(t);
  81772. }
  81773. function sje(t) {
  81774. at(oie), at(sie);
  81775. }
  81776. var lie = {
  81777. /**
  81778. * @public
  81779. */
  81780. get: function(t, e, n) {
  81781. var r = Le((lje[t] || {})[e]);
  81782. return n && ue(r) ? r[r.length - 1] : r;
  81783. }
  81784. }, lje = {
  81785. color: {
  81786. active: ["#006edd", "#e0ffff"],
  81787. inactive: ["rgba(0,0,0,0)"]
  81788. },
  81789. colorHue: {
  81790. active: [0, 360],
  81791. inactive: [0, 0]
  81792. },
  81793. colorSaturation: {
  81794. active: [0.3, 1],
  81795. inactive: [0, 0]
  81796. },
  81797. colorLightness: {
  81798. active: [0.9, 0.5],
  81799. inactive: [0, 0]
  81800. },
  81801. colorAlpha: {
  81802. active: [0.3, 1],
  81803. inactive: [0, 0]
  81804. },
  81805. opacity: {
  81806. active: [0.3, 1],
  81807. inactive: [0, 0]
  81808. },
  81809. symbol: {
  81810. active: ["circle", "roundRect", "diamond"],
  81811. inactive: ["none"]
  81812. },
  81813. symbolSize: {
  81814. active: [10, 50],
  81815. inactive: [0, 0]
  81816. }
  81817. }, aQ = qn.mapVisual, uje = qn.eachVisual, cje = ue, oQ = k, fje = Wi, dje = Lt, ZO = (
  81818. /** @class */
  81819. function(t) {
  81820. q(e, t);
  81821. function e() {
  81822. var n = t !== null && t.apply(this, arguments) || this;
  81823. return n.type = e.type, n.stateList = ["inRange", "outOfRange"], n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], n.layoutMode = {
  81824. type: "box",
  81825. ignoreSize: !0
  81826. }, n.dataBound = [-1 / 0, 1 / 0], n.targetVisuals = {}, n.controllerVisuals = {}, n;
  81827. }
  81828. return e.prototype.init = function(n, r, i) {
  81829. this.mergeDefaultAndTheme(n, i);
  81830. }, e.prototype.optionUpdated = function(n, r) {
  81831. var i = this.option;
  81832. !r && qre(i, n, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption();
  81833. }, e.prototype.resetVisual = function(n) {
  81834. var r = this.stateList;
  81835. n = xe(n, this), this.controllerVisuals = NE(this.option.controller, r, n), this.targetVisuals = NE(this.option.target, r, n);
  81836. }, e.prototype.getItemSymbol = function() {
  81837. return null;
  81838. }, e.prototype.getTargetSeriesIndices = function() {
  81839. var n = this.option.seriesIndex, r = [];
  81840. return n == null || n === "all" ? this.ecModel.eachSeries(function(i, a) {
  81841. r.push(a);
  81842. }) : r = Qt(n), r;
  81843. }, e.prototype.eachTargetSeries = function(n, r) {
  81844. k(this.getTargetSeriesIndices(), function(i) {
  81845. var a = this.ecModel.getSeriesByIndex(i);
  81846. a && n.call(r, a);
  81847. }, this);
  81848. }, e.prototype.isTargetSeries = function(n) {
  81849. var r = !1;
  81850. return this.eachTargetSeries(function(i) {
  81851. i === n && (r = !0);
  81852. }), r;
  81853. }, e.prototype.formatValueText = function(n, r, i) {
  81854. var a = this.option, o = a.precision, s = this.dataBound, l = a.formatter, u;
  81855. i = i || ["<", ">"], ue(n) && (n = n.slice(), u = !0);
  81856. var c = r ? n : u ? [f(n[0]), f(n[1])] : f(n);
  81857. if (Oe(l))
  81858. return l.replace("{value}", u ? c[0] : c).replace("{value2}", u ? c[1] : c);
  81859. if (Me(l))
  81860. return u ? l(n[0], n[1]) : l(n);
  81861. if (u)
  81862. return n[0] === s[0] ? i[0] + " " + c[1] : n[1] === s[1] ? i[1] + " " + c[0] : c[0] + " - " + c[1];
  81863. return c;
  81864. function f(d) {
  81865. return d === s[0] ? "min" : d === s[1] ? "max" : (+d).toFixed(Math.min(o, 20));
  81866. }
  81867. }, e.prototype.resetExtent = function() {
  81868. var n = this.option, r = fje([n.min, n.max]);
  81869. this._dataExtent = r;
  81870. }, e.prototype.getDataDimensionIndex = function(n) {
  81871. var r = this.option.dimension;
  81872. if (r != null)
  81873. return n.getDimensionIndex(r);
  81874. for (var i = n.dimensions, a = i.length - 1; a >= 0; a--) {
  81875. var o = i[a], s = n.getDimensionInfo(o);
  81876. if (!s.isCalculationCoord)
  81877. return s.storeDimIndex;
  81878. }
  81879. }, e.prototype.getExtent = function() {
  81880. return this._dataExtent.slice();
  81881. }, e.prototype.completeVisualOption = function() {
  81882. var n = this.ecModel, r = this.option, i = {
  81883. inRange: r.inRange,
  81884. outOfRange: r.outOfRange
  81885. }, a = r.target || (r.target = {}), o = r.controller || (r.controller = {});
  81886. qe(a, i), qe(o, i);
  81887. var s = this.isCategory();
  81888. l.call(this, a), l.call(this, o), u.call(this, a, "inRange", "outOfRange"), c.call(this, o);
  81889. function l(f) {
  81890. cje(r.color) && !f.inRange && (f.inRange = {
  81891. color: r.color.slice().reverse()
  81892. }), f.inRange = f.inRange || {
  81893. color: n.get("gradientColor")
  81894. };
  81895. }
  81896. function u(f, d, h) {
  81897. var p = f[d], v = f[h];
  81898. p && !v && (v = f[h] = {}, oQ(p, function(g, m) {
  81899. if (qn.isValidType(m)) {
  81900. var y = lie.get(m, "inactive", s);
  81901. y != null && (v[m] = y, m === "color" && !v.hasOwnProperty("opacity") && !v.hasOwnProperty("colorAlpha") && (v.opacity = [0, 0]));
  81902. }
  81903. }));
  81904. }
  81905. function c(f) {
  81906. 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";
  81907. oQ(this.stateList, function(m) {
  81908. var y = this.itemSize, b = f[m];
  81909. b || (b = f[m] = {
  81910. color: s ? p : [p]
  81911. }), b.symbol == null && (b.symbol = d && Le(d) || (s ? g : [g])), b.symbolSize == null && (b.symbolSize = h && Le(h) || (s ? y[0] : [y[0], y[0]])), b.symbol = aQ(b.symbol, function(S) {
  81912. return S === "none" ? g : S;
  81913. });
  81914. var _ = b.symbolSize;
  81915. if (_ != null) {
  81916. var O = -1 / 0;
  81917. uje(_, function(S) {
  81918. S > O && (O = S);
  81919. }), b.symbolSize = aQ(_, function(S) {
  81920. return dje(S, [0, O], [0, y[0]], !0);
  81921. });
  81922. }
  81923. }, this);
  81924. }
  81925. }, e.prototype.resetItemSize = function() {
  81926. this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))];
  81927. }, e.prototype.isCategory = function() {
  81928. return !!this.option.categories;
  81929. }, e.prototype.setSelected = function(n) {
  81930. }, e.prototype.getSelected = function() {
  81931. return null;
  81932. }, e.prototype.getValueState = function(n) {
  81933. return null;
  81934. }, e.prototype.getVisualMeta = function(n) {
  81935. return null;
  81936. }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
  81937. show: !0,
  81938. // zlevel: 0,
  81939. z: 4,
  81940. seriesIndex: "all",
  81941. min: 0,
  81942. max: 200,
  81943. left: 0,
  81944. right: null,
  81945. top: null,
  81946. bottom: 0,
  81947. itemWidth: null,
  81948. itemHeight: null,
  81949. inverse: !1,
  81950. orient: "vertical",
  81951. backgroundColor: "rgba(0,0,0,0)",
  81952. borderColor: "#ccc",
  81953. contentColor: "#5793f3",
  81954. inactiveColor: "#aaa",
  81955. borderWidth: 0,
  81956. padding: 5,
  81957. // 接受数组分别设定上右下左边距,同css
  81958. textGap: 10,
  81959. precision: 0,
  81960. textStyle: {
  81961. color: "#333"
  81962. // 值域文字颜色
  81963. }
  81964. }, e;
  81965. }(rt)
  81966. ), sQ = [20, 140], hje = (
  81967. /** @class */
  81968. function(t) {
  81969. q(e, t);
  81970. function e() {
  81971. var n = t !== null && t.apply(this, arguments) || this;
  81972. return n.type = e.type, n;
  81973. }
  81974. return e.prototype.optionUpdated = function(n, r) {
  81975. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(i) {
  81976. i.mappingMethod = "linear", i.dataExtent = this.getExtent();
  81977. }), this._resetRange();
  81978. }, e.prototype.resetItemSize = function() {
  81979. t.prototype.resetItemSize.apply(this, arguments);
  81980. var n = this.itemSize;
  81981. (n[0] == null || isNaN(n[0])) && (n[0] = sQ[0]), (n[1] == null || isNaN(n[1])) && (n[1] = sQ[1]);
  81982. }, e.prototype._resetRange = function() {
  81983. var n = this.getExtent(), r = this.option.range;
  81984. !r || r.auto ? (n.auto = 1, this.option.range = n) : ue(r) && (r[0] > r[1] && r.reverse(), r[0] = Math.max(r[0], n[0]), r[1] = Math.min(r[1], n[1]));
  81985. }, e.prototype.completeVisualOption = function() {
  81986. t.prototype.completeVisualOption.apply(this, arguments), k(this.stateList, function(n) {
  81987. var r = this.option.controller[n].symbolSize;
  81988. r && r[0] !== r[1] && (r[0] = r[1] / 3);
  81989. }, this);
  81990. }, e.prototype.setSelected = function(n) {
  81991. this.option.range = n.slice(), this._resetRange();
  81992. }, e.prototype.getSelected = function() {
  81993. var n = this.getExtent(), r = Wi((this.get("range") || []).slice());
  81994. 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;
  81995. }, e.prototype.getValueState = function(n) {
  81996. var r = this.option.range, i = this.getExtent();
  81997. return (r[0] <= i[0] || r[0] <= n) && (r[1] >= i[1] || n <= r[1]) ? "inRange" : "outOfRange";
  81998. }, e.prototype.findTargetDataIndices = function(n) {
  81999. var r = [];
  82000. return this.eachTargetSeries(function(i) {
  82001. var a = [], o = i.getData();
  82002. o.each(this.getDataDimensionIndex(o), function(s, l) {
  82003. n[0] <= s && s <= n[1] && a.push(l);
  82004. }, this), r.push({
  82005. seriesId: i.id,
  82006. dataIndex: a
  82007. });
  82008. }, this), r;
  82009. }, e.prototype.getVisualMeta = function(n) {
  82010. var r = lQ(this, "outOfRange", this.getExtent()), i = lQ(this, "inRange", this.option.range.slice()), a = [];
  82011. function o(h, p) {
  82012. a.push({
  82013. value: h,
  82014. color: n(h, p)
  82015. });
  82016. }
  82017. for (var s = 0, l = 0, u = i.length, c = r.length; l < c && (!i.length || r[l] <= i[0]); l++)
  82018. r[l] < i[s] && o(r[l], "outOfRange");
  82019. for (var f = 1; s < u; s++, f = 0)
  82020. f && a.length && o(i[s], "outOfRange"), o(i[s], "inRange");
  82021. for (var f = 1; l < c; l++)
  82022. (!i.length || i[i.length - 1] < r[l]) && (f && (a.length && o(a[a.length - 1].value, "outOfRange"), f = 0), o(r[l], "outOfRange"));
  82023. var d = a.length;
  82024. return {
  82025. stops: a,
  82026. outerColors: [d ? a[0].color : "transparent", d ? a[d - 1].color : "transparent"]
  82027. };
  82028. }, e.type = "visualMap.continuous", e.defaultOption = Pu(ZO.defaultOption, {
  82029. align: "auto",
  82030. calculable: !1,
  82031. hoverLink: !0,
  82032. realtime: !0,
  82033. 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",
  82034. handleSize: "120%",
  82035. handleStyle: {
  82036. borderColor: "#fff",
  82037. borderWidth: 1
  82038. },
  82039. indicatorIcon: "circle",
  82040. indicatorSize: "50%",
  82041. indicatorStyle: {
  82042. borderColor: "#fff",
  82043. borderWidth: 2,
  82044. shadowBlur: 2,
  82045. shadowOffsetX: 1,
  82046. shadowOffsetY: 1,
  82047. shadowColor: "rgba(0,0,0,0.2)"
  82048. }
  82049. // emphasis: {
  82050. // handleStyle: {
  82051. // shadowBlur: 3,
  82052. // shadowOffsetX: 1,
  82053. // shadowOffsetY: 1,
  82054. // shadowColor: 'rgba(0,0,0,0.2)'
  82055. // }
  82056. // }
  82057. }), e;
  82058. }(ZO)
  82059. );
  82060. function lQ(t, e, n) {
  82061. if (n[0] === n[1])
  82062. return n.slice();
  82063. for (var r = 200, i = (n[1] - n[0]) / r, a = n[0], o = [], s = 0; s <= r && a < n[1]; s++)
  82064. o.push(a), a += i;
  82065. return o.push(n[1]), o;
  82066. }
  82067. var uie = (
  82068. /** @class */
  82069. function(t) {
  82070. q(e, t);
  82071. function e() {
  82072. var n = t !== null && t.apply(this, arguments) || this;
  82073. return n.type = e.type, n.autoPositionValues = {
  82074. left: 1,
  82075. right: 1,
  82076. top: 1,
  82077. bottom: 1
  82078. }, n;
  82079. }
  82080. return e.prototype.init = function(n, r) {
  82081. this.ecModel = n, this.api = r;
  82082. }, e.prototype.render = function(n, r, i, a) {
  82083. if (this.visualMapModel = n, n.get("show") === !1) {
  82084. this.group.removeAll();
  82085. return;
  82086. }
  82087. this.doRender(n, r, i, a);
  82088. }, e.prototype.renderBackground = function(n) {
  82089. var r = this.visualMapModel, i = zf(r.get("padding") || 0), a = n.getBoundingRect();
  82090. n.add(new mt({
  82091. z2: -1,
  82092. silent: !0,
  82093. shape: {
  82094. x: a.x - i[3],
  82095. y: a.y - i[0],
  82096. width: a.width + i[3] + i[1],
  82097. height: a.height + i[0] + i[2]
  82098. },
  82099. style: {
  82100. fill: r.get("backgroundColor"),
  82101. stroke: r.get("borderColor"),
  82102. lineWidth: r.get("borderWidth")
  82103. }
  82104. }));
  82105. }, e.prototype.getControllerVisual = function(n, r, i) {
  82106. i = i || {};
  82107. var a = i.forceState, o = this.visualMapModel, s = {};
  82108. if (r === "color") {
  82109. var l = o.get("contentColor");
  82110. s.color = l;
  82111. }
  82112. function u(h) {
  82113. return s[h];
  82114. }
  82115. function c(h, p) {
  82116. s[h] = p;
  82117. }
  82118. var f = o.controllerVisuals[a || o.getValueState(n)], d = qn.prepareVisualTypes(f);
  82119. return k(d, function(h) {
  82120. var p = f[h];
  82121. i.convertOpacityToAlpha && h === "opacity" && (h = "colorAlpha", p = f.__alphaForOpacity), qn.dependsOn(h, r) && p && p.applyVisual(n, u, c);
  82122. }), s[r];
  82123. }, e.prototype.positionGroup = function(n) {
  82124. var r = this.visualMapModel, i = this.api;
  82125. ow(n, r.getBoxLayoutParams(), {
  82126. width: i.getWidth(),
  82127. height: i.getHeight()
  82128. });
  82129. }, e.prototype.doRender = function(n, r, i, a) {
  82130. }, e.type = "visualMap", e;
  82131. }(Xt)
  82132. ), uQ = [["left", "right", "width"], ["top", "bottom", "height"]];
  82133. function cie(t, e, n) {
  82134. var r = t.option, i = r.align;
  82135. if (i != null && i !== "auto")
  82136. return i;
  82137. for (var a = {
  82138. width: e.getWidth(),
  82139. height: e.getHeight()
  82140. }, o = r.orient === "horizontal" ? 1 : 0, s = uQ[o], l = [0, null, 10], u = {}, c = 0; c < 3; c++)
  82141. u[uQ[1 - o][c]] = l[c], u[s[c]] = c === 2 ? n[0] : r[s[c]];
  82142. var f = [["x", "width", 3], ["y", "height", 0]][o], d = Rn(u, a, r.padding);
  82143. return s[(d.margin[f[2]] || 0) + d[f[0]] + d[f[1]] * 0.5 < a[f[1]] * 0.5 ? 0 : 1];
  82144. }
  82145. function J_(t, e) {
  82146. return k(t || [], function(n) {
  82147. n.dataIndex != null && (n.dataIndexInside = n.dataIndex, n.dataIndex = null), n.highlightKey = "visualMap" + (e ? e.componentIndex : "");
  82148. }), t;
  82149. }
  82150. var Eo = Lt, pje = k, cQ = Math.min, s$ = Math.max, vje = 12, gje = 6, mje = (
  82151. /** @class */
  82152. function(t) {
  82153. q(e, t);
  82154. function e() {
  82155. var n = t !== null && t.apply(this, arguments) || this;
  82156. return n.type = e.type, n._shapes = {}, n._dataInterval = [], n._handleEnds = [], n._hoverLinkDataIndices = [], n;
  82157. }
  82158. return e.prototype.init = function(n, r) {
  82159. t.prototype.init.call(this, n, r), this._hoverLinkFromSeriesMouseOver = xe(this._hoverLinkFromSeriesMouseOver, this), this._hideIndicator = xe(this._hideIndicator, this);
  82160. }, e.prototype.doRender = function(n, r, i, a) {
  82161. (!a || a.type !== "selectDataRange" || a.from !== this.uid) && this._buildView();
  82162. }, e.prototype._buildView = function() {
  82163. this.group.removeAll();
  82164. var n = this.visualMapModel, r = this.group;
  82165. this._orient = n.get("orient"), this._useHandle = n.get("calculable"), this._resetInterval(), this._renderBar(r);
  82166. var i = n.get("text");
  82167. 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);
  82168. }, e.prototype._renderEndsText = function(n, r, i) {
  82169. if (r) {
  82170. var a = r[1 - i];
  82171. a = a != null ? a + "" : "";
  82172. 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;
  82173. this.group.add(new gt({
  82174. style: Zt(h, {
  82175. x: c[0],
  82176. y: c[1],
  82177. verticalAlign: d === "horizontal" ? "middle" : f,
  82178. align: d === "horizontal" ? f : "center",
  82179. text: a
  82180. })
  82181. }));
  82182. }
  82183. }, e.prototype._renderBar = function(n) {
  82184. var r = this.visualMapModel, i = this._shapes, a = r.itemSize, o = this._orient, s = this._useHandle, l = cie(r, this.api, a), u = i.mainGroup = this._createBarGroup(l), c = new Ve();
  82185. u.add(c), c.add(i.outOfRange = fQ()), c.add(i.inRange = fQ(null, s ? hQ(this._orient) : null, xe(this._dragHandle, this, "all", !1), xe(this._dragHandle, this, "all", !0))), c.setClipPath(new mt({
  82186. shape: {
  82187. x: 0,
  82188. y: 0,
  82189. width: a[0],
  82190. height: a[1],
  82191. r: 3
  82192. }
  82193. }));
  82194. var f = r.textStyleModel.getTextRect("国"), d = s$(f.width, f.height);
  82195. 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);
  82196. }, e.prototype._createHandle = function(n, r, i, a, o, s) {
  82197. var l = xe(this._dragHandle, this, i, !1), u = xe(this._dragHandle, this, i, !0), c = lo(n.get("handleSize"), a[0]), f = $n(n.get("handleIcon"), -c / 2, -c / 2, c, c, null, !0), d = hQ(this._orient);
  82198. f.attr({
  82199. cursor: d,
  82200. draggable: !0,
  82201. drift: l,
  82202. ondragend: u,
  82203. onmousemove: function(m) {
  82204. js(m.event);
  82205. }
  82206. }), f.x = a[0] / 2, f.useStyle(n.getModel("handleStyle").getItemStyle()), f.setStyle({
  82207. strokeNoScale: !0,
  82208. strokeFirst: !0
  82209. }), f.style.lineWidth *= 2, f.ensureState("emphasis").style = n.getModel(["emphasis", "handleStyle"]).getItemStyle(), Lc(f, !0), r.add(f);
  82210. var h = this.visualMapModel.textStyleModel, p = new gt({
  82211. cursor: d,
  82212. draggable: !0,
  82213. drift: l,
  82214. onmousemove: function(m) {
  82215. js(m.event);
  82216. },
  82217. ondragend: u,
  82218. style: Zt(h, {
  82219. x: 0,
  82220. y: 0,
  82221. text: ""
  82222. })
  82223. });
  82224. p.ensureState("blur").style = {
  82225. opacity: 0.1
  82226. }, p.stateTransition = {
  82227. duration: 200
  82228. }, this.group.add(p);
  82229. var v = [c, 0], g = this._shapes;
  82230. g.handleThumbs[i] = f, g.handleLabelPoints[i] = v, g.handleLabels[i] = p;
  82231. }, e.prototype._createIndicator = function(n, r, i, a, o) {
  82232. var s = lo(n.get("indicatorSize"), i[0]), l = $n(n.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0);
  82233. l.attr({
  82234. cursor: "move",
  82235. invisible: !0,
  82236. silent: !0,
  82237. x: i[0] / 2
  82238. });
  82239. var u = n.getModel("indicatorStyle").getItemStyle();
  82240. if (l instanceof lr) {
  82241. var c = l.style;
  82242. l.useStyle(le({
  82243. // TODO other properties like x, y ?
  82244. image: c.image,
  82245. x: c.x,
  82246. y: c.y,
  82247. width: c.width,
  82248. height: c.height
  82249. }, u));
  82250. } else
  82251. l.useStyle(u);
  82252. r.add(l);
  82253. var f = this.visualMapModel.textStyleModel, d = new gt({
  82254. silent: !0,
  82255. invisible: !0,
  82256. style: Zt(f, {
  82257. x: 0,
  82258. y: 0,
  82259. text: ""
  82260. })
  82261. });
  82262. this.group.add(d);
  82263. var h = [(o === "horizontal" ? a / 2 : gje) + i[0] / 2, 0], p = this._shapes;
  82264. p.indicator = l, p.indicatorLabel = d, p.indicatorLabelPoint = h, this._firstShowIndicator = !0;
  82265. }, e.prototype._dragHandle = function(n, r, i, a) {
  82266. if (this._useHandle) {
  82267. if (this._dragging = !r, !r) {
  82268. var o = this._applyTransform([i, a], this._shapes.mainGroup, !0);
  82269. this._updateInterval(n, o[1]), this._hideIndicator(), this._updateView();
  82270. }
  82271. r === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
  82272. type: "selectDataRange",
  82273. from: this.uid,
  82274. visualMapId: this.visualMapModel.id,
  82275. selected: this._dataInterval.slice()
  82276. }), r ? !this._hovering && this._clearHoverLinkToSeries() : dQ(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[n], !1);
  82277. }
  82278. }, e.prototype._resetInterval = function() {
  82279. var n = this.visualMapModel, r = this._dataInterval = n.getSelected(), i = n.getExtent(), a = [0, n.itemSize[1]];
  82280. this._handleEnds = [Eo(r[0], i, a, !0), Eo(r[1], i, a, !0)];
  82281. }, e.prototype._updateInterval = function(n, r) {
  82282. r = r || 0;
  82283. var i = this.visualMapModel, a = this._handleEnds, o = [0, i.itemSize[1]];
  82284. Hf(
  82285. r,
  82286. a,
  82287. o,
  82288. n,
  82289. // cross is forbidden
  82290. 0
  82291. );
  82292. var s = i.getExtent();
  82293. this._dataInterval = [Eo(a[0], o, s, !0), Eo(a[1], o, s, !0)];
  82294. }, e.prototype._updateView = function(n) {
  82295. 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");
  82296. a.inRange.setStyle({
  82297. fill: l.barColor
  82298. // opacity: visualInRange.opacity
  82299. }).setShape("points", l.barPoints), a.outOfRange.setStyle({
  82300. fill: u.barColor
  82301. // opacity: visualOutOfRange.opacity
  82302. }).setShape("points", u.barPoints), this._updateHandle(s, l);
  82303. }, e.prototype._createBarVisual = function(n, r, i, a) {
  82304. var o = {
  82305. forceState: a,
  82306. convertOpacityToAlpha: !0
  82307. }, s = this._makeColorGradient(n, o), l = [this.getControllerVisual(n[0], "symbolSize", o), this.getControllerVisual(n[1], "symbolSize", o)], u = this._createBarPoints(i, l);
  82308. return {
  82309. barColor: new yp(0, 0, 0, 1, s),
  82310. barPoints: u,
  82311. handlesColor: [s[0].color, s[s.length - 1].color]
  82312. };
  82313. }, e.prototype._makeColorGradient = function(n, r) {
  82314. var i = 100, a = [], o = (n[1] - n[0]) / i;
  82315. a.push({
  82316. color: this.getControllerVisual(n[0], "color", r),
  82317. offset: 0
  82318. });
  82319. for (var s = 1; s < i; s++) {
  82320. var l = n[0] + o * s;
  82321. if (l > n[1])
  82322. break;
  82323. a.push({
  82324. color: this.getControllerVisual(l, "color", r),
  82325. offset: s / i
  82326. });
  82327. }
  82328. return a.push({
  82329. color: this.getControllerVisual(n[1], "color", r),
  82330. offset: 1
  82331. }), a;
  82332. }, e.prototype._createBarPoints = function(n, r) {
  82333. var i = this.visualMapModel.itemSize;
  82334. return [[i[0] - r[0], n[0]], [i[0], n[0]], [i[0], n[1]], [i[0] - r[1], n[1]]];
  82335. }, e.prototype._createBarGroup = function(n) {
  82336. var r = this._orient, i = this.visualMapModel.get("inverse");
  82337. return new Ve(r === "horizontal" && !i ? {
  82338. scaleX: n === "bottom" ? 1 : -1,
  82339. rotation: Math.PI / 2
  82340. } : r === "horizontal" && i ? {
  82341. scaleX: n === "bottom" ? -1 : 1,
  82342. rotation: -Math.PI / 2
  82343. } : r === "vertical" && !i ? {
  82344. scaleX: n === "left" ? 1 : -1,
  82345. scaleY: -1
  82346. } : {
  82347. scaleX: n === "left" ? 1 : -1
  82348. });
  82349. }, e.prototype._updateHandle = function(n, r) {
  82350. if (this._useHandle) {
  82351. var i = this._shapes, a = this.visualMapModel, o = i.handleThumbs, s = i.handleLabels, l = a.itemSize, u = a.getExtent();
  82352. pje([0, 1], function(c) {
  82353. var f = o[c];
  82354. f.setStyle("fill", r.handlesColor[c]), f.y = n[c];
  82355. var d = Eo(n[c], [0, l[1]], u, !0), h = this.getControllerVisual(d, "symbolSize");
  82356. f.scaleX = f.scaleY = h / l[0], f.x = l[0] - h / 2;
  82357. var p = ro(i.handleLabelPoints[c], ql(f, this.group));
  82358. s[c].setStyle({
  82359. x: p[0],
  82360. y: p[1],
  82361. text: a.formatValueText(this._dataInterval[c]),
  82362. verticalAlign: "middle",
  82363. align: this._orient === "vertical" ? this._applyTransform("left", i.mainGroup) : "center"
  82364. });
  82365. }, this);
  82366. }
  82367. }, e.prototype._showIndicator = function(n, r, i, a) {
  82368. var o = this.visualMapModel, s = o.getExtent(), l = o.itemSize, u = [0, l[1]], c = this._shapes, f = c.indicator;
  82369. if (f) {
  82370. f.attr("invisible", !1);
  82371. var d = {
  82372. convertOpacityToAlpha: !0
  82373. }, h = this.getControllerVisual(n, "color", d), p = this.getControllerVisual(n, "symbolSize"), v = Eo(n, s, u, !0), g = l[0] - p / 2, m = {
  82374. x: f.x,
  82375. y: f.y
  82376. };
  82377. f.y = v, f.x = g;
  82378. var y = ro(c.indicatorLabelPoint, ql(f, this.group)), b = c.indicatorLabel;
  82379. b.attr("invisible", !1);
  82380. var _ = this._applyTransform("left", c.mainGroup), O = this._orient, S = O === "horizontal";
  82381. b.setStyle({
  82382. text: (i || "") + o.formatValueText(r),
  82383. verticalAlign: S ? _ : "middle",
  82384. align: S ? "center" : _
  82385. });
  82386. var x = {
  82387. x: g,
  82388. y: v,
  82389. style: {
  82390. fill: h
  82391. }
  82392. }, C = {
  82393. style: {
  82394. x: y[0],
  82395. y: y[1]
  82396. }
  82397. };
  82398. if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
  82399. var T = {
  82400. duration: 100,
  82401. easing: "cubicInOut",
  82402. additive: !0
  82403. };
  82404. f.x = m.x, f.y = m.y, f.animateTo(x, T), b.animateTo(C, T);
  82405. } else
  82406. f.attr(x), b.attr(C);
  82407. this._firstShowIndicator = !1;
  82408. var w = this._shapes.handleLabels;
  82409. if (w)
  82410. for (var P = 0; P < w.length; P++)
  82411. this.api.enterBlur(w[P]);
  82412. }
  82413. }, e.prototype._enableHoverLinkToSeries = function() {
  82414. var n = this;
  82415. this._shapes.mainGroup.on("mousemove", function(r) {
  82416. if (n._hovering = !0, !n._dragging) {
  82417. var i = n.visualMapModel.itemSize, a = n._applyTransform([r.offsetX, r.offsetY], n._shapes.mainGroup, !0, !0);
  82418. a[1] = cQ(s$(0, a[1]), i[1]), n._doHoverLinkToSeries(a[1], 0 <= a[0] && a[0] <= i[0]);
  82419. }
  82420. }).on("mouseout", function() {
  82421. n._hovering = !1, !n._dragging && n._clearHoverLinkToSeries();
  82422. });
  82423. }, e.prototype._enableHoverLinkFromSeries = function() {
  82424. var n = this.api.getZr();
  82425. this.visualMapModel.option.hoverLink ? (n.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), n.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
  82426. }, e.prototype._doHoverLinkToSeries = function(n, r) {
  82427. var i = this.visualMapModel, a = i.itemSize;
  82428. if (i.option.hoverLink) {
  82429. var o = [0, a[1]], s = i.getExtent();
  82430. n = cQ(s$(o[0], n), o[1]);
  82431. var l = yje(i, s, o), u = [n - l, n + l], c = Eo(n, o, s, !0), f = [Eo(u[0], o, s, !0), Eo(u[1], o, s, !0)];
  82432. 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));
  82433. var d = this._hoverLinkDataIndices, h = [];
  82434. (r || dQ(i)) && (h = this._hoverLinkDataIndices = i.findTargetDataIndices(f));
  82435. var p = nRe(d, h);
  82436. this._dispatchHighDown("downplay", J_(p[0], i)), this._dispatchHighDown("highlight", J_(p[1], i));
  82437. }
  82438. }, e.prototype._hoverLinkFromSeriesMouseOver = function(n) {
  82439. var r;
  82440. if (Bc(n.target, function(l) {
  82441. var u = Fe(l);
  82442. if (u.dataIndex != null)
  82443. return r = u, !0;
  82444. }, !0), !!r) {
  82445. var i = this.ecModel.getSeriesByIndex(r.seriesIndex), a = this.visualMapModel;
  82446. if (a.isTargetSeries(i)) {
  82447. var o = i.getData(r.dataType), s = o.getStore().get(a.getDataDimensionIndex(o), r.dataIndex);
  82448. isNaN(s) || this._showIndicator(s, s);
  82449. }
  82450. }
  82451. }, e.prototype._hideIndicator = function() {
  82452. var n = this._shapes;
  82453. n.indicator && n.indicator.attr("invisible", !0), n.indicatorLabel && n.indicatorLabel.attr("invisible", !0);
  82454. var r = this._shapes.handleLabels;
  82455. if (r)
  82456. for (var i = 0; i < r.length; i++)
  82457. this.api.leaveBlur(r[i]);
  82458. }, e.prototype._clearHoverLinkToSeries = function() {
  82459. this._hideIndicator();
  82460. var n = this._hoverLinkDataIndices;
  82461. this._dispatchHighDown("downplay", J_(n, this.visualMapModel)), n.length = 0;
  82462. }, e.prototype._clearHoverLinkFromSeries = function() {
  82463. this._hideIndicator();
  82464. var n = this.api.getZr();
  82465. n.off("mouseover", this._hoverLinkFromSeriesMouseOver), n.off("mouseout", this._hideIndicator);
  82466. }, e.prototype._applyTransform = function(n, r, i, a) {
  82467. var o = ql(r, a ? null : this.group);
  82468. return ue(n) ? ro(n, o, i) : ew(n, o, i);
  82469. }, e.prototype._dispatchHighDown = function(n, r) {
  82470. r && r.length && this.api.dispatchAction({
  82471. type: n,
  82472. batch: r
  82473. });
  82474. }, e.prototype.dispose = function() {
  82475. this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
  82476. }, e.type = "visualMap.continuous", e;
  82477. }(uie)
  82478. );
  82479. function fQ(t, e, n, r) {
  82480. return new ai({
  82481. shape: {
  82482. points: t
  82483. },
  82484. draggable: !!n,
  82485. cursor: e,
  82486. drift: n,
  82487. onmousemove: function(i) {
  82488. js(i.event);
  82489. },
  82490. ondragend: r
  82491. });
  82492. }
  82493. function yje(t, e, n) {
  82494. var r = vje / 2, i = t.get("hoverLinkDataSize");
  82495. return i && (r = Eo(i, e, n, !0) / 2), r;
  82496. }
  82497. function dQ(t) {
  82498. var e = t.get("hoverLinkOnHandle");
  82499. return !!(e ?? t.get("realtime"));
  82500. }
  82501. function hQ(t) {
  82502. return t === "vertical" ? "ns-resize" : "ew-resize";
  82503. }
  82504. var bje = {
  82505. type: "selectDataRange",
  82506. event: "dataRangeSelected",
  82507. // FIXME use updateView appears wrong
  82508. update: "update"
  82509. }, _je = function(t, e) {
  82510. e.eachComponent({
  82511. mainType: "visualMap",
  82512. query: t
  82513. }, function(n) {
  82514. n.setSelected(t.selected);
  82515. });
  82516. }, Oje = [
  82517. {
  82518. createOnAllSeries: !0,
  82519. reset: function(t, e) {
  82520. var n = [];
  82521. return e.eachComponent("visualMap", function(r) {
  82522. var i = t.pipelineContext;
  82523. !r.isTargetSeries(t) || i && i.large || n.push(QGe(r.stateList, r.targetVisuals, xe(r.getValueState, r), r.getDataDimensionIndex(t.getData())));
  82524. }), n;
  82525. }
  82526. },
  82527. // Only support color.
  82528. {
  82529. createOnAllSeries: !0,
  82530. reset: function(t, e) {
  82531. var n = t.getData(), r = [];
  82532. e.eachComponent("visualMap", function(i) {
  82533. if (i.isTargetSeries(t)) {
  82534. var a = i.getVisualMeta(xe(Sje, null, t, i)) || {
  82535. stops: [],
  82536. outerColors: []
  82537. }, o = i.getDataDimensionIndex(n);
  82538. o >= 0 && (a.dimension = o, r.push(a));
  82539. }
  82540. }), t.getData().setVisual("visualMeta", r);
  82541. }
  82542. }
  82543. ];
  82544. function Sje(t, e, n, r) {
  82545. for (var i = e.targetVisuals[r], a = qn.prepareVisualTypes(i), o = {
  82546. color: G0(t.getData(), "color")
  82547. // default color.
  82548. }, s = 0, l = a.length; s < l; s++) {
  82549. var u = a[s], c = i[u === "opacity" ? "__alphaForOpacity" : u];
  82550. c && c.applyVisual(n, f, d);
  82551. }
  82552. return o.color;
  82553. function f(h) {
  82554. return o[h];
  82555. }
  82556. function d(h, p) {
  82557. o[h] = p;
  82558. }
  82559. }
  82560. var pQ = k;
  82561. function xje(t) {
  82562. var e = t && t.visualMap;
  82563. ue(e) || (e = e ? [e] : []), pQ(e, function(n) {
  82564. if (n) {
  82565. Od(n, "splitList") && !Od(n, "pieces") && (n.pieces = n.splitList, delete n.splitList);
  82566. var r = n.pieces;
  82567. r && ue(r) && pQ(r, function(i) {
  82568. Ie(i) && (Od(i, "start") && !Od(i, "min") && (i.min = i.start), Od(i, "end") && !Od(i, "max") && (i.max = i.end));
  82569. });
  82570. }
  82571. });
  82572. }
  82573. function Od(t, e) {
  82574. return t && t.hasOwnProperty && t.hasOwnProperty(e);
  82575. }
  82576. var vQ = !1;
  82577. function fie(t) {
  82578. vQ || (vQ = !0, t.registerSubTypeDefaulter("visualMap", function(e) {
  82579. return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise";
  82580. }), t.registerAction(bje, _je), k(Oje, function(e) {
  82581. t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e);
  82582. }), t.registerPreprocessor(xje));
  82583. }
  82584. function die(t) {
  82585. t.registerComponentModel(hje), t.registerComponentView(mje), fie(t);
  82586. }
  82587. var wje = (
  82588. /** @class */
  82589. function(t) {
  82590. q(e, t);
  82591. function e() {
  82592. var n = t !== null && t.apply(this, arguments) || this;
  82593. return n.type = e.type, n._pieceList = [], n;
  82594. }
  82595. return e.prototype.optionUpdated = function(n, r) {
  82596. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
  82597. var i = this._mode = this._determineMode();
  82598. this._pieceList = [], Cje[this._mode].call(this, this._pieceList), this._resetSelected(n, r);
  82599. var a = this.option.categories;
  82600. this.resetVisual(function(o, s) {
  82601. i === "categories" ? (o.mappingMethod = "category", o.categories = Le(a)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = ce(this._pieceList, function(l) {
  82602. return l = Le(l), s !== "inRange" && (l.visual = null), l;
  82603. }));
  82604. });
  82605. }, e.prototype.completeVisualOption = function() {
  82606. var n = this.option, r = {}, i = qn.listVisualTypes(), a = this.isCategory();
  82607. k(n.pieces, function(s) {
  82608. k(i, function(l) {
  82609. s.hasOwnProperty(l) && (r[l] = 1);
  82610. });
  82611. }), k(r, function(s, l) {
  82612. var u = !1;
  82613. k(this.stateList, function(c) {
  82614. u = u || o(n, c, l) || o(n.target, c, l);
  82615. }, this), !u && k(this.stateList, function(c) {
  82616. (n[c] || (n[c] = {}))[l] = lie.get(l, c === "inRange" ? "active" : "inactive", a);
  82617. });
  82618. }, this);
  82619. function o(s, l, u) {
  82620. return s && s[l] && s[l].hasOwnProperty(u);
  82621. }
  82622. t.prototype.completeVisualOption.apply(this, arguments);
  82623. }, e.prototype._resetSelected = function(n, r) {
  82624. var i = this.option, a = this._pieceList, o = (r ? i : n).selected || {};
  82625. if (i.selected = o, k(a, function(l, u) {
  82626. var c = this.getSelectedMapKey(l);
  82627. o.hasOwnProperty(c) || (o[c] = !0);
  82628. }, this), i.selectedMode === "single") {
  82629. var s = !1;
  82630. k(a, function(l, u) {
  82631. var c = this.getSelectedMapKey(l);
  82632. o[c] && (s ? o[c] = !1 : s = !0);
  82633. }, this);
  82634. }
  82635. }, e.prototype.getItemSymbol = function() {
  82636. return this.get("itemSymbol");
  82637. }, e.prototype.getSelectedMapKey = function(n) {
  82638. return this._mode === "categories" ? n.value + "" : n.index + "";
  82639. }, e.prototype.getPieceList = function() {
  82640. return this._pieceList;
  82641. }, e.prototype._determineMode = function() {
  82642. var n = this.option;
  82643. return n.pieces && n.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
  82644. }, e.prototype.setSelected = function(n) {
  82645. this.option.selected = Le(n);
  82646. }, e.prototype.getValueState = function(n) {
  82647. var r = qn.findPieceIndex(n, this._pieceList);
  82648. return r != null && this.option.selected[this.getSelectedMapKey(this._pieceList[r])] ? "inRange" : "outOfRange";
  82649. }, e.prototype.findTargetDataIndices = function(n) {
  82650. var r = [], i = this._pieceList;
  82651. return this.eachTargetSeries(function(a) {
  82652. var o = [], s = a.getData();
  82653. s.each(this.getDataDimensionIndex(s), function(l, u) {
  82654. var c = qn.findPieceIndex(l, i);
  82655. c === n && o.push(u);
  82656. }, this), r.push({
  82657. seriesId: a.id,
  82658. dataIndex: o
  82659. });
  82660. }, this), r;
  82661. }, e.prototype.getRepresentValue = function(n) {
  82662. var r;
  82663. if (this.isCategory())
  82664. r = n.value;
  82665. else if (n.value != null)
  82666. r = n.value;
  82667. else {
  82668. var i = n.interval || [];
  82669. r = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2;
  82670. }
  82671. return r;
  82672. }, e.prototype.getVisualMeta = function(n) {
  82673. if (this.isCategory())
  82674. return;
  82675. var r = [], i = ["", ""], a = this;
  82676. function o(c, f) {
  82677. var d = a.getRepresentValue({
  82678. interval: c
  82679. });
  82680. f || (f = a.getValueState(d));
  82681. var h = n(d, f);
  82682. c[0] === -1 / 0 ? i[0] = h : c[1] === 1 / 0 ? i[1] = h : r.push({
  82683. value: c[0],
  82684. color: h
  82685. }, {
  82686. value: c[1],
  82687. color: h
  82688. });
  82689. }
  82690. var s = this._pieceList.slice();
  82691. if (!s.length)
  82692. s.push({
  82693. interval: [-1 / 0, 1 / 0]
  82694. });
  82695. else {
  82696. var l = s[0].interval[0];
  82697. l !== -1 / 0 && s.unshift({
  82698. interval: [-1 / 0, l]
  82699. }), l = s[s.length - 1].interval[1], l !== 1 / 0 && s.push({
  82700. interval: [l, 1 / 0]
  82701. });
  82702. }
  82703. var u = -1 / 0;
  82704. return k(s, function(c) {
  82705. var f = c.interval;
  82706. f && (f[0] > u && o([u, f[0]], "outOfRange"), o(f.slice()), u = f[1]);
  82707. }, this), {
  82708. stops: r,
  82709. outerColors: i
  82710. };
  82711. }, e.type = "visualMap.piecewise", e.defaultOption = Pu(ZO.defaultOption, {
  82712. selected: null,
  82713. minOpen: !1,
  82714. maxOpen: !1,
  82715. align: "auto",
  82716. itemWidth: 20,
  82717. itemHeight: 14,
  82718. itemSymbol: "roundRect",
  82719. pieces: null,
  82720. categories: null,
  82721. splitNumber: 5,
  82722. selectedMode: "multiple",
  82723. itemGap: 10,
  82724. hoverLink: !0
  82725. // Enable hover highlight.
  82726. }), e;
  82727. }(ZO)
  82728. ), Cje = {
  82729. splitNumber: function(t) {
  82730. var e = this.option, n = Math.min(e.precision, 20), r = this.getExtent(), i = e.splitNumber;
  82731. i = Math.max(parseInt(i, 10), 1), e.splitNumber = i;
  82732. for (var a = (r[1] - r[0]) / i; +a.toFixed(n) !== a && n < 5; )
  82733. n++;
  82734. e.precision = n, a = +a.toFixed(n), e.minOpen && t.push({
  82735. interval: [-1 / 0, r[0]],
  82736. close: [0, 0]
  82737. });
  82738. for (var o = 0, s = r[0]; o < i; s += a, o++) {
  82739. var l = o === i - 1 ? r[1] : s + a;
  82740. t.push({
  82741. interval: [s, l],
  82742. close: [1, 1]
  82743. });
  82744. }
  82745. e.maxOpen && t.push({
  82746. interval: [r[1], 1 / 0],
  82747. close: [0, 0]
  82748. }), PA(t), k(t, function(u, c) {
  82749. u.index = c, u.text = this.formatValueText(u.interval);
  82750. }, this);
  82751. },
  82752. categories: function(t) {
  82753. var e = this.option;
  82754. k(e.categories, function(n) {
  82755. t.push({
  82756. text: this.formatValueText(n, !0),
  82757. value: n
  82758. });
  82759. }, this), gQ(e, t);
  82760. },
  82761. pieces: function(t) {
  82762. var e = this.option;
  82763. k(e.pieces, function(n, r) {
  82764. Ie(n) || (n = {
  82765. value: n
  82766. });
  82767. var i = {
  82768. text: "",
  82769. index: r
  82770. };
  82771. if (n.label != null && (i.text = n.label), n.hasOwnProperty("value")) {
  82772. var a = i.value = n.value;
  82773. i.interval = [a, a], i.close = [1, 1];
  82774. } else {
  82775. 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++) {
  82776. for (var d = [["gte", "gt", "min"], ["lte", "lt", "max"]][f], h = 0; h < 3 && o[f] == null; h++)
  82777. o[f] = n[d[h]], s[f] = l[h], c[f] = h === 2;
  82778. o[f] == null && (o[f] = u[f]);
  82779. }
  82780. 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]);
  82781. }
  82782. i.visual = qn.retrieveVisuals(n), t.push(i);
  82783. }, this), gQ(e, t), PA(t), k(t, function(n) {
  82784. var r = n.close, i = [["<", "≤"][r[1]], [">", "≥"][r[0]]];
  82785. n.text = n.text || this.formatValueText(n.value != null ? n.value : n.interval, !1, i);
  82786. }, this);
  82787. }
  82788. };
  82789. function gQ(t, e) {
  82790. var n = t.inverse;
  82791. (t.orient === "vertical" ? !n : n) && e.reverse();
  82792. }
  82793. var Tje = (
  82794. /** @class */
  82795. function(t) {
  82796. q(e, t);
  82797. function e() {
  82798. var n = t !== null && t.apply(this, arguments) || this;
  82799. return n.type = e.type, n;
  82800. }
  82801. return e.prototype.doRender = function() {
  82802. var n = this.group;
  82803. n.removeAll();
  82804. 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 = Tn(r.get("showLabel", !0), !f);
  82805. f && this._renderEndsText(n, f[0], u, d, l), k(c.viewPieceList, function(h) {
  82806. var p = h.piece, v = new Ve();
  82807. v.onclick = xe(this._onItemClick, this, p), this._enableHoverLink(v, h.indexInModelPieceList);
  82808. var g = r.getRepresentValue(p);
  82809. if (this._createItemSymbol(v, g, [0, 0, u[0], u[1]]), d) {
  82810. var m = this.visualMapModel.getValueState(g);
  82811. v.add(new gt({
  82812. style: {
  82813. x: l === "right" ? -i : u[0] + i,
  82814. y: u[1] / 2,
  82815. text: p.text,
  82816. verticalAlign: "middle",
  82817. align: l,
  82818. font: o,
  82819. fill: s,
  82820. opacity: m === "outOfRange" ? 0.5 : 1
  82821. }
  82822. }));
  82823. }
  82824. n.add(v);
  82825. }, this), f && this._renderEndsText(n, f[1], u, d, l), tf(r.get("orient"), n, r.get("itemGap")), this.renderBackground(n), this.positionGroup(n);
  82826. }, e.prototype._enableHoverLink = function(n, r) {
  82827. var i = this;
  82828. n.on("mouseover", function() {
  82829. return a("highlight");
  82830. }).on("mouseout", function() {
  82831. return a("downplay");
  82832. });
  82833. var a = function(o) {
  82834. var s = i.visualMapModel;
  82835. s.option.hoverLink && i.api.dispatchAction({
  82836. type: o,
  82837. batch: J_(s.findTargetDataIndices(r), s)
  82838. });
  82839. };
  82840. }, e.prototype._getItemAlign = function() {
  82841. var n = this.visualMapModel, r = n.option;
  82842. if (r.orient === "vertical")
  82843. return cie(n, this.api, n.itemSize);
  82844. var i = r.align;
  82845. return (!i || i === "auto") && (i = "left"), i;
  82846. }, e.prototype._renderEndsText = function(n, r, i, a, o) {
  82847. if (r) {
  82848. var s = new Ve(), l = this.visualMapModel.textStyleModel;
  82849. s.add(new gt({
  82850. style: Zt(l, {
  82851. x: a ? o === "right" ? i[0] : 0 : i[0] / 2,
  82852. y: i[1] / 2,
  82853. verticalAlign: "middle",
  82854. align: a ? o : "center",
  82855. text: r
  82856. })
  82857. })), n.add(s);
  82858. }
  82859. }, e.prototype._getViewData = function() {
  82860. var n = this.visualMapModel, r = ce(n.getPieceList(), function(s, l) {
  82861. return {
  82862. piece: s,
  82863. indexInModelPieceList: l
  82864. };
  82865. }), i = n.get("text"), a = n.get("orient"), o = n.get("inverse");
  82866. return (a === "horizontal" ? o : !o) ? r.reverse() : i && (i = i.slice().reverse()), {
  82867. viewPieceList: r,
  82868. endsText: i
  82869. };
  82870. }, e.prototype._createItemSymbol = function(n, r, i) {
  82871. n.add($n(
  82872. // symbol will be string
  82873. this.getControllerVisual(r, "symbol"),
  82874. i[0],
  82875. i[1],
  82876. i[2],
  82877. i[3],
  82878. // color will be string
  82879. this.getControllerVisual(r, "color")
  82880. ));
  82881. }, e.prototype._onItemClick = function(n) {
  82882. var r = this.visualMapModel, i = r.option, a = i.selectedMode;
  82883. if (a) {
  82884. var o = Le(i.selected), s = r.getSelectedMapKey(n);
  82885. a === "single" || a === !0 ? (o[s] = !0, k(o, function(l, u) {
  82886. o[u] = u === s;
  82887. })) : o[s] = !o[s], this.api.dispatchAction({
  82888. type: "selectDataRange",
  82889. from: this.uid,
  82890. visualMapId: this.visualMapModel.id,
  82891. selected: o
  82892. });
  82893. }
  82894. }, e.type = "visualMap.piecewise", e;
  82895. }(uie)
  82896. );
  82897. function hie(t) {
  82898. t.registerComponentModel(wje), t.registerComponentView(Tje), fie(t);
  82899. }
  82900. function Pje(t) {
  82901. at(die), at(hie);
  82902. }
  82903. var $je = {
  82904. label: {
  82905. enabled: !0
  82906. },
  82907. decal: {
  82908. show: !1
  82909. }
  82910. }, mQ = bt(), Aje = {};
  82911. function Eje(t, e) {
  82912. var n = t.getModel("aria");
  82913. if (!n.get("enabled"))
  82914. return;
  82915. var r = Le($je);
  82916. qe(r.label, t.getLocaleModel().get("aria"), !1), qe(n.option, r, !1), i(), a();
  82917. function i() {
  82918. var u = n.getModel("decal"), c = u.get("show");
  82919. if (c) {
  82920. var f = Pe();
  82921. t.eachSeries(function(d) {
  82922. if (!d.isColorBySeries()) {
  82923. var h = f.get(d.type);
  82924. h || (h = {}, f.set(d.type, h)), mQ(d).scope = h;
  82925. }
  82926. }), t.eachRawSeries(function(d) {
  82927. if (t.isSeriesFiltered(d))
  82928. return;
  82929. if (Me(d.enableAriaDecal)) {
  82930. d.enableAriaDecal();
  82931. return;
  82932. }
  82933. var h = d.getData();
  82934. if (d.isColorBySeries()) {
  82935. var y = HA(d.ecModel, d.name, Aje, t.getSeriesCount()), b = h.getVisual("decal");
  82936. h.setVisual("decal", _(b, y));
  82937. } else {
  82938. var p = d.getRawData(), v = {}, g = mQ(d).scope;
  82939. h.each(function(O) {
  82940. var S = h.getRawIndex(O);
  82941. v[S] = O;
  82942. });
  82943. var m = p.count();
  82944. p.each(function(O) {
  82945. var S = v[O], x = p.getName(O) || O + "", C = HA(d.ecModel, x, g, m), T = h.getItemVisual(S, "decal");
  82946. h.setItemVisual(S, "decal", _(T, C));
  82947. });
  82948. }
  82949. function _(O, S) {
  82950. var x = O ? le(le({}, S), O) : S;
  82951. return x.dirty = !0, x;
  82952. }
  82953. });
  82954. }
  82955. }
  82956. function a() {
  82957. var u = e.getZr().dom;
  82958. if (u) {
  82959. var c = t.getLocaleModel().get("aria"), f = n.getModel("label");
  82960. if (f.option = Re(f.option, c), !!f.get("enabled")) {
  82961. if (f.get("description")) {
  82962. u.setAttribute("aria-label", f.get("description"));
  82963. return;
  82964. }
  82965. var d = t.getSeriesCount(), h = f.get(["data", "maxCount"]) || 10, p = f.get(["series", "maxCount"]) || 10, v = Math.min(d, p), g;
  82966. if (!(d < 1)) {
  82967. var m = s();
  82968. if (m) {
  82969. var y = f.get(["general", "withTitle"]);
  82970. g = o(y, {
  82971. title: m
  82972. });
  82973. } else
  82974. g = f.get(["general", "withoutTitle"]);
  82975. var b = [], _ = d > 1 ? f.get(["series", "multiple", "prefix"]) : f.get(["series", "single", "prefix"]);
  82976. g += o(_, {
  82977. seriesCount: d
  82978. }), t.eachSeries(function(C, T) {
  82979. if (T < v) {
  82980. var w = void 0, P = C.get("name"), $ = P ? "withName" : "withoutName";
  82981. w = d > 1 ? f.get(["series", "multiple", $]) : f.get(["series", "single", $]), w = o(w, {
  82982. seriesId: C.seriesIndex,
  82983. seriesName: C.get("name"),
  82984. seriesType: l(C.subType)
  82985. });
  82986. var A = C.getData();
  82987. if (A.count() > h) {
  82988. var D = f.get(["data", "partialData"]);
  82989. w += o(D, {
  82990. displayCnt: h
  82991. });
  82992. } else
  82993. w += f.get(["data", "allData"]);
  82994. for (var E = f.get(["data", "separator", "middle"]), R = f.get(["data", "separator", "end"]), N = [], V = 0; V < A.count(); V++)
  82995. if (V < h) {
  82996. var B = A.getName(V), W = A.getValues(V), F = f.get(["data", B ? "withName" : "withoutName"]);
  82997. N.push(o(F, {
  82998. name: B,
  82999. value: W.join(E)
  83000. }));
  83001. }
  83002. w += N.join(E) + R, b.push(w);
  83003. }
  83004. });
  83005. var O = f.getModel(["series", "multiple", "separator"]), S = O.get("middle"), x = O.get("end");
  83006. g += b.join(S) + x, u.setAttribute("aria-label", g);
  83007. }
  83008. }
  83009. }
  83010. }
  83011. function o(u, c) {
  83012. if (!Oe(u))
  83013. return u;
  83014. var f = u;
  83015. return k(c, function(d, h) {
  83016. f = f.replace(new RegExp("\\{\\s*" + h + "\\s*\\}", "g"), d);
  83017. }), f;
  83018. }
  83019. function s() {
  83020. var u = t.get("title");
  83021. return u && u.length && (u = u[0]), u && u.text;
  83022. }
  83023. function l(u) {
  83024. var c = t.getLocaleModel().get(["series", "typeNames"]);
  83025. return c[u] || c.chart;
  83026. }
  83027. }
  83028. function Mje(t) {
  83029. if (!(!t || !t.aria)) {
  83030. var e = t.aria;
  83031. e.show != null && (e.enabled = e.show), e.label = e.label || {}, k(["description", "general", "series", "data"], function(n) {
  83032. e[n] != null && (e.label[n] = e[n]);
  83033. });
  83034. }
  83035. }
  83036. function Ije(t) {
  83037. t.registerPreprocessor(Mje), t.registerVisual(t.PRIORITY.VISUAL.ARIA, Eje);
  83038. }
  83039. var yQ = {
  83040. value: "eq",
  83041. // PENDING: not good for literal semantic?
  83042. "<": "lt",
  83043. "<=": "lte",
  83044. ">": "gt",
  83045. ">=": "gte",
  83046. "=": "eq",
  83047. "!=": "ne",
  83048. "<>": "ne"
  83049. // Might be misleading for sake of the difference between '==' and '===',
  83050. // so don't support them.
  83051. // '==': 'eq',
  83052. // '===': 'seq',
  83053. // '!==': 'sne'
  83054. // PENDING: Whether support some common alias "ge", "le", "neq"?
  83055. // ge: 'gte',
  83056. // le: 'lte',
  83057. // neq: 'ne',
  83058. }, Dje = (
  83059. /** @class */
  83060. function() {
  83061. function t(e) {
  83062. var n = this._condVal = Oe(e) ? new RegExp(e) : bR(e) ? e : null;
  83063. if (n == null) {
  83064. var r = "";
  83065. process.env.NODE_ENV !== "production" && (r = ni("Illegal regexp", e, "in")), Et(r);
  83066. }
  83067. }
  83068. return t.prototype.evaluate = function(e) {
  83069. var n = typeof e;
  83070. return Oe(n) ? this._condVal.test(e) : St(n) ? this._condVal.test(e + "") : !1;
  83071. }, t;
  83072. }()
  83073. ), Rje = (
  83074. /** @class */
  83075. function() {
  83076. function t() {
  83077. }
  83078. return t.prototype.evaluate = function() {
  83079. return this.value;
  83080. }, t;
  83081. }()
  83082. ), kje = (
  83083. /** @class */
  83084. function() {
  83085. function t() {
  83086. }
  83087. return t.prototype.evaluate = function() {
  83088. for (var e = this.children, n = 0; n < e.length; n++)
  83089. if (!e[n].evaluate())
  83090. return !1;
  83091. return !0;
  83092. }, t;
  83093. }()
  83094. ), Lje = (
  83095. /** @class */
  83096. function() {
  83097. function t() {
  83098. }
  83099. return t.prototype.evaluate = function() {
  83100. for (var e = this.children, n = 0; n < e.length; n++)
  83101. if (e[n].evaluate())
  83102. return !0;
  83103. return !1;
  83104. }, t;
  83105. }()
  83106. ), Nje = (
  83107. /** @class */
  83108. function() {
  83109. function t() {
  83110. }
  83111. return t.prototype.evaluate = function() {
  83112. return !this.child.evaluate();
  83113. }, t;
  83114. }()
  83115. ), Bje = (
  83116. /** @class */
  83117. function() {
  83118. function t() {
  83119. }
  83120. return t.prototype.evaluate = function() {
  83121. 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++)
  83122. if (!this.subCondList[a].evaluate(e ? i : r))
  83123. return !1;
  83124. return !0;
  83125. }, t;
  83126. }()
  83127. );
  83128. function IL(t, e) {
  83129. if (t === !0 || t === !1) {
  83130. var n = new Rje();
  83131. return n.value = t, n;
  83132. }
  83133. var r = "";
  83134. return pie(t) || (process.env.NODE_ENV !== "production" && (r = ni("Illegal config. Expect a plain object but actually", t)), Et(r)), t.and ? bQ("and", t, e) : t.or ? bQ("or", t, e) : t.not ? zje(t, e) : Vje(t, e);
  83135. }
  83136. function bQ(t, e, n) {
  83137. var r = e[t], i = "";
  83138. process.env.NODE_ENV !== "production" && (i = ni('"and"/"or" condition should only be `' + t + ": [...]` and must not be empty array.", "Illegal condition:", e)), ue(r) || Et(i), r.length || Et(i);
  83139. var a = t === "and" ? new kje() : new Lje();
  83140. return a.children = ce(r, function(o) {
  83141. return IL(o, n);
  83142. }), a.children.length || Et(i), a;
  83143. }
  83144. function zje(t, e) {
  83145. var n = t.not, r = "";
  83146. process.env.NODE_ENV !== "production" && (r = ni('"not" condition should only be `not: {}`.', "Illegal condition:", t)), pie(n) || Et(r);
  83147. var i = new Nje();
  83148. return i.child = IL(n, e), i.child || Et(r), i;
  83149. }
  83150. function Vje(t, e) {
  83151. for (var n = "", r = e.prepareGetValue(t), i = [], a = st(t), o = t.parser, s = o ? GJ(o) : null, l = 0; l < a.length; l++) {
  83152. var u = a[l];
  83153. if (!(u === "parser" || e.valueGetterAttrMap.get(u))) {
  83154. var c = Ce(yQ, u) ? yQ[u] : u, f = t[u], d = s ? s(f) : f, h = c4e(c, d) || c === "reg" && new Dje(d);
  83155. h || (process.env.NODE_ENV !== "production" && (n = ni('Illegal relational operation: "' + u + '" in condition:', t)), Et(n)), i.push(h);
  83156. }
  83157. }
  83158. i.length || (process.env.NODE_ENV !== "production" && (n = ni("Relational condition must have at least one operator.", "Illegal condition:", t)), Et(n));
  83159. var p = new Bje();
  83160. return p.valueGetterParam = r, p.valueParser = s, p.getValue = e.getValue, p.subCondList = i, p;
  83161. }
  83162. function pie(t) {
  83163. return Ie(t) && !wr(t);
  83164. }
  83165. var Fje = (
  83166. /** @class */
  83167. function() {
  83168. function t(e, n) {
  83169. this._cond = IL(e, n);
  83170. }
  83171. return t.prototype.evaluate = function() {
  83172. return this._cond.evaluate();
  83173. }, t;
  83174. }()
  83175. );
  83176. function Wje(t, e) {
  83177. return new Fje(t, e);
  83178. }
  83179. var Qje = {
  83180. type: "echarts:filter",
  83181. // PENDING: enhance to filter by index rather than create new data
  83182. transform: function(t) {
  83183. for (var e = t.upstream, n, r = Wje(t.config, {
  83184. valueGetterAttrMap: Pe({
  83185. dimension: !0
  83186. }),
  83187. prepareGetValue: function(s) {
  83188. var l = "", u = s.dimension;
  83189. Ce(s, "dimension") || (process.env.NODE_ENV !== "production" && (l = ni('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), Et(l));
  83190. var c = e.getDimensionInfo(u);
  83191. return c || (process.env.NODE_ENV !== "production" && (l = ni("Can not find dimension info via: " + u + `.
  83192. `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
  83193. `, "Illegal condition:", s, `.
  83194. `)), Et(l)), {
  83195. dimIdx: c.index
  83196. };
  83197. },
  83198. getValue: function(s) {
  83199. return e.retrieveValueFromItem(n, s.dimIdx);
  83200. }
  83201. }), i = [], a = 0, o = e.count(); a < o; a++)
  83202. n = e.getRawDataItem(a), r.evaluate() && i.push(n);
  83203. return {
  83204. data: i
  83205. };
  83206. }
  83207. }, HE = "";
  83208. process.env.NODE_ENV !== "production" && (HE = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));
  83209. var Hje = {
  83210. type: "echarts:sort",
  83211. transform: function(t) {
  83212. var e = t.upstream, n = t.config, r = "", i = Qt(n);
  83213. i.length || (process.env.NODE_ENV !== "production" && (r = "Empty `config` in sort transform."), Et(r));
  83214. var a = [];
  83215. k(i, function(c) {
  83216. var f = c.dimension, d = c.order, h = c.parser, p = c.incomparable;
  83217. if (f == null && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "dimension" specified.' + HE), Et(r)), d !== "asc" && d !== "desc" && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "order" specified.' + HE), Et(r)), p && p !== "min" && p !== "max") {
  83218. var v = "";
  83219. process.env.NODE_ENV !== "production" && (v = 'incomparable must be "min" or "max" rather than "' + p + '".'), Et(v);
  83220. }
  83221. if (d !== "asc" && d !== "desc") {
  83222. var g = "";
  83223. process.env.NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + d + '".'), Et(g);
  83224. }
  83225. var m = e.getDimensionInfo(f);
  83226. m || (process.env.NODE_ENV !== "production" && (r = ni("Can not find dimension info via: " + f + `.
  83227. `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
  83228. `, "Illegal config:", c, `.
  83229. `)), Et(r));
  83230. var y = h ? GJ(h) : null;
  83231. h && !y && (process.env.NODE_ENV !== "production" && (r = ni("Invalid parser name " + h + `.
  83232. `, "Illegal config:", c, `.
  83233. `)), Et(r)), a.push({
  83234. dimIdx: m.index,
  83235. parser: y,
  83236. comparator: new ZJ(d, p)
  83237. });
  83238. });
  83239. var o = e.sourceFormat;
  83240. o !== zr && o !== za && (process.env.NODE_ENV !== "production" && (r = 'sourceFormat "' + o + '" is not supported yet'), Et(r));
  83241. for (var s = [], l = 0, u = e.count(); l < u; l++)
  83242. s.push(e.getRawDataItem(l));
  83243. return s.sort(function(c, f) {
  83244. for (var d = 0; d < a.length; d++) {
  83245. var h = a[d], p = e.retrieveValueFromItem(c, h.dimIdx), v = e.retrieveValueFromItem(f, h.dimIdx);
  83246. h.parser && (p = h.parser(p), v = h.parser(v));
  83247. var g = h.comparator.evaluate(p, v);
  83248. if (g !== 0)
  83249. return g;
  83250. }
  83251. return 0;
  83252. }), {
  83253. data: s
  83254. };
  83255. }
  83256. };
  83257. function Gje(t) {
  83258. t.registerTransform(Qje), t.registerTransform(Hje);
  83259. }
  83260. var jje = (
  83261. /** @class */
  83262. function(t) {
  83263. q(e, t);
  83264. function e() {
  83265. var n = t !== null && t.apply(this, arguments) || this;
  83266. return n.type = "dataset", n;
  83267. }
  83268. return e.prototype.init = function(n, r, i) {
  83269. t.prototype.init.call(this, n, r, i), this._sourceManager = new qJ(this), bz(this);
  83270. }, e.prototype.mergeOption = function(n, r) {
  83271. t.prototype.mergeOption.call(this, n, r), bz(this);
  83272. }, e.prototype.optionUpdated = function() {
  83273. this._sourceManager.dirty();
  83274. }, e.prototype.getSourceManager = function() {
  83275. return this._sourceManager;
  83276. }, e.type = "dataset", e.defaultOption = {
  83277. seriesLayoutBy: Yo
  83278. }, e;
  83279. }(rt)
  83280. ), Zje = (
  83281. /** @class */
  83282. function(t) {
  83283. q(e, t);
  83284. function e() {
  83285. var n = t !== null && t.apply(this, arguments) || this;
  83286. return n.type = "dataset", n;
  83287. }
  83288. return e.type = "dataset", e;
  83289. }(Xt)
  83290. );
  83291. function Uje(t) {
  83292. t.registerComponentModel(jje), t.registerComponentView(Zje);
  83293. }
  83294. var wo = os.CMD;
  83295. function Qd(t, e) {
  83296. return Math.abs(t - e) < 1e-5;
  83297. }
  83298. function GE(t) {
  83299. var e = t.data, n = t.len(), r = [], i, a = 0, o = 0, s = 0, l = 0;
  83300. function u(A, D) {
  83301. i && i.length > 2 && r.push(i), i = [A, D];
  83302. }
  83303. function c(A, D, E, R) {
  83304. Qd(A, E) && Qd(D, R) || i.push(A, D, E, R, E, R);
  83305. }
  83306. function f(A, D, E, R, N, V) {
  83307. var B = Math.abs(D - A), W = Math.tan(B / 4) * 4 / 3, F = D < A ? -1 : 1, Q = Math.cos(A), Z = Math.sin(A), ne = Math.cos(D), ee = Math.sin(D), oe = Q * N + E, K = Z * V + R, ie = ne * N + E, X = ee * V + R, H = N * W * F, G = V * W * F;
  83308. i.push(oe - H * Z, K + G * Q, ie + H * ee, X - G * ne, ie, X);
  83309. }
  83310. for (var d, h, p, v, g = 0; g < n; ) {
  83311. var m = e[g++], y = g === 1;
  83312. switch (y && (a = e[g], o = e[g + 1], s = a, l = o, (m === wo.L || m === wo.C || m === wo.Q) && (i = [s, l])), m) {
  83313. case wo.M:
  83314. a = s = e[g++], o = l = e[g++], u(s, l);
  83315. break;
  83316. case wo.L:
  83317. d = e[g++], h = e[g++], c(a, o, d, h), a = d, o = h;
  83318. break;
  83319. case wo.C:
  83320. i.push(e[g++], e[g++], e[g++], e[g++], a = e[g++], o = e[g++]);
  83321. break;
  83322. case wo.Q:
  83323. 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;
  83324. break;
  83325. case wo.A:
  83326. var b = e[g++], _ = e[g++], O = e[g++], S = e[g++], x = e[g++], C = e[g++] + x;
  83327. g += 1;
  83328. var T = !e[g++];
  83329. d = Math.cos(x) * O + b, h = Math.sin(x) * S + _, y ? (s = d, l = h, u(s, l)) : c(a, o, d, h), a = Math.cos(C) * O + b, o = Math.sin(C) * S + _;
  83330. for (var w = (T ? -1 : 1) * Math.PI / 2, P = x; T ? P > C : P < C; P += w) {
  83331. var $ = T ? Math.max(P + w, C) : Math.min(P + w, C);
  83332. f(P, $, b, _, O, S);
  83333. }
  83334. break;
  83335. case wo.R:
  83336. 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);
  83337. break;
  83338. case wo.Z:
  83339. i && c(a, o, s, l), a = s, o = l;
  83340. break;
  83341. }
  83342. }
  83343. return i && i.length > 2 && r.push(i), r;
  83344. }
  83345. function jE(t, e, n, r, i, a, o, s, l, u) {
  83346. if (Qd(t, n) && Qd(e, r) && Qd(i, o) && Qd(a, s)) {
  83347. l.push(o, s);
  83348. return;
  83349. }
  83350. var c = 2 / u, f = c * c, d = o - t, h = s - e, p = Math.sqrt(d * d + h * h);
  83351. d /= p, h /= p;
  83352. var v = n - t, g = r - e, m = i - o, y = a - s, b = v * v + g * g, _ = m * m + y * y;
  83353. if (b < f && _ < f) {
  83354. l.push(o, s);
  83355. return;
  83356. }
  83357. var O = d * v + h * g, S = -d * m - h * y, x = b - O * O, C = _ - S * S;
  83358. if (x < f && O >= 0 && C < f && S >= 0) {
  83359. l.push(o, s);
  83360. return;
  83361. }
  83362. var T = [], w = [];
  83363. su(t, n, i, o, 0.5, T), su(e, r, a, s, 0.5, w), jE(T[0], w[0], T[1], w[1], T[2], w[2], T[3], w[3], l, u), jE(T[4], w[4], T[5], w[5], T[6], w[6], T[7], w[7], l, u);
  83364. }
  83365. function Xje(t, e) {
  83366. var n = GE(t), r = [];
  83367. e = e || 1;
  83368. for (var i = 0; i < n.length; i++) {
  83369. var a = n[i], o = [], s = a[0], l = a[1];
  83370. o.push(s, l);
  83371. for (var u = 2; u < a.length; ) {
  83372. var c = a[u++], f = a[u++], d = a[u++], h = a[u++], p = a[u++], v = a[u++];
  83373. jE(s, l, c, f, d, h, p, v, o, e), s = p, l = v;
  83374. }
  83375. r.push(o);
  83376. }
  83377. return r;
  83378. }
  83379. function vie(t, e, n) {
  83380. 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);
  83381. s === 0 && (s = 1, o = n);
  83382. for (var l = [], u = 0; u < o; u++)
  83383. l.push(s);
  83384. var c = o * s, f = n - c;
  83385. if (f > 0)
  83386. for (var u = 0; u < f; u++)
  83387. l[u % o] += 1;
  83388. return l;
  83389. }
  83390. function _Q(t, e, n) {
  83391. 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 = vie([l, u], c ? 0 : 1, e), d = (c ? s : u) / f.length, h = 0; h < f.length; h++)
  83392. for (var p = (c ? u : s) / f[h], v = 0; v < f[h]; v++) {
  83393. var g = {};
  83394. 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);
  83395. }
  83396. }
  83397. function Yje(t, e, n) {
  83398. for (var r = t.width, i = t.height, a = r > i, o = vie([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++)
  83399. for (var h = t[l] / o[d], p = 0; p < o[d]; p++) {
  83400. var v = {};
  83401. 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);
  83402. }
  83403. }
  83404. function OQ(t, e, n, r) {
  83405. return t * r - n * e;
  83406. }
  83407. function qje(t, e, n, r, i, a, o, s) {
  83408. var l = n - t, u = r - e, c = o - i, f = s - a, d = OQ(c, f, l, u);
  83409. if (Math.abs(d) < 1e-6)
  83410. return null;
  83411. var h = t - i, p = e - a, v = OQ(h, p, c, f) / d;
  83412. return v < 0 || v > 1 ? null : new Ke(v * l + t, v * u + e);
  83413. }
  83414. function Kje(t, e, n) {
  83415. var r = new Ke();
  83416. Ke.sub(r, n, e), r.normalize();
  83417. var i = new Ke();
  83418. Ke.sub(i, t, e);
  83419. var a = i.dot(r);
  83420. return a;
  83421. }
  83422. function Sd(t, e) {
  83423. var n = t[t.length - 1];
  83424. n && n[0] === e[0] && n[1] === e[1] || t.push(e);
  83425. }
  83426. function Jje(t, e, n) {
  83427. for (var r = t.length, i = [], a = 0; a < r; a++) {
  83428. var o = t[a], s = t[(a + 1) % r], l = qje(o[0], o[1], s[0], s[1], e.x, e.y, n.x, n.y);
  83429. l && i.push({
  83430. projPt: Kje(l, e, n),
  83431. pt: l,
  83432. idx: a
  83433. });
  83434. }
  83435. if (i.length < 2)
  83436. return [{ points: t }, { points: t }];
  83437. i.sort(function(g, m) {
  83438. return g.projPt - m.projPt;
  83439. });
  83440. var u = i[0], c = i[i.length - 1];
  83441. if (c.idx < u.idx) {
  83442. var f = u;
  83443. u = c, c = f;
  83444. }
  83445. 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++)
  83446. Sd(p, t[a].slice());
  83447. Sd(p, h), Sd(p, d);
  83448. for (var a = c.idx + 1; a <= u.idx + r; a++)
  83449. Sd(v, t[a % r].slice());
  83450. return Sd(v, d), Sd(v, h), [{
  83451. points: p
  83452. }, {
  83453. points: v
  83454. }];
  83455. }
  83456. function SQ(t) {
  83457. var e = t.points, n = [], r = [];
  83458. Zx(e, n, r);
  83459. var i = new Je(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 Ke(), c = new Ke();
  83460. 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), Jje(e, u, c);
  83461. }
  83462. function UO(t, e, n, r) {
  83463. if (n === 1)
  83464. r.push(e);
  83465. else {
  83466. var i = Math.floor(n / 2), a = t(e);
  83467. UO(t, a[0], i, r), UO(t, a[1], n - i, r);
  83468. }
  83469. return r;
  83470. }
  83471. function eZe(t, e) {
  83472. for (var n = [], r = 0; r < e; r++)
  83473. n.push(VR(t));
  83474. return n;
  83475. }
  83476. function tZe(t, e) {
  83477. e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel;
  83478. }
  83479. function nZe(t) {
  83480. for (var e = [], n = 0; n < t.length; )
  83481. e.push([t[n++], t[n++]]);
  83482. return e;
  83483. }
  83484. function rZe(t, e) {
  83485. var n = [], r = t.shape, i;
  83486. switch (t.type) {
  83487. case "rect":
  83488. Yje(r, e, n), i = mt;
  83489. break;
  83490. case "sector":
  83491. _Q(r, e, n), i = ii;
  83492. break;
  83493. case "circle":
  83494. _Q({
  83495. r0: 0,
  83496. r: r.r,
  83497. startAngle: 0,
  83498. endAngle: Math.PI * 2,
  83499. cx: r.cx,
  83500. cy: r.cy
  83501. }, e, n), i = ii;
  83502. break;
  83503. default:
  83504. 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(Xje(t.getUpdatedPathProxy(), o), function(m) {
  83505. return nZe(m);
  83506. }), l = s.length;
  83507. if (l === 0)
  83508. UO(SQ, {
  83509. points: s[0]
  83510. }, e, n);
  83511. else if (l === e)
  83512. for (var u = 0; u < l; u++)
  83513. n.push({
  83514. points: s[u]
  83515. });
  83516. else {
  83517. var c = 0, f = ce(s, function(m) {
  83518. var y = [], b = [];
  83519. Zx(m, y, b);
  83520. var _ = (b[1] - y[1]) * (b[0] - y[0]);
  83521. return c += _, { poly: m, area: _ };
  83522. });
  83523. f.sort(function(m, y) {
  83524. return y.area - m.area;
  83525. });
  83526. for (var d = e, u = 0; u < l; u++) {
  83527. var h = f[u];
  83528. if (d <= 0)
  83529. break;
  83530. var p = u === l - 1 ? d : Math.ceil(h.area / c * e);
  83531. p < 0 || (UO(SQ, {
  83532. points: h.poly
  83533. }, p, n), d -= p);
  83534. }
  83535. }
  83536. i = ai;
  83537. break;
  83538. }
  83539. if (!i)
  83540. return eZe(t, e);
  83541. for (var v = [], u = 0; u < n.length; u++) {
  83542. var g = new i();
  83543. g.setShape(n[u]), tZe(t, g), v.push(g);
  83544. }
  83545. return v;
  83546. }
  83547. function iZe(t, e) {
  83548. var n = t.length, r = e.length;
  83549. if (n === r)
  83550. return [t, e];
  83551. 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; ) {
  83552. var p = o[h - 2], v = o[h - 1], g = o[h++], m = o[h++], y = o[h++], b = o[h++], _ = o[h++], O = o[h++];
  83553. if (d <= 0) {
  83554. f.push(g, m, y, b, _, O);
  83555. continue;
  83556. }
  83557. for (var S = Math.min(d, c - 1) + 1, x = 1; x <= S; x++) {
  83558. var C = x / S;
  83559. su(p, g, y, _, C, i), su(v, m, b, O, C, 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], b = a[6];
  83560. }
  83561. d -= S - 1;
  83562. }
  83563. return o === t ? [f, e] : [t, f];
  83564. }
  83565. function xQ(t, e) {
  83566. for (var n = t.length, r = t[n - 2], i = t[n - 1], a = [], o = 0; o < e.length; )
  83567. a[o++] = r, a[o++] = i;
  83568. return a;
  83569. }
  83570. function aZe(t, e) {
  83571. for (var n, r, i, a = [], o = [], s = 0; s < Math.max(t.length, e.length); s++) {
  83572. var l = t[s], u = e[s], c = void 0, f = void 0;
  83573. l ? u ? (n = iZe(l, u), c = n[0], f = n[1], r = c, i = f) : (f = xQ(i || l, l), c = l) : (c = xQ(r || u, u), f = u), a.push(c), o.push(f);
  83574. }
  83575. return [a, o];
  83576. }
  83577. function wQ(t) {
  83578. for (var e = 0, n = 0, r = 0, i = t.length, a = 0, o = i - 2; a < i; o = a, a += 2) {
  83579. var s = t[o], l = t[o + 1], u = t[a], c = t[a + 1], f = s * c - u * l;
  83580. e += f, n += (s + u) * f, r += (l + c) * f;
  83581. }
  83582. return e === 0 ? [t[0] || 0, t[1] || 0] : [n / e / 3, r / e / 3, e];
  83583. }
  83584. function oZe(t, e, n, r) {
  83585. for (var i = (t.length - 2) / 6, a = 1 / 0, o = 0, s = t.length, l = s - 2, u = 0; u < i; u++) {
  83586. for (var c = u * 6, f = 0, d = 0; d < s; d += 2) {
  83587. 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, b = m - v;
  83588. f += y * y + b * b;
  83589. }
  83590. f < a && (a = f, o = u);
  83591. }
  83592. return o;
  83593. }
  83594. function sZe(t) {
  83595. for (var e = [], n = t.length, r = 0; r < n; r += 2)
  83596. e[r] = t[n - r - 2], e[r + 1] = t[n - r - 1];
  83597. return e;
  83598. }
  83599. function lZe(t, e, n, r) {
  83600. for (var i = [], a, o = 0; o < t.length; o++) {
  83601. var s = t[o], l = e[o], u = wQ(s), c = wQ(l);
  83602. a == null && (a = u[2] < 0 != c[2] < 0);
  83603. var f = [], d = [], h = 0, p = 1 / 0, v = [], g = s.length;
  83604. a && (s = sZe(s));
  83605. for (var m = oZe(s, l, u, c) * 6, y = g - 2, b = 0; b < y; b += 2) {
  83606. var _ = (m + b) % y + 2;
  83607. f[b + 2] = s[_] - u[0], f[b + 3] = s[_ + 1] - u[1];
  83608. }
  83609. f[0] = s[m] - u[0], f[1] = s[m + 1] - u[1];
  83610. for (var O = r / n, S = -r / 2; S <= r / 2; S += O) {
  83611. for (var x = Math.sin(S), C = Math.cos(S), T = 0, b = 0; b < s.length; b += 2) {
  83612. var w = f[b], P = f[b + 1], $ = l[b] - c[0], A = l[b + 1] - c[1], D = $ * C - A * x, E = $ * x + A * C;
  83613. v[b] = D, v[b + 1] = E;
  83614. var R = D - w, N = E - P;
  83615. T += R * R + N * N;
  83616. }
  83617. if (T < p) {
  83618. p = T, h = S;
  83619. for (var V = 0; V < v.length; V++)
  83620. d[V] = v[V];
  83621. }
  83622. }
  83623. i.push({
  83624. from: f,
  83625. to: d,
  83626. fromCp: u,
  83627. toCp: c,
  83628. rotation: -h
  83629. });
  83630. }
  83631. return i;
  83632. }
  83633. function XO(t) {
  83634. return t.__isCombineMorphing;
  83635. }
  83636. var gie = "__mOriginal_";
  83637. function YO(t, e, n) {
  83638. var r = gie + e, i = t[r] || t[e];
  83639. t[r] || (t[r] = t[e]);
  83640. var a = n.replace, o = n.after, s = n.before;
  83641. t[e] = function() {
  83642. var l = arguments, u;
  83643. return s && s.apply(this, l), a ? u = a.apply(this, l) : u = i.apply(this, l), o && o.apply(this, l), u;
  83644. };
  83645. }
  83646. function Wg(t, e) {
  83647. var n = gie + e;
  83648. t[n] && (t[e] = t[n], t[n] = null);
  83649. }
  83650. function CQ(t, e) {
  83651. for (var n = 0; n < t.length; n++)
  83652. for (var r = t[n], i = 0; i < r.length; ) {
  83653. var a = r[i], o = r[i + 1];
  83654. r[i++] = e[0] * a + e[2] * o + e[4], r[i++] = e[1] * a + e[3] * o + e[5];
  83655. }
  83656. }
  83657. function mie(t, e) {
  83658. var n = t.getUpdatedPathProxy(), r = e.getUpdatedPathProxy(), i = aZe(GE(n), GE(r)), a = i[0], o = i[1], s = t.getComputedTransform(), l = e.getComputedTransform();
  83659. function u() {
  83660. this.transform = null;
  83661. }
  83662. s && CQ(a, s), l && CQ(o, l), YO(e, "updateTransform", { replace: u }), e.transform = null;
  83663. var c = lZe(a, o, 10, Math.PI), f = [];
  83664. YO(e, "buildPath", { replace: function(d) {
  83665. for (var h = e.__morphT, p = 1 - h, v = [], g = 0; g < c.length; g++) {
  83666. var m = c[g], y = m.from, b = m.to, _ = m.rotation * h, O = m.fromCp, S = m.toCp, x = Math.sin(_), C = Math.cos(_);
  83667. $g(v, O, S, h);
  83668. for (var T = 0; T < y.length; T += 2) {
  83669. var w = y[T], P = y[T + 1], $ = b[T], A = b[T + 1], D = w * p + $ * h, E = P * p + A * h;
  83670. f[T] = D * C - E * x + v[0], f[T + 1] = D * x + E * C + v[1];
  83671. }
  83672. var R = f[0], N = f[1];
  83673. d.moveTo(R, N);
  83674. for (var T = 2; T < y.length; ) {
  83675. var $ = f[T++], A = f[T++], V = f[T++], B = f[T++], W = f[T++], F = f[T++];
  83676. R === $ && N === A && V === W && B === F ? d.lineTo(W, F) : d.bezierCurveTo($, A, V, B, W, F), R = W, N = F;
  83677. }
  83678. }
  83679. } });
  83680. }
  83681. function DL(t, e, n) {
  83682. if (!t || !e)
  83683. return e;
  83684. var r = n.done, i = n.during;
  83685. mie(t, e), e.__morphT = 0;
  83686. function a() {
  83687. Wg(e, "buildPath"), Wg(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape();
  83688. }
  83689. return e.animateTo({
  83690. __morphT: 1
  83691. }, Re({
  83692. during: function(o) {
  83693. e.dirtyShape(), i && i(o);
  83694. },
  83695. done: function() {
  83696. a(), r && r();
  83697. }
  83698. }, n)), e;
  83699. }
  83700. function uZe(t, e, n, r, i, a) {
  83701. var o = 16;
  83702. t = i === n ? 0 : Math.round(32767 * (t - n) / (i - n)), e = a === r ? 0 : Math.round(32767 * (e - r) / (a - r));
  83703. for (var s = 0, l, u = (1 << o) / 2; u > 0; u /= 2) {
  83704. var c = 0, f = 0;
  83705. (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);
  83706. }
  83707. return s;
  83708. }
  83709. function qO(t) {
  83710. var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = ce(t, function(s) {
  83711. 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);
  83712. return e = Math.min(c, e), n = Math.min(f, n), r = Math.max(c, r), i = Math.max(f, i), [c, f];
  83713. }), o = ce(a, function(s, l) {
  83714. return {
  83715. cp: s,
  83716. z: uZe(s[0], s[1], e, n, r, i),
  83717. path: t[l]
  83718. };
  83719. });
  83720. return o.sort(function(s, l) {
  83721. return s.z - l.z;
  83722. }).map(function(s) {
  83723. return s.path;
  83724. });
  83725. }
  83726. function yie(t) {
  83727. return rZe(t.path, t.count);
  83728. }
  83729. function ZE() {
  83730. return {
  83731. fromIndividuals: [],
  83732. toIndividuals: [],
  83733. count: 0
  83734. };
  83735. }
  83736. function cZe(t, e, n) {
  83737. var r = [];
  83738. function i(O) {
  83739. for (var S = 0; S < O.length; S++) {
  83740. var x = O[S];
  83741. XO(x) ? i(x.childrenRef()) : x instanceof ot && r.push(x);
  83742. }
  83743. }
  83744. i(t);
  83745. var a = r.length;
  83746. if (!a)
  83747. return ZE();
  83748. var o = n.dividePath || yie, s = o({
  83749. path: e,
  83750. count: a
  83751. });
  83752. if (s.length !== a)
  83753. return console.error("Invalid morphing: unmatched splitted path"), ZE();
  83754. r = qO(r), s = qO(s);
  83755. for (var l = n.done, u = n.during, c = n.individualDelay, f = new Es(), d = 0; d < a; d++) {
  83756. var h = r[d], p = s[d];
  83757. p.parent = e, p.copyTransform(f), c || mie(h, p);
  83758. }
  83759. e.__isCombineMorphing = !0, e.childrenRef = function() {
  83760. return s;
  83761. };
  83762. function v(O) {
  83763. for (var S = 0; S < s.length; S++)
  83764. s[S].addSelfToZr(O);
  83765. }
  83766. YO(e, "addSelfToZr", {
  83767. after: function(O) {
  83768. v(O);
  83769. }
  83770. }), YO(e, "removeSelfFromZr", {
  83771. after: function(O) {
  83772. for (var S = 0; S < s.length; S++)
  83773. s[S].removeSelfFromZr(O);
  83774. }
  83775. });
  83776. function g() {
  83777. e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, Wg(e, "addSelfToZr"), Wg(e, "removeSelfFromZr");
  83778. }
  83779. var m = s.length;
  83780. if (c)
  83781. for (var y = m, b = function() {
  83782. y--, y === 0 && (g(), l && l());
  83783. }, d = 0; d < m; d++) {
  83784. var _ = c ? Re({
  83785. delay: (n.delay || 0) + c(d, m, r[d], s[d]),
  83786. done: b
  83787. }, n) : n;
  83788. DL(r[d], s[d], _);
  83789. }
  83790. else
  83791. e.__morphT = 0, e.animateTo({
  83792. __morphT: 1
  83793. }, Re({
  83794. during: function(O) {
  83795. for (var S = 0; S < m; S++) {
  83796. var x = s[S];
  83797. x.__morphT = e.__morphT, x.dirtyShape();
  83798. }
  83799. u && u(O);
  83800. },
  83801. done: function() {
  83802. g();
  83803. for (var O = 0; O < t.length; O++)
  83804. Wg(t[O], "updateTransform");
  83805. l && l();
  83806. }
  83807. }, n));
  83808. return e.__zr && v(e.__zr), {
  83809. fromIndividuals: r,
  83810. toIndividuals: s,
  83811. count: m
  83812. };
  83813. }
  83814. function fZe(t, e, n) {
  83815. var r = e.length, i = [], a = n.dividePath || yie;
  83816. function o(h) {
  83817. for (var p = 0; p < h.length; p++) {
  83818. var v = h[p];
  83819. XO(v) ? o(v.childrenRef()) : v instanceof ot && i.push(v);
  83820. }
  83821. }
  83822. if (XO(t)) {
  83823. o(t.childrenRef());
  83824. var s = i.length;
  83825. if (s < r)
  83826. for (var l = 0, u = s; u < r; u++)
  83827. i.push(VR(i[l++ % s]));
  83828. i.length = r;
  83829. } else {
  83830. i = a({ path: t, count: r });
  83831. for (var c = t.getComputedTransform(), u = 0; u < i.length; u++)
  83832. i[u].setLocalTransform(c);
  83833. if (i.length !== r)
  83834. return console.error("Invalid morphing: unmatched splitted path"), ZE();
  83835. }
  83836. i = qO(i), e = qO(e);
  83837. for (var f = n.individualDelay, u = 0; u < r; u++) {
  83838. var d = f ? Re({
  83839. delay: (n.delay || 0) + f(u, r, i[u], e[u])
  83840. }, n) : n;
  83841. DL(i[u], e[u], d);
  83842. }
  83843. return {
  83844. fromIndividuals: i,
  83845. toIndividuals: e,
  83846. count: e.length
  83847. };
  83848. }
  83849. function TQ(t) {
  83850. return ue(t[0]);
  83851. }
  83852. function PQ(t, e) {
  83853. for (var n = [], r = t.length, i = 0; i < r; i++)
  83854. n.push({
  83855. one: t[i],
  83856. many: []
  83857. });
  83858. for (var i = 0; i < e.length; i++) {
  83859. var a = e[i].length, o = void 0;
  83860. for (o = 0; o < a; o++)
  83861. n[o % r].many.push(e[i][o]);
  83862. }
  83863. for (var s = 0, i = r - 1; i >= 0; i--)
  83864. if (!n[i].many.length) {
  83865. var l = n[s].many;
  83866. if (l.length <= 1)
  83867. if (s)
  83868. s = 0;
  83869. else
  83870. return n;
  83871. var a = l.length, u = Math.ceil(a / 2);
  83872. n[i].many = l.slice(u, a), n[s].many = l.slice(0, u), s++;
  83873. }
  83874. return n;
  83875. }
  83876. var dZe = {
  83877. clone: function(t) {
  83878. for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), r = 0; r < t.count; r++) {
  83879. var i = VR(t.path);
  83880. i.setStyle("opacity", n), e.push(i);
  83881. }
  83882. return e;
  83883. },
  83884. // Use the default divider
  83885. split: null
  83886. };
  83887. function l$(t, e, n, r, i, a) {
  83888. if (!t.length || !e.length)
  83889. return;
  83890. var o = bp("update", r, i);
  83891. if (!(o && o.duration > 0))
  83892. return;
  83893. var s = r.getModel("universalTransition").get("delay"), l = Object.assign({
  83894. // Need to setToFinal so the further calculation based on the style can be correct.
  83895. // Like emphasis color.
  83896. setToFinal: !0
  83897. }, o), u, c;
  83898. TQ(t) && (u = t, c = e), TQ(e) && (u = e, c = t);
  83899. function f(m, y, b, _, O) {
  83900. var S = m.many, x = m.one;
  83901. if (S.length === 1 && !O) {
  83902. var C = y ? S[0] : x, T = y ? x : S[0];
  83903. if (XO(C))
  83904. f({
  83905. many: [C],
  83906. one: T
  83907. }, !0, b, _, !0);
  83908. else {
  83909. var w = s ? Re({
  83910. delay: s(b, _)
  83911. }, l) : l;
  83912. DL(C, T, w), a(C, T, C, T, w);
  83913. }
  83914. } else
  83915. for (var P = Re({
  83916. dividePath: dZe[n],
  83917. individualDelay: s && function(N, V, B, W) {
  83918. return s(N + b, _);
  83919. }
  83920. }, l), $ = y ? cZe(S, x, P) : fZe(x, S, P), A = $.fromIndividuals, D = $.toIndividuals, E = A.length, R = 0; R < E; R++) {
  83921. var w = s ? Re({
  83922. delay: s(R, E)
  83923. }, l) : l;
  83924. a(A[R], D[R], y ? S[R] : m.one, y ? m.one : S[R], w);
  83925. }
  83926. }
  83927. for (var d = u ? u === t : t.length > e.length, h = u ? PQ(c, u) : PQ(d ? e : t, [d ? t : e]), p = 0, v = 0; v < h.length; v++)
  83928. p += h[v].many.length;
  83929. for (var g = 0, v = 0; v < h.length; v++)
  83930. f(h[v], d, g, p), g += h[v].many.length;
  83931. }
  83932. function mc(t) {
  83933. if (!t)
  83934. return [];
  83935. if (ue(t)) {
  83936. for (var e = [], n = 0; n < t.length; n++)
  83937. e.push(mc(t[n]));
  83938. return e;
  83939. }
  83940. var r = [];
  83941. return t.traverse(function(i) {
  83942. i instanceof ot && !i.disableMorphing && !i.invisible && !i.ignore && r.push(i);
  83943. }), r;
  83944. }
  83945. var bie = 1e4, hZe = 0, $Q = 1, AQ = 2, pZe = bt();
  83946. function vZe(t, e) {
  83947. for (var n = t.dimensions, r = 0; r < n.length; r++) {
  83948. var i = t.getDimensionInfo(n[r]);
  83949. if (i && i.otherDims[e] === 0)
  83950. return n[r];
  83951. }
  83952. }
  83953. function gZe(t, e, n) {
  83954. var r = t.getDimensionInfo(n), i = r && r.ordinalMeta;
  83955. if (r) {
  83956. var a = t.get(r.name, e);
  83957. return i && i.categories[a] || a + "";
  83958. }
  83959. }
  83960. function EQ(t, e, n, r) {
  83961. var i = r ? "itemChildGroupId" : "itemGroupId", a = vZe(t, i);
  83962. if (a) {
  83963. var o = gZe(t, e, a);
  83964. return o;
  83965. }
  83966. var s = t.getRawDataItem(e), l = r ? "childGroupId" : "groupId";
  83967. if (s && s[l])
  83968. return s[l] + "";
  83969. if (!r)
  83970. return n || t.getId(e);
  83971. }
  83972. function MQ(t) {
  83973. var e = [];
  83974. return k(t, function(n) {
  83975. var r = n.data, i = n.dataGroupId;
  83976. if (r.count() > bie) {
  83977. process.env.NODE_ENV !== "production" && dn("Universal transition is disabled on large data > 10k.");
  83978. return;
  83979. }
  83980. for (var a = r.getIndices(), o = 0; o < a.length; o++)
  83981. e.push({
  83982. data: r,
  83983. groupId: EQ(r, o, i, !1),
  83984. childGroupId: EQ(r, o, i, !0),
  83985. divide: n.divide,
  83986. dataIndex: o
  83987. });
  83988. }), e;
  83989. }
  83990. function u$(t, e, n) {
  83991. t.traverse(function(r) {
  83992. r instanceof ot && Yt(r, {
  83993. style: {
  83994. opacity: 0
  83995. }
  83996. }, e, {
  83997. dataIndex: n,
  83998. isFrom: !0
  83999. });
  84000. });
  84001. }
  84002. function c$(t) {
  84003. if (t.parent) {
  84004. var e = t.getComputedTransform();
  84005. t.setLocalTransform(e), t.parent.remove(t);
  84006. }
  84007. }
  84008. function xd(t) {
  84009. t.stopAnimation(), t.isGroup && t.traverse(function(e) {
  84010. e.stopAnimation();
  84011. });
  84012. }
  84013. function mZe(t, e, n) {
  84014. var r = bp("update", n, e);
  84015. r && t.traverse(function(i) {
  84016. if (i instanceof Da) {
  84017. var a = jke(i);
  84018. a && i.animateFrom({
  84019. style: a
  84020. }, r);
  84021. }
  84022. });
  84023. }
  84024. function yZe(t, e) {
  84025. var n = t.length;
  84026. if (n !== e.length)
  84027. return !1;
  84028. for (var r = 0; r < n; r++) {
  84029. var i = t[r], a = e[r];
  84030. if (i.data.getId(i.dataIndex) !== a.data.getId(a.dataIndex))
  84031. return !1;
  84032. }
  84033. return !0;
  84034. }
  84035. function _ie(t, e, n) {
  84036. var r = MQ(t), i = MQ(e);
  84037. function a(b, _, O, S, x) {
  84038. (O || b) && _.animateFrom({
  84039. style: O && O !== b ? le(le({}, O.style), b.style) : b.style
  84040. }, x);
  84041. }
  84042. var o = !1, s = hZe, l = Pe(), u = Pe();
  84043. r.forEach(function(b) {
  84044. b.groupId && l.set(b.groupId, !0), b.childGroupId && u.set(b.childGroupId, !0);
  84045. });
  84046. for (var c = 0; c < i.length; c++) {
  84047. var f = i[c].groupId;
  84048. if (u.get(f)) {
  84049. s = $Q;
  84050. break;
  84051. }
  84052. var d = i[c].childGroupId;
  84053. if (d && l.get(d)) {
  84054. s = AQ;
  84055. break;
  84056. }
  84057. }
  84058. function h(b, _) {
  84059. return function(O) {
  84060. var S = O.data, x = O.dataIndex;
  84061. return _ ? S.getId(x) : b ? s === $Q ? O.childGroupId : O.groupId : s === AQ ? O.childGroupId : O.groupId;
  84062. };
  84063. }
  84064. var p = yZe(r, i), v = {};
  84065. if (!p)
  84066. for (var c = 0; c < i.length; c++) {
  84067. var g = i[c], m = g.data.getItemGraphicEl(g.dataIndex);
  84068. m && (v[m.id] = !0);
  84069. }
  84070. function y(b, _) {
  84071. var O = r[_], S = i[b], x = S.data.hostModel, C = O.data.getItemGraphicEl(O.dataIndex), T = S.data.getItemGraphicEl(S.dataIndex);
  84072. if (C === T) {
  84073. T && mZe(T, S.dataIndex, x);
  84074. return;
  84075. }
  84076. // We can't use the elements that already being morphed
  84077. C && v[C.id] || T && (xd(T), C ? (xd(C), c$(C), o = !0, l$(mc(C), mc(T), S.divide, x, b, a)) : u$(T, x, b));
  84078. }
  84079. new Xs(r, i, h(!0, p), h(!1, p), null, "multiple").update(y).updateManyToOne(function(b, _) {
  84080. var O = i[b], S = O.data, x = S.hostModel, C = S.getItemGraphicEl(O.dataIndex), T = Nt(ce(_, function(w) {
  84081. return r[w].data.getItemGraphicEl(r[w].dataIndex);
  84082. }), function(w) {
  84083. return w && w !== C && !v[w.id];
  84084. });
  84085. C && (xd(C), T.length ? (k(T, function(w) {
  84086. xd(w), c$(w);
  84087. }), o = !0, l$(mc(T), mc(C), O.divide, x, b, a)) : u$(C, x, O.dataIndex));
  84088. }).updateOneToMany(function(b, _) {
  84089. var O = r[_], S = O.data.getItemGraphicEl(O.dataIndex);
  84090. if (!(S && v[S.id])) {
  84091. var x = Nt(ce(b, function(T) {
  84092. return i[T].data.getItemGraphicEl(i[T].dataIndex);
  84093. }), function(T) {
  84094. return T && T !== S;
  84095. }), C = i[b[0]].data.hostModel;
  84096. x.length && (k(x, function(T) {
  84097. return xd(T);
  84098. }), S ? (xd(S), c$(S), o = !0, l$(
  84099. mc(S),
  84100. mc(x),
  84101. O.divide,
  84102. // Use divide on old.
  84103. C,
  84104. b[0],
  84105. a
  84106. )) : k(x, function(T) {
  84107. return u$(T, C, b[0]);
  84108. }));
  84109. }
  84110. }).updateManyToMany(function(b, _) {
  84111. new Xs(_, b, function(O) {
  84112. return r[O].data.getId(r[O].dataIndex);
  84113. }, function(O) {
  84114. return i[O].data.getId(i[O].dataIndex);
  84115. }).update(function(O, S) {
  84116. y(b[O], _[S]);
  84117. }).execute();
  84118. }).execute(), o && k(e, function(b) {
  84119. var _ = b.data, O = _.hostModel, S = O && n.getViewOfSeriesModel(O), x = bp("update", O, 0);
  84120. S && O.isAnimationEnabled() && x && x.duration > 0 && S.group.traverse(function(C) {
  84121. C instanceof ot && !C.animators.length && C.animateFrom({
  84122. style: {
  84123. opacity: 0
  84124. }
  84125. }, x);
  84126. });
  84127. });
  84128. }
  84129. function IQ(t) {
  84130. var e = t.getModel("universalTransition").get("seriesKey");
  84131. return e || t.id;
  84132. }
  84133. function DQ(t) {
  84134. return ue(t) ? t.sort().join(",") : t;
  84135. }
  84136. function Cl(t) {
  84137. if (t.hostModel)
  84138. return t.hostModel.getModel("universalTransition").get("divideShape");
  84139. }
  84140. function bZe(t, e) {
  84141. var n = Pe(), r = Pe(), i = Pe();
  84142. k(t.oldSeries, function(o, s) {
  84143. var l = t.oldDataGroupIds[s], u = t.oldData[s], c = IQ(o), f = DQ(c);
  84144. r.set(f, {
  84145. dataGroupId: l,
  84146. data: u
  84147. }), ue(c) && k(c, function(d) {
  84148. i.set(d, {
  84149. key: f,
  84150. dataGroupId: l,
  84151. data: u
  84152. });
  84153. });
  84154. });
  84155. function a(o) {
  84156. n.get(o) && dn("Duplicated seriesKey in universalTransition " + o);
  84157. }
  84158. return k(e.updatedSeries, function(o) {
  84159. if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) {
  84160. var s = o.get("dataGroupId"), l = o.getData(), u = IQ(o), c = DQ(u), f = r.get(c);
  84161. if (f)
  84162. process.env.NODE_ENV !== "production" && a(c), n.set(c, {
  84163. oldSeries: [{
  84164. dataGroupId: f.dataGroupId,
  84165. divide: Cl(f.data),
  84166. data: f.data
  84167. }],
  84168. newSeries: [{
  84169. dataGroupId: s,
  84170. divide: Cl(l),
  84171. data: l
  84172. }]
  84173. });
  84174. else if (ue(u)) {
  84175. process.env.NODE_ENV !== "production" && a(c);
  84176. var d = [];
  84177. k(u, function(v) {
  84178. var g = r.get(v);
  84179. g.data && d.push({
  84180. dataGroupId: g.dataGroupId,
  84181. divide: Cl(g.data),
  84182. data: g.data
  84183. });
  84184. }), d.length && n.set(c, {
  84185. oldSeries: d,
  84186. newSeries: [{
  84187. dataGroupId: s,
  84188. data: l,
  84189. divide: Cl(l)
  84190. }]
  84191. });
  84192. } else {
  84193. var h = i.get(u);
  84194. if (h) {
  84195. var p = n.get(h.key);
  84196. p || (p = {
  84197. oldSeries: [{
  84198. dataGroupId: h.dataGroupId,
  84199. data: h.data,
  84200. divide: Cl(h.data)
  84201. }],
  84202. newSeries: []
  84203. }, n.set(h.key, p)), p.newSeries.push({
  84204. dataGroupId: s,
  84205. data: l,
  84206. divide: Cl(l)
  84207. });
  84208. }
  84209. }
  84210. }
  84211. }), n;
  84212. }
  84213. function RQ(t, e) {
  84214. for (var n = 0; n < t.length; n++) {
  84215. var r = e.seriesIndex != null && e.seriesIndex === t[n].seriesIndex || e.seriesId != null && e.seriesId === t[n].id;
  84216. if (r)
  84217. return n;
  84218. }
  84219. }
  84220. function _Ze(t, e, n, r) {
  84221. var i = [], a = [];
  84222. k(Qt(t.from), function(o) {
  84223. var s = RQ(e.oldSeries, o);
  84224. s >= 0 && i.push({
  84225. dataGroupId: e.oldDataGroupIds[s],
  84226. data: e.oldData[s],
  84227. // TODO can specify divideShape in transition.
  84228. divide: Cl(e.oldData[s]),
  84229. groupIdDim: o.dimension
  84230. });
  84231. }), k(Qt(t.to), function(o) {
  84232. var s = RQ(n.updatedSeries, o);
  84233. if (s >= 0) {
  84234. var l = n.updatedSeries[s].getData();
  84235. a.push({
  84236. dataGroupId: e.oldDataGroupIds[s],
  84237. data: l,
  84238. divide: Cl(l),
  84239. groupIdDim: o.dimension
  84240. });
  84241. }
  84242. }), i.length > 0 && a.length > 0 && _ie(i, a, r);
  84243. }
  84244. function OZe(t) {
  84245. t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
  84246. k(Qt(r.seriesTransition), function(i) {
  84247. k(Qt(i.to), function(a) {
  84248. for (var o = r.updatedSeries, s = 0; s < o.length; s++)
  84249. (a.seriesIndex != null && a.seriesIndex === o[s].seriesIndex || a.seriesId != null && a.seriesId === o[s].id) && (o[s][j_] = !0);
  84250. });
  84251. });
  84252. }), t.registerUpdateLifecycle("series:transition", function(e, n, r) {
  84253. var i = pZe(n);
  84254. if (i.oldSeries && r.updatedSeries && r.optionChanged) {
  84255. var a = r.seriesTransition;
  84256. if (a)
  84257. k(Qt(a), function(h) {
  84258. _Ze(h, i, r, n);
  84259. });
  84260. else {
  84261. var o = bZe(i, r);
  84262. k(o.keys(), function(h) {
  84263. var p = o.get(h);
  84264. _ie(p.oldSeries, p.newSeries, n);
  84265. });
  84266. }
  84267. k(r.updatedSeries, function(h) {
  84268. h[j_] && (h[j_] = !1);
  84269. });
  84270. }
  84271. for (var s = e.getSeries(), l = i.oldSeries = [], u = i.oldDataGroupIds = [], c = i.oldData = [], f = 0; f < s.length; f++) {
  84272. var d = s[f].getData();
  84273. d.count() < bie && (l.push(s[f]), u.push(s[f].get("dataGroupId")), c.push(d));
  84274. }
  84275. });
  84276. }
  84277. at([M3e]);
  84278. at([T3e]);
  84279. at([q3e, d6e, S6e, tBe, dBe, KBe, Tze, uVe, MVe, NVe, jVe, VFe, fWe, SWe, BWe, WWe, KWe, a7e, g7e, S7e, I7e, pQe]);
  84280. at(DQe);
  84281. at(oHe);
  84282. at(mne);
  84283. at(bHe);
  84284. at(nre);
  84285. at(xHe);
  84286. at(IHe);
  84287. at(bGe);
  84288. at(BGe);
  84289. at(ty);
  84290. at(t9e);
  84291. at(i9e);
  84292. at(p9e);
  84293. at(O9e);
  84294. at(P9e);
  84295. at(D9e);
  84296. at(Q9e);
  84297. at(sje);
  84298. at(oie);
  84299. at(sie);
  84300. at(Pje);
  84301. at(die);
  84302. at(hie);
  84303. at(Ije);
  84304. at(Gje);
  84305. at(Uje);
  84306. at(OZe);
  84307. at(j5e);
  84308. const SZe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  84309. __proto__: null,
  84310. Axis: Va,
  84311. ChartView: zt,
  84312. ComponentModel: rt,
  84313. ComponentView: Xt,
  84314. List: Nr,
  84315. Model: Wt,
  84316. PRIORITY: Cee,
  84317. SeriesModel: Ht,
  84318. color: nDe,
  84319. connect: K8e,
  84320. dataTool: aNe,
  84321. dependencies: k8e,
  84322. disConnect: J8e,
  84323. disconnect: Ree,
  84324. dispose: eNe,
  84325. env: vt,
  84326. extendChartView: D5e,
  84327. extendComponentModel: E5e,
  84328. extendComponentView: M5e,
  84329. extendSeriesModel: I5e,
  84330. format: y5e,
  84331. getCoordinateSystemDimensions: nNe,
  84332. getInstanceByDom: mk,
  84333. getInstanceById: tNe,
  84334. getMap: iNe,
  84335. graphic: m5e,
  84336. helper: u5e,
  84337. init: Dee,
  84338. innerDrawElementOnCanvas: hk,
  84339. matrix: DIe,
  84340. number: v5e,
  84341. parseGeoJSON: aE,
  84342. parseGeoJson: aE,
  84343. registerAction: go,
  84344. registerCoordinateSystem: Nee,
  84345. registerLayout: Bee,
  84346. registerLoading: Sk,
  84347. registerLocale: XR,
  84348. registerMap: zee,
  84349. registerPostInit: kee,
  84350. registerPostUpdate: Lee,
  84351. registerPreprocessor: bk,
  84352. registerProcessor: _k,
  84353. registerTheme: yk,
  84354. registerTransform: Vee,
  84355. registerUpdateLifecycle: dw,
  84356. registerVisual: $u,
  84357. setCanvasCreator: rNe,
  84358. setPlatformAPI: Sq,
  84359. throttle: cw,
  84360. time: g5e,
  84361. use: at,
  84362. util: b5e,
  84363. vector: bIe,
  84364. version: R8e,
  84365. zrUtil: dIe,
  84366. zrender: BDe
  84367. }, Symbol.toStringTag, { value: "Module" }));
  84368. function xZe(t) {
  84369. return Z9() ? (d0(t), !0) : !1;
  84370. }
  84371. function KO(t) {
  84372. return typeof t == "function" ? t() : z(t);
  84373. }
  84374. const wZe = typeof window < "u" && typeof document < "u";
  84375. typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
  84376. const CZe = Object.prototype.toString, TZe = (t) => CZe.call(t) === "[object Object]", UE = () => {
  84377. };
  84378. function PZe(t, e) {
  84379. function n(...r) {
  84380. return new Promise((i, a) => {
  84381. Promise.resolve(t(() => e.apply(this, r), { fn: e, thisArg: this, args: r })).then(i).catch(a);
  84382. });
  84383. }
  84384. return n;
  84385. }
  84386. function $Ze(t, e = {}) {
  84387. let n, r, i = UE;
  84388. const a = (s) => {
  84389. clearTimeout(s), i(), i = UE;
  84390. };
  84391. return (s) => {
  84392. const l = KO(t), u = KO(e.maxWait);
  84393. return n && a(n), l <= 0 || u !== void 0 && u <= 0 ? (r && (a(r), r = null), Promise.resolve(s())) : new Promise((c, f) => {
  84394. i = e.rejectOnCancel ? f : c, u && !r && (r = setTimeout(() => {
  84395. n && a(n), r = null, c(s());
  84396. }, u)), n = setTimeout(() => {
  84397. r && a(r), r = null, c(s());
  84398. }, l);
  84399. });
  84400. };
  84401. }
  84402. function AZe(t) {
  84403. return vn();
  84404. }
  84405. function EZe(t, e = 200, n = {}) {
  84406. return PZe(
  84407. $Ze(e, n),
  84408. t
  84409. );
  84410. }
  84411. function MZe(t, e) {
  84412. AZe() && rl(t, e);
  84413. }
  84414. function IZe(t) {
  84415. var e;
  84416. const n = KO(t);
  84417. return (e = n == null ? void 0 : n.$el) != null ? e : n;
  84418. }
  84419. const DZe = wZe ? window : void 0;
  84420. function RZe(...t) {
  84421. let e, n, r, i;
  84422. if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([n, r, i] = t, e = DZe) : [e, n, r, i] = t, !e)
  84423. return UE;
  84424. Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  84425. const a = [], o = () => {
  84426. a.forEach((c) => c()), a.length = 0;
  84427. }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = se(
  84428. () => [IZe(e), KO(i)],
  84429. ([c, f]) => {
  84430. if (o(), !c)
  84431. return;
  84432. const d = TZe(f) ? { ...f } : f;
  84433. a.push(
  84434. ...n.flatMap((h) => r.map((p) => s(c, h, p, d)))
  84435. );
  84436. },
  84437. { immediate: !0, flush: "post" }
  84438. ), u = () => {
  84439. l(), o();
  84440. };
  84441. return xZe(u), u;
  84442. }
  84443. function kZe(t, e = "default") {
  84444. let n = null, r = s;
  84445. const i = U({});
  84446. let a;
  84447. const o = L(() => i.value);
  84448. r = EZe(s, 200);
  84449. function s() {
  84450. n == null || n.resize({
  84451. animation: {
  84452. duration: 300,
  84453. easing: "quadraticIn"
  84454. }
  84455. });
  84456. }
  84457. function l(f = e) {
  84458. const d = z(t);
  84459. if (!d || !z(d))
  84460. return;
  84461. n = Dee(d, f), a = RZe(window, "resize", r);
  84462. }
  84463. function u(f, d = !1) {
  84464. return i.value = f, new Promise((h) => {
  84465. var p;
  84466. ((p = z(t)) == null ? void 0 : p.offsetHeight) === 0 && setTimeout(() => {
  84467. u(z(o)), h(null);
  84468. }, 30), Tt(() => {
  84469. setTimeout(() => {
  84470. !n && (l("default"), !n) || (d && (n == null || n.clear()), n == null || n.setOption(z(o)), h(null));
  84471. }, 30);
  84472. });
  84473. });
  84474. }
  84475. se(
  84476. () => e,
  84477. (f) => {
  84478. n && (n.dispose(), l(f), u(i.value));
  84479. }
  84480. ), MZe(() => {
  84481. n && (a(), n.dispose(), n = null);
  84482. });
  84483. function c() {
  84484. return n || l("default"), n;
  84485. }
  84486. return {
  84487. setOptions: u,
  84488. resize: s,
  84489. echarts: SZe,
  84490. getInstance: c
  84491. };
  84492. }
  84493. const RL = /* @__PURE__ */ te({
  84494. __name: "Charts",
  84495. props: {
  84496. echartsOptions: {},
  84497. width: {},
  84498. height: {},
  84499. loading: { type: Boolean }
  84500. },
  84501. setup(t) {
  84502. const e = t, n = U(null), { setOptions: r, resize: i } = kZe(n), a = qg(ns, {
  84503. style: {
  84504. fontSize: "24px"
  84505. }
  84506. });
  84507. return se(
  84508. () => [e.width, e.height],
  84509. Wbe(async () => {
  84510. i();
  84511. }, 200)
  84512. ), se(
  84513. () => e,
  84514. async () => {
  84515. await Tt();
  84516. const { echartsOptions: o } = e;
  84517. r(o);
  84518. },
  84519. {
  84520. immediate: !0,
  84521. deep: !0
  84522. }
  84523. ), (o, s) => (pe(), je(z(Og), {
  84524. spinning: o.loading,
  84525. indicator: z(a)
  84526. }, {
  84527. default: we(() => [
  84528. He("div", {
  84529. ref_key: "chartRef",
  84530. ref: n,
  84531. style: Sr({ width: o.width + "px", height: o.height + "px" })
  84532. }, null, 4)
  84533. ]),
  84534. _: 1
  84535. }, 8, ["spinning", "indicator"]));
  84536. }
  84537. });
  84538. function kL(t) {
  84539. return xU(t, PMe);
  84540. }
  84541. const LL = {
  84542. type: Object,
  84543. default: () => ({
  84544. sourceType: Li.STATIC,
  84545. data: [],
  84546. url: "",
  84547. method: "GET",
  84548. params: {},
  84549. headers: {},
  84550. refreshTime: 0,
  84551. dataProcess: () => []
  84552. })
  84553. }, LZe = (t, e) => new Promise((n, r) => {
  84554. const i = new Blob([`
  84555. self.onmessage = function(e) {
  84556. self.postMessage((${t}).call(null, e.data));
  84557. }
  84558. `], { type: "application/javascript" }), a = new Worker(URL.createObjectURL(i));
  84559. a.postMessage(JSON.parse(e)), a.onmessage = (o) => {
  84560. a.terminate(), n(o.data);
  84561. }, a.onerror = (o) => {
  84562. a.terminate(), r(o);
  84563. };
  84564. }), NL = {
  84565. width: {
  84566. type: Number,
  84567. default: 400
  84568. },
  84569. height: {
  84570. type: Number,
  84571. default: 260
  84572. },
  84573. dataSource: LL,
  84574. // 标题
  84575. title: {
  84576. type: Object
  84577. },
  84578. // 图例
  84579. legend: {
  84580. type: Object
  84581. },
  84582. // 背景
  84583. backgroundColor: {
  84584. type: String
  84585. },
  84586. // 边框
  84587. grid: {
  84588. type: Object
  84589. },
  84590. // 提示框
  84591. tooltip: {
  84592. type: Object
  84593. },
  84594. // x轴数据
  84595. xAxis: {
  84596. type: Object
  84597. },
  84598. // y轴数据
  84599. yAxis: {
  84600. type: Object
  84601. },
  84602. // 折线
  84603. series: {
  84604. type: Array
  84605. },
  84606. // 数据集
  84607. dataset: {
  84608. type: Object
  84609. }
  84610. }, Oie = [];
  84611. Oie.line = {
  84612. lineStyle: {
  84613. type: "solid",
  84614. width: 1
  84615. },
  84616. symbol: "rect",
  84617. symbolSize: 4,
  84618. symbolRotate: 0,
  84619. smooth: !1,
  84620. step: !1
  84621. };
  84622. const NZe = kL({
  84623. title: {
  84624. text: "折线图标题"
  84625. },
  84626. xAxis: {
  84627. data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  84628. },
  84629. series: Oie
  84630. }), BZe = {
  84631. container: {
  84632. props: {
  84633. width: 400,
  84634. height: 260
  84635. }
  84636. },
  84637. props: {
  84638. // 数据源
  84639. dataSource: {
  84640. sourceType: Li.STATIC,
  84641. data: {
  84642. xData: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"],
  84643. series: [
  84644. {
  84645. type: "line",
  84646. name: "系列1",
  84647. data: [89.3, 92.1, 94.4, 85.4]
  84648. },
  84649. {
  84650. type: "line",
  84651. name: "系列2",
  84652. data: [95.8, 89.4, 91.2, 76.9]
  84653. }
  84654. ]
  84655. },
  84656. url: location.origin + "/mock/api/get/example/line",
  84657. method: "POST",
  84658. params: {},
  84659. headers: {},
  84660. refreshTime: 0,
  84661. dataProcess: `
  84662. (res) => {
  84663. // 取出列表
  84664. const data = res.data;
  84665. // x轴数据
  84666. const xData = data.map((item) => item.name);
  84667. // 系列数据
  84668. const series = [
  84669. { type: 'line', name: '苹果', data: data.map(item => item.apple) },
  84670. { type: 'line', name: 'VIVO', data: data.map(item => item.vivo) },
  84671. { type: 'line', name: '小米', data: data.map(item => item.mi) },
  84672. ];
  84673. // 返回图表数据
  84674. return { xData, series };
  84675. }
  84676. `
  84677. },
  84678. ...NZe
  84679. }
  84680. }, Sie = (t, { manual: e, ready: n = !0, refreshDeps: r = [], refreshDepsAction: i }) => {
  84681. const a = U(!1);
  84682. return ht(() => {
  84683. !e && t.options.refreshDeps !== !0 && (a.value = z(n));
  84684. }), r instanceof Array ? se(
  84685. [a, ...r],
  84686. ([o]) => {
  84687. o && !e && o && (i ? i() : t.refresh());
  84688. },
  84689. {
  84690. deep: !0,
  84691. immediate: !1
  84692. }
  84693. ) : se(a, (o) => {
  84694. !e && o && (i ? i() : t.refresh());
  84695. }), {
  84696. name: "autoRunPlugin",
  84697. onBefore: () => {
  84698. if (!z(n))
  84699. return {
  84700. stopNow: !0
  84701. };
  84702. }
  84703. };
  84704. };
  84705. Sie.onInit = ({ ready: t = !0, manual: e }) => ({
  84706. loading: !e && z(t)
  84707. });
  84708. const e1 = /* @__PURE__ */ new Map(), zZe = (t, e, n) => {
  84709. const r = e1.get(t);
  84710. r != null && r.timer && clearTimeout(r.timer);
  84711. let i;
  84712. e > -1 && (i = setTimeout(() => {
  84713. e1.delete(t);
  84714. }, e)), e1.set(t, {
  84715. ...n,
  84716. timer: i
  84717. });
  84718. }, VZe = (t) => e1.get(t), t1 = /* @__PURE__ */ new Map(), FZe = (t) => t1.get(t), WZe = (t, e) => {
  84719. t1.set(t, e), e.then((n) => (t1.delete(t), n)).catch((n) => {
  84720. throw t1.delete(t), n;
  84721. });
  84722. }, Tc = {}, QZe = [], HZe = (t, e) => {
  84723. Tc[t] && (Tc[t].forEach((n) => n(e)), QZe.forEach((n) => n({
  84724. type: t,
  84725. data: e
  84726. })));
  84727. }, f$ = (t, e) => (Tc[t] || (Tc[t] = []), Tc[t].push(e), function() {
  84728. const r = Tc[t].indexOf(e);
  84729. Tc[t].splice(r, 1);
  84730. }), GZe = (t, {
  84731. cacheKey: e,
  84732. cacheTime: n = 5 * 60 * 1e3,
  84733. staleTime: r = 0,
  84734. setCache: i,
  84735. getCache: a
  84736. }) => {
  84737. const o = U(), s = U(), l = (c, f) => {
  84738. i ? i(f) : zZe(c, n, f), HZe(c, f.data);
  84739. }, u = (c, f = []) => a ? a(f) : VZe(c);
  84740. return ht(() => {
  84741. if (!e)
  84742. return;
  84743. const c = u(e);
  84744. 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 = f$(e, (f) => {
  84745. t.setState({ data: f });
  84746. });
  84747. }), d0(() => {
  84748. var c;
  84749. (c = o.value) == null || c.call(o);
  84750. }), e ? {
  84751. name: "cachePlugin",
  84752. onBefore: (c) => {
  84753. const f = u(e, c);
  84754. return !f || !Object.hasOwnProperty.call(f, "data") ? {} : r === -1 || (/* @__PURE__ */ new Date()).getTime() - f.time <= r ? {
  84755. loading: !1,
  84756. data: f == null ? void 0 : f.data,
  84757. returnNow: !0
  84758. } : {
  84759. data: f == null ? void 0 : f.data
  84760. };
  84761. },
  84762. onRequest: (c, f) => {
  84763. let d = FZe(e);
  84764. return d && d !== s.value ? { servicePromise: d } : (d = c(...f), s.value = d, WZe(e, d), { servicePromise: d });
  84765. },
  84766. onSuccess: (c, f) => {
  84767. var d;
  84768. e && ((d = o.value) == null || d.call(o), l(e, {
  84769. data: c,
  84770. params: f,
  84771. time: (/* @__PURE__ */ new Date()).getTime()
  84772. }), o.value = f$(e, (h) => {
  84773. t.setState({ data: h });
  84774. }));
  84775. },
  84776. onMutate: (c) => {
  84777. var f;
  84778. e && ((f = o.value) == null || f.call(o), l(e, {
  84779. data: c,
  84780. params: t.state.params,
  84781. time: (/* @__PURE__ */ new Date()).getTime()
  84782. }), o.value = f$(e, (d) => {
  84783. t.setState({ data: d });
  84784. }));
  84785. }
  84786. } : {};
  84787. };
  84788. function jZe(t) {
  84789. var e = typeof t;
  84790. return t != null && (e == "object" || e == "function");
  84791. }
  84792. var mo = jZe, ZZe = typeof Dy == "object" && Dy && Dy.Object === Object && Dy, xie = ZZe, UZe = xie, XZe = typeof self == "object" && self && self.Object === Object && self, YZe = UZe || XZe || Function("return this")(), yo = YZe, qZe = yo, KZe = function() {
  84793. return qZe.Date.now();
  84794. }, JZe = KZe, eUe = /\s/;
  84795. function tUe(t) {
  84796. for (var e = t.length; e-- && eUe.test(t.charAt(e)); )
  84797. ;
  84798. return e;
  84799. }
  84800. var nUe = tUe, rUe = nUe, iUe = /^\s+/;
  84801. function aUe(t) {
  84802. return t && t.slice(0, rUe(t) + 1).replace(iUe, "");
  84803. }
  84804. var oUe = aUe, sUe = yo, lUe = sUe.Symbol, Cw = lUe, kQ = Cw, wie = Object.prototype, uUe = wie.hasOwnProperty, cUe = wie.toString, Mv = kQ ? kQ.toStringTag : void 0;
  84805. function fUe(t) {
  84806. var e = uUe.call(t, Mv), n = t[Mv];
  84807. try {
  84808. t[Mv] = void 0;
  84809. var r = !0;
  84810. } catch {
  84811. }
  84812. var i = cUe.call(t);
  84813. return r && (e ? t[Mv] = n : delete t[Mv]), i;
  84814. }
  84815. var dUe = fUe, hUe = Object.prototype, pUe = hUe.toString;
  84816. function vUe(t) {
  84817. return pUe.call(t);
  84818. }
  84819. var gUe = vUe, LQ = Cw, mUe = dUe, yUe = gUe, bUe = "[object Null]", _Ue = "[object Undefined]", NQ = LQ ? LQ.toStringTag : void 0;
  84820. function OUe(t) {
  84821. return t == null ? t === void 0 ? _Ue : bUe : NQ && NQ in Object(t) ? mUe(t) : yUe(t);
  84822. }
  84823. var Dp = OUe;
  84824. function SUe(t) {
  84825. return t != null && typeof t == "object";
  84826. }
  84827. var Au = SUe, xUe = Dp, wUe = Au, CUe = "[object Symbol]";
  84828. function TUe(t) {
  84829. return typeof t == "symbol" || wUe(t) && xUe(t) == CUe;
  84830. }
  84831. var PUe = TUe, $Ue = oUe, BQ = mo, AUe = PUe, zQ = NaN, EUe = /^[-+]0x[0-9a-f]+$/i, MUe = /^0b[01]+$/i, IUe = /^0o[0-7]+$/i, DUe = parseInt;
  84832. function RUe(t) {
  84833. if (typeof t == "number")
  84834. return t;
  84835. if (AUe(t))
  84836. return zQ;
  84837. if (BQ(t)) {
  84838. var e = typeof t.valueOf == "function" ? t.valueOf() : t;
  84839. t = BQ(e) ? e + "" : e;
  84840. }
  84841. if (typeof t != "string")
  84842. return t === 0 ? t : +t;
  84843. t = $Ue(t);
  84844. var n = MUe.test(t);
  84845. return n || IUe.test(t) ? DUe(t.slice(2), n ? 2 : 8) : EUe.test(t) ? zQ : +t;
  84846. }
  84847. var kUe = RUe, LUe = mo, d$ = JZe, VQ = kUe, NUe = "Expected a function", BUe = Math.max, zUe = Math.min;
  84848. function VUe(t, e, n) {
  84849. var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  84850. if (typeof t != "function")
  84851. throw new TypeError(NUe);
  84852. e = VQ(e) || 0, LUe(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? BUe(VQ(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  84853. function h(S) {
  84854. var x = r, C = i;
  84855. return r = i = void 0, u = S, o = t.apply(C, x), o;
  84856. }
  84857. function p(S) {
  84858. return u = S, s = setTimeout(m, e), c ? h(S) : o;
  84859. }
  84860. function v(S) {
  84861. var x = S - l, C = S - u, T = e - x;
  84862. return f ? zUe(T, a - C) : T;
  84863. }
  84864. function g(S) {
  84865. var x = S - l, C = S - u;
  84866. return l === void 0 || x >= e || x < 0 || f && C >= a;
  84867. }
  84868. function m() {
  84869. var S = d$();
  84870. if (g(S))
  84871. return y(S);
  84872. s = setTimeout(m, v(S));
  84873. }
  84874. function y(S) {
  84875. return s = void 0, d && r ? h(S) : (r = i = void 0, o);
  84876. }
  84877. function b() {
  84878. s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  84879. }
  84880. function _() {
  84881. return s === void 0 ? o : y(d$());
  84882. }
  84883. function O() {
  84884. var S = d$(), x = g(S);
  84885. if (r = arguments, i = this, l = S, x) {
  84886. if (s === void 0)
  84887. return p(l);
  84888. if (f)
  84889. return clearTimeout(s), s = setTimeout(m, e), h(l);
  84890. }
  84891. return s === void 0 && (s = setTimeout(m, e)), o;
  84892. }
  84893. return O.cancel = b, O.flush = _, O;
  84894. }
  84895. var Cie = VUe;
  84896. const FUe = /* @__PURE__ */ mx(Cie), WUe = (t, { debounceWait: e, debounceLeading: n, debounceTrailing: r, debounceMaxWait: i }) => {
  84897. const a = U(), o = L(() => {
  84898. const s = {}, l = z(n), u = z(r), c = z(i);
  84899. return l !== void 0 && (s.leading = l), u !== void 0 && (s.trailing = u), c !== void 0 && (s.maxWait = c), s;
  84900. });
  84901. return ht((s) => {
  84902. if (z(e)) {
  84903. const l = t.runAsync.bind(t);
  84904. a.value = FUe(
  84905. (u) => {
  84906. u();
  84907. },
  84908. z(e),
  84909. o.value
  84910. ), t.runAsync = (...u) => new Promise((c, f) => {
  84911. var d;
  84912. (d = a.value) == null || d.call(a, () => {
  84913. l(...u).then(c).catch(f);
  84914. });
  84915. }), s(() => {
  84916. var u;
  84917. (u = a.value) == null || u.cancel(), t.runAsync = l;
  84918. });
  84919. }
  84920. }), z(e) ? {
  84921. name: "debouncePlugin",
  84922. onCancel: () => {
  84923. var s;
  84924. (s = a.value) == null || s.cancel();
  84925. }
  84926. } : {};
  84927. };
  84928. var QUe = Object.defineProperty, HUe = (t, e, n) => e in t ? QUe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, FQ = (t, e, n) => (HUe(t, typeof e != "symbol" ? e + "" : e, n), n);
  84929. class GUe {
  84930. constructor() {
  84931. FQ(this, "table", {}), FQ(this, "hashTable", {});
  84932. }
  84933. insert(e) {
  84934. const n = Symbol(e);
  84935. return this.table[e] = !0, this.hashTable[n] = e, n;
  84936. }
  84937. find(e) {
  84938. return this.hashTable[e];
  84939. }
  84940. }
  84941. new GUe();
  84942. function jUe(t) {
  84943. const n = t.toString().match(/^function\s+([^\s(]+)/);
  84944. return n ? n[1] : "";
  84945. }
  84946. function ZUe(t) {
  84947. const e = t.toString(), n = /([a-zA-Z$_][a-zA-Z0-9$_]*)\s*\(/, r = e.match(n);
  84948. return r ? r[1].trim() : "";
  84949. }
  84950. var UUe = Object.defineProperty, XUe = (t, e, n) => e in t ? UUe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, WQ = (t, e, n) => (XUe(t, typeof e != "symbol" ? e + "" : e, n), n);
  84951. class YUe {
  84952. constructor() {
  84953. WQ(this, "requestInstances", /* @__PURE__ */ new Map()), WQ(this, "listeners", []);
  84954. }
  84955. emit(e) {
  84956. this.listeners.forEach((n) => n(e));
  84957. }
  84958. subscribe(e) {
  84959. return this.listeners.push(e), () => {
  84960. const n = this.listeners.indexOf(e);
  84961. this.listeners.splice(n, 1);
  84962. };
  84963. }
  84964. insert(e, n) {
  84965. this.requestInstances.set(e, { ...n }), this.emit({
  84966. key: e,
  84967. ...n
  84968. });
  84969. }
  84970. update(e, n) {
  84971. this.has(e) && this.requestInstances.set(e, { ...this.requestInstances.get(e), ...n });
  84972. }
  84973. has(e) {
  84974. return this.requestInstances.has(e);
  84975. }
  84976. reset(e) {
  84977. if (this.requestInstances.has(e)) {
  84978. const n = this.requestInstances.get(e);
  84979. this.requestInstances.clear(), this.insert(e, n);
  84980. } else
  84981. this.requestInstances.clear();
  84982. }
  84983. getAll() {
  84984. return this.requestInstances;
  84985. }
  84986. }
  84987. const ui = new YUe(), qUe = (t, { ready: e = !0, debugKey: n, ...r }) => {
  84988. const i = () => {
  84989. if (n && !ui.has(n)) {
  84990. const o = t.serviceRef.value.toString().includes("function") ? jUe(t.serviceRef.value.toString()) : ZUe(t.serviceRef.value.toString());
  84991. ui.insert(n, {
  84992. instance: t,
  84993. requestName: o,
  84994. time: Date.now()
  84995. });
  84996. }
  84997. }, a = L(
  84998. () => Object.fromEntries(
  84999. Object.entries({ ready: e, ...r }).map(([o, s]) => [o, z(s)])
  85000. )
  85001. );
  85002. return ht(() => {
  85003. n && ui.has(n) && ui.emit({
  85004. ...t,
  85005. options: { ...t.options, ...a.value }
  85006. });
  85007. }), {
  85008. name: "devtoolsPlugin",
  85009. onBefore: (o) => {
  85010. i(), n && ui.has(n) && ui.emit({
  85011. ...t.state,
  85012. key: n,
  85013. params: o,
  85014. loading: !0,
  85015. time: Date.now(),
  85016. type: "pending"
  85017. });
  85018. },
  85019. onSuccess(o, s) {
  85020. i(), n && ui.has(n) && ui.emit({
  85021. ...t.state,
  85022. key: n,
  85023. data: o,
  85024. params: s,
  85025. loading: !1,
  85026. time: Date.now(),
  85027. type: "done"
  85028. });
  85029. },
  85030. onCancel() {
  85031. i(), n && ui.has(n) && ui.emit({
  85032. ...t.state,
  85033. key: n,
  85034. loading: !1,
  85035. time: Date.now(),
  85036. type: "cancel"
  85037. });
  85038. },
  85039. onError(o, s) {
  85040. i(), n && ui.has(n) && ui.emit({
  85041. ...t.state,
  85042. key: n,
  85043. params: s,
  85044. loading: !1,
  85045. error: o,
  85046. time: Date.now(),
  85047. type: "error"
  85048. });
  85049. },
  85050. onMutate(o) {
  85051. i(), n && ui.has(n) && ui.emit({
  85052. ...t.state,
  85053. key: n,
  85054. data: o,
  85055. loading: !1,
  85056. time: Date.now(),
  85057. type: "mutate"
  85058. });
  85059. }
  85060. };
  85061. }, KUe = (t, { loadingDelay: e }) => {
  85062. const n = U(), r = () => {
  85063. n.value && (clearTimeout(z(n.value)), n.value = void 0);
  85064. };
  85065. return {
  85066. name: "loadingDelayPlugin",
  85067. onFinally: () => {
  85068. r();
  85069. const i = z(e);
  85070. i && (t.setState({
  85071. loading: !0
  85072. }), n.value = setTimeout(() => {
  85073. t.setState({
  85074. loading: !1
  85075. });
  85076. }, i));
  85077. },
  85078. onError: () => {
  85079. r();
  85080. }
  85081. };
  85082. };
  85083. function BL() {
  85084. return !!(typeof window < "u" && window.document && window.document.createElement);
  85085. }
  85086. const JUe = !!(typeof window < "u" && window.document && window.document.createElement);
  85087. function zL() {
  85088. return BL() ? document.visibilityState !== "hidden" : !0;
  85089. }
  85090. const Qg = [];
  85091. function eXe(t) {
  85092. return Qg.push(t), function() {
  85093. const n = Qg.indexOf(t);
  85094. Qg.splice(n, 1);
  85095. };
  85096. }
  85097. if (BL()) {
  85098. const t = () => {
  85099. if (zL())
  85100. for (let e = 0; e < Qg.length; e++) {
  85101. const n = Qg[e];
  85102. n();
  85103. }
  85104. };
  85105. window.addEventListener("visibilitychange", t, !1);
  85106. }
  85107. const tXe = (t, { pollingInterval: e, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
  85108. let i;
  85109. const a = U(), o = U(0), s = () => {
  85110. var l;
  85111. i && clearTimeout(i), (l = a.value) == null || l.call(a);
  85112. };
  85113. return ht(() => {
  85114. z(e) || s();
  85115. }), z(e) ? {
  85116. name: "pollingPlugin",
  85117. onBefore: () => {
  85118. s();
  85119. },
  85120. onError: () => {
  85121. o.value += 1;
  85122. },
  85123. onSuccess: () => {
  85124. o.value = 0;
  85125. },
  85126. onFinally: () => {
  85127. r === -1 || r !== -1 && o.value <= r ? i = setTimeout(() => {
  85128. !n && !zL() ? a.value = eXe(() => {
  85129. t.refresh();
  85130. }) : t.refresh();
  85131. }, z(e)) : o.value = 0;
  85132. },
  85133. onCancel: () => {
  85134. s();
  85135. }
  85136. } : {};
  85137. };
  85138. function nXe(t, e) {
  85139. let n = !1;
  85140. return (...r) => {
  85141. n || (n = !0, t(...r), setTimeout(() => {
  85142. n = !1;
  85143. }, e));
  85144. };
  85145. }
  85146. function rXe() {
  85147. return BL() && typeof navigator.onLine < "u" ? navigator.onLine : !0;
  85148. }
  85149. const Hg = [];
  85150. function iXe(t) {
  85151. return Hg.push(t), function() {
  85152. const n = Hg.indexOf(t);
  85153. n > -1 && Hg.splice(n, 1);
  85154. };
  85155. }
  85156. if (JUe) {
  85157. const t = () => {
  85158. if (!(!zL() || !rXe()))
  85159. for (let e = 0; e < Hg.length; e++) {
  85160. const n = Hg[e];
  85161. n();
  85162. }
  85163. };
  85164. window.addEventListener("visibilitychange", t, !1), window.addEventListener("focus", t, !1);
  85165. }
  85166. const aXe = (t, { refreshOnWindowFocus: e, focusTimespan: n = 5e3 }) => {
  85167. const r = U(), i = () => {
  85168. var a;
  85169. (a = r.value) == null || a.call(r);
  85170. };
  85171. return ht((a) => {
  85172. if (z(e)) {
  85173. const o = nXe(
  85174. t.refresh.bind(t),
  85175. z(n)
  85176. );
  85177. r.value = iXe(() => {
  85178. o();
  85179. });
  85180. }
  85181. a(() => {
  85182. i();
  85183. });
  85184. }), d0(() => {
  85185. i();
  85186. }), {
  85187. name: "refreshOnWindowFocusPlugin"
  85188. };
  85189. }, oXe = (t, { retryInterval: e, retryCount: n }) => {
  85190. const r = U(), i = U(0), a = U(!1);
  85191. return n ? {
  85192. name: "retryPlugin",
  85193. onBefore: () => {
  85194. a.value || (i.value = 0), a.value = !1, r.value && clearTimeout(r.value);
  85195. },
  85196. onSuccess: () => {
  85197. i.value = 0;
  85198. },
  85199. onError: () => {
  85200. if (i.value += 1, n === -1 || i.value <= n) {
  85201. const o = e ?? Math.min(1e3 * 2 ** i.value, 3e4);
  85202. r.value = setTimeout(() => {
  85203. a.value = !0, t.refresh();
  85204. }, o);
  85205. } else
  85206. i.value = 0;
  85207. },
  85208. onCancel: () => {
  85209. i.value = 0, r.value && clearTimeout(r.value);
  85210. }
  85211. } : {};
  85212. };
  85213. var sXe = Cie, lXe = mo, uXe = "Expected a function";
  85214. function cXe(t, e, n) {
  85215. var r = !0, i = !0;
  85216. if (typeof t != "function")
  85217. throw new TypeError(uXe);
  85218. return lXe(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), sXe(t, e, {
  85219. leading: r,
  85220. maxWait: e,
  85221. trailing: i
  85222. });
  85223. }
  85224. var fXe = cXe;
  85225. const dXe = /* @__PURE__ */ mx(fXe), hXe = (t, { throttleWait: e, throttleLeading: n, throttleTrailing: r }) => {
  85226. const i = L(() => {
  85227. const o = {};
  85228. return z(n) !== void 0 && (o.leading = z(n)), z(r) !== void 0 && (o.trailing = z(r)), o;
  85229. }), a = L(
  85230. () => dXe(
  85231. (o) => {
  85232. o();
  85233. },
  85234. z(e),
  85235. i.value
  85236. )
  85237. );
  85238. return ht((o) => {
  85239. if (z(e)) {
  85240. const s = t.runAsync.bind(t);
  85241. t.runAsync = (...l) => new Promise((u, c) => {
  85242. var f;
  85243. (f = a.value) == null || f.call(a, () => {
  85244. s(...l).then(u).catch(c);
  85245. });
  85246. }), o(() => {
  85247. var l;
  85248. t.runAsync = s, (l = a.value) == null || l.cancel();
  85249. });
  85250. }
  85251. }), z(e) ? {
  85252. name: "throttlePlugin",
  85253. onCancel: () => {
  85254. var o;
  85255. (o = a.value) == null || o.cancel();
  85256. }
  85257. } : {};
  85258. }, QQ = (t) => typeof t == "function", pXe = (t) => typeof t == "boolean";
  85259. var vXe = Object.defineProperty, gXe = (t, e, n) => e in t ? vXe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Wb = (t, e, n) => (gXe(t, typeof e != "symbol" ? e + "" : e, n), n);
  85260. class mXe {
  85261. constructor(e, n, r, i = {}) {
  85262. Wb(this, "pluginImpls"), Wb(this, "count", 0), Wb(this, "state", {
  85263. loading: !1,
  85264. params: void 0,
  85265. data: void 0,
  85266. error: void 0
  85267. }), Wb(this, "previousValidData"), this.serviceRef = e, this.options = n, this.setUpdateData = r, this.initState = i, this.state = {
  85268. ...this.state,
  85269. loading: !n.manual,
  85270. ...i
  85271. };
  85272. }
  85273. setState(e = {}) {
  85274. this.state = {
  85275. ...this.state,
  85276. ...e
  85277. }, this.setUpdateData(this.state);
  85278. }
  85279. setData(e, n) {
  85280. console.warn("Please use 'setFetchState' instead of 'setData'"), n instanceof Array ? n.forEach((r) => {
  85281. this.state[r] = e, this.setUpdateData(e, r);
  85282. }) : (this.state[n] = e, this.setUpdateData(e, n));
  85283. }
  85284. setFetchState(e, n) {
  85285. n instanceof Array ? n.forEach((r) => {
  85286. this.state[r] = e, this.setUpdateData(e, r);
  85287. }) : (this.state[n] = e, this.setUpdateData(e, n));
  85288. }
  85289. runPluginHandler(e, ...n) {
  85290. var r, i, a;
  85291. const o = (a = (i = (r = this.pluginImpls) == null ? void 0 : r.map((s) => {
  85292. var l;
  85293. return (l = s[e]) == null ? void 0 : l.call(s, ...n);
  85294. })) != null ? i : []) == null ? void 0 : a.filter(Boolean);
  85295. return Object.assign({}, ...o);
  85296. }
  85297. async runAsync(...e) {
  85298. var n, r, i, a, o, s, l, u, c, f, d;
  85299. this.count += 1;
  85300. const h = this.count, { stopNow: p = !1, returnNow: v = !1, ...g } = this.runPluginHandler(
  85301. "onBefore",
  85302. e
  85303. );
  85304. if (p)
  85305. return new Promise(() => {
  85306. });
  85307. if (this.setState({
  85308. loading: !0,
  85309. params: e,
  85310. ...g
  85311. }), v)
  85312. return Promise.resolve(g.data);
  85313. try {
  85314. (r = (n = this.options).onBefore) == null || r.call(n, e);
  85315. } catch (m) {
  85316. return this.setState({
  85317. error: m,
  85318. loading: !1
  85319. }), (a = (i = this.options).onError) == null || a.call(i, m, e), this.runPluginHandler("onError", m, e), new Promise(() => {
  85320. });
  85321. }
  85322. try {
  85323. let { servicePromise: m } = this.runPluginHandler("onRequest", this.serviceRef.value, e);
  85324. const y = (_) => {
  85325. var O, S, x, C;
  85326. if (h !== this.count)
  85327. return new Promise(() => {
  85328. });
  85329. const T = this.options.formatResult ? this.options.formatResult(_) : _;
  85330. return this.setState({
  85331. data: T,
  85332. error: void 0,
  85333. loading: !1
  85334. }), (S = (O = this.options).onSuccess) == null || S.call(O, T, e), this.runPluginHandler("onSuccess", T, e), this.previousValidData = T, (C = (x = this.options).onFinally) == null || C.call(x, e, T, void 0), h === this.count && this.runPluginHandler("onFinally", e, T, void 0), T;
  85335. };
  85336. m || (m = this.serviceRef.value(...e));
  85337. const b = await m;
  85338. return y(b);
  85339. } catch (m) {
  85340. if (h !== this.count)
  85341. return new Promise(() => {
  85342. });
  85343. throw this.setState({
  85344. error: m,
  85345. loading: !1
  85346. }), (s = (o = this.options).onError) == null || s.call(o, m, e), this.runPluginHandler("onError", m, e), (QQ((l = this.options) == null ? void 0 : l.rollbackOnError) && ((u = this.options) != null && u.rollbackOnError(e)) || pXe((c = this.options) == null ? void 0 : c.rollbackOnError) && this.options.rollbackOnError) && this.setState({
  85347. data: this.previousValidData
  85348. }), (d = (f = this.options).onFinally) == null || d.call(f, e, void 0, m), h === this.count && this.runPluginHandler("onFinally", e, void 0, m), m;
  85349. }
  85350. }
  85351. run(...e) {
  85352. this.runAsync(...e).catch((n) => {
  85353. this.options.onError || console.error(n);
  85354. });
  85355. }
  85356. cancel() {
  85357. this.count += 1, this.setState({
  85358. loading: !1
  85359. }), this.runPluginHandler("onCancel");
  85360. }
  85361. refresh() {
  85362. this.run(...this.state.params || []);
  85363. }
  85364. refreshAsync() {
  85365. return this.runAsync(...this.state.params || []);
  85366. }
  85367. mutate(e) {
  85368. const n = QQ(e) ? e(this.state.data) : e;
  85369. this.runPluginHandler("onMutate", n), this.setState({
  85370. data: n
  85371. });
  85372. }
  85373. }
  85374. const yXe = Symbol(
  85375. "USEREQUEST_GLOBAL_OPTIONS_PROVIDE_KEY"
  85376. );
  85377. function bXe(t) {
  85378. return Object.keys(t).filter((n) => ["data", "loading", "params", "error"].includes(n)).length === 4;
  85379. }
  85380. function _Xe(t, e = {}, n = []) {
  85381. const r = Ge(
  85382. yXe,
  85383. {}
  85384. ), { initialData: i = void 0, manual: a = !1, ready: o = !0, ...s } = {
  85385. ...r ?? {},
  85386. ...e ?? {}
  85387. }, l = {
  85388. manual: a,
  85389. ready: o,
  85390. initialData: i,
  85391. ...s
  85392. }, u = U(t), c = tn({
  85393. data: i,
  85394. loading: !1,
  85395. params: void 0,
  85396. error: void 0
  85397. }), f = (v, g) => {
  85398. g ? c[g] = v : bXe(v) && (c.data = v.data, c.loading = v.loading, c.error = v.error, c.params = v.params);
  85399. }, d = n.map((v) => {
  85400. var g;
  85401. return (g = v == null ? void 0 : v.onInit) == null ? void 0 : g.call(v, l);
  85402. }).filter(Boolean), h = new mXe(
  85403. u,
  85404. l,
  85405. f,
  85406. Object.assign({}, ...d, c)
  85407. );
  85408. h.options = l, h.pluginImpls = n.map((v) => v(h, l));
  85409. const p = L(() => op(o) ? o.value : o);
  85410. if (ht(() => {
  85411. if (!a) {
  85412. const v = h.state.params || e.defaultParams || [];
  85413. p.value && h.options.refreshDeps === !0 && u.value && h.run(...v);
  85414. }
  85415. }), !a && h.options.refreshDeps !== !0) {
  85416. const v = h.state.params || e.defaultParams || [];
  85417. z(o) && h.run(...v);
  85418. }
  85419. return d0(() => {
  85420. h.cancel();
  85421. }), {
  85422. ...ES(c),
  85423. cancel: h.cancel.bind(h),
  85424. refresh: h.refresh.bind(h),
  85425. refreshAsync: h.refreshAsync.bind(h),
  85426. run: h.run.bind(h),
  85427. runAsync: h.runAsync.bind(h),
  85428. mutate: h.mutate.bind(h)
  85429. };
  85430. }
  85431. const OXe = (t, e) => function(r, i = {}, a = []) {
  85432. let o = t;
  85433. const s = e || [];
  85434. for (let l = s.length; l--; )
  85435. o = s[l](o);
  85436. return o(r, i, a);
  85437. };
  85438. function SXe(t, e, n) {
  85439. var r;
  85440. const i = (r = [
  85441. process.env.NODE_ENV === "development" ? qUe : null,
  85442. WUe,
  85443. KUe,
  85444. tXe,
  85445. aXe,
  85446. hXe,
  85447. Sie,
  85448. GZe,
  85449. oXe
  85450. ]) == null ? void 0 : r.filter(Boolean);
  85451. return OXe(_Xe, e == null ? void 0 : e.use)(t, e, [
  85452. ...i
  85453. ]);
  85454. }
  85455. /*! js-cookie v3.0.5 | MIT */
  85456. function Qb(t) {
  85457. for (var e = 1; e < arguments.length; e++) {
  85458. var n = arguments[e];
  85459. for (var r in n)
  85460. t[r] = n[r];
  85461. }
  85462. return t;
  85463. }
  85464. var xXe = {
  85465. read: function(t) {
  85466. return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
  85467. },
  85468. write: function(t) {
  85469. return encodeURIComponent(t).replace(
  85470. /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
  85471. decodeURIComponent
  85472. );
  85473. }
  85474. };
  85475. function XE(t, e) {
  85476. function n(i, a, o) {
  85477. if (!(typeof document > "u")) {
  85478. o = Qb({}, 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);
  85479. var s = "";
  85480. for (var l in o)
  85481. o[l] && (s += "; " + l, o[l] !== !0 && (s += "=" + o[l].split(";")[0]));
  85482. return document.cookie = i + "=" + t.write(a, i) + s;
  85483. }
  85484. }
  85485. function r(i) {
  85486. if (!(typeof document > "u" || arguments.length && !i)) {
  85487. for (var a = document.cookie ? document.cookie.split("; ") : [], o = {}, s = 0; s < a.length; s++) {
  85488. var l = a[s].split("="), u = l.slice(1).join("=");
  85489. try {
  85490. var c = decodeURIComponent(l[0]);
  85491. if (o[c] = t.read(u, c), i === c)
  85492. break;
  85493. } catch {
  85494. }
  85495. }
  85496. return i ? o[i] : o;
  85497. }
  85498. }
  85499. return Object.create(
  85500. {
  85501. set: n,
  85502. get: r,
  85503. remove: function(i, a) {
  85504. n(
  85505. i,
  85506. "",
  85507. Qb({}, a, {
  85508. expires: -1
  85509. })
  85510. );
  85511. },
  85512. withAttributes: function(i) {
  85513. return XE(this.converter, Qb({}, this.attributes, i));
  85514. },
  85515. withConverter: function(i) {
  85516. return XE(Qb({}, this.converter, i), this.attributes);
  85517. }
  85518. },
  85519. {
  85520. attributes: { value: Object.freeze(e) },
  85521. converter: { value: Object.freeze(t) }
  85522. }
  85523. );
  85524. }
  85525. XE(xXe, { path: "/" });
  85526. function wXe() {
  85527. this.__data__ = [], this.size = 0;
  85528. }
  85529. var CXe = wXe;
  85530. function TXe(t, e) {
  85531. return t === e || t !== t && e !== e;
  85532. }
  85533. var Tw = TXe, PXe = Tw;
  85534. function $Xe(t, e) {
  85535. for (var n = t.length; n--; )
  85536. if (PXe(t[n][0], e))
  85537. return n;
  85538. return -1;
  85539. }
  85540. var Pw = $Xe, AXe = Pw, EXe = Array.prototype, MXe = EXe.splice;
  85541. function IXe(t) {
  85542. var e = this.__data__, n = AXe(e, t);
  85543. if (n < 0)
  85544. return !1;
  85545. var r = e.length - 1;
  85546. return n == r ? e.pop() : MXe.call(e, n, 1), --this.size, !0;
  85547. }
  85548. var DXe = IXe, RXe = Pw;
  85549. function kXe(t) {
  85550. var e = this.__data__, n = RXe(e, t);
  85551. return n < 0 ? void 0 : e[n][1];
  85552. }
  85553. var LXe = kXe, NXe = Pw;
  85554. function BXe(t) {
  85555. return NXe(this.__data__, t) > -1;
  85556. }
  85557. var zXe = BXe, VXe = Pw;
  85558. function FXe(t, e) {
  85559. var n = this.__data__, r = VXe(n, t);
  85560. return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
  85561. }
  85562. var WXe = FXe, QXe = CXe, HXe = DXe, GXe = LXe, jXe = zXe, ZXe = WXe;
  85563. function Rp(t) {
  85564. var e = -1, n = t == null ? 0 : t.length;
  85565. for (this.clear(); ++e < n; ) {
  85566. var r = t[e];
  85567. this.set(r[0], r[1]);
  85568. }
  85569. }
  85570. Rp.prototype.clear = QXe;
  85571. Rp.prototype.delete = HXe;
  85572. Rp.prototype.get = GXe;
  85573. Rp.prototype.has = jXe;
  85574. Rp.prototype.set = ZXe;
  85575. var $w = Rp, UXe = $w;
  85576. function XXe() {
  85577. this.__data__ = new UXe(), this.size = 0;
  85578. }
  85579. var YXe = XXe;
  85580. function qXe(t) {
  85581. var e = this.__data__, n = e.delete(t);
  85582. return this.size = e.size, n;
  85583. }
  85584. var KXe = qXe;
  85585. function JXe(t) {
  85586. return this.__data__.get(t);
  85587. }
  85588. var eYe = JXe;
  85589. function tYe(t) {
  85590. return this.__data__.has(t);
  85591. }
  85592. var nYe = tYe, rYe = Dp, iYe = mo, aYe = "[object AsyncFunction]", oYe = "[object Function]", sYe = "[object GeneratorFunction]", lYe = "[object Proxy]";
  85593. function uYe(t) {
  85594. if (!iYe(t))
  85595. return !1;
  85596. var e = rYe(t);
  85597. return e == oYe || e == sYe || e == aYe || e == lYe;
  85598. }
  85599. var VL = uYe, cYe = yo, fYe = cYe["__core-js_shared__"], dYe = fYe, h$ = dYe, HQ = function() {
  85600. var t = /[^.]+$/.exec(h$ && h$.keys && h$.keys.IE_PROTO || "");
  85601. return t ? "Symbol(src)_1." + t : "";
  85602. }();
  85603. function hYe(t) {
  85604. return !!HQ && HQ in t;
  85605. }
  85606. var pYe = hYe, vYe = Function.prototype, gYe = vYe.toString;
  85607. function mYe(t) {
  85608. if (t != null) {
  85609. try {
  85610. return gYe.call(t);
  85611. } catch {
  85612. }
  85613. try {
  85614. return t + "";
  85615. } catch {
  85616. }
  85617. }
  85618. return "";
  85619. }
  85620. var Tie = mYe, yYe = VL, bYe = pYe, _Ye = mo, OYe = Tie, SYe = /[\\^$.*+?()[\]{}|]/g, xYe = /^\[object .+?Constructor\]$/, wYe = Function.prototype, CYe = Object.prototype, TYe = wYe.toString, PYe = CYe.hasOwnProperty, $Ye = RegExp(
  85621. "^" + TYe.call(PYe).replace(SYe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  85622. );
  85623. function AYe(t) {
  85624. if (!_Ye(t) || bYe(t))
  85625. return !1;
  85626. var e = yYe(t) ? $Ye : xYe;
  85627. return e.test(OYe(t));
  85628. }
  85629. var EYe = AYe;
  85630. function MYe(t, e) {
  85631. return t == null ? void 0 : t[e];
  85632. }
  85633. var IYe = MYe, DYe = EYe, RYe = IYe;
  85634. function kYe(t, e) {
  85635. var n = RYe(t, e);
  85636. return DYe(n) ? n : void 0;
  85637. }
  85638. var Gf = kYe, LYe = Gf, NYe = yo, BYe = LYe(NYe, "Map"), FL = BYe, zYe = Gf, VYe = zYe(Object, "create"), Aw = VYe, GQ = Aw;
  85639. function FYe() {
  85640. this.__data__ = GQ ? GQ(null) : {}, this.size = 0;
  85641. }
  85642. var WYe = FYe;
  85643. function QYe(t) {
  85644. var e = this.has(t) && delete this.__data__[t];
  85645. return this.size -= e ? 1 : 0, e;
  85646. }
  85647. var HYe = QYe, GYe = Aw, jYe = "__lodash_hash_undefined__", ZYe = Object.prototype, UYe = ZYe.hasOwnProperty;
  85648. function XYe(t) {
  85649. var e = this.__data__;
  85650. if (GYe) {
  85651. var n = e[t];
  85652. return n === jYe ? void 0 : n;
  85653. }
  85654. return UYe.call(e, t) ? e[t] : void 0;
  85655. }
  85656. var YYe = XYe, qYe = Aw, KYe = Object.prototype, JYe = KYe.hasOwnProperty;
  85657. function eqe(t) {
  85658. var e = this.__data__;
  85659. return qYe ? e[t] !== void 0 : JYe.call(e, t);
  85660. }
  85661. var tqe = eqe, nqe = Aw, rqe = "__lodash_hash_undefined__";
  85662. function iqe(t, e) {
  85663. var n = this.__data__;
  85664. return this.size += this.has(t) ? 0 : 1, n[t] = nqe && e === void 0 ? rqe : e, this;
  85665. }
  85666. var aqe = iqe, oqe = WYe, sqe = HYe, lqe = YYe, uqe = tqe, cqe = aqe;
  85667. function kp(t) {
  85668. var e = -1, n = t == null ? 0 : t.length;
  85669. for (this.clear(); ++e < n; ) {
  85670. var r = t[e];
  85671. this.set(r[0], r[1]);
  85672. }
  85673. }
  85674. kp.prototype.clear = oqe;
  85675. kp.prototype.delete = sqe;
  85676. kp.prototype.get = lqe;
  85677. kp.prototype.has = uqe;
  85678. kp.prototype.set = cqe;
  85679. var fqe = kp, jQ = fqe, dqe = $w, hqe = FL;
  85680. function pqe() {
  85681. this.size = 0, this.__data__ = {
  85682. hash: new jQ(),
  85683. map: new (hqe || dqe)(),
  85684. string: new jQ()
  85685. };
  85686. }
  85687. var vqe = pqe;
  85688. function gqe(t) {
  85689. var e = typeof t;
  85690. return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
  85691. }
  85692. var mqe = gqe, yqe = mqe;
  85693. function bqe(t, e) {
  85694. var n = t.__data__;
  85695. return yqe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
  85696. }
  85697. var Ew = bqe, _qe = Ew;
  85698. function Oqe(t) {
  85699. var e = _qe(this, t).delete(t);
  85700. return this.size -= e ? 1 : 0, e;
  85701. }
  85702. var Sqe = Oqe, xqe = Ew;
  85703. function wqe(t) {
  85704. return xqe(this, t).get(t);
  85705. }
  85706. var Cqe = wqe, Tqe = Ew;
  85707. function Pqe(t) {
  85708. return Tqe(this, t).has(t);
  85709. }
  85710. var $qe = Pqe, Aqe = Ew;
  85711. function Eqe(t, e) {
  85712. var n = Aqe(this, t), r = n.size;
  85713. return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
  85714. }
  85715. var Mqe = Eqe, Iqe = vqe, Dqe = Sqe, Rqe = Cqe, kqe = $qe, Lqe = Mqe;
  85716. function Lp(t) {
  85717. var e = -1, n = t == null ? 0 : t.length;
  85718. for (this.clear(); ++e < n; ) {
  85719. var r = t[e];
  85720. this.set(r[0], r[1]);
  85721. }
  85722. }
  85723. Lp.prototype.clear = Iqe;
  85724. Lp.prototype.delete = Dqe;
  85725. Lp.prototype.get = Rqe;
  85726. Lp.prototype.has = kqe;
  85727. Lp.prototype.set = Lqe;
  85728. var Pie = Lp, Nqe = $w, Bqe = FL, zqe = Pie, Vqe = 200;
  85729. function Fqe(t, e) {
  85730. var n = this.__data__;
  85731. if (n instanceof Nqe) {
  85732. var r = n.__data__;
  85733. if (!Bqe || r.length < Vqe - 1)
  85734. return r.push([t, e]), this.size = ++n.size, this;
  85735. n = this.__data__ = new zqe(r);
  85736. }
  85737. return n.set(t, e), this.size = n.size, this;
  85738. }
  85739. var Wqe = Fqe, Qqe = $w, Hqe = YXe, Gqe = KXe, jqe = eYe, Zqe = nYe, Uqe = Wqe;
  85740. function Np(t) {
  85741. var e = this.__data__ = new Qqe(t);
  85742. this.size = e.size;
  85743. }
  85744. Np.prototype.clear = Hqe;
  85745. Np.prototype.delete = Gqe;
  85746. Np.prototype.get = jqe;
  85747. Np.prototype.has = Zqe;
  85748. Np.prototype.set = Uqe;
  85749. var $ie = Np;
  85750. function Xqe(t, e) {
  85751. for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
  85752. ;
  85753. return t;
  85754. }
  85755. var Yqe = Xqe, qqe = Gf, Kqe = function() {
  85756. try {
  85757. var t = qqe(Object, "defineProperty");
  85758. return t({}, "", {}), t;
  85759. } catch {
  85760. }
  85761. }(), Aie = Kqe, ZQ = Aie;
  85762. function Jqe(t, e, n) {
  85763. e == "__proto__" && ZQ ? ZQ(t, e, {
  85764. configurable: !0,
  85765. enumerable: !0,
  85766. value: n,
  85767. writable: !0
  85768. }) : t[e] = n;
  85769. }
  85770. var WL = Jqe, eKe = WL, tKe = Tw, nKe = Object.prototype, rKe = nKe.hasOwnProperty;
  85771. function iKe(t, e, n) {
  85772. var r = t[e];
  85773. (!(rKe.call(t, e) && tKe(r, n)) || n === void 0 && !(e in t)) && eKe(t, e, n);
  85774. }
  85775. var Eie = iKe, aKe = Eie, oKe = WL;
  85776. function sKe(t, e, n, r) {
  85777. var i = !n;
  85778. n || (n = {});
  85779. for (var a = -1, o = e.length; ++a < o; ) {
  85780. var s = e[a], l = r ? r(n[s], t[s], s, n, t) : void 0;
  85781. l === void 0 && (l = t[s]), i ? oKe(n, s, l) : aKe(n, s, l);
  85782. }
  85783. return n;
  85784. }
  85785. var ny = sKe;
  85786. function lKe(t, e) {
  85787. for (var n = -1, r = Array(t); ++n < t; )
  85788. r[n] = e(n);
  85789. return r;
  85790. }
  85791. var uKe = lKe, cKe = Dp, fKe = Au, dKe = "[object Arguments]";
  85792. function hKe(t) {
  85793. return fKe(t) && cKe(t) == dKe;
  85794. }
  85795. var pKe = hKe, UQ = pKe, vKe = Au, Mie = Object.prototype, gKe = Mie.hasOwnProperty, mKe = Mie.propertyIsEnumerable, yKe = UQ(/* @__PURE__ */ function() {
  85796. return arguments;
  85797. }()) ? UQ : function(t) {
  85798. return vKe(t) && gKe.call(t, "callee") && !mKe.call(t, "callee");
  85799. }, Iie = yKe, bKe = Array.isArray, Mw = bKe, JO = { exports: {} };
  85800. function _Ke() {
  85801. return !1;
  85802. }
  85803. var OKe = _Ke;
  85804. JO.exports;
  85805. (function(t, e) {
  85806. var n = yo, r = OKe, 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;
  85807. t.exports = u;
  85808. })(JO, JO.exports);
  85809. var QL = JO.exports, SKe = 9007199254740991, xKe = /^(?:0|[1-9]\d*)$/;
  85810. function wKe(t, e) {
  85811. var n = typeof t;
  85812. return e = e ?? SKe, !!e && (n == "number" || n != "symbol" && xKe.test(t)) && t > -1 && t % 1 == 0 && t < e;
  85813. }
  85814. var Die = wKe, CKe = 9007199254740991;
  85815. function TKe(t) {
  85816. return typeof t == "number" && t > -1 && t % 1 == 0 && t <= CKe;
  85817. }
  85818. var Rie = TKe, PKe = Dp, $Ke = Rie, AKe = Au, EKe = "[object Arguments]", MKe = "[object Array]", IKe = "[object Boolean]", DKe = "[object Date]", RKe = "[object Error]", kKe = "[object Function]", LKe = "[object Map]", NKe = "[object Number]", BKe = "[object Object]", zKe = "[object RegExp]", VKe = "[object Set]", FKe = "[object String]", WKe = "[object WeakMap]", QKe = "[object ArrayBuffer]", HKe = "[object DataView]", GKe = "[object Float32Array]", jKe = "[object Float64Array]", ZKe = "[object Int8Array]", UKe = "[object Int16Array]", XKe = "[object Int32Array]", YKe = "[object Uint8Array]", qKe = "[object Uint8ClampedArray]", KKe = "[object Uint16Array]", JKe = "[object Uint32Array]", un = {};
  85819. un[GKe] = un[jKe] = un[ZKe] = un[UKe] = un[XKe] = un[YKe] = un[qKe] = un[KKe] = un[JKe] = !0;
  85820. un[EKe] = un[MKe] = un[QKe] = un[IKe] = un[HKe] = un[DKe] = un[RKe] = un[kKe] = un[LKe] = un[NKe] = un[BKe] = un[zKe] = un[VKe] = un[FKe] = un[WKe] = !1;
  85821. function eJe(t) {
  85822. return AKe(t) && $Ke(t.length) && !!un[PKe(t)];
  85823. }
  85824. var tJe = eJe;
  85825. function nJe(t) {
  85826. return function(e) {
  85827. return t(e);
  85828. };
  85829. }
  85830. var HL = nJe, eS = { exports: {} };
  85831. eS.exports;
  85832. (function(t, e) {
  85833. var n = xie, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a && n.process, s = function() {
  85834. try {
  85835. var l = i && i.require && i.require("util").types;
  85836. return l || o && o.binding && o.binding("util");
  85837. } catch {
  85838. }
  85839. }();
  85840. t.exports = s;
  85841. })(eS, eS.exports);
  85842. var GL = eS.exports, rJe = tJe, iJe = HL, XQ = GL, YQ = XQ && XQ.isTypedArray, aJe = YQ ? iJe(YQ) : rJe, kie = aJe, oJe = uKe, sJe = Iie, lJe = Mw, uJe = QL, cJe = Die, fJe = kie, dJe = Object.prototype, hJe = dJe.hasOwnProperty;
  85843. function pJe(t, e) {
  85844. var n = lJe(t), r = !n && sJe(t), i = !n && !r && uJe(t), a = !n && !r && !i && fJe(t), o = n || r || i || a, s = o ? oJe(t.length, String) : [], l = s.length;
  85845. for (var u in t)
  85846. (e || hJe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
  85847. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  85848. i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  85849. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
  85850. cJe(u, l))) && s.push(u);
  85851. return s;
  85852. }
  85853. var Lie = pJe, vJe = Object.prototype;
  85854. function gJe(t) {
  85855. var e = t && t.constructor, n = typeof e == "function" && e.prototype || vJe;
  85856. return t === n;
  85857. }
  85858. var jL = gJe;
  85859. function mJe(t, e) {
  85860. return function(n) {
  85861. return t(e(n));
  85862. };
  85863. }
  85864. var Nie = mJe, yJe = Nie, bJe = yJe(Object.keys, Object), _Je = bJe, OJe = jL, SJe = _Je, xJe = Object.prototype, wJe = xJe.hasOwnProperty;
  85865. function CJe(t) {
  85866. if (!OJe(t))
  85867. return SJe(t);
  85868. var e = [];
  85869. for (var n in Object(t))
  85870. wJe.call(t, n) && n != "constructor" && e.push(n);
  85871. return e;
  85872. }
  85873. var TJe = CJe, PJe = VL, $Je = Rie;
  85874. function AJe(t) {
  85875. return t != null && $Je(t.length) && !PJe(t);
  85876. }
  85877. var Iw = AJe, EJe = Lie, MJe = TJe, IJe = Iw;
  85878. function DJe(t) {
  85879. return IJe(t) ? EJe(t) : MJe(t);
  85880. }
  85881. var ZL = DJe, RJe = ny, kJe = ZL;
  85882. function LJe(t, e) {
  85883. return t && RJe(e, kJe(e), t);
  85884. }
  85885. var NJe = LJe;
  85886. function BJe(t) {
  85887. var e = [];
  85888. if (t != null)
  85889. for (var n in Object(t))
  85890. e.push(n);
  85891. return e;
  85892. }
  85893. var zJe = BJe, VJe = mo, FJe = jL, WJe = zJe, QJe = Object.prototype, HJe = QJe.hasOwnProperty;
  85894. function GJe(t) {
  85895. if (!VJe(t))
  85896. return WJe(t);
  85897. var e = FJe(t), n = [];
  85898. for (var r in t)
  85899. r == "constructor" && (e || !HJe.call(t, r)) || n.push(r);
  85900. return n;
  85901. }
  85902. var jJe = GJe, ZJe = Lie, UJe = jJe, XJe = Iw;
  85903. function YJe(t) {
  85904. return XJe(t) ? ZJe(t, !0) : UJe(t);
  85905. }
  85906. var ry = YJe, qJe = ny, KJe = ry;
  85907. function JJe(t, e) {
  85908. return t && qJe(e, KJe(e), t);
  85909. }
  85910. var eet = JJe, tS = { exports: {} };
  85911. tS.exports;
  85912. (function(t, e) {
  85913. var n = yo, 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;
  85914. function l(u, c) {
  85915. if (c)
  85916. return u.slice();
  85917. var f = u.length, d = s ? s(f) : new u.constructor(f);
  85918. return u.copy(d), d;
  85919. }
  85920. t.exports = l;
  85921. })(tS, tS.exports);
  85922. var Bie = tS.exports;
  85923. function tet(t, e) {
  85924. var n = -1, r = t.length;
  85925. for (e || (e = Array(r)); ++n < r; )
  85926. e[n] = t[n];
  85927. return e;
  85928. }
  85929. var zie = tet;
  85930. function net(t, e) {
  85931. for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
  85932. var o = t[n];
  85933. e(o, n, t) && (a[i++] = o);
  85934. }
  85935. return a;
  85936. }
  85937. var ret = net;
  85938. function iet() {
  85939. return [];
  85940. }
  85941. var Vie = iet, aet = ret, oet = Vie, set = Object.prototype, uet = set.propertyIsEnumerable, qQ = Object.getOwnPropertySymbols, cet = qQ ? function(t) {
  85942. return t == null ? [] : (t = Object(t), aet(qQ(t), function(e) {
  85943. return uet.call(t, e);
  85944. }));
  85945. } : oet, UL = cet, fet = ny, det = UL;
  85946. function het(t, e) {
  85947. return fet(t, det(t), e);
  85948. }
  85949. var pet = het;
  85950. function vet(t, e) {
  85951. for (var n = -1, r = e.length, i = t.length; ++n < r; )
  85952. t[i + n] = e[n];
  85953. return t;
  85954. }
  85955. var Fie = vet, get = Nie, met = get(Object.getPrototypeOf, Object), XL = met, yet = Fie, bet = XL, _et = UL, Oet = Vie, xet = Object.getOwnPropertySymbols, wet = xet ? function(t) {
  85956. for (var e = []; t; )
  85957. yet(e, _et(t)), t = bet(t);
  85958. return e;
  85959. } : Oet, Wie = wet, Cet = ny, Tet = Wie;
  85960. function Pet(t, e) {
  85961. return Cet(t, Tet(t), e);
  85962. }
  85963. var $et = Pet, Aet = Fie, Eet = Mw;
  85964. function Met(t, e, n) {
  85965. var r = e(t);
  85966. return Eet(t) ? r : Aet(r, n(t));
  85967. }
  85968. var Qie = Met, Iet = Qie, Det = UL, Ret = ZL;
  85969. function ket(t) {
  85970. return Iet(t, Ret, Det);
  85971. }
  85972. var Let = ket, Net = Qie, Bet = Wie, zet = ry;
  85973. function Vet(t) {
  85974. return Net(t, zet, Bet);
  85975. }
  85976. var Fet = Vet, Wet = Gf, Qet = yo, Het = Wet(Qet, "DataView"), Get = Het, jet = Gf, Zet = yo, Uet = jet(Zet, "Promise"), Xet = Uet, Yet = Gf, qet = yo, Ket = Yet(qet, "Set"), Jet = Ket, ett = Gf, ttt = yo, ntt = ett(ttt, "WeakMap"), rtt = ntt, YE = Get, qE = FL, KE = Xet, JE = Jet, eM = rtt, Hie = Dp, Bp = Tie, KQ = "[object Map]", itt = "[object Object]", JQ = "[object Promise]", eH = "[object Set]", tH = "[object WeakMap]", nH = "[object DataView]", att = Bp(YE), ott = Bp(qE), stt = Bp(KE), ltt = Bp(JE), utt = Bp(eM), yc = Hie;
  85977. (YE && yc(new YE(new ArrayBuffer(1))) != nH || qE && yc(new qE()) != KQ || KE && yc(KE.resolve()) != JQ || JE && yc(new JE()) != eH || eM && yc(new eM()) != tH) && (yc = function(t) {
  85978. var e = Hie(t), n = e == itt ? t.constructor : void 0, r = n ? Bp(n) : "";
  85979. if (r)
  85980. switch (r) {
  85981. case att:
  85982. return nH;
  85983. case ott:
  85984. return KQ;
  85985. case stt:
  85986. return JQ;
  85987. case ltt:
  85988. return eH;
  85989. case utt:
  85990. return tH;
  85991. }
  85992. return e;
  85993. });
  85994. var YL = yc, ctt = Object.prototype, ftt = ctt.hasOwnProperty;
  85995. function dtt(t) {
  85996. var e = t.length, n = new t.constructor(e);
  85997. return e && typeof t[0] == "string" && ftt.call(t, "index") && (n.index = t.index, n.input = t.input), n;
  85998. }
  85999. var htt = dtt, ptt = yo, vtt = ptt.Uint8Array, gtt = vtt, rH = gtt;
  86000. function mtt(t) {
  86001. var e = new t.constructor(t.byteLength);
  86002. return new rH(e).set(new rH(t)), e;
  86003. }
  86004. var qL = mtt, ytt = qL;
  86005. function btt(t, e) {
  86006. var n = e ? ytt(t.buffer) : t.buffer;
  86007. return new t.constructor(n, t.byteOffset, t.byteLength);
  86008. }
  86009. var _tt = btt, Ott = /\w*$/;
  86010. function Stt(t) {
  86011. var e = new t.constructor(t.source, Ott.exec(t));
  86012. return e.lastIndex = t.lastIndex, e;
  86013. }
  86014. var xtt = Stt, iH = Cw, aH = iH ? iH.prototype : void 0, oH = aH ? aH.valueOf : void 0;
  86015. function wtt(t) {
  86016. return oH ? Object(oH.call(t)) : {};
  86017. }
  86018. var Ctt = wtt, Ttt = qL;
  86019. function Ptt(t, e) {
  86020. var n = e ? Ttt(t.buffer) : t.buffer;
  86021. return new t.constructor(n, t.byteOffset, t.length);
  86022. }
  86023. var Gie = Ptt, $tt = qL, Att = _tt, Ett = xtt, Mtt = Ctt, Itt = Gie, Dtt = "[object Boolean]", Rtt = "[object Date]", ktt = "[object Map]", Ltt = "[object Number]", Ntt = "[object RegExp]", Btt = "[object Set]", ztt = "[object String]", Vtt = "[object Symbol]", Ftt = "[object ArrayBuffer]", Wtt = "[object DataView]", Qtt = "[object Float32Array]", Htt = "[object Float64Array]", Gtt = "[object Int8Array]", jtt = "[object Int16Array]", Ztt = "[object Int32Array]", Utt = "[object Uint8Array]", Xtt = "[object Uint8ClampedArray]", Ytt = "[object Uint16Array]", qtt = "[object Uint32Array]";
  86024. function Ktt(t, e, n) {
  86025. var r = t.constructor;
  86026. switch (e) {
  86027. case Ftt:
  86028. return $tt(t);
  86029. case Dtt:
  86030. case Rtt:
  86031. return new r(+t);
  86032. case Wtt:
  86033. return Att(t, n);
  86034. case Qtt:
  86035. case Htt:
  86036. case Gtt:
  86037. case jtt:
  86038. case Ztt:
  86039. case Utt:
  86040. case Xtt:
  86041. case Ytt:
  86042. case qtt:
  86043. return Itt(t, n);
  86044. case ktt:
  86045. return new r();
  86046. case Ltt:
  86047. case ztt:
  86048. return new r(t);
  86049. case Ntt:
  86050. return Ett(t);
  86051. case Btt:
  86052. return new r();
  86053. case Vtt:
  86054. return Mtt(t);
  86055. }
  86056. }
  86057. var Jtt = Ktt, ent = mo, sH = Object.create, tnt = /* @__PURE__ */ function() {
  86058. function t() {
  86059. }
  86060. return function(e) {
  86061. if (!ent(e))
  86062. return {};
  86063. if (sH)
  86064. return sH(e);
  86065. t.prototype = e;
  86066. var n = new t();
  86067. return t.prototype = void 0, n;
  86068. };
  86069. }(), nnt = tnt, rnt = nnt, int = XL, ant = jL;
  86070. function ont(t) {
  86071. return typeof t.constructor == "function" && !ant(t) ? rnt(int(t)) : {};
  86072. }
  86073. var jie = ont, snt = YL, lnt = Au, unt = "[object Map]";
  86074. function cnt(t) {
  86075. return lnt(t) && snt(t) == unt;
  86076. }
  86077. var fnt = cnt, dnt = fnt, hnt = HL, lH = GL, uH = lH && lH.isMap, pnt = uH ? hnt(uH) : dnt, vnt = pnt, gnt = YL, mnt = Au, ynt = "[object Set]";
  86078. function bnt(t) {
  86079. return mnt(t) && gnt(t) == ynt;
  86080. }
  86081. var _nt = bnt, Ont = _nt, Snt = HL, cH = GL, fH = cH && cH.isSet, xnt = fH ? Snt(fH) : Ont, wnt = xnt, Cnt = $ie, Tnt = Yqe, Pnt = Eie, $nt = NJe, Ant = eet, Ent = Bie, Mnt = zie, Int = pet, Dnt = $et, Rnt = Let, knt = Fet, Lnt = YL, Nnt = htt, Bnt = Jtt, znt = jie, Vnt = Mw, Fnt = QL, Wnt = vnt, Qnt = mo, Hnt = wnt, Gnt = ZL, jnt = ry, Znt = 1, Unt = 2, Xnt = 4, Zie = "[object Arguments]", Ynt = "[object Array]", qnt = "[object Boolean]", Knt = "[object Date]", Jnt = "[object Error]", Uie = "[object Function]", ert = "[object GeneratorFunction]", trt = "[object Map]", nrt = "[object Number]", Xie = "[object Object]", rrt = "[object RegExp]", irt = "[object Set]", art = "[object String]", ort = "[object Symbol]", srt = "[object WeakMap]", lrt = "[object ArrayBuffer]", urt = "[object DataView]", crt = "[object Float32Array]", frt = "[object Float64Array]", drt = "[object Int8Array]", hrt = "[object Int16Array]", prt = "[object Int32Array]", vrt = "[object Uint8Array]", grt = "[object Uint8ClampedArray]", mrt = "[object Uint16Array]", yrt = "[object Uint32Array]", an = {};
  86082. an[Zie] = an[Ynt] = an[lrt] = an[urt] = an[qnt] = an[Knt] = an[crt] = an[frt] = an[drt] = an[hrt] = an[prt] = an[trt] = an[nrt] = an[Xie] = an[rrt] = an[irt] = an[art] = an[ort] = an[vrt] = an[grt] = an[mrt] = an[yrt] = !0;
  86083. an[Jnt] = an[Uie] = an[srt] = !1;
  86084. function n1(t, e, n, r, i, a) {
  86085. var o, s = e & Znt, l = e & Unt, u = e & Xnt;
  86086. if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
  86087. return o;
  86088. if (!Qnt(t))
  86089. return t;
  86090. var c = Vnt(t);
  86091. if (c) {
  86092. if (o = Nnt(t), !s)
  86093. return Mnt(t, o);
  86094. } else {
  86095. var f = Lnt(t), d = f == Uie || f == ert;
  86096. if (Fnt(t))
  86097. return Ent(t, s);
  86098. if (f == Xie || f == Zie || d && !i) {
  86099. if (o = l || d ? {} : znt(t), !s)
  86100. return l ? Dnt(t, Ant(o, t)) : Int(t, $nt(o, t));
  86101. } else {
  86102. if (!an[f])
  86103. return i ? t : {};
  86104. o = Bnt(t, f, s);
  86105. }
  86106. }
  86107. a || (a = new Cnt());
  86108. var h = a.get(t);
  86109. if (h)
  86110. return h;
  86111. a.set(t, o), Hnt(t) ? t.forEach(function(g) {
  86112. o.add(n1(g, e, n, g, t, a));
  86113. }) : Wnt(t) && t.forEach(function(g, m) {
  86114. o.set(m, n1(g, e, n, m, t, a));
  86115. });
  86116. var p = u ? l ? knt : Rnt : l ? jnt : Gnt, v = c ? void 0 : p(t);
  86117. return Tnt(v || t, function(g, m) {
  86118. v && (m = g, g = t[m]), Pnt(o, m, n1(g, e, n, m, t, a));
  86119. }), o;
  86120. }
  86121. var brt = n1, _rt = brt, Ort = 1, Srt = 4;
  86122. function xrt(t) {
  86123. return _rt(t, Ort | Srt);
  86124. }
  86125. var wrt = xrt;
  86126. const dH = /* @__PURE__ */ mx(wrt);
  86127. var Crt = Object.defineProperty, Trt = (t, e, n) => e in t ? Crt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, uc = (t, e, n) => (Trt(t, typeof e != "symbol" ? e + "" : e, n), n);
  86128. class Prt {
  86129. constructor() {
  86130. uc(this, "subscriptions", /* @__PURE__ */ new Map()), uc(this, "emitEffectCache", /* @__PURE__ */ new Map()), uc(this, "useSubscription", (e, n) => {
  86131. const r = U();
  86132. ht((i) => {
  86133. var a, o;
  86134. r.value = n;
  86135. function s(u) {
  86136. r.value && r.value(u);
  86137. }
  86138. const l = (o = (a = this.subscriptions) == null ? void 0 : a.get(e)) != null ? o : [];
  86139. l.push(s), this.subscriptions.set(e, l), this.emitEffect(e), i(() => {
  86140. this.subscriptions.delete(e);
  86141. });
  86142. });
  86143. }), uc(this, "emit", (e, ...n) => {
  86144. if (typeof e == "string" || typeof e == "number") {
  86145. const r = this.subscriptions.get(e);
  86146. r == null || r.forEach((i) => {
  86147. i == null || i({
  86148. params: dH(n),
  86149. event: e
  86150. });
  86151. }), this.emitEffectCache.set(e, {
  86152. params: dH(n),
  86153. event: e
  86154. });
  86155. } else
  86156. throw new TypeError("event must be string or number !");
  86157. }), uc(this, "emitEffect", (e) => {
  86158. const n = this.emitEffectCache.get(e), r = this.subscriptions.get(e);
  86159. n && (r == null || r.forEach((i) => {
  86160. i == null || i({
  86161. ...n
  86162. });
  86163. }));
  86164. }), uc(this, "removeListener", (e) => {
  86165. this.subscriptions.delete(e);
  86166. }), uc(this, "clear", () => {
  86167. this.subscriptions.clear();
  86168. }), this.clear();
  86169. }
  86170. }
  86171. new Prt();
  86172. var $rt = { exports: {} };
  86173. /*!
  86174. * screenfull
  86175. * v5.2.0 - 2021-11-03
  86176. * (c) Sindre Sorhus; MIT License
  86177. */
  86178. (function(t) {
  86179. (function() {
  86180. var e = typeof window < "u" && typeof window.document < "u" ? window.document : {}, n = t.exports, r = function() {
  86181. for (var o, s = [
  86182. [
  86183. "requestFullscreen",
  86184. "exitFullscreen",
  86185. "fullscreenElement",
  86186. "fullscreenEnabled",
  86187. "fullscreenchange",
  86188. "fullscreenerror"
  86189. ],
  86190. // New WebKit
  86191. [
  86192. "webkitRequestFullscreen",
  86193. "webkitExitFullscreen",
  86194. "webkitFullscreenElement",
  86195. "webkitFullscreenEnabled",
  86196. "webkitfullscreenchange",
  86197. "webkitfullscreenerror"
  86198. ],
  86199. // Old WebKit
  86200. [
  86201. "webkitRequestFullScreen",
  86202. "webkitCancelFullScreen",
  86203. "webkitCurrentFullScreenElement",
  86204. "webkitCancelFullScreen",
  86205. "webkitfullscreenchange",
  86206. "webkitfullscreenerror"
  86207. ],
  86208. [
  86209. "mozRequestFullScreen",
  86210. "mozCancelFullScreen",
  86211. "mozFullScreenElement",
  86212. "mozFullScreenEnabled",
  86213. "mozfullscreenchange",
  86214. "mozfullscreenerror"
  86215. ],
  86216. [
  86217. "msRequestFullscreen",
  86218. "msExitFullscreen",
  86219. "msFullscreenElement",
  86220. "msFullscreenEnabled",
  86221. "MSFullscreenChange",
  86222. "MSFullscreenError"
  86223. ]
  86224. ], l = 0, u = s.length, c = {}; l < u; l++)
  86225. if (o = s[l], o && o[1] in e) {
  86226. for (l = 0; l < o.length; l++)
  86227. c[s[0][l]] = o[l];
  86228. return c;
  86229. }
  86230. return !1;
  86231. }(), i = {
  86232. change: r.fullscreenchange,
  86233. error: r.fullscreenerror
  86234. }, a = {
  86235. request: function(o, s) {
  86236. return new Promise((function(l, u) {
  86237. var c = (function() {
  86238. this.off("change", c), l();
  86239. }).bind(this);
  86240. this.on("change", c), o = o || e.documentElement;
  86241. var f = o[r.requestFullscreen](s);
  86242. f instanceof Promise && f.then(c).catch(u);
  86243. }).bind(this));
  86244. },
  86245. exit: function() {
  86246. return new Promise((function(o, s) {
  86247. if (!this.isFullscreen) {
  86248. o();
  86249. return;
  86250. }
  86251. var l = (function() {
  86252. this.off("change", l), o();
  86253. }).bind(this);
  86254. this.on("change", l);
  86255. var u = e[r.exitFullscreen]();
  86256. u instanceof Promise && u.then(l).catch(s);
  86257. }).bind(this));
  86258. },
  86259. toggle: function(o, s) {
  86260. return this.isFullscreen ? this.exit() : this.request(o, s);
  86261. },
  86262. onchange: function(o) {
  86263. this.on("change", o);
  86264. },
  86265. onerror: function(o) {
  86266. this.on("error", o);
  86267. },
  86268. on: function(o, s) {
  86269. var l = i[o];
  86270. l && e.addEventListener(l, s, !1);
  86271. },
  86272. off: function(o, s) {
  86273. var l = i[o];
  86274. l && e.removeEventListener(l, s, !1);
  86275. },
  86276. raw: r
  86277. };
  86278. if (!r) {
  86279. n ? t.exports = { isEnabled: !1 } : window.screenfull = { isEnabled: !1 };
  86280. return;
  86281. }
  86282. Object.defineProperties(a, {
  86283. isFullscreen: {
  86284. get: function() {
  86285. return !!e[r.fullscreenElement];
  86286. }
  86287. },
  86288. element: {
  86289. enumerable: !0,
  86290. get: function() {
  86291. return e[r.fullscreenElement];
  86292. }
  86293. },
  86294. isEnabled: {
  86295. enumerable: !0,
  86296. get: function() {
  86297. return !!e[r.fullscreenEnabled];
  86298. }
  86299. }
  86300. }), n ? t.exports = a : window.screenfull = a;
  86301. })();
  86302. })($rt);
  86303. var Art = "__lodash_hash_undefined__";
  86304. function Ert(t) {
  86305. return this.__data__.set(t, Art), this;
  86306. }
  86307. var Mrt = Ert;
  86308. function Irt(t) {
  86309. return this.__data__.has(t);
  86310. }
  86311. var Drt = Irt, Rrt = Pie, krt = Mrt, Lrt = Drt;
  86312. function tM(t) {
  86313. var e = -1, n = t == null ? 0 : t.length;
  86314. for (this.__data__ = new Rrt(); ++e < n; )
  86315. this.add(t[e]);
  86316. }
  86317. tM.prototype.add = tM.prototype.push = krt;
  86318. tM.prototype.has = Lrt;
  86319. var hH = Cw, pH = hH ? hH.prototype : void 0;
  86320. pH && pH.valueOf;
  86321. var Nrt = WL, Brt = Tw;
  86322. function zrt(t, e, n) {
  86323. (n !== void 0 && !Brt(t[e], n) || n === void 0 && !(e in t)) && Nrt(t, e, n);
  86324. }
  86325. var Yie = zrt;
  86326. function Vrt(t) {
  86327. return function(e, n, r) {
  86328. for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
  86329. var l = o[t ? s : ++i];
  86330. if (n(a[l], l, a) === !1)
  86331. break;
  86332. }
  86333. return e;
  86334. };
  86335. }
  86336. var Frt = Vrt, Wrt = Frt, Qrt = Wrt(), Hrt = Qrt, Grt = Iw, jrt = Au;
  86337. function Zrt(t) {
  86338. return jrt(t) && Grt(t);
  86339. }
  86340. var Urt = Zrt, Xrt = Dp, Yrt = XL, qrt = Au, Krt = "[object Object]", Jrt = Function.prototype, eit = Object.prototype, qie = Jrt.toString, tit = eit.hasOwnProperty, nit = qie.call(Object);
  86341. function rit(t) {
  86342. if (!qrt(t) || Xrt(t) != Krt)
  86343. return !1;
  86344. var e = Yrt(t);
  86345. if (e === null)
  86346. return !0;
  86347. var n = tit.call(e, "constructor") && e.constructor;
  86348. return typeof n == "function" && n instanceof n && qie.call(n) == nit;
  86349. }
  86350. var iit = rit;
  86351. function ait(t, e) {
  86352. if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
  86353. return t[e];
  86354. }
  86355. var Kie = ait, oit = ny, sit = ry;
  86356. function lit(t) {
  86357. return oit(t, sit(t));
  86358. }
  86359. var uit = lit, vH = Yie, cit = Bie, fit = Gie, dit = zie, hit = jie, gH = Iie, mH = Mw, pit = Urt, vit = QL, git = VL, mit = mo, yit = iit, bit = kie, yH = Kie, _it = uit;
  86360. function Oit(t, e, n, r, i, a, o) {
  86361. var s = yH(t, n), l = yH(e, n), u = o.get(l);
  86362. if (u) {
  86363. vH(t, n, u);
  86364. return;
  86365. }
  86366. var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  86367. if (f) {
  86368. var d = mH(l), h = !d && vit(l), p = !d && !h && bit(l);
  86369. c = l, d || h || p ? mH(s) ? c = s : pit(s) ? c = dit(s) : h ? (f = !1, c = cit(l, !0)) : p ? (f = !1, c = fit(l, !0)) : c = [] : yit(l) || gH(l) ? (c = s, gH(s) ? c = _it(s) : (!mit(s) || git(s)) && (c = hit(l))) : f = !1;
  86370. }
  86371. f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), vH(t, n, c);
  86372. }
  86373. var Sit = Oit, xit = $ie, wit = Yie, Cit = Hrt, Tit = Sit, Pit = mo, $it = ry, Ait = Kie;
  86374. function Jie(t, e, n, r, i) {
  86375. t !== e && Cit(e, function(a, o) {
  86376. if (i || (i = new xit()), Pit(a))
  86377. Tit(t, e, o, n, Jie, r, i);
  86378. else {
  86379. var s = r ? r(Ait(t, o), a, o + "", t, e, i) : void 0;
  86380. s === void 0 && (s = a), wit(t, o, s);
  86381. }
  86382. }, $it);
  86383. }
  86384. var Eit = Jie;
  86385. function Mit(t) {
  86386. return t;
  86387. }
  86388. var eae = Mit;
  86389. function Iit(t, e, n) {
  86390. switch (n.length) {
  86391. case 0:
  86392. return t.call(e);
  86393. case 1:
  86394. return t.call(e, n[0]);
  86395. case 2:
  86396. return t.call(e, n[0], n[1]);
  86397. case 3:
  86398. return t.call(e, n[0], n[1], n[2]);
  86399. }
  86400. return t.apply(e, n);
  86401. }
  86402. var Dit = Iit, Rit = Dit, bH = Math.max;
  86403. function kit(t, e, n) {
  86404. return e = bH(e === void 0 ? t.length - 1 : e, 0), function() {
  86405. for (var r = arguments, i = -1, a = bH(r.length - e, 0), o = Array(a); ++i < a; )
  86406. o[i] = r[e + i];
  86407. i = -1;
  86408. for (var s = Array(e + 1); ++i < e; )
  86409. s[i] = r[i];
  86410. return s[e] = n(o), Rit(t, this, s);
  86411. };
  86412. }
  86413. var Lit = kit;
  86414. function Nit(t) {
  86415. return function() {
  86416. return t;
  86417. };
  86418. }
  86419. var Bit = Nit, zit = Bit, _H = Aie, Vit = eae, Fit = _H ? function(t, e) {
  86420. return _H(t, "toString", {
  86421. configurable: !0,
  86422. enumerable: !1,
  86423. value: zit(e),
  86424. writable: !0
  86425. });
  86426. } : Vit, Wit = Fit, Qit = 800, Hit = 16, Git = Date.now;
  86427. function jit(t) {
  86428. var e = 0, n = 0;
  86429. return function() {
  86430. var r = Git(), i = Hit - (r - n);
  86431. if (n = r, i > 0) {
  86432. if (++e >= Qit)
  86433. return arguments[0];
  86434. } else
  86435. e = 0;
  86436. return t.apply(void 0, arguments);
  86437. };
  86438. }
  86439. var Zit = jit, Uit = Wit, Xit = Zit, Yit = Xit(Uit), qit = Yit, Kit = eae, Jit = Lit, eat = qit;
  86440. function tat(t, e) {
  86441. return eat(Jit(t, e, Kit), t + "");
  86442. }
  86443. var nat = tat, rat = Tw, iat = Iw, aat = Die, oat = mo;
  86444. function sat(t, e, n) {
  86445. if (!oat(n))
  86446. return !1;
  86447. var r = typeof e;
  86448. return (r == "number" ? iat(n) && aat(e, n.length) : r == "string" && e in n) ? rat(n[e], t) : !1;
  86449. }
  86450. var lat = sat, uat = nat, cat = lat;
  86451. function fat(t) {
  86452. return uat(function(e, n) {
  86453. var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
  86454. for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && cat(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
  86455. var s = n[r];
  86456. s && t(e, s, r, a);
  86457. }
  86458. return e;
  86459. });
  86460. }
  86461. var dat = fat, hat = Eit, pat = dat;
  86462. pat(function(t, e, n) {
  86463. hat(t, e, n);
  86464. });
  86465. const KL = (t) => {
  86466. var h, p, v;
  86467. const e = t.dataSource || {}, n = U(), r = U(), i = U((h = e == null ? void 0 : e.data) == null ? void 0 : h.series), a = L(() => async () => await fetch(t.dataSource.url, {
  86468. method: t.dataSource.method
  86469. }).then((g) => g.json())), { run: o, refresh: s, cancel: l, data: u, loading: c } = SXe(a.value, {
  86470. defaultParams: t.dataSource.params,
  86471. manual: !0,
  86472. cacheKey: t.dataSource.url,
  86473. cacheTime: (((p = t.dataSource) == null ? void 0 : p.refreshTime) || 0) * 1e3,
  86474. pollingInterval: (((v = t.dataSource) == null ? void 0 : v.refreshTime) || 0) * 1e3,
  86475. // 刷新时间
  86476. onError: (g) => {
  86477. console.error(g), Dh.error(t.dataSource.url + "请求失败");
  86478. }
  86479. });
  86480. t.dataSource.sourceType === Li.API && o(), se(
  86481. () => u.value,
  86482. async (g) => {
  86483. if (g && t.dataSource.sourceType === Li.API) {
  86484. let m = g;
  86485. t.dataSource.dataProcess && (m = await LZe(t.dataSource.dataProcess, JSON.stringify(g))), n.value = m.xAxis || { data: m.xData }, r.value = m.yAxis || { data: m.yData }, i.value = m.series;
  86486. }
  86487. },
  86488. {
  86489. deep: !0
  86490. }
  86491. ), se(
  86492. () => [
  86493. t.dataSource.sourceType,
  86494. t.dataSource.method
  86495. ],
  86496. () => {
  86497. if (t.dataSource.sourceType === Li.API)
  86498. s();
  86499. else {
  86500. l();
  86501. const g = t.dataSource || {}, { xData: m, yData: y, series: b } = (g == null ? void 0 : g.data) || {};
  86502. m && (n.value = { data: m }), y && (r.value = { data: y }), b.value = b;
  86503. }
  86504. },
  86505. {
  86506. deep: !0
  86507. }
  86508. );
  86509. const f = (g) => {
  86510. var O, S, x, C;
  86511. let m = 34, y = 20, b = 30, _ = 20;
  86512. return !Array.isArray(g.title) && ((O = g.title) != null && O.show) && (_ += 20), !Array.isArray(g.legend) && ((S = g.legend) != null && S.show) && (g.legend.left === "center" && g.legend.top !== "auto" && (_ += 20), g.legend.left === "center" && g.legend.bottom !== "auto" && (m += 20), g.legend.top === "center" && g.legend.left !== "auto" && (b += 70), g.legend.top === "center" && g.legend.right !== "auto" && (y += 50)), !Array.isArray(g.xAxis) && ((x = g.xAxis) != null && x.name) && (m += 20), !Array.isArray(g.yAxis) && ((C = g.yAxis) != null && C.name) && (b += 20), {
  86513. bottom: m,
  86514. left: b,
  86515. right: y,
  86516. top: _
  86517. };
  86518. };
  86519. return {
  86520. options: L(() => {
  86521. var b, _;
  86522. const g = CU(t, [
  86523. "width",
  86524. "height",
  86525. "dataSource"
  86526. ]);
  86527. !Array.isArray(g.title) && !((b = g.title) != null && b.show) && !Array.isArray(g.legend) && g.legend && (g.legend.top = 12);
  86528. const m = (g == null ? void 0 : g.label) || {}, y = xU(
  86529. {
  86530. xAxis: n.value,
  86531. yAxis: r.value,
  86532. series: (_ = i.value) == null ? void 0 : _.map((O) => {
  86533. var x;
  86534. const S = ((x = g.series) == null ? void 0 : x[O.type]) || {};
  86535. return {
  86536. ...m,
  86537. ...O,
  86538. ...S
  86539. };
  86540. }),
  86541. grid: f(g)
  86542. },
  86543. g
  86544. );
  86545. return console.log("option result:", y), y;
  86546. }),
  86547. loading: c
  86548. };
  86549. }, vat = te({
  86550. name: "DBasicLine",
  86551. components: { Charts: RL },
  86552. props: NL,
  86553. setup(t) {
  86554. const { options: e, loading: n } = KL(t);
  86555. return {
  86556. options: e,
  86557. loading: n
  86558. };
  86559. }
  86560. });
  86561. function gat(t, e, n, r, i, a) {
  86562. const o = fi("Charts");
  86563. return pe(), je(o, {
  86564. width: t.width,
  86565. height: t.height,
  86566. "echarts-options": t.options,
  86567. loading: t.loading
  86568. }, null, 8, ["width", "height", "echarts-options", "loading"]);
  86569. }
  86570. const lh = /* @__PURE__ */ $r(vat, [["render", gat]]);
  86571. class Ft {
  86572. /**
  86573. Get the line description around the given position.
  86574. */
  86575. lineAt(e) {
  86576. if (e < 0 || e > this.length)
  86577. throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);
  86578. return this.lineInner(e, !1, 1, 0);
  86579. }
  86580. /**
  86581. Get the description for the given (1-based) line number.
  86582. */
  86583. line(e) {
  86584. if (e < 1 || e > this.lines)
  86585. throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
  86586. return this.lineInner(e, !0, 1, 0);
  86587. }
  86588. /**
  86589. Replace a range of the text with the given content.
  86590. */
  86591. replace(e, n, r) {
  86592. [e, n] = Kh(this, e, n);
  86593. let i = [];
  86594. return this.decompose(
  86595. 0,
  86596. e,
  86597. i,
  86598. 2
  86599. /* Open.To */
  86600. ), r.length && r.decompose(
  86601. 0,
  86602. r.length,
  86603. i,
  86604. 3
  86605. /* Open.To */
  86606. ), this.decompose(
  86607. n,
  86608. this.length,
  86609. i,
  86610. 1
  86611. /* Open.From */
  86612. ), Bo.from(i, this.length - (n - e) + r.length);
  86613. }
  86614. /**
  86615. Append another document to this one.
  86616. */
  86617. append(e) {
  86618. return this.replace(this.length, this.length, e);
  86619. }
  86620. /**
  86621. Retrieve the text between the given points.
  86622. */
  86623. slice(e, n = this.length) {
  86624. [e, n] = Kh(this, e, n);
  86625. let r = [];
  86626. return this.decompose(e, n, r, 0), Bo.from(r, n - e);
  86627. }
  86628. /**
  86629. Test whether this text is equal to another instance.
  86630. */
  86631. eq(e) {
  86632. if (e == this)
  86633. return !0;
  86634. if (e.length != this.length || e.lines != this.lines)
  86635. return !1;
  86636. let n = this.scanIdentical(e, 1), r = this.length - this.scanIdentical(e, -1), i = new Gg(this), a = new Gg(e);
  86637. for (let o = n, s = n; ; ) {
  86638. if (i.next(o), a.next(o), o = 0, i.lineBreak != a.lineBreak || i.done != a.done || i.value != a.value)
  86639. return !1;
  86640. if (s += i.value.length, i.done || s >= r)
  86641. return !0;
  86642. }
  86643. }
  86644. /**
  86645. Iterate over the text. When `dir` is `-1`, iteration happens
  86646. from end to start. This will return lines and the breaks between
  86647. them as separate strings.
  86648. */
  86649. iter(e = 1) {
  86650. return new Gg(this, e);
  86651. }
  86652. /**
  86653. Iterate over a range of the text. When `from` > `to`, the
  86654. iterator will run in reverse.
  86655. */
  86656. iterRange(e, n = this.length) {
  86657. return new tae(this, e, n);
  86658. }
  86659. /**
  86660. Return a cursor that iterates over the given range of lines,
  86661. _without_ returning the line breaks between, and yielding empty
  86662. strings for empty lines.
  86663. When `from` and `to` are given, they should be 1-based line numbers.
  86664. */
  86665. iterLines(e, n) {
  86666. let r;
  86667. if (e == null)
  86668. r = this.iter();
  86669. else {
  86670. n == null && (n = this.lines + 1);
  86671. let i = this.line(e).from;
  86672. r = this.iterRange(i, Math.max(i, n == this.lines + 1 ? this.length : n <= 1 ? 0 : this.line(n - 1).to));
  86673. }
  86674. return new nae(r);
  86675. }
  86676. /**
  86677. Return the document as a string, using newline characters to
  86678. separate lines.
  86679. */
  86680. toString() {
  86681. return this.sliceString(0);
  86682. }
  86683. /**
  86684. Convert the document to an array of lines (which can be
  86685. deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
  86686. */
  86687. toJSON() {
  86688. let e = [];
  86689. return this.flatten(e), e;
  86690. }
  86691. /**
  86692. @internal
  86693. */
  86694. constructor() {
  86695. }
  86696. /**
  86697. Create a `Text` instance for the given array of lines.
  86698. */
  86699. static of(e) {
  86700. if (e.length == 0)
  86701. throw new RangeError("A document must have at least one line");
  86702. return e.length == 1 && !e[0] ? Ft.empty : e.length <= 32 ? new Mn(e) : Bo.from(Mn.split(e, []));
  86703. }
  86704. }
  86705. class Mn extends Ft {
  86706. constructor(e, n = mat(e)) {
  86707. super(), this.text = e, this.length = n;
  86708. }
  86709. get lines() {
  86710. return this.text.length;
  86711. }
  86712. get children() {
  86713. return null;
  86714. }
  86715. lineInner(e, n, r, i) {
  86716. for (let a = 0; ; a++) {
  86717. let o = this.text[a], s = i + o.length;
  86718. if ((n ? r : s) >= e)
  86719. return new yat(i, s, r, o);
  86720. i = s + 1, r++;
  86721. }
  86722. }
  86723. decompose(e, n, r, i) {
  86724. let a = e <= 0 && n >= this.length ? this : new Mn(OH(this.text, e, n), Math.min(n, this.length) - Math.max(0, e));
  86725. if (i & 1) {
  86726. let o = r.pop(), s = r1(a.text, o.text.slice(), 0, a.length);
  86727. if (s.length <= 32)
  86728. r.push(new Mn(s, o.length + a.length));
  86729. else {
  86730. let l = s.length >> 1;
  86731. r.push(new Mn(s.slice(0, l)), new Mn(s.slice(l)));
  86732. }
  86733. } else
  86734. r.push(a);
  86735. }
  86736. replace(e, n, r) {
  86737. if (!(r instanceof Mn))
  86738. return super.replace(e, n, r);
  86739. [e, n] = Kh(this, e, n);
  86740. let i = r1(this.text, r1(r.text, OH(this.text, 0, e)), n), a = this.length + r.length - (n - e);
  86741. return i.length <= 32 ? new Mn(i, a) : Bo.from(Mn.split(i, []), a);
  86742. }
  86743. sliceString(e, n = this.length, r = `
  86744. `) {
  86745. [e, n] = Kh(this, e, n);
  86746. let i = "";
  86747. for (let a = 0, o = 0; a <= n && o < this.text.length; o++) {
  86748. let s = this.text[o], l = a + s.length;
  86749. a > e && o && (i += r), e < l && n > a && (i += s.slice(Math.max(0, e - a), n - a)), a = l + 1;
  86750. }
  86751. return i;
  86752. }
  86753. flatten(e) {
  86754. for (let n of this.text)
  86755. e.push(n);
  86756. }
  86757. scanIdentical() {
  86758. return 0;
  86759. }
  86760. static split(e, n) {
  86761. let r = [], i = -1;
  86762. for (let a of e)
  86763. r.push(a), i += a.length + 1, r.length == 32 && (n.push(new Mn(r, i)), r = [], i = -1);
  86764. return i > -1 && n.push(new Mn(r, i)), n;
  86765. }
  86766. }
  86767. class Bo extends Ft {
  86768. constructor(e, n) {
  86769. super(), this.children = e, this.length = n, this.lines = 0;
  86770. for (let r of e)
  86771. this.lines += r.lines;
  86772. }
  86773. lineInner(e, n, r, i) {
  86774. for (let a = 0; ; a++) {
  86775. let o = this.children[a], s = i + o.length, l = r + o.lines - 1;
  86776. if ((n ? l : s) >= e)
  86777. return o.lineInner(e, n, r, i);
  86778. i = s + 1, r = l + 1;
  86779. }
  86780. }
  86781. decompose(e, n, r, i) {
  86782. for (let a = 0, o = 0; o <= n && a < this.children.length; a++) {
  86783. let s = this.children[a], l = o + s.length;
  86784. if (e <= l && n >= o) {
  86785. let u = i & ((o <= e ? 1 : 0) | (l >= n ? 2 : 0));
  86786. o >= e && l <= n && !u ? r.push(s) : s.decompose(e - o, n - o, r, u);
  86787. }
  86788. o = l + 1;
  86789. }
  86790. }
  86791. replace(e, n, r) {
  86792. if ([e, n] = Kh(this, e, n), r.lines < this.lines)
  86793. for (let i = 0, a = 0; i < this.children.length; i++) {
  86794. let o = this.children[i], s = a + o.length;
  86795. if (e >= a && n <= s) {
  86796. let l = o.replace(e - a, n - a, r), u = this.lines - o.lines + l.lines;
  86797. if (l.lines < u >> 4 && l.lines > u >> 6) {
  86798. let c = this.children.slice();
  86799. return c[i] = l, new Bo(c, this.length - (n - e) + r.length);
  86800. }
  86801. return super.replace(a, s, l);
  86802. }
  86803. a = s + 1;
  86804. }
  86805. return super.replace(e, n, r);
  86806. }
  86807. sliceString(e, n = this.length, r = `
  86808. `) {
  86809. [e, n] = Kh(this, e, n);
  86810. let i = "";
  86811. for (let a = 0, o = 0; a < this.children.length && o <= n; a++) {
  86812. let s = this.children[a], l = o + s.length;
  86813. o > e && a && (i += r), e < l && n > o && (i += s.sliceString(e - o, n - o, r)), o = l + 1;
  86814. }
  86815. return i;
  86816. }
  86817. flatten(e) {
  86818. for (let n of this.children)
  86819. n.flatten(e);
  86820. }
  86821. scanIdentical(e, n) {
  86822. if (!(e instanceof Bo))
  86823. return 0;
  86824. 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];
  86825. for (; ; i += n, a += n) {
  86826. if (i == o || a == s)
  86827. return r;
  86828. let l = this.children[i], u = e.children[a];
  86829. if (l != u)
  86830. return r + l.scanIdentical(u, n);
  86831. r += l.length + 1;
  86832. }
  86833. }
  86834. static from(e, n = e.reduce((r, i) => r + i.length + 1, -1)) {
  86835. let r = 0;
  86836. for (let h of e)
  86837. r += h.lines;
  86838. if (r < 32) {
  86839. let h = [];
  86840. for (let p of e)
  86841. p.flatten(h);
  86842. return new Mn(h, n);
  86843. }
  86844. let i = Math.max(
  86845. 32,
  86846. r >> 5
  86847. /* Tree.BranchShift */
  86848. ), a = i << 1, o = i >> 1, s = [], l = 0, u = -1, c = [];
  86849. function f(h) {
  86850. let p;
  86851. if (h.lines > a && h instanceof Bo)
  86852. for (let v of h.children)
  86853. f(v);
  86854. else h.lines > o && (l > o || !l) ? (d(), s.push(h)) : h instanceof Mn && l && (p = c[c.length - 1]) instanceof Mn && h.lines + p.lines <= 32 ? (l += h.lines, u += h.length + 1, c[c.length - 1] = new Mn(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));
  86855. }
  86856. function d() {
  86857. l != 0 && (s.push(c.length == 1 ? c[0] : Bo.from(c, u)), u = -1, l = c.length = 0);
  86858. }
  86859. for (let h of e)
  86860. f(h);
  86861. return d(), s.length == 1 ? s[0] : new Bo(s, n);
  86862. }
  86863. }
  86864. Ft.empty = /* @__PURE__ */ new Mn([""], 0);
  86865. function mat(t) {
  86866. let e = -1;
  86867. for (let n of t)
  86868. e += n.length + 1;
  86869. return e;
  86870. }
  86871. function r1(t, e, n = 0, r = 1e9) {
  86872. for (let i = 0, a = 0, o = !0; a < t.length && i <= r; a++) {
  86873. let s = t[a], l = i + s.length;
  86874. 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;
  86875. }
  86876. return e;
  86877. }
  86878. function OH(t, e, n) {
  86879. return r1(t, [""], e, n);
  86880. }
  86881. class Gg {
  86882. constructor(e, n = 1) {
  86883. this.dir = n, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [n > 0 ? 1 : (e instanceof Mn ? e.text.length : e.children.length) << 1];
  86884. }
  86885. nextInner(e, n) {
  86886. for (this.done = this.lineBreak = !1; ; ) {
  86887. let r = this.nodes.length - 1, i = this.nodes[r], a = this.offsets[r], o = a >> 1, s = i instanceof Mn ? i.text.length : i.children.length;
  86888. if (o == (n > 0 ? s : 0)) {
  86889. if (r == 0)
  86890. return this.done = !0, this.value = "", this;
  86891. n > 0 && this.offsets[r - 1]++, this.nodes.pop(), this.offsets.pop();
  86892. } else if ((a & 1) == (n > 0 ? 0 : 1)) {
  86893. if (this.offsets[r] += n, e == 0)
  86894. return this.lineBreak = !0, this.value = `
  86895. `, this;
  86896. e--;
  86897. } else if (i instanceof Mn) {
  86898. let l = i.text[o + (n < 0 ? -1 : 0)];
  86899. if (this.offsets[r] += n, l.length > Math.max(0, e))
  86900. return this.value = e == 0 ? l : n > 0 ? l.slice(e) : l.slice(0, l.length - e), this;
  86901. e -= l.length;
  86902. } else {
  86903. let l = i.children[o + (n < 0 ? -1 : 0)];
  86904. 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 Mn ? l.text.length : l.children.length) << 1));
  86905. }
  86906. }
  86907. }
  86908. next(e = 0) {
  86909. return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
  86910. }
  86911. }
  86912. class tae {
  86913. constructor(e, n, r) {
  86914. this.value = "", this.done = !1, this.cursor = new Gg(e, n > r ? -1 : 1), this.pos = n > r ? e.length : 0, this.from = Math.min(n, r), this.to = Math.max(n, r);
  86915. }
  86916. nextInner(e, n) {
  86917. if (n < 0 ? this.pos <= this.from : this.pos >= this.to)
  86918. return this.value = "", this.done = !0, this;
  86919. e += Math.max(0, n < 0 ? this.pos - this.to : this.from - this.pos);
  86920. let r = n < 0 ? this.pos - this.from : this.to - this.pos;
  86921. e > r && (e = r), r -= e;
  86922. let { value: i } = this.cursor.next(e);
  86923. 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;
  86924. }
  86925. next(e = 0) {
  86926. 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);
  86927. }
  86928. get lineBreak() {
  86929. return this.cursor.lineBreak && this.value != "";
  86930. }
  86931. }
  86932. class nae {
  86933. constructor(e) {
  86934. this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
  86935. }
  86936. next(e = 0) {
  86937. let { done: n, lineBreak: r, value: i } = this.inner.next(e);
  86938. 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;
  86939. }
  86940. get lineBreak() {
  86941. return !1;
  86942. }
  86943. }
  86944. typeof Symbol < "u" && (Ft.prototype[Symbol.iterator] = function() {
  86945. return this.iter();
  86946. }, Gg.prototype[Symbol.iterator] = tae.prototype[Symbol.iterator] = nae.prototype[Symbol.iterator] = function() {
  86947. return this;
  86948. });
  86949. class yat {
  86950. /**
  86951. @internal
  86952. */
  86953. constructor(e, n, r, i) {
  86954. this.from = e, this.to = n, this.number = r, this.text = i;
  86955. }
  86956. /**
  86957. The length of the line (not including any line break after it).
  86958. */
  86959. get length() {
  86960. return this.to - this.from;
  86961. }
  86962. }
  86963. function Kh(t, e, n) {
  86964. return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, n))];
  86965. }
  86966. let uh = /* @__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);
  86967. for (let t = 1; t < uh.length; t++)
  86968. uh[t] += uh[t - 1];
  86969. function bat(t) {
  86970. for (let e = 1; e < uh.length; e += 2)
  86971. if (uh[e] > t)
  86972. return uh[e - 1] <= t;
  86973. return !1;
  86974. }
  86975. function SH(t) {
  86976. return t >= 127462 && t <= 127487;
  86977. }
  86978. const xH = 8205;
  86979. function _r(t, e, n = !0, r = !0) {
  86980. return (n ? rae : _at)(t, e, r);
  86981. }
  86982. function rae(t, e, n) {
  86983. if (e == t.length)
  86984. return e;
  86985. e && iae(t.charCodeAt(e)) && aae(t.charCodeAt(e - 1)) && e--;
  86986. let r = gr(t, e);
  86987. for (e += ya(r); e < t.length; ) {
  86988. let i = gr(t, e);
  86989. if (r == xH || i == xH || n && bat(i))
  86990. e += ya(i), r = i;
  86991. else if (SH(i)) {
  86992. let a = 0, o = e - 2;
  86993. for (; o >= 0 && SH(gr(t, o)); )
  86994. a++, o -= 2;
  86995. if (a % 2 == 0)
  86996. break;
  86997. e += 2;
  86998. } else
  86999. break;
  87000. }
  87001. return e;
  87002. }
  87003. function _at(t, e, n) {
  87004. for (; e > 0; ) {
  87005. let r = rae(t, e - 2, n);
  87006. if (r < e)
  87007. return r;
  87008. e--;
  87009. }
  87010. return 0;
  87011. }
  87012. function iae(t) {
  87013. return t >= 56320 && t < 57344;
  87014. }
  87015. function aae(t) {
  87016. return t >= 55296 && t < 56320;
  87017. }
  87018. function gr(t, e) {
  87019. let n = t.charCodeAt(e);
  87020. if (!aae(n) || e + 1 == t.length)
  87021. return n;
  87022. let r = t.charCodeAt(e + 1);
  87023. return iae(r) ? (n - 55296 << 10) + (r - 56320) + 65536 : n;
  87024. }
  87025. function JL(t) {
  87026. return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
  87027. }
  87028. function ya(t) {
  87029. return t < 65536 ? 1 : 2;
  87030. }
  87031. const nM = /\r\n?|\n/;
  87032. var yr = /* @__PURE__ */ function(t) {
  87033. return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t;
  87034. }(yr || (yr = {}));
  87035. class qo {
  87036. // Sections are encoded as pairs of integers. The first is the
  87037. // length in the current document, and the second is -1 for
  87038. // unaffected sections, and the length of the replacement content
  87039. // otherwise. So an insertion would be (0, n>0), a deletion (n>0,
  87040. // 0), and a replacement two positive numbers.
  87041. /**
  87042. @internal
  87043. */
  87044. constructor(e) {
  87045. this.sections = e;
  87046. }
  87047. /**
  87048. The length of the document before the change.
  87049. */
  87050. get length() {
  87051. let e = 0;
  87052. for (let n = 0; n < this.sections.length; n += 2)
  87053. e += this.sections[n];
  87054. return e;
  87055. }
  87056. /**
  87057. The length of the document after the change.
  87058. */
  87059. get newLength() {
  87060. let e = 0;
  87061. for (let n = 0; n < this.sections.length; n += 2) {
  87062. let r = this.sections[n + 1];
  87063. e += r < 0 ? this.sections[n] : r;
  87064. }
  87065. return e;
  87066. }
  87067. /**
  87068. False when there are actual changes in this set.
  87069. */
  87070. get empty() {
  87071. return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
  87072. }
  87073. /**
  87074. Iterate over the unchanged parts left by these changes. `posA`
  87075. provides the position of the range in the old document, `posB`
  87076. the new position in the changed document.
  87077. */
  87078. iterGaps(e) {
  87079. for (let n = 0, r = 0, i = 0; n < this.sections.length; ) {
  87080. let a = this.sections[n++], o = this.sections[n++];
  87081. o < 0 ? (e(r, i, a), i += a) : i += o, r += a;
  87082. }
  87083. }
  87084. /**
  87085. Iterate over the ranges changed by these changes. (See
  87086. [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
  87087. variant that also provides you with the inserted text.)
  87088. `fromA`/`toA` provides the extent of the change in the starting
  87089. document, `fromB`/`toB` the extent of the replacement in the
  87090. changed document.
  87091. When `individual` is true, adjacent changes (which are kept
  87092. separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
  87093. reported separately.
  87094. */
  87095. iterChangedRanges(e, n = !1) {
  87096. rM(this, e, n);
  87097. }
  87098. /**
  87099. Get a description of the inverted form of these changes.
  87100. */
  87101. get invertedDesc() {
  87102. let e = [];
  87103. for (let n = 0; n < this.sections.length; ) {
  87104. let r = this.sections[n++], i = this.sections[n++];
  87105. i < 0 ? e.push(r, i) : e.push(i, r);
  87106. }
  87107. return new qo(e);
  87108. }
  87109. /**
  87110. Compute the combined effect of applying another set of changes
  87111. after this one. The length of the document after this set should
  87112. match the length before `other`.
  87113. */
  87114. composeDesc(e) {
  87115. return this.empty ? e : e.empty ? this : oae(this, e);
  87116. }
  87117. /**
  87118. Map this description, which should start with the same document
  87119. as `other`, over another set of changes, so that it can be
  87120. applied after it. When `before` is true, map as if the changes
  87121. in `other` happened before the ones in `this`.
  87122. */
  87123. mapDesc(e, n = !1) {
  87124. return e.empty ? this : iM(this, e, n);
  87125. }
  87126. mapPos(e, n = -1, r = yr.Simple) {
  87127. let i = 0, a = 0;
  87128. for (let o = 0; o < this.sections.length; ) {
  87129. let s = this.sections[o++], l = this.sections[o++], u = i + s;
  87130. if (l < 0) {
  87131. if (u > e)
  87132. return a + (e - i);
  87133. a += s;
  87134. } else {
  87135. if (r != yr.Simple && u >= e && (r == yr.TrackDel && i < e && u > e || r == yr.TrackBefore && i < e || r == yr.TrackAfter && u > e))
  87136. return null;
  87137. if (u > e || u == e && n < 0 && !s)
  87138. return e == i || n < 0 ? a : a + l;
  87139. a += l;
  87140. }
  87141. i = u;
  87142. }
  87143. if (e > i)
  87144. throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);
  87145. return a;
  87146. }
  87147. /**
  87148. Check whether these changes touch a given range. When one of the
  87149. changes entirely covers the range, the string `"cover"` is
  87150. returned.
  87151. */
  87152. touchesRange(e, n = e) {
  87153. for (let r = 0, i = 0; r < this.sections.length && i <= n; ) {
  87154. let a = this.sections[r++], o = this.sections[r++], s = i + a;
  87155. if (o >= 0 && i <= n && s >= e)
  87156. return i < e && s > n ? "cover" : !0;
  87157. i = s;
  87158. }
  87159. return !1;
  87160. }
  87161. /**
  87162. @internal
  87163. */
  87164. toString() {
  87165. let e = "";
  87166. for (let n = 0; n < this.sections.length; ) {
  87167. let r = this.sections[n++], i = this.sections[n++];
  87168. e += (e ? " " : "") + r + (i >= 0 ? ":" + i : "");
  87169. }
  87170. return e;
  87171. }
  87172. /**
  87173. Serialize this change desc to a JSON-representable value.
  87174. */
  87175. toJSON() {
  87176. return this.sections;
  87177. }
  87178. /**
  87179. Create a change desc from its JSON representation (as produced
  87180. by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
  87181. */
  87182. static fromJSON(e) {
  87183. if (!Array.isArray(e) || e.length % 2 || e.some((n) => typeof n != "number"))
  87184. throw new RangeError("Invalid JSON representation of ChangeDesc");
  87185. return new qo(e);
  87186. }
  87187. /**
  87188. @internal
  87189. */
  87190. static create(e) {
  87191. return new qo(e);
  87192. }
  87193. }
  87194. class jn extends qo {
  87195. constructor(e, n) {
  87196. super(e), this.inserted = n;
  87197. }
  87198. /**
  87199. Apply the changes to a document, returning the modified
  87200. document.
  87201. */
  87202. apply(e) {
  87203. if (this.length != e.length)
  87204. throw new RangeError("Applying change set to a document with the wrong length");
  87205. return rM(this, (n, r, i, a, o) => e = e.replace(i, i + (r - n), o), !1), e;
  87206. }
  87207. mapDesc(e, n = !1) {
  87208. return iM(this, e, n, !0);
  87209. }
  87210. /**
  87211. Given the document as it existed _before_ the changes, return a
  87212. change set that represents the inverse of this set, which could
  87213. be used to go from the document created by the changes back to
  87214. the document as it existed before the changes.
  87215. */
  87216. invert(e) {
  87217. let n = this.sections.slice(), r = [];
  87218. for (let i = 0, a = 0; i < n.length; i += 2) {
  87219. let o = n[i], s = n[i + 1];
  87220. if (s >= 0) {
  87221. n[i] = s, n[i + 1] = o;
  87222. let l = i >> 1;
  87223. for (; r.length < l; )
  87224. r.push(Ft.empty);
  87225. r.push(o ? e.slice(a, a + o) : Ft.empty);
  87226. }
  87227. a += o;
  87228. }
  87229. return new jn(n, r);
  87230. }
  87231. /**
  87232. Combine two subsequent change sets into a single set. `other`
  87233. must start in the document produced by `this`. If `this` goes
  87234. `docA` → `docB` and `other` represents `docB` → `docC`, the
  87235. returned value will represent the change `docA` → `docC`.
  87236. */
  87237. compose(e) {
  87238. return this.empty ? e : e.empty ? this : oae(this, e, !0);
  87239. }
  87240. /**
  87241. Given another change set starting in the same document, maps this
  87242. change set over the other, producing a new change set that can be
  87243. applied to the document produced by applying `other`. When
  87244. `before` is `true`, order changes as if `this` comes before
  87245. `other`, otherwise (the default) treat `other` as coming first.
  87246. Given two changes `A` and `B`, `A.compose(B.map(A))` and
  87247. `B.compose(A.map(B, true))` will produce the same document. This
  87248. provides a basic form of [operational
  87249. transformation](https://en.wikipedia.org/wiki/Operational_transformation),
  87250. and can be used for collaborative editing.
  87251. */
  87252. map(e, n = !1) {
  87253. return e.empty ? this : iM(this, e, n, !0);
  87254. }
  87255. /**
  87256. Iterate over the changed ranges in the document, calling `f` for
  87257. each, with the range in the original document (`fromA`-`toA`)
  87258. and the range that replaces it in the new document
  87259. (`fromB`-`toB`).
  87260. When `individual` is true, adjacent changes are reported
  87261. separately.
  87262. */
  87263. iterChanges(e, n = !1) {
  87264. rM(this, e, n);
  87265. }
  87266. /**
  87267. Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
  87268. set.
  87269. */
  87270. get desc() {
  87271. return qo.create(this.sections);
  87272. }
  87273. /**
  87274. @internal
  87275. */
  87276. filter(e) {
  87277. let n = [], r = [], i = [], a = new Um(this);
  87278. e: for (let o = 0, s = 0; ; ) {
  87279. let l = o == e.length ? 1e9 : e[o++];
  87280. for (; s < l || s == l && a.len == 0; ) {
  87281. if (a.done)
  87282. break e;
  87283. let c = Math.min(a.len, l - s);
  87284. Rr(i, c, -1);
  87285. let f = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
  87286. Rr(n, c, f), f > 0 && Wl(r, n, a.text), a.forward(c), s += c;
  87287. }
  87288. let u = e[o++];
  87289. for (; s < u; ) {
  87290. if (a.done)
  87291. break e;
  87292. let c = Math.min(a.len, u - s);
  87293. Rr(n, c, -1), Rr(i, c, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(c), s += c;
  87294. }
  87295. }
  87296. return {
  87297. changes: new jn(n, r),
  87298. filtered: qo.create(i)
  87299. };
  87300. }
  87301. /**
  87302. Serialize this change set to a JSON-representable value.
  87303. */
  87304. toJSON() {
  87305. let e = [];
  87306. for (let n = 0; n < this.sections.length; n += 2) {
  87307. let r = this.sections[n], i = this.sections[n + 1];
  87308. i < 0 ? e.push(r) : i == 0 ? e.push([r]) : e.push([r].concat(this.inserted[n >> 1].toJSON()));
  87309. }
  87310. return e;
  87311. }
  87312. /**
  87313. Create a change set for the given changes, for a document of the
  87314. given length, using `lineSep` as line separator.
  87315. */
  87316. static of(e, n, r) {
  87317. let i = [], a = [], o = 0, s = null;
  87318. function l(c = !1) {
  87319. if (!c && !i.length)
  87320. return;
  87321. o < n && Rr(i, n - o, -1);
  87322. let f = new jn(i, a);
  87323. s = s ? s.compose(f.map(s)) : f, i = [], a = [], o = 0;
  87324. }
  87325. function u(c) {
  87326. if (Array.isArray(c))
  87327. for (let f of c)
  87328. u(f);
  87329. else if (c instanceof jn) {
  87330. if (c.length != n)
  87331. throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);
  87332. l(), s = s ? s.compose(c.map(s)) : c;
  87333. } else {
  87334. let { from: f, to: d = f, insert: h } = c;
  87335. if (f > d || f < 0 || d > n)
  87336. throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);
  87337. let p = h ? typeof h == "string" ? Ft.of(h.split(r || nM)) : h : Ft.empty, v = p.length;
  87338. if (f == d && v == 0)
  87339. return;
  87340. f < o && l(), f > o && Rr(i, f - o, -1), Rr(i, d - f, v), Wl(a, i, p), o = d;
  87341. }
  87342. }
  87343. return u(e), l(!s), s;
  87344. }
  87345. /**
  87346. Create an empty changeset of the given length.
  87347. */
  87348. static empty(e) {
  87349. return new jn(e ? [e, -1] : [], []);
  87350. }
  87351. /**
  87352. Create a changeset from its JSON representation (as produced by
  87353. [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
  87354. */
  87355. static fromJSON(e) {
  87356. if (!Array.isArray(e))
  87357. throw new RangeError("Invalid JSON representation of ChangeSet");
  87358. let n = [], r = [];
  87359. for (let i = 0; i < e.length; i++) {
  87360. let a = e[i];
  87361. if (typeof a == "number")
  87362. n.push(a, -1);
  87363. else {
  87364. if (!Array.isArray(a) || typeof a[0] != "number" || a.some((o, s) => s && typeof o != "string"))
  87365. throw new RangeError("Invalid JSON representation of ChangeSet");
  87366. if (a.length == 1)
  87367. n.push(a[0], 0);
  87368. else {
  87369. for (; r.length < i; )
  87370. r.push(Ft.empty);
  87371. r[i] = Ft.of(a.slice(1)), n.push(a[0], r[i].length);
  87372. }
  87373. }
  87374. }
  87375. return new jn(n, r);
  87376. }
  87377. /**
  87378. @internal
  87379. */
  87380. static createSet(e, n) {
  87381. return new jn(e, n);
  87382. }
  87383. }
  87384. function Rr(t, e, n, r = !1) {
  87385. if (e == 0 && n <= 0)
  87386. return;
  87387. let i = t.length - 2;
  87388. 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);
  87389. }
  87390. function Wl(t, e, n) {
  87391. if (n.length == 0)
  87392. return;
  87393. let r = e.length - 2 >> 1;
  87394. if (r < t.length)
  87395. t[t.length - 1] = t[t.length - 1].append(n);
  87396. else {
  87397. for (; t.length < r; )
  87398. t.push(Ft.empty);
  87399. t.push(n);
  87400. }
  87401. }
  87402. function rM(t, e, n) {
  87403. let r = t.inserted;
  87404. for (let i = 0, a = 0, o = 0; o < t.sections.length; ) {
  87405. let s = t.sections[o++], l = t.sections[o++];
  87406. if (l < 0)
  87407. i += s, a += s;
  87408. else {
  87409. let u = i, c = a, f = Ft.empty;
  87410. for (; u += s, c += l, l && r && (f = f.append(r[o - 2 >> 1])), !(n || o == t.sections.length || t.sections[o + 1] < 0); )
  87411. s = t.sections[o++], l = t.sections[o++];
  87412. e(i, u, a, c, f), i = u, a = c;
  87413. }
  87414. }
  87415. }
  87416. function iM(t, e, n, r = !1) {
  87417. let i = [], a = r ? [] : null, o = new Um(t), s = new Um(e);
  87418. for (let l = -1; ; )
  87419. if (o.ins == -1 && s.ins == -1) {
  87420. let u = Math.min(o.len, s.len);
  87421. Rr(i, u, -1), o.forward(u), s.forward(u);
  87422. } else if (s.ins >= 0 && (o.ins < 0 || l == o.i || o.off == 0 && (s.len < o.len || s.len == o.len && !n))) {
  87423. let u = s.len;
  87424. for (Rr(i, s.ins, -1); u; ) {
  87425. let c = Math.min(o.len, u);
  87426. o.ins >= 0 && l < o.i && o.len <= c && (Rr(i, 0, o.ins), a && Wl(a, i, o.text), l = o.i), o.forward(c), u -= c;
  87427. }
  87428. s.next();
  87429. } else if (o.ins >= 0) {
  87430. let u = 0, c = o.len;
  87431. for (; c; )
  87432. if (s.ins == -1) {
  87433. let f = Math.min(c, s.len);
  87434. u += f, c -= f, s.forward(f);
  87435. } else if (s.ins == 0 && s.len < c)
  87436. c -= s.len, s.next();
  87437. else
  87438. break;
  87439. Rr(i, u, l < o.i ? o.ins : 0), a && l < o.i && Wl(a, i, o.text), l = o.i, o.forward(o.len - c);
  87440. } else {
  87441. if (o.done && s.done)
  87442. return a ? jn.createSet(i, a) : qo.create(i);
  87443. throw new Error("Mismatched change set lengths");
  87444. }
  87445. }
  87446. function oae(t, e, n = !1) {
  87447. let r = [], i = n ? [] : null, a = new Um(t), o = new Um(e);
  87448. for (let s = !1; ; ) {
  87449. if (a.done && o.done)
  87450. return i ? jn.createSet(r, i) : qo.create(r);
  87451. if (a.ins == 0)
  87452. Rr(r, a.len, 0, s), a.next();
  87453. else if (o.len == 0 && !o.done)
  87454. Rr(r, 0, o.ins, s), i && Wl(i, r, o.text), o.next();
  87455. else {
  87456. if (a.done || o.done)
  87457. throw new Error("Mismatched change set lengths");
  87458. {
  87459. let l = Math.min(a.len2, o.len), u = r.length;
  87460. if (a.ins == -1) {
  87461. let c = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
  87462. Rr(r, l, c, s), i && c && Wl(i, r, o.text);
  87463. } else o.ins == -1 ? (Rr(r, a.off ? 0 : a.len, l, s), i && Wl(i, r, a.textBit(l))) : (Rr(r, a.off ? 0 : a.len, o.off ? 0 : o.ins, s), i && !o.off && Wl(i, r, o.text));
  87464. s = (a.ins > l || o.ins >= 0 && o.len > l) && (s || r.length > u), a.forward2(l), o.forward(l);
  87465. }
  87466. }
  87467. }
  87468. }
  87469. class Um {
  87470. constructor(e) {
  87471. this.set = e, this.i = 0, this.next();
  87472. }
  87473. next() {
  87474. let { sections: e } = this.set;
  87475. this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
  87476. }
  87477. get done() {
  87478. return this.ins == -2;
  87479. }
  87480. get len2() {
  87481. return this.ins < 0 ? this.len : this.ins;
  87482. }
  87483. get text() {
  87484. let { inserted: e } = this.set, n = this.i - 2 >> 1;
  87485. return n >= e.length ? Ft.empty : e[n];
  87486. }
  87487. textBit(e) {
  87488. let { inserted: n } = this.set, r = this.i - 2 >> 1;
  87489. return r >= n.length && !e ? Ft.empty : n[r].slice(this.off, e == null ? void 0 : this.off + e);
  87490. }
  87491. forward(e) {
  87492. e == this.len ? this.next() : (this.len -= e, this.off += e);
  87493. }
  87494. forward2(e) {
  87495. this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
  87496. }
  87497. }
  87498. class Wc {
  87499. constructor(e, n, r) {
  87500. this.from = e, this.to = n, this.flags = r;
  87501. }
  87502. /**
  87503. The anchor of the range—the side that doesn't move when you
  87504. extend it.
  87505. */
  87506. get anchor() {
  87507. return this.flags & 32 ? this.to : this.from;
  87508. }
  87509. /**
  87510. The head of the range, which is moved when the range is
  87511. [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
  87512. */
  87513. get head() {
  87514. return this.flags & 32 ? this.from : this.to;
  87515. }
  87516. /**
  87517. True when `anchor` and `head` are at the same position.
  87518. */
  87519. get empty() {
  87520. return this.from == this.to;
  87521. }
  87522. /**
  87523. If this is a cursor that is explicitly associated with the
  87524. character on one of its sides, this returns the side. -1 means
  87525. the character before its position, 1 the character after, and 0
  87526. means no association.
  87527. */
  87528. get assoc() {
  87529. return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
  87530. }
  87531. /**
  87532. The bidirectional text level associated with this cursor, if
  87533. any.
  87534. */
  87535. get bidiLevel() {
  87536. let e = this.flags & 7;
  87537. return e == 7 ? null : e;
  87538. }
  87539. /**
  87540. The goal column (stored vertical offset) associated with a
  87541. cursor. This is used to preserve the vertical position when
  87542. [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
  87543. lines of different length.
  87544. */
  87545. get goalColumn() {
  87546. let e = this.flags >> 6;
  87547. return e == 16777215 ? void 0 : e;
  87548. }
  87549. /**
  87550. Map this range through a change, producing a valid range in the
  87551. updated document.
  87552. */
  87553. map(e, n = -1) {
  87554. let r, i;
  87555. 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 Wc(r, i, this.flags);
  87556. }
  87557. /**
  87558. Extend this range to cover at least `from` to `to`.
  87559. */
  87560. extend(e, n = e) {
  87561. if (e <= this.anchor && n >= this.anchor)
  87562. return me.range(e, n);
  87563. let r = Math.abs(e - this.anchor) > Math.abs(n - this.anchor) ? e : n;
  87564. return me.range(this.anchor, r);
  87565. }
  87566. /**
  87567. Compare this range to another range.
  87568. */
  87569. eq(e, n = !1) {
  87570. return this.anchor == e.anchor && this.head == e.head && (!n || !this.empty || this.assoc == e.assoc);
  87571. }
  87572. /**
  87573. Return a JSON-serializable object representing the range.
  87574. */
  87575. toJSON() {
  87576. return { anchor: this.anchor, head: this.head };
  87577. }
  87578. /**
  87579. Convert a JSON representation of a range to a `SelectionRange`
  87580. instance.
  87581. */
  87582. static fromJSON(e) {
  87583. if (!e || typeof e.anchor != "number" || typeof e.head != "number")
  87584. throw new RangeError("Invalid JSON representation for SelectionRange");
  87585. return me.range(e.anchor, e.head);
  87586. }
  87587. /**
  87588. @internal
  87589. */
  87590. static create(e, n, r) {
  87591. return new Wc(e, n, r);
  87592. }
  87593. }
  87594. class me {
  87595. constructor(e, n) {
  87596. this.ranges = e, this.mainIndex = n;
  87597. }
  87598. /**
  87599. Map a selection through a change. Used to adjust the selection
  87600. position for changes.
  87601. */
  87602. map(e, n = -1) {
  87603. return e.empty ? this : me.create(this.ranges.map((r) => r.map(e, n)), this.mainIndex);
  87604. }
  87605. /**
  87606. Compare this selection to another selection. By default, ranges
  87607. are compared only by position. When `includeAssoc` is true,
  87608. cursor ranges must also have the same
  87609. [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
  87610. */
  87611. eq(e, n = !1) {
  87612. if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
  87613. return !1;
  87614. for (let r = 0; r < this.ranges.length; r++)
  87615. if (!this.ranges[r].eq(e.ranges[r], n))
  87616. return !1;
  87617. return !0;
  87618. }
  87619. /**
  87620. Get the primary selection range. Usually, you should make sure
  87621. your code applies to _all_ ranges, by using methods like
  87622. [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
  87623. */
  87624. get main() {
  87625. return this.ranges[this.mainIndex];
  87626. }
  87627. /**
  87628. Make sure the selection only has one range. Returns a selection
  87629. holding only the main range from this selection.
  87630. */
  87631. asSingle() {
  87632. return this.ranges.length == 1 ? this : new me([this.main], 0);
  87633. }
  87634. /**
  87635. Extend this selection with an extra range.
  87636. */
  87637. addRange(e, n = !0) {
  87638. return me.create([e].concat(this.ranges), n ? 0 : this.mainIndex + 1);
  87639. }
  87640. /**
  87641. Replace a given range with another range, and then normalize the
  87642. selection to merge and sort ranges if necessary.
  87643. */
  87644. replaceRange(e, n = this.mainIndex) {
  87645. let r = this.ranges.slice();
  87646. return r[n] = e, me.create(r, this.mainIndex);
  87647. }
  87648. /**
  87649. Convert this selection to an object that can be serialized to
  87650. JSON.
  87651. */
  87652. toJSON() {
  87653. return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
  87654. }
  87655. /**
  87656. Create a selection from a JSON representation.
  87657. */
  87658. static fromJSON(e) {
  87659. if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
  87660. throw new RangeError("Invalid JSON representation for EditorSelection");
  87661. return new me(e.ranges.map((n) => Wc.fromJSON(n)), e.main);
  87662. }
  87663. /**
  87664. Create a selection holding a single range.
  87665. */
  87666. static single(e, n = e) {
  87667. return new me([me.range(e, n)], 0);
  87668. }
  87669. /**
  87670. Sort and merge the given set of ranges, creating a valid
  87671. selection.
  87672. */
  87673. static create(e, n = 0) {
  87674. if (e.length == 0)
  87675. throw new RangeError("A selection needs at least one range");
  87676. for (let r = 0, i = 0; i < e.length; i++) {
  87677. let a = e[i];
  87678. if (a.empty ? a.from <= r : a.from < r)
  87679. return me.normalized(e.slice(), n);
  87680. r = a.to;
  87681. }
  87682. return new me(e, n);
  87683. }
  87684. /**
  87685. Create a cursor selection range at the given position. You can
  87686. safely ignore the optional arguments in most situations.
  87687. */
  87688. static cursor(e, n = 0, r, i) {
  87689. return Wc.create(e, e, (n == 0 ? 0 : n < 0 ? 8 : 16) | (r == null ? 7 : Math.min(6, r)) | (i ?? 16777215) << 6);
  87690. }
  87691. /**
  87692. Create a selection range.
  87693. */
  87694. static range(e, n, r, i) {
  87695. let a = (r ?? 16777215) << 6 | (i == null ? 7 : Math.min(6, i));
  87696. return n < e ? Wc.create(n, e, 48 | a) : Wc.create(e, n, (n > e ? 8 : 0) | a);
  87697. }
  87698. /**
  87699. @internal
  87700. */
  87701. static normalized(e, n = 0) {
  87702. let r = e[n];
  87703. e.sort((i, a) => i.from - a.from), n = e.indexOf(r);
  87704. for (let i = 1; i < e.length; i++) {
  87705. let a = e[i], o = e[i - 1];
  87706. if (a.empty ? a.from <= o.to : a.from < o.to) {
  87707. let s = o.from, l = Math.max(a.to, o.to);
  87708. i <= n && n--, e.splice(--i, 2, a.anchor > a.head ? me.range(l, s) : me.range(s, l));
  87709. }
  87710. }
  87711. return new me(e, n);
  87712. }
  87713. }
  87714. function sae(t, e) {
  87715. for (let n of t.ranges)
  87716. if (n.to > e)
  87717. throw new RangeError("Selection points outside of document");
  87718. }
  87719. let e4 = 0;
  87720. class Be {
  87721. constructor(e, n, r, i, a) {
  87722. this.combine = e, this.compareInput = n, this.compare = r, this.isStatic = i, this.id = e4++, this.default = e([]), this.extensions = typeof a == "function" ? a(this) : a;
  87723. }
  87724. /**
  87725. Returns a facet reader for this facet, which can be used to
  87726. [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
  87727. */
  87728. get reader() {
  87729. return this;
  87730. }
  87731. /**
  87732. Define a new facet.
  87733. */
  87734. static define(e = {}) {
  87735. return new Be(e.combine || ((n) => n), e.compareInput || ((n, r) => n === r), e.compare || (e.combine ? (n, r) => n === r : t4), !!e.static, e.enables);
  87736. }
  87737. /**
  87738. Returns an extension that adds the given value to this facet.
  87739. */
  87740. of(e) {
  87741. return new i1([], this, 0, e);
  87742. }
  87743. /**
  87744. Create an extension that computes a value for the facet from a
  87745. state. You must take care to declare the parts of the state that
  87746. this value depends on, since your function is only called again
  87747. for a new state when one of those parts changed.
  87748. In cases where your value depends only on a single field, you'll
  87749. want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
  87750. */
  87751. compute(e, n) {
  87752. if (this.isStatic)
  87753. throw new Error("Can't compute a static facet");
  87754. return new i1(e, this, 1, n);
  87755. }
  87756. /**
  87757. Create an extension that computes zero or more values for this
  87758. facet from a state.
  87759. */
  87760. computeN(e, n) {
  87761. if (this.isStatic)
  87762. throw new Error("Can't compute a static facet");
  87763. return new i1(e, this, 2, n);
  87764. }
  87765. from(e, n) {
  87766. return n || (n = (r) => r), this.compute([e], (r) => n(r.field(e)));
  87767. }
  87768. }
  87769. function t4(t, e) {
  87770. return t == e || t.length == e.length && t.every((n, r) => n === e[r]);
  87771. }
  87772. class i1 {
  87773. constructor(e, n, r, i) {
  87774. this.dependencies = e, this.facet = n, this.type = r, this.value = i, this.id = e4++;
  87775. }
  87776. dynamicSlot(e) {
  87777. var n;
  87778. let r = this.value, i = this.facet.compareInput, a = this.id, o = e[a] >> 1, s = this.type == 2, l = !1, u = !1, c = [];
  87779. for (let f of this.dependencies)
  87780. f == "doc" ? l = !0 : f == "selection" ? u = !0 : ((n = e[f.id]) !== null && n !== void 0 ? n : 1) & 1 || c.push(e[f.id]);
  87781. return {
  87782. create(f) {
  87783. return f.values[o] = r(f), 1;
  87784. },
  87785. update(f, d) {
  87786. if (l && d.docChanged || u && (d.docChanged || d.selection) || aM(f, c)) {
  87787. let h = r(f);
  87788. if (s ? !wH(h, f.values[o], i) : !i(h, f.values[o]))
  87789. return f.values[o] = h, 1;
  87790. }
  87791. return 0;
  87792. },
  87793. reconfigure: (f, d) => {
  87794. let h, p = d.config.address[a];
  87795. if (p != null) {
  87796. let v = rS(d, p);
  87797. if (this.dependencies.every((g) => g instanceof Be ? d.facet(g) === f.facet(g) : g instanceof ur ? d.field(g, !1) == f.field(g, !1) : !0) || (s ? wH(h = r(f), v, i) : i(h = r(f), v)))
  87798. return f.values[o] = v, 0;
  87799. } else
  87800. h = r(f);
  87801. return f.values[o] = h, 1;
  87802. }
  87803. };
  87804. }
  87805. }
  87806. function wH(t, e, n) {
  87807. if (t.length != e.length)
  87808. return !1;
  87809. for (let r = 0; r < t.length; r++)
  87810. if (!n(t[r], e[r]))
  87811. return !1;
  87812. return !0;
  87813. }
  87814. function aM(t, e) {
  87815. let n = !1;
  87816. for (let r of e)
  87817. jg(t, r) & 1 && (n = !0);
  87818. return n;
  87819. }
  87820. function Oat(t, e, n) {
  87821. 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;
  87822. function s(l) {
  87823. let u = [];
  87824. for (let c = 0; c < r.length; c++) {
  87825. let f = rS(l, r[c]);
  87826. if (i[c] == 2)
  87827. for (let d of f)
  87828. u.push(d);
  87829. else
  87830. u.push(f);
  87831. }
  87832. return e.combine(u);
  87833. }
  87834. return {
  87835. create(l) {
  87836. for (let u of r)
  87837. jg(l, u);
  87838. return l.values[o] = s(l), 1;
  87839. },
  87840. update(l, u) {
  87841. if (!aM(l, a))
  87842. return 0;
  87843. let c = s(l);
  87844. return e.compare(c, l.values[o]) ? 0 : (l.values[o] = c, 1);
  87845. },
  87846. reconfigure(l, u) {
  87847. let c = aM(l, r), f = u.config.facets[e.id], d = u.facet(e);
  87848. if (f && !c && t4(n, f))
  87849. return l.values[o] = d, 0;
  87850. let h = s(l);
  87851. return e.compare(h, d) ? (l.values[o] = d, 0) : (l.values[o] = h, 1);
  87852. }
  87853. };
  87854. }
  87855. const CH = /* @__PURE__ */ Be.define({ static: !0 });
  87856. class ur {
  87857. constructor(e, n, r, i, a) {
  87858. this.id = e, this.createF = n, this.updateF = r, this.compareF = i, this.spec = a, this.provides = void 0;
  87859. }
  87860. /**
  87861. Define a state field.
  87862. */
  87863. static define(e) {
  87864. let n = new ur(e4++, e.create, e.update, e.compare || ((r, i) => r === i), e);
  87865. return e.provide && (n.provides = e.provide(n)), n;
  87866. }
  87867. create(e) {
  87868. let n = e.facet(CH).find((r) => r.field == this);
  87869. return ((n == null ? void 0 : n.create) || this.createF)(e);
  87870. }
  87871. /**
  87872. @internal
  87873. */
  87874. slot(e) {
  87875. let n = e[this.id] >> 1;
  87876. return {
  87877. create: (r) => (r.values[n] = this.create(r), 1),
  87878. update: (r, i) => {
  87879. let a = r.values[n], o = this.updateF(a, i);
  87880. return this.compareF(a, o) ? 0 : (r.values[n] = o, 1);
  87881. },
  87882. reconfigure: (r, i) => i.config.address[this.id] != null ? (r.values[n] = i.field(this), 0) : (r.values[n] = this.create(r), 1)
  87883. };
  87884. }
  87885. /**
  87886. Returns an extension that enables this field and overrides the
  87887. way it is initialized. Can be useful when you need to provide a
  87888. non-default starting value for the field.
  87889. */
  87890. init(e) {
  87891. return [this, CH.of({ field: this, create: e })];
  87892. }
  87893. /**
  87894. State field instances can be used as
  87895. [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
  87896. given state.
  87897. */
  87898. get extension() {
  87899. return this;
  87900. }
  87901. }
  87902. const Pc = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
  87903. function Iv(t) {
  87904. return (e) => new lae(e, t);
  87905. }
  87906. const Eu = {
  87907. /**
  87908. The highest precedence level, for extensions that should end up
  87909. near the start of the precedence ordering.
  87910. */
  87911. highest: /* @__PURE__ */ Iv(Pc.highest),
  87912. /**
  87913. A higher-than-default precedence, for extensions that should
  87914. come before those with default precedence.
  87915. */
  87916. high: /* @__PURE__ */ Iv(Pc.high),
  87917. /**
  87918. The default precedence, which is also used for extensions
  87919. without an explicit precedence.
  87920. */
  87921. default: /* @__PURE__ */ Iv(Pc.default),
  87922. /**
  87923. A lower-than-default precedence.
  87924. */
  87925. low: /* @__PURE__ */ Iv(Pc.low),
  87926. /**
  87927. The lowest precedence level. Meant for things that should end up
  87928. near the end of the extension order.
  87929. */
  87930. lowest: /* @__PURE__ */ Iv(Pc.lowest)
  87931. };
  87932. class lae {
  87933. constructor(e, n) {
  87934. this.inner = e, this.prec = n;
  87935. }
  87936. }
  87937. class iy {
  87938. /**
  87939. Create an instance of this compartment to add to your [state
  87940. configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
  87941. */
  87942. of(e) {
  87943. return new oM(this, e);
  87944. }
  87945. /**
  87946. Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
  87947. reconfigures this compartment.
  87948. */
  87949. reconfigure(e) {
  87950. return iy.reconfigure.of({ compartment: this, extension: e });
  87951. }
  87952. /**
  87953. Get the current content of the compartment in the state, or
  87954. `undefined` if it isn't present.
  87955. */
  87956. get(e) {
  87957. return e.config.compartments.get(this);
  87958. }
  87959. }
  87960. class oM {
  87961. constructor(e, n) {
  87962. this.compartment = e, this.inner = n;
  87963. }
  87964. }
  87965. class nS {
  87966. constructor(e, n, r, i, a, o) {
  87967. 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; )
  87968. this.statusTemplate.push(
  87969. 0
  87970. /* SlotStatus.Unresolved */
  87971. );
  87972. }
  87973. staticFacet(e) {
  87974. let n = this.address[e.id];
  87975. return n == null ? e.default : this.staticValues[n >> 1];
  87976. }
  87977. static resolve(e, n, r) {
  87978. let i = [], a = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map();
  87979. for (let d of Sat(e, n, o))
  87980. d instanceof ur ? i.push(d) : (a[d.facet.id] || (a[d.facet.id] = [])).push(d);
  87981. let s = /* @__PURE__ */ Object.create(null), l = [], u = [];
  87982. for (let d of i)
  87983. s[d.id] = u.length << 1, u.push((h) => d.slot(h));
  87984. let c = r == null ? void 0 : r.config.facets;
  87985. for (let d in a) {
  87986. let h = a[d], p = h[0].facet, v = c && c[d] || [];
  87987. if (h.every(
  87988. (g) => g.type == 0
  87989. /* Provider.Static */
  87990. ))
  87991. if (s[p.id] = l.length << 1 | 1, t4(v, h))
  87992. l.push(r.facet(p));
  87993. else {
  87994. let g = p.combine(h.map((m) => m.value));
  87995. l.push(r && p.compare(g, r.facet(p)) ? r.facet(p) : g);
  87996. }
  87997. else {
  87998. for (let g of h)
  87999. 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)));
  88000. s[p.id] = u.length << 1, u.push((g) => Oat(g, p, h));
  88001. }
  88002. }
  88003. let f = u.map((d) => d(s));
  88004. return new nS(e, o, f, s, l, a);
  88005. }
  88006. }
  88007. function Sat(t, e, n) {
  88008. let r = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
  88009. function a(o, s) {
  88010. let l = i.get(o);
  88011. if (l != null) {
  88012. if (l <= s)
  88013. return;
  88014. let u = r[l].indexOf(o);
  88015. u > -1 && r[l].splice(u, 1), o instanceof oM && n.delete(o.compartment);
  88016. }
  88017. if (i.set(o, s), Array.isArray(o))
  88018. for (let u of o)
  88019. a(u, s);
  88020. else if (o instanceof oM) {
  88021. if (n.has(o.compartment))
  88022. throw new RangeError("Duplicate use of compartment in extensions");
  88023. let u = e.get(o.compartment) || o.inner;
  88024. n.set(o.compartment, u), a(u, s);
  88025. } else if (o instanceof lae)
  88026. a(o.inner, o.prec);
  88027. else if (o instanceof ur)
  88028. r[s].push(o), o.provides && a(o.provides, s);
  88029. else if (o instanceof i1)
  88030. r[s].push(o), o.facet.extensions && a(o.facet.extensions, Pc.default);
  88031. else {
  88032. let u = o.extension;
  88033. if (!u)
  88034. throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
  88035. a(u, s);
  88036. }
  88037. }
  88038. return a(t, Pc.default), r.reduce((o, s) => o.concat(s));
  88039. }
  88040. function jg(t, e) {
  88041. if (e & 1)
  88042. return 2;
  88043. let n = e >> 1, r = t.status[n];
  88044. if (r == 4)
  88045. throw new Error("Cyclic dependency between fields and/or facets");
  88046. if (r & 2)
  88047. return r;
  88048. t.status[n] = 4;
  88049. let i = t.computeSlot(t, t.config.dynamicSlots[n]);
  88050. return t.status[n] = 2 | i;
  88051. }
  88052. function rS(t, e) {
  88053. return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1];
  88054. }
  88055. const uae = /* @__PURE__ */ Be.define(), sM = /* @__PURE__ */ Be.define({
  88056. combine: (t) => t.some((e) => e),
  88057. static: !0
  88058. }), cae = /* @__PURE__ */ Be.define({
  88059. combine: (t) => t.length ? t[0] : void 0,
  88060. static: !0
  88061. }), fae = /* @__PURE__ */ Be.define(), dae = /* @__PURE__ */ Be.define(), hae = /* @__PURE__ */ Be.define(), pae = /* @__PURE__ */ Be.define({
  88062. combine: (t) => t.length ? t[0] : !1
  88063. });
  88064. class cl {
  88065. /**
  88066. @internal
  88067. */
  88068. constructor(e, n) {
  88069. this.type = e, this.value = n;
  88070. }
  88071. /**
  88072. Define a new type of annotation.
  88073. */
  88074. static define() {
  88075. return new xat();
  88076. }
  88077. }
  88078. class xat {
  88079. /**
  88080. Create an instance of this annotation.
  88081. */
  88082. of(e) {
  88083. return new cl(this, e);
  88084. }
  88085. }
  88086. class wat {
  88087. /**
  88088. @internal
  88089. */
  88090. constructor(e) {
  88091. this.map = e;
  88092. }
  88093. /**
  88094. Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
  88095. type.
  88096. */
  88097. of(e) {
  88098. return new dt(this, e);
  88099. }
  88100. }
  88101. class dt {
  88102. /**
  88103. @internal
  88104. */
  88105. constructor(e, n) {
  88106. this.type = e, this.value = n;
  88107. }
  88108. /**
  88109. Map this effect through a position mapping. Will return
  88110. `undefined` when that ends up deleting the effect.
  88111. */
  88112. map(e) {
  88113. let n = this.type.map(this.value, e);
  88114. return n === void 0 ? void 0 : n == this.value ? this : new dt(this.type, n);
  88115. }
  88116. /**
  88117. Tells you whether this effect object is of a given
  88118. [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
  88119. */
  88120. is(e) {
  88121. return this.type == e;
  88122. }
  88123. /**
  88124. Define a new effect type. The type parameter indicates the type
  88125. of values that his effect holds. It should be a type that
  88126. doesn't include `undefined`, since that is used in
  88127. [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
  88128. removed.
  88129. */
  88130. static define(e = {}) {
  88131. return new wat(e.map || ((n) => n));
  88132. }
  88133. /**
  88134. Map an array of effects through a change set.
  88135. */
  88136. static mapEffects(e, n) {
  88137. if (!e.length)
  88138. return e;
  88139. let r = [];
  88140. for (let i of e) {
  88141. let a = i.map(n);
  88142. a && r.push(a);
  88143. }
  88144. return r;
  88145. }
  88146. }
  88147. dt.reconfigure = /* @__PURE__ */ dt.define();
  88148. dt.appendConfig = /* @__PURE__ */ dt.define();
  88149. class Fn {
  88150. constructor(e, n, r, i, a, o) {
  88151. 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 && sae(r, n.newLength), a.some((s) => s.type == Fn.time) || (this.annotations = a.concat(Fn.time.of(Date.now())));
  88152. }
  88153. /**
  88154. @internal
  88155. */
  88156. static create(e, n, r, i, a, o) {
  88157. return new Fn(e, n, r, i, a, o);
  88158. }
  88159. /**
  88160. The new document produced by the transaction. Contrary to
  88161. [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
  88162. force the entire new state to be computed right away, so it is
  88163. recommended that [transaction
  88164. filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
  88165. when they need to look at the new document.
  88166. */
  88167. get newDoc() {
  88168. return this._doc || (this._doc = this.changes.apply(this.startState.doc));
  88169. }
  88170. /**
  88171. The new selection produced by the transaction. If
  88172. [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
  88173. this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
  88174. current selection through the changes made by the transaction.
  88175. */
  88176. get newSelection() {
  88177. return this.selection || this.startState.selection.map(this.changes);
  88178. }
  88179. /**
  88180. The new state created by the transaction. Computed on demand
  88181. (but retained for subsequent access), so it is recommended not to
  88182. access it in [transaction
  88183. filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
  88184. */
  88185. get state() {
  88186. return this._state || this.startState.applyTransaction(this), this._state;
  88187. }
  88188. /**
  88189. Get the value of the given annotation type, if any.
  88190. */
  88191. annotation(e) {
  88192. for (let n of this.annotations)
  88193. if (n.type == e)
  88194. return n.value;
  88195. }
  88196. /**
  88197. Indicates whether the transaction changed the document.
  88198. */
  88199. get docChanged() {
  88200. return !this.changes.empty;
  88201. }
  88202. /**
  88203. Indicates whether this transaction reconfigures the state
  88204. (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
  88205. with a top-level configuration
  88206. [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
  88207. */
  88208. get reconfigured() {
  88209. return this.startState.config != this.state.config;
  88210. }
  88211. /**
  88212. Returns true if the transaction has a [user
  88213. event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
  88214. or more specific than `event`. For example, if the transaction
  88215. has `"select.pointer"` as user event, `"select"` and
  88216. `"select.pointer"` will match it.
  88217. */
  88218. isUserEvent(e) {
  88219. let n = this.annotation(Fn.userEvent);
  88220. return !!(n && (n == e || n.length > e.length && n.slice(0, e.length) == e && n[e.length] == "."));
  88221. }
  88222. }
  88223. Fn.time = /* @__PURE__ */ cl.define();
  88224. Fn.userEvent = /* @__PURE__ */ cl.define();
  88225. Fn.addToHistory = /* @__PURE__ */ cl.define();
  88226. Fn.remote = /* @__PURE__ */ cl.define();
  88227. function Cat(t, e) {
  88228. let n = [];
  88229. for (let r = 0, i = 0; ; ) {
  88230. let a, o;
  88231. if (r < t.length && (i == e.length || e[i] >= t[r]))
  88232. a = t[r++], o = t[r++];
  88233. else if (i < e.length)
  88234. a = e[i++], o = e[i++];
  88235. else
  88236. return n;
  88237. !n.length || n[n.length - 1] < a ? n.push(a, o) : n[n.length - 1] < o && (n[n.length - 1] = o);
  88238. }
  88239. }
  88240. function vae(t, e, n) {
  88241. var r;
  88242. let i, a, o;
  88243. return n ? (i = e.changes, a = jn.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)), {
  88244. changes: o,
  88245. selection: e.selection ? e.selection.map(a) : (r = t.selection) === null || r === void 0 ? void 0 : r.map(i),
  88246. effects: dt.mapEffects(t.effects, i).concat(dt.mapEffects(e.effects, a)),
  88247. annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations,
  88248. scrollIntoView: t.scrollIntoView || e.scrollIntoView
  88249. };
  88250. }
  88251. function lM(t, e, n) {
  88252. let r = e.selection, i = ch(e.annotations);
  88253. return e.userEvent && (i = i.concat(Fn.userEvent.of(e.userEvent))), {
  88254. changes: e.changes instanceof jn ? e.changes : jn.of(e.changes || [], n, t.facet(cae)),
  88255. selection: r && (r instanceof me ? r : me.single(r.anchor, r.head)),
  88256. effects: ch(e.effects),
  88257. annotations: i,
  88258. scrollIntoView: !!e.scrollIntoView
  88259. };
  88260. }
  88261. function gae(t, e, n) {
  88262. let r = lM(t, e.length ? e[0] : {}, t.doc.length);
  88263. e.length && e[0].filter === !1 && (n = !1);
  88264. for (let a = 1; a < e.length; a++) {
  88265. e[a].filter === !1 && (n = !1);
  88266. let o = !!e[a].sequential;
  88267. r = vae(r, lM(t, e[a], o ? r.changes.newLength : t.doc.length), o);
  88268. }
  88269. let i = Fn.create(t, r.changes, r.selection, r.effects, r.annotations, r.scrollIntoView);
  88270. return Pat(n ? Tat(i) : i);
  88271. }
  88272. function Tat(t) {
  88273. let e = t.startState, n = !0;
  88274. for (let i of e.facet(fae)) {
  88275. let a = i(t);
  88276. if (a === !1) {
  88277. n = !1;
  88278. break;
  88279. }
  88280. Array.isArray(a) && (n = n === !0 ? a : Cat(n, a));
  88281. }
  88282. if (n !== !0) {
  88283. let i, a;
  88284. if (n === !1)
  88285. a = t.changes.invertedDesc, i = jn.empty(e.doc.length);
  88286. else {
  88287. let o = t.changes.filter(n);
  88288. i = o.changes, a = o.filtered.mapDesc(o.changes).invertedDesc;
  88289. }
  88290. t = Fn.create(e, i, t.selection && t.selection.map(a), dt.mapEffects(t.effects, a), t.annotations, t.scrollIntoView);
  88291. }
  88292. let r = e.facet(dae);
  88293. for (let i = r.length - 1; i >= 0; i--) {
  88294. let a = r[i](t);
  88295. a instanceof Fn ? t = a : Array.isArray(a) && a.length == 1 && a[0] instanceof Fn ? t = a[0] : t = gae(e, ch(a), !1);
  88296. }
  88297. return t;
  88298. }
  88299. function Pat(t) {
  88300. let e = t.startState, n = e.facet(hae), r = t;
  88301. for (let i = n.length - 1; i >= 0; i--) {
  88302. let a = n[i](t);
  88303. a && Object.keys(a).length && (r = vae(r, lM(e, a, t.changes.newLength), !0));
  88304. }
  88305. return r == t ? t : Fn.create(e, t.changes, t.selection, r.effects, r.annotations, r.scrollIntoView);
  88306. }
  88307. const $at = [];
  88308. function ch(t) {
  88309. return t == null ? $at : Array.isArray(t) ? t : [t];
  88310. }
  88311. var yn = /* @__PURE__ */ function(t) {
  88312. return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t;
  88313. }(yn || (yn = {}));
  88314. const Aat = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
  88315. let uM;
  88316. try {
  88317. uM = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
  88318. } catch {
  88319. }
  88320. function Eat(t) {
  88321. if (uM)
  88322. return uM.test(t);
  88323. for (let e = 0; e < t.length; e++) {
  88324. let n = t[e];
  88325. if (/\w/.test(n) || n > "€" && (n.toUpperCase() != n.toLowerCase() || Aat.test(n)))
  88326. return !0;
  88327. }
  88328. return !1;
  88329. }
  88330. function Mat(t) {
  88331. return (e) => {
  88332. if (!/\S/.test(e))
  88333. return yn.Space;
  88334. if (Eat(e))
  88335. return yn.Word;
  88336. for (let n = 0; n < t.length; n++)
  88337. if (e.indexOf(t[n]) > -1)
  88338. return yn.Word;
  88339. return yn.Other;
  88340. };
  88341. }
  88342. class At {
  88343. constructor(e, n, r, i, a, o) {
  88344. this.config = e, this.doc = n, this.selection = r, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = a, o && (o._state = this);
  88345. for (let s = 0; s < this.config.dynamicSlots.length; s++)
  88346. jg(this, s << 1);
  88347. this.computeSlot = null;
  88348. }
  88349. field(e, n = !0) {
  88350. let r = this.config.address[e.id];
  88351. if (r == null) {
  88352. if (n)
  88353. throw new RangeError("Field is not present in this state");
  88354. return;
  88355. }
  88356. return jg(this, r), rS(this, r);
  88357. }
  88358. /**
  88359. Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
  88360. state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
  88361. can be passed. Unless
  88362. [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
  88363. [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
  88364. are assumed to start in the _current_ document (not the document
  88365. produced by previous specs), and its
  88366. [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
  88367. [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
  88368. to the document created by its _own_ changes. The resulting
  88369. transaction contains the combined effect of all the different
  88370. specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
  88371. specs take precedence over earlier ones.
  88372. */
  88373. update(...e) {
  88374. return gae(this, e, !0);
  88375. }
  88376. /**
  88377. @internal
  88378. */
  88379. applyTransaction(e) {
  88380. let n = this.config, { base: r, compartments: i } = n;
  88381. for (let s of e.effects)
  88382. s.is(iy.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(dt.reconfigure) ? (n = null, r = s.value) : s.is(dt.appendConfig) && (n = null, r = ch(r).concat(s.value));
  88383. let a;
  88384. n ? a = e.startState.values.slice() : (n = nS.resolve(r, i, this), a = new At(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values);
  88385. let o = e.startState.facet(sM) ? e.newSelection : e.newSelection.asSingle();
  88386. new At(n, e.newDoc, o, a, (s, l) => l.update(s, e), e);
  88387. }
  88388. /**
  88389. Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
  88390. replaces every selection range with the given content.
  88391. */
  88392. replaceSelection(e) {
  88393. return typeof e == "string" && (e = this.toText(e)), this.changeByRange((n) => ({
  88394. changes: { from: n.from, to: n.to, insert: e },
  88395. range: me.cursor(n.from + e.length)
  88396. }));
  88397. }
  88398. /**
  88399. Create a set of changes and a new selection by running the given
  88400. function for each range in the active selection. The function
  88401. can return an optional set of changes (in the coordinate space
  88402. of the start document), plus an updated range (in the coordinate
  88403. space of the document produced by the call's own changes). This
  88404. method will merge all the changes and ranges into a single
  88405. changeset and selection, and return it as a [transaction
  88406. spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
  88407. [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
  88408. */
  88409. changeByRange(e) {
  88410. let n = this.selection, r = e(n.ranges[0]), i = this.changes(r.changes), a = [r.range], o = ch(r.effects);
  88411. for (let s = 1; s < n.ranges.length; s++) {
  88412. let l = e(n.ranges[s]), u = this.changes(l.changes), c = u.map(i);
  88413. for (let d = 0; d < s; d++)
  88414. a[d] = a[d].map(c);
  88415. let f = i.mapDesc(u, !0);
  88416. a.push(l.range.map(f)), i = i.compose(c), o = dt.mapEffects(o, c).concat(dt.mapEffects(ch(l.effects), f));
  88417. }
  88418. return {
  88419. changes: i,
  88420. selection: me.create(a, n.mainIndex),
  88421. effects: o
  88422. };
  88423. }
  88424. /**
  88425. Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
  88426. description, taking the state's document length and line
  88427. separator into account.
  88428. */
  88429. changes(e = []) {
  88430. return e instanceof jn ? e : jn.of(e, this.doc.length, this.facet(At.lineSeparator));
  88431. }
  88432. /**
  88433. Using the state's [line
  88434. separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
  88435. [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
  88436. */
  88437. toText(e) {
  88438. return Ft.of(e.split(this.facet(At.lineSeparator) || nM));
  88439. }
  88440. /**
  88441. Return the given range of the document as a string.
  88442. */
  88443. sliceDoc(e = 0, n = this.doc.length) {
  88444. return this.doc.sliceString(e, n, this.lineBreak);
  88445. }
  88446. /**
  88447. Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
  88448. */
  88449. facet(e) {
  88450. let n = this.config.address[e.id];
  88451. return n == null ? e.default : (jg(this, n), rS(this, n));
  88452. }
  88453. /**
  88454. Convert this state to a JSON-serializable object. When custom
  88455. fields should be serialized, you can pass them in as an object
  88456. mapping property names (in the resulting object, which should
  88457. not use `doc` or `selection`) to fields.
  88458. */
  88459. toJSON(e) {
  88460. let n = {
  88461. doc: this.sliceDoc(),
  88462. selection: this.selection.toJSON()
  88463. };
  88464. if (e)
  88465. for (let r in e) {
  88466. let i = e[r];
  88467. i instanceof ur && this.config.address[i.id] != null && (n[r] = i.spec.toJSON(this.field(e[r]), this));
  88468. }
  88469. return n;
  88470. }
  88471. /**
  88472. Deserialize a state from its JSON representation. When custom
  88473. fields should be deserialized, pass the same object you passed
  88474. to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
  88475. third argument.
  88476. */
  88477. static fromJSON(e, n = {}, r) {
  88478. if (!e || typeof e.doc != "string")
  88479. throw new RangeError("Invalid JSON representation for EditorState");
  88480. let i = [];
  88481. if (r) {
  88482. for (let a in r)
  88483. if (Object.prototype.hasOwnProperty.call(e, a)) {
  88484. let o = r[a], s = e[a];
  88485. i.push(o.init((l) => o.spec.fromJSON(s, l)));
  88486. }
  88487. }
  88488. return At.create({
  88489. doc: e.doc,
  88490. selection: me.fromJSON(e.selection),
  88491. extensions: n.extensions ? i.concat([n.extensions]) : i
  88492. });
  88493. }
  88494. /**
  88495. Create a new state. You'll usually only need this when
  88496. initializing an editor—updated states are created by applying
  88497. transactions.
  88498. */
  88499. static create(e = {}) {
  88500. let n = nS.resolve(e.extensions || [], /* @__PURE__ */ new Map()), r = e.doc instanceof Ft ? e.doc : Ft.of((e.doc || "").split(n.staticFacet(At.lineSeparator) || nM)), i = e.selection ? e.selection instanceof me ? e.selection : me.single(e.selection.anchor, e.selection.head) : me.single(0);
  88501. return sae(i, r.length), n.staticFacet(sM) || (i = i.asSingle()), new At(n, r, i, n.dynamicSlots.map(() => null), (a, o) => o.create(a), null);
  88502. }
  88503. /**
  88504. The size (in columns) of a tab in the document, determined by
  88505. the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
  88506. */
  88507. get tabSize() {
  88508. return this.facet(At.tabSize);
  88509. }
  88510. /**
  88511. Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
  88512. string for this state.
  88513. */
  88514. get lineBreak() {
  88515. return this.facet(At.lineSeparator) || `
  88516. `;
  88517. }
  88518. /**
  88519. Returns true when the editor is
  88520. [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
  88521. */
  88522. get readOnly() {
  88523. return this.facet(pae);
  88524. }
  88525. /**
  88526. Look up a translation for the given phrase (via the
  88527. [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
  88528. original string if no translation is found.
  88529. If additional arguments are passed, they will be inserted in
  88530. place of markers like `$1` (for the first value) and `$2`, etc.
  88531. A single `$` is equivalent to `$1`, and `$$` will produce a
  88532. literal dollar sign.
  88533. */
  88534. phrase(e, ...n) {
  88535. for (let r of this.facet(At.phrases))
  88536. if (Object.prototype.hasOwnProperty.call(r, e)) {
  88537. e = r[e];
  88538. break;
  88539. }
  88540. return n.length && (e = e.replace(/\$(\$|\d*)/g, (r, i) => {
  88541. if (i == "$")
  88542. return "$";
  88543. let a = +(i || 1);
  88544. return !a || a > n.length ? r : n[a - 1];
  88545. })), e;
  88546. }
  88547. /**
  88548. Find the values for a given language data field, provided by the
  88549. the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
  88550. Examples of language data fields are...
  88551. - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
  88552. comment syntax.
  88553. - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
  88554. for providing language-specific completion sources.
  88555. - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
  88556. characters that should be considered part of words in this
  88557. language.
  88558. - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
  88559. bracket closing behavior.
  88560. */
  88561. languageDataAt(e, n, r = -1) {
  88562. let i = [];
  88563. for (let a of this.facet(uae))
  88564. for (let o of a(this, n, r))
  88565. Object.prototype.hasOwnProperty.call(o, e) && i.push(o[e]);
  88566. return i;
  88567. }
  88568. /**
  88569. Return a function that can categorize strings (expected to
  88570. represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
  88571. into one of:
  88572. - Word (contains an alphanumeric character or a character
  88573. explicitly listed in the local language's `"wordChars"`
  88574. language data, which should be a string)
  88575. - Space (contains only whitespace)
  88576. - Other (anything else)
  88577. */
  88578. charCategorizer(e) {
  88579. return Mat(this.languageDataAt("wordChars", e).join(""));
  88580. }
  88581. /**
  88582. Find the word at the given position, meaning the range
  88583. containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
  88584. around it. If no word characters are adjacent to the position,
  88585. this returns null.
  88586. */
  88587. wordAt(e) {
  88588. let { text: n, from: r, length: i } = this.doc.lineAt(e), a = this.charCategorizer(e), o = e - r, s = e - r;
  88589. for (; o > 0; ) {
  88590. let l = _r(n, o, !1);
  88591. if (a(n.slice(l, o)) != yn.Word)
  88592. break;
  88593. o = l;
  88594. }
  88595. for (; s < i; ) {
  88596. let l = _r(n, s);
  88597. if (a(n.slice(s, l)) != yn.Word)
  88598. break;
  88599. s = l;
  88600. }
  88601. return o == s ? null : me.range(o + r, s + r);
  88602. }
  88603. }
  88604. At.allowMultipleSelections = sM;
  88605. At.tabSize = /* @__PURE__ */ Be.define({
  88606. combine: (t) => t.length ? t[0] : 4
  88607. });
  88608. At.lineSeparator = cae;
  88609. At.readOnly = pae;
  88610. At.phrases = /* @__PURE__ */ Be.define({
  88611. compare(t, e) {
  88612. let n = Object.keys(t), r = Object.keys(e);
  88613. return n.length == r.length && n.every((i) => t[i] == e[i]);
  88614. }
  88615. });
  88616. At.languageData = uae;
  88617. At.changeFilter = fae;
  88618. At.transactionFilter = dae;
  88619. At.transactionExtender = hae;
  88620. iy.reconfigure = /* @__PURE__ */ dt.define();
  88621. function ds(t, e, n = {}) {
  88622. let r = {};
  88623. for (let i of t)
  88624. for (let a of Object.keys(i)) {
  88625. let o = i[a], s = r[a];
  88626. if (s === void 0)
  88627. r[a] = o;
  88628. else if (!(s === o || o === void 0)) if (Object.hasOwnProperty.call(n, a))
  88629. r[a] = n[a](s, o);
  88630. else
  88631. throw new Error("Config merge conflict for field " + a);
  88632. }
  88633. for (let i in e)
  88634. r[i] === void 0 && (r[i] = e[i]);
  88635. return r;
  88636. }
  88637. class Cf {
  88638. /**
  88639. Compare this value with another value. Used when comparing
  88640. rangesets. The default implementation compares by identity.
  88641. Unless you are only creating a fixed number of unique instances
  88642. of your value type, it is a good idea to implement this
  88643. properly.
  88644. */
  88645. eq(e) {
  88646. return this == e;
  88647. }
  88648. /**
  88649. Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
  88650. */
  88651. range(e, n = e) {
  88652. return cM.create(e, n, this);
  88653. }
  88654. }
  88655. Cf.prototype.startSide = Cf.prototype.endSide = 0;
  88656. Cf.prototype.point = !1;
  88657. Cf.prototype.mapMode = yr.TrackDel;
  88658. let cM = class mae {
  88659. constructor(e, n, r) {
  88660. this.from = e, this.to = n, this.value = r;
  88661. }
  88662. /**
  88663. @internal
  88664. */
  88665. static create(e, n, r) {
  88666. return new mae(e, n, r);
  88667. }
  88668. };
  88669. function fM(t, e) {
  88670. return t.from - e.from || t.value.startSide - e.value.startSide;
  88671. }
  88672. class n4 {
  88673. constructor(e, n, r, i) {
  88674. this.from = e, this.to = n, this.value = r, this.maxPoint = i;
  88675. }
  88676. get length() {
  88677. return this.to[this.to.length - 1];
  88678. }
  88679. // Find the index of the given position and side. Use the ranges'
  88680. // `from` pos when `end == false`, `to` when `end == true`.
  88681. findIndex(e, n, r, i = 0) {
  88682. let a = r ? this.to : this.from;
  88683. for (let o = i, s = a.length; ; ) {
  88684. if (o == s)
  88685. return o;
  88686. let l = o + s >> 1, u = a[l] - e || (r ? this.value[l].endSide : this.value[l].startSide) - n;
  88687. if (l == o)
  88688. return u >= 0 ? o : s;
  88689. u >= 0 ? s = l : o = l + 1;
  88690. }
  88691. }
  88692. between(e, n, r, i) {
  88693. for (let a = this.findIndex(n, -1e9, !0), o = this.findIndex(r, 1e9, !1, a); a < o; a++)
  88694. if (i(this.from[a] + e, this.to[a] + e, this.value[a]) === !1)
  88695. return !1;
  88696. }
  88697. map(e, n) {
  88698. let r = [], i = [], a = [], o = -1, s = -1;
  88699. for (let l = 0; l < this.value.length; l++) {
  88700. let u = this.value[l], c = this.from[l] + e, f = this.to[l] + e, d, h;
  88701. if (c == f) {
  88702. let p = n.mapPos(c, u.startSide, u.mapMode);
  88703. if (p == null || (d = h = p, u.startSide != u.endSide && (h = n.mapPos(c, u.endSide), h < d)))
  88704. continue;
  88705. } else if (d = n.mapPos(c, u.startSide), h = n.mapPos(f, u.endSide), d > h || d == h && u.startSide > 0 && u.endSide <= 0)
  88706. continue;
  88707. (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));
  88708. }
  88709. return { mapped: r.length ? new n4(i, a, r, s) : null, pos: o };
  88710. }
  88711. }
  88712. class Vt {
  88713. constructor(e, n, r, i) {
  88714. this.chunkPos = e, this.chunk = n, this.nextLayer = r, this.maxPoint = i;
  88715. }
  88716. /**
  88717. @internal
  88718. */
  88719. static create(e, n, r, i) {
  88720. return new Vt(e, n, r, i);
  88721. }
  88722. /**
  88723. @internal
  88724. */
  88725. get length() {
  88726. let e = this.chunk.length - 1;
  88727. return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
  88728. }
  88729. /**
  88730. The number of ranges in the set.
  88731. */
  88732. get size() {
  88733. if (this.isEmpty)
  88734. return 0;
  88735. let e = this.nextLayer.size;
  88736. for (let n of this.chunk)
  88737. e += n.value.length;
  88738. return e;
  88739. }
  88740. /**
  88741. @internal
  88742. */
  88743. chunkEnd(e) {
  88744. return this.chunkPos[e] + this.chunk[e].length;
  88745. }
  88746. /**
  88747. Update the range set, optionally adding new ranges or filtering
  88748. out existing ones.
  88749. (Note: The type parameter is just there as a kludge to work
  88750. around TypeScript variance issues that prevented `RangeSet<X>`
  88751. from being a subtype of `RangeSet<Y>` when `X` is a subtype of
  88752. `Y`.)
  88753. */
  88754. update(e) {
  88755. let { add: n = [], sort: r = !1, filterFrom: i = 0, filterTo: a = this.length } = e, o = e.filter;
  88756. if (n.length == 0 && !o)
  88757. return this;
  88758. if (r && (n = n.slice().sort(fM)), this.isEmpty)
  88759. return n.length ? Vt.of(n) : this;
  88760. let s = new yae(this, null, -1).goto(0), l = 0, u = [], c = new hu();
  88761. for (; s.value || l < n.length; )
  88762. if (l < n.length && (s.from - n[l].from || s.startSide - n[l].value.startSide) >= 0) {
  88763. let f = n[l++];
  88764. c.addInner(f.from, f.to, f.value) || u.push(f);
  88765. } 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(cM.create(s.from, s.to, s.value))), s.next());
  88766. return c.finishInner(this.nextLayer.isEmpty && !u.length ? Vt.empty : this.nextLayer.update({ add: u, filter: o, filterFrom: i, filterTo: a }));
  88767. }
  88768. /**
  88769. Map this range set through a set of changes, return the new set.
  88770. */
  88771. map(e) {
  88772. if (e.empty || this.isEmpty)
  88773. return this;
  88774. let n = [], r = [], i = -1;
  88775. for (let o = 0; o < this.chunk.length; o++) {
  88776. let s = this.chunkPos[o], l = this.chunk[o], u = e.touchesRange(s, s + l.length);
  88777. if (u === !1)
  88778. i = Math.max(i, l.maxPoint), n.push(l), r.push(e.mapPos(s));
  88779. else if (u === !0) {
  88780. let { mapped: c, pos: f } = l.map(s, e);
  88781. c && (i = Math.max(i, c.maxPoint), n.push(c), r.push(f));
  88782. }
  88783. }
  88784. let a = this.nextLayer.map(e);
  88785. return n.length == 0 ? a : new Vt(r, n, a || Vt.empty, i);
  88786. }
  88787. /**
  88788. Iterate over the ranges that touch the region `from` to `to`,
  88789. calling `f` for each. There is no guarantee that the ranges will
  88790. be reported in any specific order. When the callback returns
  88791. `false`, iteration stops.
  88792. */
  88793. between(e, n, r) {
  88794. if (!this.isEmpty) {
  88795. for (let i = 0; i < this.chunk.length; i++) {
  88796. let a = this.chunkPos[i], o = this.chunk[i];
  88797. if (n >= a && e <= a + o.length && o.between(a, e - a, n - a, r) === !1)
  88798. return;
  88799. }
  88800. this.nextLayer.between(e, n, r);
  88801. }
  88802. }
  88803. /**
  88804. Iterate over the ranges in this set, in order, including all
  88805. ranges that end at or after `from`.
  88806. */
  88807. iter(e = 0) {
  88808. return Xm.from([this]).goto(e);
  88809. }
  88810. /**
  88811. @internal
  88812. */
  88813. get isEmpty() {
  88814. return this.nextLayer == this;
  88815. }
  88816. /**
  88817. Iterate over the ranges in a collection of sets, in order,
  88818. starting from `from`.
  88819. */
  88820. static iter(e, n = 0) {
  88821. return Xm.from(e).goto(n);
  88822. }
  88823. /**
  88824. Iterate over two groups of sets, calling methods on `comparator`
  88825. to notify it of possible differences.
  88826. */
  88827. static compare(e, n, r, i, a = -1) {
  88828. 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 = TH(o, s, r), u = new Dv(o, l, a), c = new Dv(s, l, a);
  88829. r.iterGaps((f, d, h) => PH(u, f, c, d, h, i)), r.empty && r.length == 0 && PH(u, 0, c, 0, 0, i);
  88830. }
  88831. /**
  88832. Compare the contents of two groups of range sets, returning true
  88833. if they are equivalent in the given range.
  88834. */
  88835. static eq(e, n, r = 0, i) {
  88836. i == null && (i = 999999999);
  88837. let a = e.filter((c) => !c.isEmpty && n.indexOf(c) < 0), o = n.filter((c) => !c.isEmpty && e.indexOf(c) < 0);
  88838. if (a.length != o.length)
  88839. return !1;
  88840. if (!a.length)
  88841. return !0;
  88842. let s = TH(a, o), l = new Dv(a, s, 0).goto(r), u = new Dv(o, s, 0).goto(r);
  88843. for (; ; ) {
  88844. if (l.to != u.to || !dM(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point)))
  88845. return !1;
  88846. if (l.to > i)
  88847. return !0;
  88848. l.next(), u.next();
  88849. }
  88850. }
  88851. /**
  88852. Iterate over a group of range sets at the same time, notifying
  88853. the iterator about the ranges covering every given piece of
  88854. content. Returns the open count (see
  88855. [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
  88856. of the iteration.
  88857. */
  88858. static spans(e, n, r, i, a = -1) {
  88859. let o = new Dv(e, null, a).goto(n), s = n, l = o.openStart;
  88860. for (; ; ) {
  88861. let u = Math.min(o.to, r);
  88862. if (o.point) {
  88863. let c = o.activeForPoint(o.to), f = o.pointFrom < n ? c.length + 1 : o.point.startSide < 0 ? c.length : Math.min(c.length, l);
  88864. i.point(s, u, o.point, c, f, o.pointRank), l = Math.min(o.openEnd(u), c.length);
  88865. } else u > s && (i.span(s, u, o.active, l), l = o.openEnd(u));
  88866. if (o.to > r)
  88867. return l + (o.point && o.to > r ? 1 : 0);
  88868. s = o.to, o.next();
  88869. }
  88870. }
  88871. /**
  88872. Create a range set for the given range or array of ranges. By
  88873. default, this expects the ranges to be _sorted_ (by start
  88874. position and, if two start at the same position,
  88875. `value.startSide`). You can pass `true` as second argument to
  88876. cause the method to sort them.
  88877. */
  88878. static of(e, n = !1) {
  88879. let r = new hu();
  88880. for (let i of e instanceof cM ? [e] : n ? Iat(e) : e)
  88881. r.add(i.from, i.to, i.value);
  88882. return r.finish();
  88883. }
  88884. /**
  88885. Join an array of range sets into a single set.
  88886. */
  88887. static join(e) {
  88888. if (!e.length)
  88889. return Vt.empty;
  88890. let n = e[e.length - 1];
  88891. for (let r = e.length - 2; r >= 0; r--)
  88892. for (let i = e[r]; i != Vt.empty; i = i.nextLayer)
  88893. n = new Vt(i.chunkPos, i.chunk, n, Math.max(i.maxPoint, n.maxPoint));
  88894. return n;
  88895. }
  88896. }
  88897. Vt.empty = /* @__PURE__ */ new Vt([], [], null, -1);
  88898. function Iat(t) {
  88899. if (t.length > 1)
  88900. for (let e = t[0], n = 1; n < t.length; n++) {
  88901. let r = t[n];
  88902. if (fM(e, r) > 0)
  88903. return t.slice().sort(fM);
  88904. e = r;
  88905. }
  88906. return t;
  88907. }
  88908. Vt.empty.nextLayer = Vt.empty;
  88909. class hu {
  88910. finishChunk(e) {
  88911. this.chunks.push(new n4(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 = []);
  88912. }
  88913. /**
  88914. Create an empty builder.
  88915. */
  88916. constructor() {
  88917. 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;
  88918. }
  88919. /**
  88920. Add a range. Ranges should be added in sorted (by `from` and
  88921. `value.startSide`) order.
  88922. */
  88923. add(e, n, r) {
  88924. this.addInner(e, n, r) || (this.nextLayer || (this.nextLayer = new hu())).add(e, n, r);
  88925. }
  88926. /**
  88927. @internal
  88928. */
  88929. addInner(e, n, r) {
  88930. let i = e - this.lastTo || r.startSide - this.last.endSide;
  88931. if (i <= 0 && (e - this.lastFrom || r.startSide - this.last.startSide) < 0)
  88932. throw new Error("Ranges must be added sorted by `from` position and `startSide`");
  88933. 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);
  88934. }
  88935. /**
  88936. @internal
  88937. */
  88938. addChunk(e, n) {
  88939. if ((e - this.lastTo || n.value[0].startSide - this.last.endSide) < 0)
  88940. return !1;
  88941. this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, n.maxPoint), this.chunks.push(n), this.chunkPos.push(e);
  88942. let r = n.value.length - 1;
  88943. return this.last = n.value[r], this.lastFrom = n.from[r] + e, this.lastTo = n.to[r] + e, !0;
  88944. }
  88945. /**
  88946. Finish the range set. Returns the new set. The builder can't be
  88947. used anymore after this has been called.
  88948. */
  88949. finish() {
  88950. return this.finishInner(Vt.empty);
  88951. }
  88952. /**
  88953. @internal
  88954. */
  88955. finishInner(e) {
  88956. if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
  88957. return e;
  88958. let n = Vt.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
  88959. return this.from = null, n;
  88960. }
  88961. }
  88962. function TH(t, e, n) {
  88963. let r = /* @__PURE__ */ new Map();
  88964. for (let a of t)
  88965. for (let o = 0; o < a.chunk.length; o++)
  88966. a.chunk[o].maxPoint <= 0 && r.set(a.chunk[o], a.chunkPos[o]);
  88967. let i = /* @__PURE__ */ new Set();
  88968. for (let a of e)
  88969. for (let o = 0; o < a.chunk.length; o++) {
  88970. let s = r.get(a.chunk[o]);
  88971. 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]);
  88972. }
  88973. return i;
  88974. }
  88975. class yae {
  88976. constructor(e, n, r, i = 0) {
  88977. this.layer = e, this.skip = n, this.minPoint = r, this.rank = i;
  88978. }
  88979. get startSide() {
  88980. return this.value ? this.value.startSide : 0;
  88981. }
  88982. get endSide() {
  88983. return this.value ? this.value.endSide : 0;
  88984. }
  88985. goto(e, n = -1e9) {
  88986. return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, n, !1), this;
  88987. }
  88988. gotoInner(e, n, r) {
  88989. for (; this.chunkIndex < this.layer.chunk.length; ) {
  88990. let i = this.layer.chunk[this.chunkIndex];
  88991. if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint))
  88992. break;
  88993. this.chunkIndex++, r = !1;
  88994. }
  88995. if (this.chunkIndex < this.layer.chunk.length) {
  88996. let i = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], n, !0);
  88997. (!r || this.rangeIndex < i) && this.setRangeIndex(i);
  88998. }
  88999. this.next();
  89000. }
  89001. forward(e, n) {
  89002. (this.to - e || this.endSide - n) < 0 && this.gotoInner(e, n, !0);
  89003. }
  89004. next() {
  89005. for (; ; )
  89006. if (this.chunkIndex == this.layer.chunk.length) {
  89007. this.from = this.to = 1e9, this.value = null;
  89008. break;
  89009. } else {
  89010. let e = this.layer.chunkPos[this.chunkIndex], n = this.layer.chunk[this.chunkIndex], r = e + n.from[this.rangeIndex];
  89011. 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)
  89012. break;
  89013. }
  89014. }
  89015. setRangeIndex(e) {
  89016. if (e == this.layer.chunk[this.chunkIndex].value.length) {
  89017. if (this.chunkIndex++, this.skip)
  89018. for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
  89019. this.chunkIndex++;
  89020. this.rangeIndex = 0;
  89021. } else
  89022. this.rangeIndex = e;
  89023. }
  89024. nextChunk() {
  89025. this.chunkIndex++, this.rangeIndex = 0, this.next();
  89026. }
  89027. compare(e) {
  89028. return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
  89029. }
  89030. }
  89031. class Xm {
  89032. constructor(e) {
  89033. this.heap = e;
  89034. }
  89035. static from(e, n = null, r = -1) {
  89036. let i = [];
  89037. for (let a = 0; a < e.length; a++)
  89038. for (let o = e[a]; !o.isEmpty; o = o.nextLayer)
  89039. o.maxPoint >= r && i.push(new yae(o, n, r, a));
  89040. return i.length == 1 ? i[0] : new Xm(i);
  89041. }
  89042. get startSide() {
  89043. return this.value ? this.value.startSide : 0;
  89044. }
  89045. goto(e, n = -1e9) {
  89046. for (let r of this.heap)
  89047. r.goto(e, n);
  89048. for (let r = this.heap.length >> 1; r >= 0; r--)
  89049. p$(this.heap, r);
  89050. return this.next(), this;
  89051. }
  89052. forward(e, n) {
  89053. for (let r of this.heap)
  89054. r.forward(e, n);
  89055. for (let r = this.heap.length >> 1; r >= 0; r--)
  89056. p$(this.heap, r);
  89057. (this.to - e || this.value.endSide - n) < 0 && this.next();
  89058. }
  89059. next() {
  89060. if (this.heap.length == 0)
  89061. this.from = this.to = 1e9, this.value = null, this.rank = -1;
  89062. else {
  89063. let e = this.heap[0];
  89064. this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), p$(this.heap, 0);
  89065. }
  89066. }
  89067. }
  89068. function p$(t, e) {
  89069. for (let n = t[e]; ; ) {
  89070. let r = (e << 1) + 1;
  89071. if (r >= t.length)
  89072. break;
  89073. let i = t[r];
  89074. if (r + 1 < t.length && i.compare(t[r + 1]) >= 0 && (i = t[r + 1], r++), n.compare(i) < 0)
  89075. break;
  89076. t[r] = n, t[e] = i, e = r;
  89077. }
  89078. }
  89079. class Dv {
  89080. constructor(e, n, r) {
  89081. 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 = Xm.from(e, n, r);
  89082. }
  89083. goto(e, n = -1e9) {
  89084. 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;
  89085. }
  89086. forward(e, n) {
  89087. for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - n) < 0; )
  89088. this.removeActive(this.minActive);
  89089. this.cursor.forward(e, n);
  89090. }
  89091. removeActive(e) {
  89092. Hb(this.active, e), Hb(this.activeTo, e), Hb(this.activeRank, e), this.minActive = $H(this.active, this.activeTo);
  89093. }
  89094. addActive(e) {
  89095. let n = 0, { value: r, to: i, rank: a } = this.cursor;
  89096. for (; n < this.activeRank.length && (a - this.activeRank[n] || i - this.activeTo[n]) > 0; )
  89097. n++;
  89098. Gb(this.active, n, r), Gb(this.activeTo, n, i), Gb(this.activeRank, n, a), e && Gb(e, n, this.cursor.from), this.minActive = $H(this.active, this.activeTo);
  89099. }
  89100. // After calling this, if `this.point` != null, the next range is a
  89101. // point. Otherwise, it's a regular range, covered by `this.active`.
  89102. next() {
  89103. let e = this.to, n = this.point;
  89104. this.point = null;
  89105. let r = this.openStart < 0 ? [] : null;
  89106. for (; ; ) {
  89107. let i = this.minActive;
  89108. if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) {
  89109. if (this.activeTo[i] > e) {
  89110. this.to = this.activeTo[i], this.endSide = this.active[i].endSide;
  89111. break;
  89112. }
  89113. this.removeActive(i), r && Hb(r, i);
  89114. } else if (this.cursor.value)
  89115. if (this.cursor.from > e) {
  89116. this.to = this.cursor.from, this.endSide = this.cursor.startSide;
  89117. break;
  89118. } else {
  89119. let a = this.cursor.value;
  89120. if (!a.point)
  89121. this.addActive(r), this.cursor.next();
  89122. else if (n && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
  89123. this.cursor.next();
  89124. else {
  89125. 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);
  89126. break;
  89127. }
  89128. }
  89129. else {
  89130. this.to = this.endSide = 1e9;
  89131. break;
  89132. }
  89133. }
  89134. if (r) {
  89135. this.openStart = 0;
  89136. for (let i = r.length - 1; i >= 0 && r[i] < e; i--)
  89137. this.openStart++;
  89138. }
  89139. }
  89140. activeForPoint(e) {
  89141. if (!this.active.length)
  89142. return this.active;
  89143. let n = [];
  89144. for (let r = this.active.length - 1; r >= 0 && !(this.activeRank[r] < this.pointRank); r--)
  89145. (this.activeTo[r] > e || this.activeTo[r] == e && this.active[r].endSide >= this.point.endSide) && n.push(this.active[r]);
  89146. return n.reverse();
  89147. }
  89148. openEnd(e) {
  89149. let n = 0;
  89150. for (let r = this.activeTo.length - 1; r >= 0 && this.activeTo[r] > e; r--)
  89151. n++;
  89152. return n;
  89153. }
  89154. }
  89155. function PH(t, e, n, r, i, a) {
  89156. t.goto(e), n.goto(r);
  89157. let o = r + i, s = r, l = r - e;
  89158. for (; ; ) {
  89159. let u = t.to + l - n.to || t.endSide - n.endSide, c = u < 0 ? t.to + l : n.to, f = Math.min(c, o);
  89160. if (t.point || n.point ? t.point && n.point && (t.point == n.point || t.point.eq(n.point)) && dM(t.activeForPoint(t.to), n.activeForPoint(n.to)) || a.comparePoint(s, f, t.point, n.point) : f > s && !dM(t.active, n.active) && a.compareRange(s, f, t.active, n.active), c > o)
  89161. break;
  89162. s = c, u <= 0 && t.next(), u >= 0 && n.next();
  89163. }
  89164. }
  89165. function dM(t, e) {
  89166. if (t.length != e.length)
  89167. return !1;
  89168. for (let n = 0; n < t.length; n++)
  89169. if (t[n] != e[n] && !t[n].eq(e[n]))
  89170. return !1;
  89171. return !0;
  89172. }
  89173. function Hb(t, e) {
  89174. for (let n = e, r = t.length - 1; n < r; n++)
  89175. t[n] = t[n + 1];
  89176. t.pop();
  89177. }
  89178. function Gb(t, e, n) {
  89179. for (let r = t.length - 1; r >= e; r--)
  89180. t[r + 1] = t[r];
  89181. t[e] = n;
  89182. }
  89183. function $H(t, e) {
  89184. let n = -1, r = 1e9;
  89185. for (let i = 0; i < e.length; i++)
  89186. (e[i] - r || t[i].endSide - t[n].endSide) < 0 && (n = i, r = e[i]);
  89187. return n;
  89188. }
  89189. function zp(t, e, n = t.length) {
  89190. let r = 0;
  89191. for (let i = 0; i < n; )
  89192. t.charCodeAt(i) == 9 ? (r += e - r % e, i++) : (r++, i = _r(t, i));
  89193. return r;
  89194. }
  89195. function hM(t, e, n, r) {
  89196. for (let i = 0, a = 0; ; ) {
  89197. if (a >= e)
  89198. return i;
  89199. if (i == t.length)
  89200. break;
  89201. a += t.charCodeAt(i) == 9 ? n - a % n : 1, i = _r(t, i);
  89202. }
  89203. return r === !0 ? -1 : t.length;
  89204. }
  89205. const pM = "ͼ", AH = typeof Symbol > "u" ? "__" + pM : Symbol.for(pM), vM = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), EH = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {};
  89206. class pu {
  89207. // :: (Object<Style>, ?{finish: ?(string) → string})
  89208. // Create a style module from the given spec.
  89209. //
  89210. // When `finish` is given, it is called on regular (non-`@`)
  89211. // selectors (after `&` expansion) to compute the final selector.
  89212. constructor(e, n) {
  89213. this.rules = [];
  89214. let { finish: r } = n || {};
  89215. function i(o) {
  89216. return /^@/.test(o) ? [o] : o.split(/,\s*/);
  89217. }
  89218. function a(o, s, l, u) {
  89219. let c = [], f = /^@(\w+)\b/.exec(o[0]), d = f && f[1] == "keyframes";
  89220. if (f && s == null) return l.push(o[0] + ";");
  89221. for (let h in s) {
  89222. let p = s[h];
  89223. if (/&/.test(h))
  89224. a(
  89225. h.split(/,\s*/).map((v) => o.map((g) => v.replace(/&/, g))).reduce((v, g) => v.concat(g)),
  89226. p,
  89227. l
  89228. );
  89229. else if (p && typeof p == "object") {
  89230. if (!f) throw new RangeError("The value of a property (" + h + ") should be a primitive value.");
  89231. a(i(h), p, c, d);
  89232. } else p != null && c.push(h.replace(/_.*/, "").replace(/[A-Z]/g, (v) => "-" + v.toLowerCase()) + ": " + p + ";");
  89233. }
  89234. (c.length || d) && l.push((r && !f && !u ? o.map(r) : o).join(", ") + " {" + c.join(" ") + "}");
  89235. }
  89236. for (let o in e) a(i(o), e[o], this.rules);
  89237. }
  89238. // :: () → string
  89239. // Returns a string containing the module's CSS rules.
  89240. getRules() {
  89241. return this.rules.join(`
  89242. `);
  89243. }
  89244. // :: () → string
  89245. // Generate a new unique CSS class name.
  89246. static newName() {
  89247. let e = EH[AH] || 1;
  89248. return EH[AH] = e + 1, pM + e.toString(36);
  89249. }
  89250. // :: (union<Document, ShadowRoot>, union<[StyleModule], StyleModule>, ?{nonce: ?string})
  89251. //
  89252. // Mount the given set of modules in the given DOM root, which ensures
  89253. // that the CSS rules defined by the module are available in that
  89254. // context.
  89255. //
  89256. // Rules are only added to the document once per root.
  89257. //
  89258. // Rule order will follow the order of the modules, so that rules from
  89259. // modules later in the array take precedence of those from earlier
  89260. // modules. If you call this function multiple times for the same root
  89261. // in a way that changes the order of already mounted modules, the old
  89262. // order will be changed.
  89263. //
  89264. // If a Content Security Policy nonce is provided, it is added to
  89265. // the `<style>` tag generated by the library.
  89266. static mount(e, n, r) {
  89267. let i = e[vM], a = r && r.nonce;
  89268. i ? a && i.setNonce(a) : i = new Dat(e, a), i.mount(Array.isArray(n) ? n : [n], e);
  89269. }
  89270. }
  89271. let MH = /* @__PURE__ */ new Map();
  89272. class Dat {
  89273. constructor(e, n) {
  89274. let r = e.ownerDocument || e, i = r.defaultView;
  89275. if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) {
  89276. let a = MH.get(r);
  89277. if (a) return e[vM] = a;
  89278. this.sheet = new i.CSSStyleSheet(), MH.set(r, this);
  89279. } else
  89280. this.styleTag = r.createElement("style"), n && this.styleTag.setAttribute("nonce", n);
  89281. this.modules = [], e[vM] = this;
  89282. }
  89283. mount(e, n) {
  89284. let r = this.sheet, i = 0, a = 0;
  89285. for (let o = 0; o < e.length; o++) {
  89286. let s = e[o], l = this.modules.indexOf(s);
  89287. if (l < a && l > -1 && (this.modules.splice(l, 1), a--, l = -1), l == -1) {
  89288. if (this.modules.splice(a++, 0, s), r) for (let u = 0; u < s.rules.length; u++)
  89289. r.insertRule(s.rules[u], i++);
  89290. } else {
  89291. for (; a < l; ) i += this.modules[a++].rules.length;
  89292. i += s.rules.length, a++;
  89293. }
  89294. }
  89295. if (r)
  89296. n.adoptedStyleSheets.indexOf(this.sheet) < 0 && (n.adoptedStyleSheets = [this.sheet, ...n.adoptedStyleSheets]);
  89297. else {
  89298. let o = "";
  89299. for (let l = 0; l < this.modules.length; l++)
  89300. o += this.modules[l].getRules() + `
  89301. `;
  89302. this.styleTag.textContent = o;
  89303. let s = n.head || n;
  89304. this.styleTag.parentNode != s && s.insertBefore(this.styleTag, s.firstChild);
  89305. }
  89306. }
  89307. setNonce(e) {
  89308. this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e);
  89309. }
  89310. }
  89311. var vu = {
  89312. 8: "Backspace",
  89313. 9: "Tab",
  89314. 10: "Enter",
  89315. 12: "NumLock",
  89316. 13: "Enter",
  89317. 16: "Shift",
  89318. 17: "Control",
  89319. 18: "Alt",
  89320. 20: "CapsLock",
  89321. 27: "Escape",
  89322. 32: " ",
  89323. 33: "PageUp",
  89324. 34: "PageDown",
  89325. 35: "End",
  89326. 36: "Home",
  89327. 37: "ArrowLeft",
  89328. 38: "ArrowUp",
  89329. 39: "ArrowRight",
  89330. 40: "ArrowDown",
  89331. 44: "PrintScreen",
  89332. 45: "Insert",
  89333. 46: "Delete",
  89334. 59: ";",
  89335. 61: "=",
  89336. 91: "Meta",
  89337. 92: "Meta",
  89338. 106: "*",
  89339. 107: "+",
  89340. 108: ",",
  89341. 109: "-",
  89342. 110: ".",
  89343. 111: "/",
  89344. 144: "NumLock",
  89345. 145: "ScrollLock",
  89346. 160: "Shift",
  89347. 161: "Shift",
  89348. 162: "Control",
  89349. 163: "Control",
  89350. 164: "Alt",
  89351. 165: "Alt",
  89352. 173: "-",
  89353. 186: ";",
  89354. 187: "=",
  89355. 188: ",",
  89356. 189: "-",
  89357. 190: ".",
  89358. 191: "/",
  89359. 192: "`",
  89360. 219: "[",
  89361. 220: "\\",
  89362. 221: "]",
  89363. 222: "'"
  89364. }, Ym = {
  89365. 48: ")",
  89366. 49: "!",
  89367. 50: "@",
  89368. 51: "#",
  89369. 52: "$",
  89370. 53: "%",
  89371. 54: "^",
  89372. 55: "&",
  89373. 56: "*",
  89374. 57: "(",
  89375. 59: ":",
  89376. 61: "+",
  89377. 173: "_",
  89378. 186: ":",
  89379. 187: "+",
  89380. 188: "<",
  89381. 189: "_",
  89382. 190: ">",
  89383. 191: "?",
  89384. 192: "~",
  89385. 219: "{",
  89386. 220: "|",
  89387. 221: "}",
  89388. 222: '"'
  89389. }, Rat = typeof navigator < "u" && /Mac/.test(navigator.platform), kat = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
  89390. for (var mr = 0; mr < 10; mr++) vu[48 + mr] = vu[96 + mr] = String(mr);
  89391. for (var mr = 1; mr <= 24; mr++) vu[mr + 111] = "F" + mr;
  89392. for (var mr = 65; mr <= 90; mr++)
  89393. vu[mr] = String.fromCharCode(mr + 32), Ym[mr] = String.fromCharCode(mr);
  89394. for (var v$ in vu) Ym.hasOwnProperty(v$) || (Ym[v$] = vu[v$]);
  89395. function Lat(t) {
  89396. var e = Rat && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || kat && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Ym : vu)[t.keyCode] || t.key || "Unidentified";
  89397. 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;
  89398. }
  89399. function qm(t) {
  89400. let e;
  89401. return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection();
  89402. }
  89403. function gM(t, e) {
  89404. return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1;
  89405. }
  89406. function Nat(t) {
  89407. let e = t.activeElement;
  89408. for (; e && e.shadowRoot; )
  89409. e = e.shadowRoot.activeElement;
  89410. return e;
  89411. }
  89412. function a1(t, e) {
  89413. if (!e.anchorNode)
  89414. return !1;
  89415. try {
  89416. return gM(t, e.anchorNode);
  89417. } catch {
  89418. return !1;
  89419. }
  89420. }
  89421. function Jh(t) {
  89422. return t.nodeType == 3 ? Pf(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : [];
  89423. }
  89424. function Zg(t, e, n, r) {
  89425. return n ? IH(t, e, n, r, -1) || IH(t, e, n, r, 1) : !1;
  89426. }
  89427. function Tf(t) {
  89428. for (var e = 0; ; e++)
  89429. if (t = t.previousSibling, !t)
  89430. return e;
  89431. }
  89432. function iS(t) {
  89433. return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName);
  89434. }
  89435. function IH(t, e, n, r, i) {
  89436. for (; ; ) {
  89437. if (t == n && e == r)
  89438. return !0;
  89439. if (e == (i < 0 ? 0 : el(t))) {
  89440. if (t.nodeName == "DIV")
  89441. return !1;
  89442. let a = t.parentNode;
  89443. if (!a || a.nodeType != 1)
  89444. return !1;
  89445. e = Tf(t) + (i < 0 ? 0 : 1), t = a;
  89446. } else if (t.nodeType == 1) {
  89447. if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false")
  89448. return !1;
  89449. e = i < 0 ? el(t) : 0;
  89450. } else
  89451. return !1;
  89452. }
  89453. }
  89454. function el(t) {
  89455. return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
  89456. }
  89457. function Dw(t, e) {
  89458. let n = e ? t.left : t.right;
  89459. return { left: n, right: n, top: t.top, bottom: t.bottom };
  89460. }
  89461. function Bat(t) {
  89462. let e = t.visualViewport;
  89463. return e ? {
  89464. left: 0,
  89465. right: e.width,
  89466. top: 0,
  89467. bottom: e.height
  89468. } : {
  89469. left: 0,
  89470. right: t.innerWidth,
  89471. top: 0,
  89472. bottom: t.innerHeight
  89473. };
  89474. }
  89475. function bae(t, e) {
  89476. let n = e.width / t.offsetWidth, r = e.height / t.offsetHeight;
  89477. 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 };
  89478. }
  89479. function zat(t, e, n, r, i, a, o, s) {
  89480. let l = t.ownerDocument, u = l.defaultView || window;
  89481. for (let c = t, f = !1; c && !f; )
  89482. if (c.nodeType == 1) {
  89483. let d, h = c == l.body, p = 1, v = 1;
  89484. if (h)
  89485. d = Bat(u);
  89486. else {
  89487. if (/^(fixed|sticky)$/.test(getComputedStyle(c).position) && (f = !0), c.scrollHeight <= c.clientHeight && c.scrollWidth <= c.clientWidth) {
  89488. c = c.assignedSlot || c.parentNode;
  89489. continue;
  89490. }
  89491. let y = c.getBoundingClientRect();
  89492. ({ scaleX: p, scaleY: v } = bae(c, y)), d = {
  89493. left: y.left,
  89494. right: y.left + c.clientWidth * p,
  89495. top: y.top,
  89496. bottom: y.top + c.clientHeight * v
  89497. };
  89498. }
  89499. let g = 0, m = 0;
  89500. if (i == "nearest")
  89501. 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)));
  89502. else {
  89503. let y = e.bottom - e.top, b = d.bottom - d.top;
  89504. m = (i == "center" && y <= b ? e.top + y / 2 - b / 2 : i == "start" || i == "center" && n < 0 ? e.top - o : e.bottom - b + o) - d.top;
  89505. }
  89506. 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)
  89507. if (h)
  89508. u.scrollBy(g, m);
  89509. else {
  89510. let y = 0, b = 0;
  89511. if (m) {
  89512. let _ = c.scrollTop;
  89513. c.scrollTop += m / v, b = (c.scrollTop - _) * v;
  89514. }
  89515. if (g) {
  89516. let _ = c.scrollLeft;
  89517. c.scrollLeft += g / p, y = (c.scrollLeft - _) * p;
  89518. }
  89519. e = {
  89520. left: e.left - y,
  89521. top: e.top - b,
  89522. right: e.right - y,
  89523. bottom: e.bottom - b
  89524. }, y && Math.abs(y - g) < 1 && (r = "nearest"), b && Math.abs(b - m) < 1 && (i = "nearest");
  89525. }
  89526. if (h)
  89527. break;
  89528. c = c.assignedSlot || c.parentNode;
  89529. } else if (c.nodeType == 11)
  89530. c = c.host;
  89531. else
  89532. break;
  89533. }
  89534. function Vat(t) {
  89535. let e = t.ownerDocument;
  89536. for (let n = t.parentNode; n && n != e.body; )
  89537. if (n.nodeType == 1) {
  89538. if (n.scrollHeight > n.clientHeight || n.scrollWidth > n.clientWidth)
  89539. return n;
  89540. n = n.assignedSlot || n.parentNode;
  89541. } else if (n.nodeType == 11)
  89542. n = n.host;
  89543. else
  89544. break;
  89545. return null;
  89546. }
  89547. class Fat {
  89548. constructor() {
  89549. this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
  89550. }
  89551. eq(e) {
  89552. return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset;
  89553. }
  89554. setRange(e) {
  89555. let { anchorNode: n, focusNode: r } = e;
  89556. this.set(n, Math.min(e.anchorOffset, n ? el(n) : 0), r, Math.min(e.focusOffset, r ? el(r) : 0));
  89557. }
  89558. set(e, n, r, i) {
  89559. this.anchorNode = e, this.anchorOffset = n, this.focusNode = r, this.focusOffset = i;
  89560. }
  89561. }
  89562. let wd = null;
  89563. function _ae(t) {
  89564. if (t.setActive)
  89565. return t.setActive();
  89566. if (wd)
  89567. return t.focus(wd);
  89568. let e = [];
  89569. for (let n = t; n && (e.push(n, n.scrollTop, n.scrollLeft), n != n.ownerDocument); n = n.parentNode)
  89570. ;
  89571. if (t.focus(wd == null ? {
  89572. get preventScroll() {
  89573. return wd = { preventScroll: !0 }, !0;
  89574. }
  89575. } : void 0), !wd) {
  89576. wd = !1;
  89577. for (let n = 0; n < e.length; ) {
  89578. let r = e[n++], i = e[n++], a = e[n++];
  89579. r.scrollTop != i && (r.scrollTop = i), r.scrollLeft != a && (r.scrollLeft = a);
  89580. }
  89581. }
  89582. }
  89583. let DH;
  89584. function Pf(t, e, n = e) {
  89585. let r = DH || (DH = document.createRange());
  89586. return r.setEnd(t, n), r.setStart(t, e), r;
  89587. }
  89588. function fh(t, e, n, r) {
  89589. let i = { key: e, code: e, keyCode: n, which: n, cancelable: !0 };
  89590. r && ({ altKey: i.altKey, ctrlKey: i.ctrlKey, shiftKey: i.shiftKey, metaKey: i.metaKey } = r);
  89591. let a = new KeyboardEvent("keydown", i);
  89592. a.synthetic = !0, t.dispatchEvent(a);
  89593. let o = new KeyboardEvent("keyup", i);
  89594. return o.synthetic = !0, t.dispatchEvent(o), a.defaultPrevented || o.defaultPrevented;
  89595. }
  89596. function Wat(t) {
  89597. for (; t; ) {
  89598. if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host))
  89599. return t;
  89600. t = t.assignedSlot || t.parentNode;
  89601. }
  89602. return null;
  89603. }
  89604. function Oae(t) {
  89605. for (; t.attributes.length; )
  89606. t.removeAttributeNode(t.attributes[0]);
  89607. }
  89608. function Qat(t, e) {
  89609. let n = e.focusNode, r = e.focusOffset;
  89610. if (!n || e.anchorNode != n || e.anchorOffset != r)
  89611. return !1;
  89612. for (r = Math.min(r, el(n)); ; )
  89613. if (r) {
  89614. if (n.nodeType != 1)
  89615. return !1;
  89616. let i = n.childNodes[r - 1];
  89617. i.contentEditable == "false" ? r-- : (n = i, r = el(n));
  89618. } else {
  89619. if (n == t)
  89620. return !0;
  89621. r = Tf(n), n = n.parentNode;
  89622. }
  89623. }
  89624. function Sae(t) {
  89625. return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4);
  89626. }
  89627. function xae(t, e) {
  89628. for (let n = t, r = e; ; ) {
  89629. if (n.nodeType == 3 && r > 0)
  89630. return { node: n, offset: r };
  89631. if (n.nodeType == 1 && r > 0) {
  89632. if (n.contentEditable == "false")
  89633. return null;
  89634. n = n.childNodes[r - 1], r = el(n);
  89635. } else if (n.parentNode && !iS(n))
  89636. r = Tf(n), n = n.parentNode;
  89637. else
  89638. return null;
  89639. }
  89640. }
  89641. function wae(t, e) {
  89642. for (let n = t, r = e; ; ) {
  89643. if (n.nodeType == 3 && r < n.nodeValue.length)
  89644. return { node: n, offset: r };
  89645. if (n.nodeType == 1 && r < n.childNodes.length) {
  89646. if (n.contentEditable == "false")
  89647. return null;
  89648. n = n.childNodes[r], r = 0;
  89649. } else if (n.parentNode && !iS(n))
  89650. r = Tf(n) + 1, n = n.parentNode;
  89651. else
  89652. return null;
  89653. }
  89654. }
  89655. class Lr {
  89656. constructor(e, n, r = !0) {
  89657. this.node = e, this.offset = n, this.precise = r;
  89658. }
  89659. static before(e, n) {
  89660. return new Lr(e.parentNode, Tf(e), n);
  89661. }
  89662. static after(e, n) {
  89663. return new Lr(e.parentNode, Tf(e) + 1, n);
  89664. }
  89665. }
  89666. const r4 = [];
  89667. class Jt {
  89668. constructor() {
  89669. this.parent = null, this.dom = null, this.flags = 2;
  89670. }
  89671. get overrideDOMText() {
  89672. return null;
  89673. }
  89674. get posAtStart() {
  89675. return this.parent ? this.parent.posBefore(this) : 0;
  89676. }
  89677. get posAtEnd() {
  89678. return this.posAtStart + this.length;
  89679. }
  89680. posBefore(e) {
  89681. let n = this.posAtStart;
  89682. for (let r of this.children) {
  89683. if (r == e)
  89684. return n;
  89685. n += r.length + r.breakAfter;
  89686. }
  89687. throw new RangeError("Invalid child in posBefore");
  89688. }
  89689. posAfter(e) {
  89690. return this.posBefore(e) + e.length;
  89691. }
  89692. sync(e, n) {
  89693. if (this.flags & 2) {
  89694. let r = this.dom, i = null, a;
  89695. for (let o of this.children) {
  89696. if (o.flags & 7) {
  89697. if (!o.dom && (a = i ? i.nextSibling : r.firstChild)) {
  89698. let s = Jt.get(a);
  89699. (!s || !s.parent && s.canReuseDOM(o)) && o.reuseDOM(a);
  89700. }
  89701. o.sync(e, n), o.flags &= -8;
  89702. }
  89703. if (a = i ? i.nextSibling : r.firstChild, n && !n.written && n.node == r && a != o.dom && (n.written = !0), o.dom.parentNode == r)
  89704. for (; a && a != o.dom; )
  89705. a = RH(a);
  89706. else
  89707. r.insertBefore(o.dom, a);
  89708. i = o.dom;
  89709. }
  89710. for (a = i ? i.nextSibling : r.firstChild, a && n && n.node == r && (n.written = !0); a; )
  89711. a = RH(a);
  89712. } else if (this.flags & 1)
  89713. for (let r of this.children)
  89714. r.flags & 7 && (r.sync(e, n), r.flags &= -8);
  89715. }
  89716. reuseDOM(e) {
  89717. }
  89718. localPosFromDOM(e, n) {
  89719. let r;
  89720. if (e == this.dom)
  89721. r = this.dom.childNodes[n];
  89722. else {
  89723. let i = el(e) == 0 ? 0 : n == 0 ? -1 : 1;
  89724. for (; ; ) {
  89725. let a = e.parentNode;
  89726. if (a == this.dom)
  89727. break;
  89728. i == 0 && a.firstChild != a.lastChild && (e == a.firstChild ? i = -1 : i = 1), e = a;
  89729. }
  89730. i < 0 ? r = e : r = e.nextSibling;
  89731. }
  89732. if (r == this.dom.firstChild)
  89733. return 0;
  89734. for (; r && !Jt.get(r); )
  89735. r = r.nextSibling;
  89736. if (!r)
  89737. return this.length;
  89738. for (let i = 0, a = 0; ; i++) {
  89739. let o = this.children[i];
  89740. if (o.dom == r)
  89741. return a;
  89742. a += o.length + o.breakAfter;
  89743. }
  89744. }
  89745. domBoundsAround(e, n, r = 0) {
  89746. let i = -1, a = -1, o = -1, s = -1;
  89747. for (let l = 0, u = r, c = r; l < this.children.length; l++) {
  89748. let f = this.children[l], d = u + f.length;
  89749. if (u < e && d > n)
  89750. return f.domBoundsAround(e, n, u);
  89751. if (d >= e && i == -1 && (i = l, a = u), u > n && f.dom.parentNode == this.dom) {
  89752. o = l, s = c;
  89753. break;
  89754. }
  89755. c = d, u = d + f.breakAfter;
  89756. }
  89757. return {
  89758. from: a,
  89759. to: s < 0 ? r + this.length : s,
  89760. startDOM: (i ? this.children[i - 1].dom.nextSibling : null) || this.dom.firstChild,
  89761. endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null
  89762. };
  89763. }
  89764. markDirty(e = !1) {
  89765. this.flags |= 2, this.markParentsDirty(e);
  89766. }
  89767. markParentsDirty(e) {
  89768. for (let n = this.parent; n; n = n.parent) {
  89769. if (e && (n.flags |= 2), n.flags & 1)
  89770. return;
  89771. n.flags |= 1, e = !1;
  89772. }
  89773. }
  89774. setParent(e) {
  89775. this.parent != e && (this.parent = e, this.flags & 7 && this.markParentsDirty(!0));
  89776. }
  89777. setDOM(e) {
  89778. this.dom != e && (this.dom && (this.dom.cmView = null), this.dom = e, e.cmView = this);
  89779. }
  89780. get rootView() {
  89781. for (let e = this; ; ) {
  89782. let n = e.parent;
  89783. if (!n)
  89784. return e;
  89785. e = n;
  89786. }
  89787. }
  89788. replaceChildren(e, n, r = r4) {
  89789. this.markDirty();
  89790. for (let i = e; i < n; i++) {
  89791. let a = this.children[i];
  89792. a.parent == this && r.indexOf(a) < 0 && a.destroy();
  89793. }
  89794. this.children.splice(e, n - e, ...r);
  89795. for (let i = 0; i < r.length; i++)
  89796. r[i].setParent(this);
  89797. }
  89798. ignoreMutation(e) {
  89799. return !1;
  89800. }
  89801. ignoreEvent(e) {
  89802. return !1;
  89803. }
  89804. childCursor(e = this.length) {
  89805. return new Cae(this.children, e, this.children.length);
  89806. }
  89807. childPos(e, n = 1) {
  89808. return this.childCursor().findPos(e, n);
  89809. }
  89810. toString() {
  89811. let e = this.constructor.name.replace("View", "");
  89812. return e + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (e == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "");
  89813. }
  89814. static get(e) {
  89815. return e.cmView;
  89816. }
  89817. get isEditable() {
  89818. return !0;
  89819. }
  89820. get isWidget() {
  89821. return !1;
  89822. }
  89823. get isHidden() {
  89824. return !1;
  89825. }
  89826. merge(e, n, r, i, a, o) {
  89827. return !1;
  89828. }
  89829. become(e) {
  89830. return !1;
  89831. }
  89832. canReuseDOM(e) {
  89833. return e.constructor == this.constructor && !((this.flags | e.flags) & 8);
  89834. }
  89835. // When this is a zero-length view with a side, this should return a
  89836. // number <= 0 to indicate it is before its position, or a
  89837. // number > 0 when after its position.
  89838. getSide() {
  89839. return 0;
  89840. }
  89841. destroy() {
  89842. for (let e of this.children)
  89843. e.parent == this && e.destroy();
  89844. this.parent = null;
  89845. }
  89846. }
  89847. Jt.prototype.breakAfter = 0;
  89848. function RH(t) {
  89849. let e = t.nextSibling;
  89850. return t.parentNode.removeChild(t), e;
  89851. }
  89852. class Cae {
  89853. constructor(e, n, r) {
  89854. this.children = e, this.pos = n, this.i = r, this.off = 0;
  89855. }
  89856. findPos(e, n = 1) {
  89857. for (; ; ) {
  89858. if (e > this.pos || e == this.pos && (n > 0 || this.i == 0 || this.children[this.i - 1].breakAfter))
  89859. return this.off = e - this.pos, this;
  89860. let r = this.children[--this.i];
  89861. this.pos -= r.length + r.breakAfter;
  89862. }
  89863. }
  89864. }
  89865. function Tae(t, e, n, r, i, a, o, s, l) {
  89866. let { children: u } = t, c = u.length ? u[e] : null, f = a.length ? a[a.length - 1] : null, d = f ? f.breakAfter : o;
  89867. if (!(e == r && c && !o && !d && a.length < 2 && c.merge(n, i, a.length ? f : null, n == 0, s, l))) {
  89868. if (r < u.length) {
  89869. let h = u[r];
  89870. 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++;
  89871. }
  89872. 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; )
  89873. if (u[r - 1].become(a[a.length - 1]))
  89874. r--, a.pop(), l = a.length ? 0 : s;
  89875. else if (u[e].become(a[0]))
  89876. e++, a.shift(), s = a.length ? 0 : l;
  89877. else
  89878. break;
  89879. !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);
  89880. }
  89881. }
  89882. function Pae(t, e, n, r, i, a) {
  89883. let o = t.childCursor(), { i: s, off: l } = o.findPos(n, 1), { i: u, off: c } = o.findPos(e, -1), f = e - n;
  89884. for (let d of r)
  89885. f += d.length;
  89886. t.length += f, Tae(t, u, c, s, l, r, 0, i, a);
  89887. }
  89888. let gi = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, mM = typeof document < "u" ? document : { documentElement: { style: {} } };
  89889. const yM = /* @__PURE__ */ /Edge\/(\d+)/.exec(gi.userAgent), $ae = /* @__PURE__ */ /MSIE \d/.test(gi.userAgent), bM = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(gi.userAgent), Rw = !!($ae || bM || yM), kH = !Rw && /* @__PURE__ */ /gecko\/(\d+)/i.test(gi.userAgent), g$ = !Rw && /* @__PURE__ */ /Chrome\/(\d+)/.exec(gi.userAgent), LH = "webkitFontSmoothing" in mM.documentElement.style, Aae = !Rw && /* @__PURE__ */ /Apple Computer/.test(gi.vendor), NH = Aae && (/* @__PURE__ */ /Mobile\/\w+/.test(gi.userAgent) || gi.maxTouchPoints > 2);
  89890. var Ne = {
  89891. mac: NH || /* @__PURE__ */ /Mac/.test(gi.platform),
  89892. windows: /* @__PURE__ */ /Win/.test(gi.platform),
  89893. linux: /* @__PURE__ */ /Linux|X11/.test(gi.platform),
  89894. ie: Rw,
  89895. ie_version: $ae ? mM.documentMode || 6 : bM ? +bM[1] : yM ? +yM[1] : 0,
  89896. gecko: kH,
  89897. gecko_version: kH ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(gi.userAgent) || [0, 0])[1] : 0,
  89898. chrome: !!g$,
  89899. chrome_version: g$ ? +g$[1] : 0,
  89900. ios: NH,
  89901. android: /* @__PURE__ */ /Android\b/.test(gi.userAgent),
  89902. webkit: LH,
  89903. safari: Aae,
  89904. webkit_version: LH ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(gi.userAgent) || [0, 0])[1] : 0,
  89905. tabSize: mM.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
  89906. };
  89907. const Hat = 256;
  89908. class co extends Jt {
  89909. constructor(e) {
  89910. super(), this.text = e;
  89911. }
  89912. get length() {
  89913. return this.text.length;
  89914. }
  89915. createDOM(e) {
  89916. this.setDOM(e || document.createTextNode(this.text));
  89917. }
  89918. sync(e, n) {
  89919. this.dom || this.createDOM(), this.dom.nodeValue != this.text && (n && n.node == this.dom && (n.written = !0), this.dom.nodeValue = this.text);
  89920. }
  89921. reuseDOM(e) {
  89922. e.nodeType == 3 && this.createDOM(e);
  89923. }
  89924. merge(e, n, r) {
  89925. return this.flags & 8 || r && (!(r instanceof co) || this.length - (n - e) + r.length > Hat || r.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (r ? r.text : "") + this.text.slice(n), this.markDirty(), !0);
  89926. }
  89927. split(e) {
  89928. let n = new co(this.text.slice(e));
  89929. return this.text = this.text.slice(0, e), this.markDirty(), n.flags |= this.flags & 8, n;
  89930. }
  89931. localPosFromDOM(e, n) {
  89932. return e == this.dom ? n : n ? this.text.length : 0;
  89933. }
  89934. domAtPos(e) {
  89935. return new Lr(this.dom, e);
  89936. }
  89937. domBoundsAround(e, n, r) {
  89938. return { from: r, to: r + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling };
  89939. }
  89940. coordsAt(e, n) {
  89941. return Gat(this.dom, e, n);
  89942. }
  89943. }
  89944. class tl extends Jt {
  89945. constructor(e, n = [], r = 0) {
  89946. super(), this.mark = e, this.children = n, this.length = r;
  89947. for (let i of n)
  89948. i.setParent(this);
  89949. }
  89950. setAttrs(e) {
  89951. if (Oae(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)
  89952. for (let n in this.mark.attrs)
  89953. e.setAttribute(n, this.mark.attrs[n]);
  89954. return e;
  89955. }
  89956. canReuseDOM(e) {
  89957. return super.canReuseDOM(e) && !((this.flags | e.flags) & 8);
  89958. }
  89959. reuseDOM(e) {
  89960. e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), this.flags |= 6);
  89961. }
  89962. sync(e, n) {
  89963. this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, n);
  89964. }
  89965. merge(e, n, r, i, a, o) {
  89966. return r && (!(r instanceof tl && r.mark.eq(this.mark)) || e && a <= 0 || n < this.length && o <= 0) ? !1 : (Pae(this, e, n, r ? r.children.slice() : [], a - 1, o - 1), this.markDirty(), !0);
  89967. }
  89968. split(e) {
  89969. let n = [], r = 0, i = -1, a = 0;
  89970. for (let s of this.children) {
  89971. let l = r + s.length;
  89972. l > e && n.push(r < e ? s.split(e - r) : s), i < 0 && r >= e && (i = a), r = l, a++;
  89973. }
  89974. let o = this.length - e;
  89975. return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new tl(this.mark, n, o);
  89976. }
  89977. domAtPos(e) {
  89978. return Eae(this, e);
  89979. }
  89980. coordsAt(e, n) {
  89981. return Iae(this, e, n);
  89982. }
  89983. }
  89984. function Gat(t, e, n) {
  89985. let r = t.nodeValue.length;
  89986. e > r && (e = r);
  89987. let i = e, a = e, o = 0;
  89988. e == 0 && n < 0 || e == r && n >= 0 ? Ne.chrome || Ne.gecko || (e ? (i--, o = 1) : a < r && (a++, o = -1)) : n < 0 ? i-- : a < r && a++;
  89989. let s = Pf(t, i, a).getClientRects();
  89990. if (!s.length)
  89991. return null;
  89992. let l = s[(o ? o < 0 : n >= 0) ? 0 : s.length - 1];
  89993. return Ne.safari && !o && l.width == 0 && (l = Array.prototype.find.call(s, (u) => u.width) || l), o ? Dw(l, o < 0) : l || null;
  89994. }
  89995. class Ql extends Jt {
  89996. static create(e, n, r) {
  89997. return new Ql(e, n, r);
  89998. }
  89999. constructor(e, n, r) {
  90000. super(), this.widget = e, this.length = n, this.side = r, this.prevWidget = null;
  90001. }
  90002. split(e) {
  90003. let n = Ql.create(this.widget, this.length - e, this.side);
  90004. return this.length -= e, n;
  90005. }
  90006. sync(e) {
  90007. (!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"));
  90008. }
  90009. getSide() {
  90010. return this.side;
  90011. }
  90012. merge(e, n, r, i, a, o) {
  90013. return r && (!(r instanceof Ql) || !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);
  90014. }
  90015. become(e) {
  90016. return e instanceof Ql && 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;
  90017. }
  90018. ignoreMutation() {
  90019. return !0;
  90020. }
  90021. ignoreEvent(e) {
  90022. return this.widget.ignoreEvent(e);
  90023. }
  90024. get overrideDOMText() {
  90025. if (this.length == 0)
  90026. return Ft.empty;
  90027. let e = this;
  90028. for (; e.parent; )
  90029. e = e.parent;
  90030. let { view: n } = e, r = n && n.state.doc, i = this.posAtStart;
  90031. return r ? r.slice(i, i + this.length) : Ft.empty;
  90032. }
  90033. domAtPos(e) {
  90034. return (this.length ? e == 0 : this.side > 0) ? Lr.before(this.dom) : Lr.after(this.dom, e == this.length);
  90035. }
  90036. domBoundsAround() {
  90037. return null;
  90038. }
  90039. coordsAt(e, n) {
  90040. let r = this.widget.coordsAt(this.dom, e, n);
  90041. if (r)
  90042. return r;
  90043. let i = this.dom.getClientRects(), a = null;
  90044. if (!i.length)
  90045. return null;
  90046. let o = this.side ? this.side < 0 : e > 0;
  90047. 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)
  90048. ;
  90049. return Dw(a, !o);
  90050. }
  90051. get isEditable() {
  90052. return !1;
  90053. }
  90054. get isWidget() {
  90055. return !0;
  90056. }
  90057. get isHidden() {
  90058. return this.widget.isHidden;
  90059. }
  90060. destroy() {
  90061. super.destroy(), this.dom && this.widget.destroy(this.dom);
  90062. }
  90063. }
  90064. class ep extends Jt {
  90065. constructor(e) {
  90066. super(), this.side = e;
  90067. }
  90068. get length() {
  90069. return 0;
  90070. }
  90071. merge() {
  90072. return !1;
  90073. }
  90074. become(e) {
  90075. return e instanceof ep && e.side == this.side;
  90076. }
  90077. split() {
  90078. return new ep(this.side);
  90079. }
  90080. sync() {
  90081. if (!this.dom) {
  90082. let e = document.createElement("img");
  90083. e.className = "cm-widgetBuffer", e.setAttribute("aria-hidden", "true"), this.setDOM(e);
  90084. }
  90085. }
  90086. getSide() {
  90087. return this.side;
  90088. }
  90089. domAtPos(e) {
  90090. return this.side > 0 ? Lr.before(this.dom) : Lr.after(this.dom);
  90091. }
  90092. localPosFromDOM() {
  90093. return 0;
  90094. }
  90095. domBoundsAround() {
  90096. return null;
  90097. }
  90098. coordsAt(e) {
  90099. return this.dom.getBoundingClientRect();
  90100. }
  90101. get overrideDOMText() {
  90102. return Ft.empty;
  90103. }
  90104. get isHidden() {
  90105. return !0;
  90106. }
  90107. }
  90108. co.prototype.children = Ql.prototype.children = ep.prototype.children = r4;
  90109. function Eae(t, e) {
  90110. let n = t.dom, { children: r } = t, i = 0;
  90111. for (let a = 0; i < r.length; i++) {
  90112. let o = r[i], s = a + o.length;
  90113. if (!(s == a && o.getSide() <= 0)) {
  90114. if (e > a && e < s && o.dom.parentNode == n)
  90115. return o.domAtPos(e - a);
  90116. if (e <= a)
  90117. break;
  90118. a = s;
  90119. }
  90120. }
  90121. for (let a = i; a > 0; a--) {
  90122. let o = r[a - 1];
  90123. if (o.dom.parentNode == n)
  90124. return o.domAtPos(o.length);
  90125. }
  90126. for (let a = i; a < r.length; a++) {
  90127. let o = r[a];
  90128. if (o.dom.parentNode == n)
  90129. return o.domAtPos(0);
  90130. }
  90131. return new Lr(n, 0);
  90132. }
  90133. function Mae(t, e, n) {
  90134. let r, { children: i } = t;
  90135. n > 0 && e instanceof tl && i.length && (r = i[i.length - 1]) instanceof tl && r.mark.eq(e.mark) ? Mae(r, e.children[0], n - 1) : (i.push(e), e.setParent(t)), t.length += e.length;
  90136. }
  90137. function Iae(t, e, n) {
  90138. let r = null, i = -1, a = null, o = -1;
  90139. function s(u, c) {
  90140. for (let f = 0, d = 0; f < u.children.length && d <= c; f++) {
  90141. let h = u.children[f], p = d + h.length;
  90142. 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;
  90143. }
  90144. }
  90145. s(t, e);
  90146. let l = (n < 0 ? r : a) || r || a;
  90147. return l ? l.coordsAt(Math.max(0, l == r ? i : o), n) : jat(t);
  90148. }
  90149. function jat(t) {
  90150. let e = t.dom.lastChild;
  90151. if (!e)
  90152. return t.dom.getBoundingClientRect();
  90153. let n = Jh(e);
  90154. return n[n.length - 1] || null;
  90155. }
  90156. function _M(t, e) {
  90157. for (let n in t)
  90158. n == "class" && e.class ? e.class += " " + t.class : n == "style" && e.style ? e.style += ";" + t.style : e[n] = t[n];
  90159. return e;
  90160. }
  90161. const BH = /* @__PURE__ */ Object.create(null);
  90162. function aS(t, e, n) {
  90163. if (t == e)
  90164. return !0;
  90165. t || (t = BH), e || (e = BH);
  90166. let r = Object.keys(t), i = Object.keys(e);
  90167. if (r.length - (n && r.indexOf(n) > -1 ? 1 : 0) != i.length - (n && i.indexOf(n) > -1 ? 1 : 0))
  90168. return !1;
  90169. for (let a of r)
  90170. if (a != n && (i.indexOf(a) == -1 || t[a] !== e[a]))
  90171. return !1;
  90172. return !0;
  90173. }
  90174. function OM(t, e, n) {
  90175. let r = !1;
  90176. if (e)
  90177. for (let i in e)
  90178. n && i in n || (r = !0, i == "style" ? t.style.cssText = "" : t.removeAttribute(i));
  90179. if (n)
  90180. for (let i in n)
  90181. e && e[i] == n[i] || (r = !0, i == "style" ? t.style.cssText = n[i] : t.setAttribute(i, n[i]));
  90182. return r;
  90183. }
  90184. function Zat(t) {
  90185. let e = /* @__PURE__ */ Object.create(null);
  90186. for (let n = 0; n < t.attributes.length; n++) {
  90187. let r = t.attributes[n];
  90188. e[r.name] = r.value;
  90189. }
  90190. return e;
  90191. }
  90192. class Ln extends Jt {
  90193. constructor() {
  90194. super(...arguments), this.children = [], this.length = 0, this.prevAttrs = void 0, this.attrs = null, this.breakAfter = 0;
  90195. }
  90196. // Consumes source
  90197. merge(e, n, r, i, a, o) {
  90198. if (r) {
  90199. if (!(r instanceof Ln))
  90200. return !1;
  90201. this.dom || r.transferDOM(this);
  90202. }
  90203. return i && this.setDeco(r ? r.attrs : null), Pae(this, e, n, r ? r.children.slice() : [], a, o), !0;
  90204. }
  90205. split(e) {
  90206. let n = new Ln();
  90207. if (n.breakAfter = this.breakAfter, this.length == 0)
  90208. return n;
  90209. let { i: r, off: i } = this.childPos(e);
  90210. i && (n.append(this.children[r].split(i), 0), this.children[r].merge(i, this.children[r].length, null, !1, 0, 0), r++);
  90211. for (let a = r; a < this.children.length; a++)
  90212. n.append(this.children[a], 0);
  90213. for (; r > 0 && this.children[r - 1].length == 0; )
  90214. this.children[--r].destroy();
  90215. return this.children.length = r, this.markDirty(), this.length = e, n;
  90216. }
  90217. transferDOM(e) {
  90218. 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);
  90219. }
  90220. setDeco(e) {
  90221. aS(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e);
  90222. }
  90223. append(e, n) {
  90224. Mae(this, e, n);
  90225. }
  90226. // Only called when building a line view in ContentBuilder
  90227. addLineDeco(e) {
  90228. let n = e.spec.attributes, r = e.spec.class;
  90229. n && (this.attrs = _M(n, this.attrs || {})), r && (this.attrs = _M({ class: r }, this.attrs || {}));
  90230. }
  90231. domAtPos(e) {
  90232. return Eae(this, e);
  90233. }
  90234. reuseDOM(e) {
  90235. e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6);
  90236. }
  90237. sync(e, n) {
  90238. var r;
  90239. this.dom ? this.flags & 4 && (Oae(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 && (OM(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, n);
  90240. let i = this.dom.lastChild;
  90241. for (; i && Jt.get(i) instanceof tl; )
  90242. i = i.lastChild;
  90243. if (!i || !this.length || i.nodeName != "BR" && ((r = Jt.get(i)) === null || r === void 0 ? void 0 : r.isEditable) == !1 && (!Ne.ios || !this.children.some((a) => a instanceof co))) {
  90244. let a = document.createElement("BR");
  90245. a.cmIgnore = !0, this.dom.appendChild(a);
  90246. }
  90247. }
  90248. measureTextSize() {
  90249. if (this.children.length == 0 || this.length > 20)
  90250. return null;
  90251. let e = 0, n;
  90252. for (let r of this.children) {
  90253. if (!(r instanceof co) || /[^ -~]/.test(r.text))
  90254. return null;
  90255. let i = Jh(r.dom);
  90256. if (i.length != 1)
  90257. return null;
  90258. e += i[0].width, n = i[0].height;
  90259. }
  90260. return e ? {
  90261. lineHeight: this.dom.getBoundingClientRect().height,
  90262. charWidth: e / this.length,
  90263. textHeight: n
  90264. } : null;
  90265. }
  90266. coordsAt(e, n) {
  90267. let r = Iae(this, e, n);
  90268. if (!this.children.length && r && this.parent) {
  90269. let { heightOracle: i } = this.parent.view.viewState, a = r.bottom - r.top;
  90270. if (Math.abs(a - i.lineHeight) < 2 && i.textHeight < a) {
  90271. let o = (a - i.textHeight) / 2;
  90272. return { top: r.top + o, bottom: r.bottom - o, left: r.left, right: r.left };
  90273. }
  90274. }
  90275. return r;
  90276. }
  90277. become(e) {
  90278. return e instanceof Ln && this.children.length == 0 && e.children.length == 0 && aS(this.attrs, e.attrs) && this.breakAfter == e.breakAfter;
  90279. }
  90280. covers() {
  90281. return !0;
  90282. }
  90283. static find(e, n) {
  90284. for (let r = 0, i = 0; r < e.children.length; r++) {
  90285. let a = e.children[r], o = i + a.length;
  90286. if (o >= n) {
  90287. if (a instanceof Ln)
  90288. return a;
  90289. if (o > n)
  90290. break;
  90291. }
  90292. i = o + a.breakAfter;
  90293. }
  90294. return null;
  90295. }
  90296. }
  90297. class Ns extends Jt {
  90298. constructor(e, n, r) {
  90299. super(), this.widget = e, this.length = n, this.deco = r, this.breakAfter = 0, this.prevWidget = null;
  90300. }
  90301. merge(e, n, r, i, a, o) {
  90302. return r && (!(r instanceof Ns) || !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);
  90303. }
  90304. domAtPos(e) {
  90305. return e == 0 ? Lr.before(this.dom) : Lr.after(this.dom, e == this.length);
  90306. }
  90307. split(e) {
  90308. let n = this.length - e;
  90309. this.length = e;
  90310. let r = new Ns(this.widget, n, this.deco);
  90311. return r.breakAfter = this.breakAfter, r;
  90312. }
  90313. get children() {
  90314. return r4;
  90315. }
  90316. sync(e) {
  90317. (!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"));
  90318. }
  90319. get overrideDOMText() {
  90320. return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : Ft.empty;
  90321. }
  90322. domBoundsAround() {
  90323. return null;
  90324. }
  90325. become(e) {
  90326. return e instanceof Ns && 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;
  90327. }
  90328. ignoreMutation() {
  90329. return !0;
  90330. }
  90331. ignoreEvent(e) {
  90332. return this.widget.ignoreEvent(e);
  90333. }
  90334. get isEditable() {
  90335. return !1;
  90336. }
  90337. get isWidget() {
  90338. return !0;
  90339. }
  90340. coordsAt(e, n) {
  90341. return this.widget.coordsAt(this.dom, e, n);
  90342. }
  90343. destroy() {
  90344. super.destroy(), this.dom && this.widget.destroy(this.dom);
  90345. }
  90346. covers(e) {
  90347. let { startSide: n, endSide: r } = this.deco;
  90348. return n == r ? !1 : e < 0 ? n < 0 : r > 0;
  90349. }
  90350. }
  90351. class hs {
  90352. /**
  90353. Compare this instance to another instance of the same type.
  90354. (TypeScript can't express this, but only instances of the same
  90355. specific class will be passed to this method.) This is used to
  90356. avoid redrawing widgets when they are replaced by a new
  90357. decoration of the same type. The default implementation just
  90358. returns `false`, which will cause new instances of the widget to
  90359. always be redrawn.
  90360. */
  90361. eq(e) {
  90362. return !1;
  90363. }
  90364. /**
  90365. Update a DOM element created by a widget of the same type (but
  90366. different, non-`eq` content) to reflect this widget. May return
  90367. true to indicate that it could update, false to indicate it
  90368. couldn't (in which case the widget will be redrawn). The default
  90369. implementation just returns false.
  90370. */
  90371. updateDOM(e, n) {
  90372. return !1;
  90373. }
  90374. /**
  90375. @internal
  90376. */
  90377. compare(e) {
  90378. return this == e || this.constructor == e.constructor && this.eq(e);
  90379. }
  90380. /**
  90381. The estimated height this widget will have, to be used when
  90382. estimating the height of content that hasn't been drawn. May
  90383. return -1 to indicate you don't know. The default implementation
  90384. returns -1.
  90385. */
  90386. get estimatedHeight() {
  90387. return -1;
  90388. }
  90389. /**
  90390. For inline widgets that are displayed inline (as opposed to
  90391. `inline-block`) and introduce line breaks (through `<br>` tags
  90392. or textual newlines), this must indicate the amount of line
  90393. breaks they introduce. Defaults to 0.
  90394. */
  90395. get lineBreaks() {
  90396. return 0;
  90397. }
  90398. /**
  90399. Can be used to configure which kinds of events inside the widget
  90400. should be ignored by the editor. The default is to ignore all
  90401. events.
  90402. */
  90403. ignoreEvent(e) {
  90404. return !0;
  90405. }
  90406. /**
  90407. Override the way screen coordinates for positions at/in the
  90408. widget are found. `pos` will be the offset into the widget, and
  90409. `side` the side of the position that is being queried—less than
  90410. zero for before, greater than zero for after, and zero for
  90411. directly at that position.
  90412. */
  90413. coordsAt(e, n, r) {
  90414. return null;
  90415. }
  90416. /**
  90417. @internal
  90418. */
  90419. get isHidden() {
  90420. return !1;
  90421. }
  90422. /**
  90423. @internal
  90424. */
  90425. get editable() {
  90426. return !1;
  90427. }
  90428. /**
  90429. This is called when the an instance of the widget is removed
  90430. from the editor view.
  90431. */
  90432. destroy(e) {
  90433. }
  90434. }
  90435. var ei = /* @__PURE__ */ function(t) {
  90436. return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t;
  90437. }(ei || (ei = {}));
  90438. class Ze extends Cf {
  90439. constructor(e, n, r, i) {
  90440. super(), this.startSide = e, this.endSide = n, this.widget = r, this.spec = i;
  90441. }
  90442. /**
  90443. @internal
  90444. */
  90445. get heightRelevant() {
  90446. return !1;
  90447. }
  90448. /**
  90449. Create a mark decoration, which influences the styling of the
  90450. content in its range. Nested mark decorations will cause nested
  90451. DOM elements to be created. Nesting order is determined by
  90452. precedence of the [facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), with
  90453. the higher-precedence decorations creating the inner DOM nodes.
  90454. Such elements are split on line boundaries and on the boundaries
  90455. of lower-precedence decorations.
  90456. */
  90457. static mark(e) {
  90458. return new ay(e);
  90459. }
  90460. /**
  90461. Create a widget decoration, which displays a DOM element at the
  90462. given position.
  90463. */
  90464. static widget(e) {
  90465. let n = Math.max(-1e4, Math.min(1e4, e.side || 0)), r = !!e.block;
  90466. return n += r && !e.inlineOrder ? n > 0 ? 3e8 : -4e8 : n > 0 ? 1e8 : -1e8, new gu(e, n, n, r, e.widget || null, !1);
  90467. }
  90468. /**
  90469. Create a replace decoration which replaces the given range with
  90470. a widget, or simply hides it.
  90471. */
  90472. static replace(e) {
  90473. let n = !!e.block, r, i;
  90474. if (e.isBlockGap)
  90475. r = -5e8, i = 4e8;
  90476. else {
  90477. let { start: a, end: o } = Dae(e, n);
  90478. r = (a ? n ? -3e8 : -1 : 5e8) - 1, i = (o ? n ? 2e8 : 1 : -6e8) + 1;
  90479. }
  90480. return new gu(e, r, i, n, e.widget || null, !0);
  90481. }
  90482. /**
  90483. Create a line decoration, which can add DOM attributes to the
  90484. line starting at the given position.
  90485. */
  90486. static line(e) {
  90487. return new oy(e);
  90488. }
  90489. /**
  90490. Build a [`DecorationSet`](https://codemirror.net/6/docs/ref/#view.DecorationSet) from the given
  90491. decorated range or ranges. If the ranges aren't already sorted,
  90492. pass `true` for `sort` to make the library sort them for you.
  90493. */
  90494. static set(e, n = !1) {
  90495. return Vt.of(e, n);
  90496. }
  90497. /**
  90498. @internal
  90499. */
  90500. hasHeight() {
  90501. return this.widget ? this.widget.estimatedHeight > -1 : !1;
  90502. }
  90503. }
  90504. Ze.none = Vt.empty;
  90505. class ay extends Ze {
  90506. constructor(e) {
  90507. let { start: n, end: r } = Dae(e);
  90508. super(n ? -1 : 5e8, r ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null;
  90509. }
  90510. eq(e) {
  90511. var n, r;
  90512. return this == e || e instanceof ay && 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)) && aS(this.attrs, e.attrs, "class");
  90513. }
  90514. range(e, n = e) {
  90515. if (e >= n)
  90516. throw new RangeError("Mark decorations may not be empty");
  90517. return super.range(e, n);
  90518. }
  90519. }
  90520. ay.prototype.point = !1;
  90521. class oy extends Ze {
  90522. constructor(e) {
  90523. super(-2e8, -2e8, null, e);
  90524. }
  90525. eq(e) {
  90526. return e instanceof oy && this.spec.class == e.spec.class && aS(this.spec.attributes, e.spec.attributes);
  90527. }
  90528. range(e, n = e) {
  90529. if (n != e)
  90530. throw new RangeError("Line decoration ranges must be zero-length");
  90531. return super.range(e, n);
  90532. }
  90533. }
  90534. oy.prototype.mapMode = yr.TrackBefore;
  90535. oy.prototype.point = !0;
  90536. class gu extends Ze {
  90537. constructor(e, n, r, i, a, o) {
  90538. super(n, r, a, e), this.block = i, this.isReplace = o, this.mapMode = i ? n <= 0 ? yr.TrackBefore : yr.TrackAfter : yr.TrackDel;
  90539. }
  90540. // Only relevant when this.block == true
  90541. get type() {
  90542. return this.startSide != this.endSide ? ei.WidgetRange : this.startSide <= 0 ? ei.WidgetBefore : ei.WidgetAfter;
  90543. }
  90544. get heightRelevant() {
  90545. return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
  90546. }
  90547. eq(e) {
  90548. return e instanceof gu && Uat(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide;
  90549. }
  90550. range(e, n = e) {
  90551. if (this.isReplace && (e > n || e == n && this.startSide > 0 && this.endSide <= 0))
  90552. throw new RangeError("Invalid range for replacement decoration");
  90553. if (!this.isReplace && n != e)
  90554. throw new RangeError("Widget decorations can only have zero-length ranges");
  90555. return super.range(e, n);
  90556. }
  90557. }
  90558. gu.prototype.point = !0;
  90559. function Dae(t, e = !1) {
  90560. let { inclusiveStart: n, inclusiveEnd: r } = t;
  90561. return n == null && (n = t.inclusive), r == null && (r = t.inclusive), { start: n ?? e, end: r ?? e };
  90562. }
  90563. function Uat(t, e) {
  90564. return t == e || !!(t && e && t.compare(e));
  90565. }
  90566. function SM(t, e, n, r = 0) {
  90567. let i = n.length - 1;
  90568. i >= 0 && n[i] + r >= t ? n[i] = Math.max(n[i], e) : n.push(t, e);
  90569. }
  90570. class Ug {
  90571. constructor(e, n, r, i) {
  90572. 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;
  90573. }
  90574. posCovered() {
  90575. if (this.content.length == 0)
  90576. return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos;
  90577. let e = this.content[this.content.length - 1];
  90578. return !(e.breakAfter || e instanceof Ns && e.deco.endSide < 0);
  90579. }
  90580. getLine() {
  90581. return this.curLine || (this.content.push(this.curLine = new Ln()), this.atCursorPos = !0), this.curLine;
  90582. }
  90583. flushBuffer(e = this.bufferMarks) {
  90584. this.pendingBuffer && (this.curLine.append(jb(new ep(-1), e), e.length), this.pendingBuffer = 0);
  90585. }
  90586. addBlockWidget(e) {
  90587. this.flushBuffer(), this.curLine = null, this.content.push(e);
  90588. }
  90589. finish(e) {
  90590. this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof Ns) && this.getLine();
  90591. }
  90592. buildText(e, n, r) {
  90593. for (; e > 0; ) {
  90594. if (this.textOff == this.text.length) {
  90595. let { value: a, lineBreak: o, done: s } = this.cursor.next(this.skip);
  90596. if (this.skip = 0, s)
  90597. throw new Error("Ran out of text content when drawing inline views");
  90598. if (o) {
  90599. 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--;
  90600. continue;
  90601. } else
  90602. this.text = a, this.textOff = 0;
  90603. }
  90604. let i = Math.min(
  90605. this.text.length - this.textOff,
  90606. e,
  90607. 512
  90608. /* T.Chunk */
  90609. );
  90610. this.flushBuffer(n.slice(n.length - r)), this.getLine().append(jb(new co(this.text.slice(this.textOff, this.textOff + i)), n), r), this.atCursorPos = !0, this.textOff += i, e -= i, r = 0;
  90611. }
  90612. }
  90613. span(e, n, r, i) {
  90614. this.buildText(n - e, r, i), this.pos = n, this.openStart < 0 && (this.openStart = i);
  90615. }
  90616. point(e, n, r, i, a, o) {
  90617. if (this.disallowBlockEffectsFor[o] && r instanceof gu) {
  90618. if (r.block)
  90619. throw new RangeError("Block decorations may not be specified via plugins");
  90620. if (n > this.doc.lineAt(this.pos).to)
  90621. throw new RangeError("Decorations that replace line breaks may not be specified via plugins");
  90622. }
  90623. let s = n - e;
  90624. if (r instanceof gu)
  90625. if (r.block)
  90626. r.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Ns(r.widget || tp.block, s, r));
  90627. else {
  90628. let l = Ql.create(r.widget || tp.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();
  90629. this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(jb(new ep(1), i), a), a = i.length + Math.max(0, a - i.length)), f.append(jb(l, i), a), this.atCursorPos = c, this.pendingBuffer = c ? e < n || a > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice());
  90630. }
  90631. else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(r);
  90632. 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);
  90633. }
  90634. static build(e, n, r, i, a) {
  90635. let o = new Ug(e, n, r, a);
  90636. return o.openEnd = Vt.spans(i, n, r, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
  90637. }
  90638. }
  90639. function jb(t, e) {
  90640. for (let n of e)
  90641. t = new tl(n, [t], t.length);
  90642. return t;
  90643. }
  90644. class tp extends hs {
  90645. constructor(e) {
  90646. super(), this.tag = e;
  90647. }
  90648. eq(e) {
  90649. return e.tag == this.tag;
  90650. }
  90651. toDOM() {
  90652. return document.createElement(this.tag);
  90653. }
  90654. updateDOM(e) {
  90655. return e.nodeName.toLowerCase() == this.tag;
  90656. }
  90657. get isHidden() {
  90658. return !0;
  90659. }
  90660. }
  90661. tp.inline = /* @__PURE__ */ new tp("span");
  90662. tp.block = /* @__PURE__ */ new tp("div");
  90663. var pn = /* @__PURE__ */ function(t) {
  90664. return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t;
  90665. }(pn || (pn = {}));
  90666. const $f = pn.LTR, i4 = pn.RTL;
  90667. function Rae(t) {
  90668. let e = [];
  90669. for (let n = 0; n < t.length; n++)
  90670. e.push(1 << +t[n]);
  90671. return e;
  90672. }
  90673. const Xat = /* @__PURE__ */ Rae("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Yat = /* @__PURE__ */ Rae("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), xM = /* @__PURE__ */ Object.create(null), Co = [];
  90674. for (let t of ["()", "[]", "{}"]) {
  90675. let e = /* @__PURE__ */ t.charCodeAt(0), n = /* @__PURE__ */ t.charCodeAt(1);
  90676. xM[e] = n, xM[n] = -e;
  90677. }
  90678. function kae(t) {
  90679. return t <= 247 ? Xat[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? Yat[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1;
  90680. }
  90681. const qat = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
  90682. class Hl {
  90683. /**
  90684. The direction of this span.
  90685. */
  90686. get dir() {
  90687. return this.level % 2 ? i4 : $f;
  90688. }
  90689. /**
  90690. @internal
  90691. */
  90692. constructor(e, n, r) {
  90693. this.from = e, this.to = n, this.level = r;
  90694. }
  90695. /**
  90696. @internal
  90697. */
  90698. side(e, n) {
  90699. return this.dir == n == e ? this.to : this.from;
  90700. }
  90701. /**
  90702. @internal
  90703. */
  90704. forward(e, n) {
  90705. return e == (this.dir == n);
  90706. }
  90707. /**
  90708. @internal
  90709. */
  90710. static find(e, n, r, i) {
  90711. let a = -1;
  90712. for (let o = 0; o < e.length; o++) {
  90713. let s = e[o];
  90714. if (s.from <= n && s.to >= n) {
  90715. if (s.level == r)
  90716. return o;
  90717. (a < 0 || (i != 0 ? i < 0 ? s.from < n : s.to > n : e[a].level > s.level)) && (a = o);
  90718. }
  90719. }
  90720. if (a < 0)
  90721. throw new RangeError("Index out of range");
  90722. return a;
  90723. }
  90724. }
  90725. function Lae(t, e) {
  90726. if (t.length != e.length)
  90727. return !1;
  90728. for (let n = 0; n < t.length; n++) {
  90729. let r = t[n], i = e[n];
  90730. if (r.from != i.from || r.to != i.to || r.direction != i.direction || !Lae(r.inner, i.inner))
  90731. return !1;
  90732. }
  90733. return !0;
  90734. }
  90735. const qt = [];
  90736. function Kat(t, e, n, r, i) {
  90737. for (let a = 0; a <= r.length; a++) {
  90738. let o = a ? r[a - 1].to : e, s = a < r.length ? r[a].from : n, l = a ? 256 : i;
  90739. for (let u = o, c = l, f = l; u < s; u++) {
  90740. let d = kae(t.charCodeAt(u));
  90741. d == 512 ? d = c : d == 8 && f == 4 && (d = 16), qt[u] = d == 4 ? 2 : d, d & 7 && (f = d), c = d;
  90742. }
  90743. for (let u = o, c = l, f = l; u < s; u++) {
  90744. let d = qt[u];
  90745. if (d == 128)
  90746. u < s - 1 && c == qt[u + 1] && c & 24 ? d = qt[u] = c : qt[u] = 256;
  90747. else if (d == 64) {
  90748. let h = u + 1;
  90749. for (; h < s && qt[h] == 64; )
  90750. h++;
  90751. let p = u && c == 8 || h < n && qt[h] == 8 ? f == 1 ? 1 : 8 : 256;
  90752. for (let v = u; v < h; v++)
  90753. qt[v] = p;
  90754. u = h - 1;
  90755. } else d == 8 && f == 1 && (qt[u] = 1);
  90756. c = d, d & 7 && (f = d);
  90757. }
  90758. }
  90759. }
  90760. function Jat(t, e, n, r, i) {
  90761. let a = i == 1 ? 2 : 1;
  90762. for (let o = 0, s = 0, l = 0; o <= r.length; o++) {
  90763. let u = o ? r[o - 1].to : e, c = o < r.length ? r[o].from : n;
  90764. for (let f = u, d, h, p; f < c; f++)
  90765. if (h = xM[d = t.charCodeAt(f)])
  90766. if (h < 0) {
  90767. for (let v = s - 3; v >= 0; v -= 3)
  90768. if (Co[v + 1] == -h) {
  90769. let g = Co[v + 2], m = g & 2 ? i : g & 4 ? g & 1 ? a : i : 0;
  90770. m && (qt[f] = qt[Co[v]] = m), s = v;
  90771. break;
  90772. }
  90773. } else {
  90774. if (Co.length == 189)
  90775. break;
  90776. Co[s++] = f, Co[s++] = d, Co[s++] = l;
  90777. }
  90778. else if ((p = qt[f]) == 2 || p == 1) {
  90779. let v = p == i;
  90780. l = v ? 0 : 1;
  90781. for (let g = s - 3; g >= 0; g -= 3) {
  90782. let m = Co[g + 2];
  90783. if (m & 2)
  90784. break;
  90785. if (v)
  90786. Co[g + 2] |= 2;
  90787. else {
  90788. if (m & 4)
  90789. break;
  90790. Co[g + 2] |= 4;
  90791. }
  90792. }
  90793. }
  90794. }
  90795. }
  90796. function eot(t, e, n, r) {
  90797. for (let i = 0, a = r; i <= n.length; i++) {
  90798. let o = i ? n[i - 1].to : t, s = i < n.length ? n[i].from : e;
  90799. for (let l = o; l < s; ) {
  90800. let u = qt[l];
  90801. if (u == 256) {
  90802. let c = l + 1;
  90803. for (; ; )
  90804. if (c == s) {
  90805. if (i == n.length)
  90806. break;
  90807. c = n[i++].to, s = i < n.length ? n[i].from : e;
  90808. } else if (qt[c] == 256)
  90809. c++;
  90810. else
  90811. break;
  90812. let f = a == 1, d = (c < e ? qt[c] : r) == 1, h = f == d ? f ? 1 : 2 : r;
  90813. for (let p = c, v = i, g = v ? n[v - 1].to : t; p > l; )
  90814. p == g && (p = n[--v].from, g = v ? n[v - 1].to : t), qt[--p] = h;
  90815. l = c;
  90816. } else
  90817. a = u, l++;
  90818. }
  90819. }
  90820. }
  90821. function wM(t, e, n, r, i, a, o) {
  90822. let s = r % 2 ? 2 : 1;
  90823. if (r % 2 == i % 2)
  90824. for (let l = e, u = 0; l < n; ) {
  90825. let c = !0, f = !1;
  90826. if (u == a.length || l < a[u].from) {
  90827. let v = qt[l];
  90828. v != s && (c = !1, f = v == 16);
  90829. }
  90830. let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
  90831. e: for (; ; )
  90832. if (u < a.length && p == a[u].from) {
  90833. if (f)
  90834. break e;
  90835. let v = a[u];
  90836. if (!c)
  90837. for (let g = v.to, m = u + 1; ; ) {
  90838. if (g == n)
  90839. break e;
  90840. if (m < a.length && a[m].from == g)
  90841. g = a[m++].to;
  90842. else {
  90843. if (qt[g] == s)
  90844. break e;
  90845. break;
  90846. }
  90847. }
  90848. if (u++, d)
  90849. d.push(v);
  90850. else {
  90851. v.from > l && o.push(new Hl(l, v.from, h));
  90852. let g = v.direction == $f != !(h % 2);
  90853. CM(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.to;
  90854. }
  90855. p = v.to;
  90856. } else {
  90857. if (p == n || (c ? qt[p] != s : qt[p] == s))
  90858. break;
  90859. p++;
  90860. }
  90861. d ? wM(t, l, p, r + 1, i, d, o) : l < p && o.push(new Hl(l, p, h)), l = p;
  90862. }
  90863. else
  90864. for (let l = n, u = a.length; l > e; ) {
  90865. let c = !0, f = !1;
  90866. if (!u || l > a[u - 1].to) {
  90867. let v = qt[l - 1];
  90868. v != s && (c = !1, f = v == 16);
  90869. }
  90870. let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
  90871. e: for (; ; )
  90872. if (u && p == a[u - 1].to) {
  90873. if (f)
  90874. break e;
  90875. let v = a[--u];
  90876. if (!c)
  90877. for (let g = v.from, m = u; ; ) {
  90878. if (g == e)
  90879. break e;
  90880. if (m && a[m - 1].to == g)
  90881. g = a[--m].from;
  90882. else {
  90883. if (qt[g - 1] == s)
  90884. break e;
  90885. break;
  90886. }
  90887. }
  90888. if (d)
  90889. d.push(v);
  90890. else {
  90891. v.to < l && o.push(new Hl(v.to, l, h));
  90892. let g = v.direction == $f != !(h % 2);
  90893. CM(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.from;
  90894. }
  90895. p = v.from;
  90896. } else {
  90897. if (p == e || (c ? qt[p - 1] != s : qt[p - 1] == s))
  90898. break;
  90899. p--;
  90900. }
  90901. d ? wM(t, p, l, r + 1, i, d, o) : p < l && o.push(new Hl(p, l, h)), l = p;
  90902. }
  90903. }
  90904. function CM(t, e, n, r, i, a, o) {
  90905. let s = e % 2 ? 2 : 1;
  90906. Kat(t, i, a, r, s), Jat(t, i, a, r, s), eot(i, a, r, s), wM(t, i, a, e, n, r, o);
  90907. }
  90908. function tot(t, e, n) {
  90909. if (!t)
  90910. return [new Hl(0, 0, e == i4 ? 1 : 0)];
  90911. if (e == $f && !n.length && !qat.test(t))
  90912. return Nae(t.length);
  90913. if (n.length)
  90914. for (; t.length > qt.length; )
  90915. qt[qt.length] = 256;
  90916. let r = [], i = e == $f ? 0 : 1;
  90917. return CM(t, i, i, n, 0, t.length, r), r;
  90918. }
  90919. function Nae(t) {
  90920. return [new Hl(0, t, 0)];
  90921. }
  90922. let Bae = "";
  90923. function not(t, e, n, r, i) {
  90924. var a;
  90925. let o = r.head - t.from, s = Hl.find(e, o, (a = r.bidiLevel) !== null && a !== void 0 ? a : -1, r.assoc), l = e[s], u = l.side(i, n);
  90926. if (o == u) {
  90927. let d = s += i ? 1 : -1;
  90928. if (d < 0 || d >= e.length)
  90929. return null;
  90930. l = e[s = d], o = l.side(!i, n), u = l.side(i, n);
  90931. }
  90932. let c = _r(t.text, o, l.forward(i, n));
  90933. (c < l.from || c > l.to) && (c = u), Bae = t.text.slice(Math.min(o, c), Math.max(o, c));
  90934. let f = s == (i ? e.length - 1 : 0) ? null : e[s + (i ? 1 : -1)];
  90935. return f && c == u && f.level + (i ? 0 : 1) < l.level ? me.cursor(f.side(!i, n) + t.from, f.forward(i, n) ? 1 : -1, f.level) : me.cursor(c + t.from, l.forward(i, n) ? -1 : 1, l.level);
  90936. }
  90937. function rot(t, e, n) {
  90938. for (let r = e; r < n; r++) {
  90939. let i = kae(t.charCodeAt(r));
  90940. if (i == 1)
  90941. return $f;
  90942. if (i == 2 || i == 4)
  90943. return i4;
  90944. }
  90945. return $f;
  90946. }
  90947. const zae = /* @__PURE__ */ Be.define(), Vae = /* @__PURE__ */ Be.define(), Fae = /* @__PURE__ */ Be.define(), Wae = /* @__PURE__ */ Be.define(), TM = /* @__PURE__ */ Be.define(), Qae = /* @__PURE__ */ Be.define(), Hae = /* @__PURE__ */ Be.define(), Gae = /* @__PURE__ */ Be.define({
  90948. combine: (t) => t.some((e) => e)
  90949. }), jae = /* @__PURE__ */ Be.define({
  90950. combine: (t) => t.some((e) => e)
  90951. }), Zae = /* @__PURE__ */ Be.define();
  90952. class dh {
  90953. constructor(e, n = "nearest", r = "nearest", i = 5, a = 5, o = !1) {
  90954. this.range = e, this.y = n, this.x = r, this.yMargin = i, this.xMargin = a, this.isSnapshot = o;
  90955. }
  90956. map(e) {
  90957. return e.empty ? this : new dh(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  90958. }
  90959. clip(e) {
  90960. return this.range.to <= e.doc.length ? this : new dh(me.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  90961. }
  90962. }
  90963. const Zb = /* @__PURE__ */ dt.define({ map: (t, e) => t.map(e) }), Uae = /* @__PURE__ */ dt.define();
  90964. function bi(t, e, n) {
  90965. let r = t.facet(Wae);
  90966. 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);
  90967. }
  90968. const El = /* @__PURE__ */ Be.define({ combine: (t) => t.length ? t[0] : !0 });
  90969. let iot = 0;
  90970. const ig = /* @__PURE__ */ Be.define();
  90971. class kn {
  90972. constructor(e, n, r, i, a) {
  90973. this.id = e, this.create = n, this.domEventHandlers = r, this.domEventObservers = i, this.extension = a(this);
  90974. }
  90975. /**
  90976. Define a plugin from a constructor function that creates the
  90977. plugin's value, given an editor view.
  90978. */
  90979. static define(e, n) {
  90980. const { eventHandlers: r, eventObservers: i, provide: a, decorations: o } = n || {};
  90981. return new kn(iot++, e, r, i, (s) => {
  90982. let l = [ig.of(s)];
  90983. return o && l.push(Km.of((u) => {
  90984. let c = u.plugin(s);
  90985. return c ? o(c) : Ze.none;
  90986. })), a && l.push(a(s)), l;
  90987. });
  90988. }
  90989. /**
  90990. Create a plugin for a class whose constructor takes a single
  90991. editor view as argument.
  90992. */
  90993. static fromClass(e, n) {
  90994. return kn.define((r) => new e(r), n);
  90995. }
  90996. }
  90997. class m$ {
  90998. constructor(e) {
  90999. this.spec = e, this.mustUpdate = null, this.value = null;
  91000. }
  91001. update(e) {
  91002. if (this.value) {
  91003. if (this.mustUpdate) {
  91004. let n = this.mustUpdate;
  91005. if (this.mustUpdate = null, this.value.update)
  91006. try {
  91007. this.value.update(n);
  91008. } catch (r) {
  91009. if (bi(n.state, r, "CodeMirror plugin crashed"), this.value.destroy)
  91010. try {
  91011. this.value.destroy();
  91012. } catch {
  91013. }
  91014. this.deactivate();
  91015. }
  91016. }
  91017. } else if (this.spec)
  91018. try {
  91019. this.value = this.spec.create(e);
  91020. } catch (n) {
  91021. bi(e.state, n, "CodeMirror plugin crashed"), this.deactivate();
  91022. }
  91023. return this;
  91024. }
  91025. destroy(e) {
  91026. var n;
  91027. if (!((n = this.value) === null || n === void 0) && n.destroy)
  91028. try {
  91029. this.value.destroy();
  91030. } catch (r) {
  91031. bi(e.state, r, "CodeMirror plugin crashed");
  91032. }
  91033. }
  91034. deactivate() {
  91035. this.spec = this.value = null;
  91036. }
  91037. }
  91038. const Xae = /* @__PURE__ */ Be.define(), a4 = /* @__PURE__ */ Be.define(), Km = /* @__PURE__ */ Be.define(), Yae = /* @__PURE__ */ Be.define(), o4 = /* @__PURE__ */ Be.define(), qae = /* @__PURE__ */ Be.define();
  91039. function zH(t, e) {
  91040. let n = t.state.facet(qae);
  91041. if (!n.length)
  91042. return n;
  91043. let r = n.map((a) => a instanceof Function ? a(t) : a), i = [];
  91044. return Vt.spans(r, e.from, e.to, {
  91045. point() {
  91046. },
  91047. span(a, o, s, l) {
  91048. let u = a - e.from, c = o - e.from, f = i;
  91049. for (let d = s.length - 1; d >= 0; d--, l--) {
  91050. let h = s[d].spec.bidiIsolate, p;
  91051. if (h == null && (h = rot(e.text, u, c)), l > 0 && f.length && (p = f[f.length - 1]).to == u && p.direction == h)
  91052. p.to = c, f = p.inner;
  91053. else {
  91054. let v = { from: u, to: c, direction: h, inner: [] };
  91055. f.push(v), f = v.inner;
  91056. }
  91057. }
  91058. }
  91059. }), i;
  91060. }
  91061. const Kae = /* @__PURE__ */ Be.define();
  91062. function Jae(t) {
  91063. let e = 0, n = 0, r = 0, i = 0;
  91064. for (let a of t.state.facet(Kae)) {
  91065. let o = a(t);
  91066. 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)));
  91067. }
  91068. return { left: e, right: n, top: r, bottom: i };
  91069. }
  91070. const ag = /* @__PURE__ */ Be.define();
  91071. class Ca {
  91072. constructor(e, n, r, i) {
  91073. this.fromA = e, this.toA = n, this.fromB = r, this.toB = i;
  91074. }
  91075. join(e) {
  91076. return new Ca(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
  91077. }
  91078. addToSet(e) {
  91079. let n = e.length, r = this;
  91080. for (; n > 0; n--) {
  91081. let i = e[n - 1];
  91082. if (!(i.fromA > r.toA)) {
  91083. if (i.toA < r.fromA)
  91084. break;
  91085. r = r.join(i), e.splice(n - 1, 1);
  91086. }
  91087. }
  91088. return e.splice(n, 0, r), e;
  91089. }
  91090. static extendWithRanges(e, n) {
  91091. if (n.length == 0)
  91092. return e;
  91093. let r = [];
  91094. for (let i = 0, a = 0, o = 0, s = 0; ; i++) {
  91095. let l = i == e.length ? null : e[i], u = o - s, c = l ? l.fromB : 1e9;
  91096. for (; a < n.length && n[a] < c; ) {
  91097. let f = n[a], d = n[a + 1], h = Math.max(s, f), p = Math.min(c, d);
  91098. if (h <= p && new Ca(h + u, p + u, h, p).addToSet(r), d > c)
  91099. break;
  91100. a += 2;
  91101. }
  91102. if (!l)
  91103. return r;
  91104. new Ca(l.fromA, l.toA, l.fromB, l.toB).addToSet(r), o = l.toA, s = l.toB;
  91105. }
  91106. }
  91107. }
  91108. class oS {
  91109. constructor(e, n, r) {
  91110. this.view = e, this.state = n, this.transactions = r, this.flags = 0, this.startState = e.state, this.changes = jn.empty(this.startState.doc.length);
  91111. for (let a of r)
  91112. this.changes = this.changes.compose(a.changes);
  91113. let i = [];
  91114. this.changes.iterChangedRanges((a, o, s, l) => i.push(new Ca(a, o, s, l))), this.changedRanges = i;
  91115. }
  91116. /**
  91117. @internal
  91118. */
  91119. static create(e, n, r) {
  91120. return new oS(e, n, r);
  91121. }
  91122. /**
  91123. Tells you whether the [viewport](https://codemirror.net/6/docs/ref/#view.EditorView.viewport) or
  91124. [visible ranges](https://codemirror.net/6/docs/ref/#view.EditorView.visibleRanges) changed in this
  91125. update.
  91126. */
  91127. get viewportChanged() {
  91128. return (this.flags & 4) > 0;
  91129. }
  91130. /**
  91131. Indicates whether the height of a block element in the editor
  91132. changed in this update.
  91133. */
  91134. get heightChanged() {
  91135. return (this.flags & 2) > 0;
  91136. }
  91137. /**
  91138. Returns true when the document was modified or the size of the
  91139. editor, or elements within the editor, changed.
  91140. */
  91141. get geometryChanged() {
  91142. return this.docChanged || (this.flags & 10) > 0;
  91143. }
  91144. /**
  91145. True when this update indicates a focus change.
  91146. */
  91147. get focusChanged() {
  91148. return (this.flags & 1) > 0;
  91149. }
  91150. /**
  91151. Whether the document changed in this update.
  91152. */
  91153. get docChanged() {
  91154. return !this.changes.empty;
  91155. }
  91156. /**
  91157. Whether the selection was explicitly set in this update.
  91158. */
  91159. get selectionSet() {
  91160. return this.transactions.some((e) => e.selection);
  91161. }
  91162. /**
  91163. @internal
  91164. */
  91165. get empty() {
  91166. return this.flags == 0 && this.transactions.length == 0;
  91167. }
  91168. }
  91169. class VH extends Jt {
  91170. get length() {
  91171. return this.view.state.doc.length;
  91172. }
  91173. constructor(e) {
  91174. super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [!1], this.domChanged = null, this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.editContextFormatting = Ze.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 Ln()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new Ca(0, 0, 0, e.state.doc.length)], 0, null);
  91175. }
  91176. // Update the document view to a given state.
  91177. update(e) {
  91178. var n;
  91179. let r = e.changedRanges;
  91180. 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);
  91181. let i = -1;
  91182. this.view.inputState.composing >= 0 && !this.view.observer.editContext && (!((n = this.domChanged) === null || n === void 0) && n.newSel ? i = this.domChanged.newSel.head : !fot(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head));
  91183. let a = i > -1 ? oot(this.view, e.changes, i) : null;
  91184. if (this.domChanged = null, this.hasComposition) {
  91185. this.markedForComposition.clear();
  91186. let { from: u, to: c } = this.hasComposition;
  91187. r = new Ca(u, c, e.changes.mapPos(u, -1), e.changes.mapPos(c, 1)).addToSet(r.slice());
  91188. }
  91189. this.hasComposition = a ? { from: a.range.fromB, to: a.range.toB } : null, (Ne.ie || Ne.chrome) && !a && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0);
  91190. let o = this.decorations, s = this.updateDeco(), l = uot(o, s, e.changes);
  91191. return r = Ca.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);
  91192. }
  91193. // Used by update and the constructor do perform the actual DOM
  91194. // update
  91195. updateInner(e, n, r) {
  91196. this.view.viewState.mustMeasureContent = !0, this.updateChildren(e, n, r);
  91197. let { observer: i } = this.view;
  91198. i.ignore(() => {
  91199. this.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px", this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : "";
  91200. let o = Ne.chrome || Ne.ios ? { node: i.selectionRange.focusNode, written: !1 } : void 0;
  91201. this.sync(this.view, o), this.flags &= -8, o && (o.written || i.selectionRange.focusNode != o.node) && (this.forceSelection = !0), this.dom.style.height = "";
  91202. }), this.markedForComposition.forEach(
  91203. (o) => o.flags &= -9
  91204. /* ViewFlag.Composition */
  91205. );
  91206. let a = [];
  91207. if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length)
  91208. for (let o of this.children)
  91209. o instanceof Ns && o.widget instanceof FH && a.push(o.dom);
  91210. i.updateGaps(a);
  91211. }
  91212. updateChildren(e, n, r) {
  91213. let i = r ? r.range.addToSet(e.slice()) : e, a = this.childCursor(n);
  91214. for (let o = i.length - 1; ; o--) {
  91215. let s = o >= 0 ? i[o] : null;
  91216. if (!s)
  91217. break;
  91218. let { fromA: l, toA: u, fromB: c, toB: f } = s, d, h, p, v;
  91219. if (r && r.range.fromB < f && r.range.toB > c) {
  91220. let _ = Ug.build(this.view.state.doc, c, r.range.fromB, this.decorations, this.dynamicDecorationMap), O = Ug.build(this.view.state.doc, r.range.toB, f, this.decorations, this.dynamicDecorationMap);
  91221. h = _.breakAtStart, p = _.openStart, v = O.openEnd;
  91222. let S = this.compositionView(r);
  91223. O.breakAtStart ? S.breakAfter = 1 : O.content.length && S.merge(S.length, S.length, O.content[0], !1, O.openStart, 0) && (S.breakAfter = O.content[0].breakAfter, O.content.shift()), _.content.length && S.merge(0, 0, _.content[_.content.length - 1], !0, 0, _.openEnd) && _.content.pop(), d = _.content.concat(S).concat(O.content);
  91224. } else
  91225. ({ content: d, breakAtStart: h, openStart: p, openEnd: v } = Ug.build(this.view.state.doc, c, f, this.decorations, this.dynamicDecorationMap));
  91226. let { i: g, off: m } = a.findPos(u, 1), { i: y, off: b } = a.findPos(l, -1);
  91227. Tae(this, y, b, g, m, d, h, p, v);
  91228. }
  91229. r && this.fixCompositionDOM(r);
  91230. }
  91231. updateEditContextFormatting(e) {
  91232. this.editContextFormatting = this.editContextFormatting.map(e.changes);
  91233. for (let n of e.transactions)
  91234. for (let r of n.effects)
  91235. r.is(Uae) && (this.editContextFormatting = r.value);
  91236. }
  91237. compositionView(e) {
  91238. let n = new co(e.text.nodeValue);
  91239. n.flags |= 8;
  91240. for (let { deco: i } of e.marks)
  91241. n = new tl(i, [n], n.length);
  91242. let r = new Ln();
  91243. return r.append(n, 0), r;
  91244. }
  91245. fixCompositionDOM(e) {
  91246. let n = (a, o) => {
  91247. o.flags |= 8 | (o.children.some(
  91248. (l) => l.flags & 7
  91249. /* ViewFlag.Dirty */
  91250. ) ? 1 : 0), this.markedForComposition.add(o);
  91251. let s = Jt.get(a);
  91252. s && s != o && (s.dom = null), o.setDOM(a);
  91253. }, r = this.childPos(e.range.fromB, 1), i = this.children[r.i];
  91254. n(e.line, i);
  91255. for (let a = e.marks.length - 1; a >= -1; a--)
  91256. r = i.childPos(r.off, 1), i = i.children[r.i], n(a >= 0 ? e.marks[a].node : e.text, i);
  91257. }
  91258. // Sync the DOM selection to this.state.selection
  91259. updateSelection(e = !1, n = !1) {
  91260. (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange();
  91261. let r = this.view.root.activeElement, i = r == this.dom, a = !i && a1(this.dom, this.view.observer.selectionRange) && !(r && this.dom.contains(r));
  91262. if (!(i || n || a))
  91263. return;
  91264. let o = this.forceSelection;
  91265. this.forceSelection = !1;
  91266. let s = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(s.anchor)), u = s.empty ? l : this.moveToLine(this.domAtPos(s.head));
  91267. if (Ne.gecko && s.empty && !this.hasComposition && aot(l)) {
  91268. let f = document.createTextNode("");
  91269. this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new Lr(f, 0), o = !0;
  91270. }
  91271. let c = this.view.observer.selectionRange;
  91272. (o || !c.focusNode || (!Zg(l.node, l.offset, c.anchorNode, c.anchorOffset) || !Zg(u.node, u.offset, c.focusNode, c.focusOffset)) && !this.suppressWidgetCursorChange(c, s)) && (this.view.observer.ignore(() => {
  91273. Ne.android && Ne.chrome && this.dom.contains(c.focusNode) && cot(c.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 }));
  91274. let f = qm(this.view.root);
  91275. if (f) if (s.empty) {
  91276. if (Ne.gecko) {
  91277. let d = sot(l.node, l.offset);
  91278. if (d && d != 3) {
  91279. let h = (d == 1 ? xae : wae)(l.node, l.offset);
  91280. h && (l = new Lr(h.node, h.offset));
  91281. }
  91282. }
  91283. f.collapse(l.node, l.offset), s.bidiLevel != null && f.caretBidiLevel !== void 0 && (f.caretBidiLevel = s.bidiLevel);
  91284. } else if (f.extend) {
  91285. f.collapse(l.node, l.offset);
  91286. try {
  91287. f.extend(u.node, u.offset);
  91288. } catch {
  91289. }
  91290. } else {
  91291. let d = document.createRange();
  91292. 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);
  91293. }
  91294. a && this.view.root.activeElement == this.dom && (this.dom.blur(), r && r.focus());
  91295. }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new Lr(c.anchorNode, c.anchorOffset), this.impreciseHead = u.precise ? null : new Lr(c.focusNode, c.focusOffset);
  91296. }
  91297. // If a zero-length widget is inserted next to the cursor during
  91298. // composition, avoid moving it across it and disrupting the
  91299. // composition.
  91300. suppressWidgetCursorChange(e, n) {
  91301. return this.hasComposition && n.empty && Zg(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == n.head;
  91302. }
  91303. enforceCursorAssoc() {
  91304. if (this.hasComposition)
  91305. return;
  91306. let { view: e } = this, n = e.state.selection.main, r = qm(e.root), { anchorNode: i, anchorOffset: a } = e.observer.selectionRange;
  91307. if (!r || !n.empty || !n.assoc || !r.modify)
  91308. return;
  91309. let o = Ln.find(this, n.head);
  91310. if (!o)
  91311. return;
  91312. let s = o.posAtStart;
  91313. if (n.head == s || n.head == s + o.length)
  91314. return;
  91315. let l = this.coordsAt(n.head, -1), u = this.coordsAt(n.head, 1);
  91316. if (!l || !u || l.bottom > u.top)
  91317. return;
  91318. let c = this.domAtPos(n.head + n.assoc);
  91319. r.collapse(c.node, c.offset), r.modify("move", n.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange();
  91320. let f = e.observer.selectionRange;
  91321. e.docView.posFromDOM(f.anchorNode, f.anchorOffset) != n.from && r.collapse(i, a);
  91322. }
  91323. // If a position is in/near a block widget, move it to a nearby text
  91324. // line, since we don't want the cursor inside a block widget.
  91325. moveToLine(e) {
  91326. let n = this.dom, r;
  91327. if (e.node != n)
  91328. return e;
  91329. for (let i = e.offset; !r && i < n.childNodes.length; i++) {
  91330. let a = Jt.get(n.childNodes[i]);
  91331. a instanceof Ln && (r = a.domAtPos(0));
  91332. }
  91333. for (let i = e.offset - 1; !r && i >= 0; i--) {
  91334. let a = Jt.get(n.childNodes[i]);
  91335. a instanceof Ln && (r = a.domAtPos(a.length));
  91336. }
  91337. return r ? new Lr(r.node, r.offset, !0) : e;
  91338. }
  91339. nearest(e) {
  91340. for (let n = e; n; ) {
  91341. let r = Jt.get(n);
  91342. if (r && r.rootView == this)
  91343. return r;
  91344. n = n.parentNode;
  91345. }
  91346. return null;
  91347. }
  91348. posFromDOM(e, n) {
  91349. let r = this.nearest(e);
  91350. if (!r)
  91351. throw new RangeError("Trying to find position for a DOM position outside of the document");
  91352. return r.localPosFromDOM(e, n) + r.posAtStart;
  91353. }
  91354. domAtPos(e) {
  91355. let { i: n, off: r } = this.childCursor().findPos(e, -1);
  91356. for (; n < this.children.length - 1; ) {
  91357. let i = this.children[n];
  91358. if (r < i.length || i instanceof Ln)
  91359. break;
  91360. n++, r = 0;
  91361. }
  91362. return this.children[n].domAtPos(r);
  91363. }
  91364. coordsAt(e, n) {
  91365. let r = null, i = 0;
  91366. for (let a = this.length, o = this.children.length - 1; o >= 0; o--) {
  91367. let s = this.children[o], l = a - s.breakAfter, u = l - s.length;
  91368. if (l < e)
  91369. break;
  91370. if (u <= e && (u < e || s.covers(-1)) && (l > e || s.covers(1)) && (!r || s instanceof Ln && !(r instanceof Ln && n >= 0)))
  91371. r = s, i = u;
  91372. else if (r && u == e && l == e && s instanceof Ns && Math.abs(n) < 2) {
  91373. if (s.deco.startSide < 0)
  91374. break;
  91375. o && (r = null);
  91376. }
  91377. a = u;
  91378. }
  91379. return r ? r.coordsAt(e - i, n) : null;
  91380. }
  91381. coordsForChar(e) {
  91382. let { i: n, off: r } = this.childPos(e, 1), i = this.children[n];
  91383. if (!(i instanceof Ln))
  91384. return null;
  91385. for (; i.children.length; ) {
  91386. let { i: s, off: l } = i.childPos(r, 1);
  91387. for (; ; s++) {
  91388. if (s == i.children.length)
  91389. return null;
  91390. if ((i = i.children[s]).length)
  91391. break;
  91392. }
  91393. r = l;
  91394. }
  91395. if (!(i instanceof co))
  91396. return null;
  91397. let a = _r(i.text, r);
  91398. if (a == r)
  91399. return null;
  91400. let o = Pf(i.dom, r, a).getClientRects();
  91401. for (let s = 0; s < o.length; s++) {
  91402. let l = o[s];
  91403. if (s == o.length - 1 || l.top < l.bottom && l.left < l.right)
  91404. return l;
  91405. }
  91406. return null;
  91407. }
  91408. measureVisibleLineHeights(e) {
  91409. 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 == pn.LTR;
  91410. for (let u = 0, c = 0; c < this.children.length; c++) {
  91411. let f = this.children[c], d = u + f.length;
  91412. if (d > i)
  91413. break;
  91414. if (u >= r) {
  91415. let h = f.dom.getBoundingClientRect();
  91416. if (n.push(h.height), o) {
  91417. let p = f.dom.lastChild, v = p ? Jh(p) : [];
  91418. if (v.length) {
  91419. let g = v[v.length - 1], m = l ? g.right - h.left : h.right - g.left;
  91420. m > s && (s = m, this.minWidth = a, this.minWidthFrom = u, this.minWidthTo = d);
  91421. }
  91422. }
  91423. }
  91424. u = d + f.breakAfter;
  91425. }
  91426. return n;
  91427. }
  91428. textDirectionAt(e) {
  91429. let { i: n } = this.childPos(e, 1);
  91430. return getComputedStyle(this.children[n].dom).direction == "rtl" ? pn.RTL : pn.LTR;
  91431. }
  91432. measureTextSize() {
  91433. for (let a of this.children)
  91434. if (a instanceof Ln) {
  91435. let o = a.measureTextSize();
  91436. if (o)
  91437. return o;
  91438. }
  91439. let e = document.createElement("div"), n, r, i;
  91440. 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(() => {
  91441. this.dom.appendChild(e);
  91442. let a = Jh(e.firstChild)[0];
  91443. n = e.getBoundingClientRect().height, r = a ? a.width / 27 : 7, i = a ? a.height : n, e.remove();
  91444. }), { lineHeight: n, charWidth: r, textHeight: i };
  91445. }
  91446. childCursor(e = this.length) {
  91447. let n = this.children.length;
  91448. return n && (e -= this.children[--n].length), new Cae(this.children, e, n);
  91449. }
  91450. computeBlockGapDeco() {
  91451. let e = [], n = this.view.viewState;
  91452. for (let r = 0, i = 0; ; i++) {
  91453. let a = i == n.viewports.length ? null : n.viewports[i], o = a ? a.from - 1 : this.length;
  91454. if (o > r) {
  91455. let s = (n.lineBlockAt(o).bottom - n.lineBlockAt(r).top) / this.view.scaleY;
  91456. e.push(Ze.replace({
  91457. widget: new FH(s),
  91458. block: !0,
  91459. inclusive: !0,
  91460. isBlockGap: !0
  91461. }).range(r, o));
  91462. }
  91463. if (!a)
  91464. break;
  91465. r = a.to + 1;
  91466. }
  91467. return Ze.set(e);
  91468. }
  91469. updateDeco() {
  91470. let e = 1, n = this.view.state.facet(Km).map((a) => (this.dynamicDecorationMap[e++] = typeof a == "function") ? a(this.view) : a), r = !1, i = this.view.state.facet(Yae).map((a, o) => {
  91471. let s = typeof a == "function";
  91472. return s && (r = !0), s ? a(this.view) : a;
  91473. });
  91474. for (i.length && (this.dynamicDecorationMap[e++] = r, n.push(Vt.join(i))), this.decorations = [
  91475. this.editContextFormatting,
  91476. ...n,
  91477. this.computeBlockGapDeco(),
  91478. this.view.viewState.lineGapDeco
  91479. ]; e < this.decorations.length; )
  91480. this.dynamicDecorationMap[e++] = !1;
  91481. return this.decorations;
  91482. }
  91483. scrollIntoView(e) {
  91484. if (e.isSnapshot) {
  91485. let u = this.view.viewState.lineBlockAt(e.range.head);
  91486. this.view.scrollDOM.scrollTop = u.top - e.yMargin, this.view.scrollDOM.scrollLeft = e.xMargin;
  91487. return;
  91488. }
  91489. for (let u of this.view.state.facet(Zae))
  91490. try {
  91491. if (u(this.view, e.range, e))
  91492. return !0;
  91493. } catch (c) {
  91494. bi(this.view.state, c, "scroll handler");
  91495. }
  91496. let { range: n } = e, r = this.coordsAt(n.head, n.empty ? n.assoc : n.head > n.anchor ? -1 : 1), i;
  91497. if (!r)
  91498. return;
  91499. !n.empty && (i = this.coordsAt(n.anchor, n.anchor > n.head ? -1 : 1)) && (r = {
  91500. left: Math.min(r.left, i.left),
  91501. top: Math.min(r.top, i.top),
  91502. right: Math.max(r.right, i.right),
  91503. bottom: Math.max(r.bottom, i.bottom)
  91504. });
  91505. let a = Jae(this.view), o = {
  91506. left: r.left - a.left,
  91507. top: r.top - a.top,
  91508. right: r.right + a.right,
  91509. bottom: r.bottom + a.bottom
  91510. }, { offsetWidth: s, offsetHeight: l } = this.view.scrollDOM;
  91511. zat(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 == pn.LTR);
  91512. }
  91513. }
  91514. function aot(t) {
  91515. 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");
  91516. }
  91517. class FH extends hs {
  91518. constructor(e) {
  91519. super(), this.height = e;
  91520. }
  91521. toDOM() {
  91522. let e = document.createElement("div");
  91523. return e.className = "cm-gap", this.updateDOM(e), e;
  91524. }
  91525. eq(e) {
  91526. return e.height == this.height;
  91527. }
  91528. updateDOM(e) {
  91529. return e.style.height = this.height + "px", !0;
  91530. }
  91531. get editable() {
  91532. return !0;
  91533. }
  91534. get estimatedHeight() {
  91535. return this.height;
  91536. }
  91537. ignoreEvent() {
  91538. return !1;
  91539. }
  91540. }
  91541. function eoe(t, e) {
  91542. let n = t.observer.selectionRange;
  91543. if (!n.focusNode)
  91544. return null;
  91545. let r = xae(n.focusNode, n.focusOffset), i = wae(n.focusNode, n.focusOffset), a = r || i;
  91546. if (i && r && i.node != r.node) {
  91547. let s = Jt.get(i.node);
  91548. if (!s || s instanceof co && s.text != i.node.nodeValue)
  91549. a = i;
  91550. else if (t.docView.lastCompositionAfterCursor) {
  91551. let l = Jt.get(r.node);
  91552. !l || l instanceof co && l.text != r.node.nodeValue || (a = i);
  91553. }
  91554. }
  91555. if (t.docView.lastCompositionAfterCursor = a != r, !a)
  91556. return null;
  91557. let o = e - a.offset;
  91558. return { from: o, to: o + a.node.nodeValue.length, node: a.node };
  91559. }
  91560. function oot(t, e, n) {
  91561. let r = eoe(t, n);
  91562. if (!r)
  91563. return null;
  91564. let { node: i, from: a, to: o } = r, s = i.nodeValue;
  91565. if (/[\n\r]/.test(s) || t.state.doc.sliceString(r.from, r.to) != s)
  91566. return null;
  91567. let l = e.invertedDesc, u = new Ca(l.mapPos(a), l.mapPos(o), a, o), c = [];
  91568. for (let f = i.parentNode; ; f = f.parentNode) {
  91569. let d = Jt.get(f);
  91570. if (d instanceof tl)
  91571. c.push({ node: f, deco: d.mark });
  91572. else {
  91573. if (d instanceof Ln || f.nodeName == "DIV" && f.parentNode == t.contentDOM)
  91574. return { range: u, text: i, marks: c, line: f };
  91575. if (f != t.contentDOM)
  91576. c.push({ node: f, deco: new ay({
  91577. inclusive: !0,
  91578. attributes: Zat(f),
  91579. tagName: f.tagName.toLowerCase()
  91580. }) });
  91581. else
  91582. return null;
  91583. }
  91584. }
  91585. }
  91586. function sot(t, e) {
  91587. 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);
  91588. }
  91589. let lot = class {
  91590. constructor() {
  91591. this.changes = [];
  91592. }
  91593. compareRange(e, n) {
  91594. SM(e, n, this.changes);
  91595. }
  91596. comparePoint(e, n) {
  91597. SM(e, n, this.changes);
  91598. }
  91599. };
  91600. function uot(t, e, n) {
  91601. let r = new lot();
  91602. return Vt.compare(t, e, n, r), r.changes;
  91603. }
  91604. function cot(t, e) {
  91605. for (let n = t; n && n != e; n = n.assignedSlot || n.parentNode)
  91606. if (n.nodeType == 1 && n.contentEditable == "false")
  91607. return !0;
  91608. return !1;
  91609. }
  91610. function fot(t, e) {
  91611. let n = !1;
  91612. return e && t.iterChangedRanges((r, i) => {
  91613. r < e.to && i > e.from && (n = !0);
  91614. }), n;
  91615. }
  91616. function dot(t, e, n = 1) {
  91617. let r = t.charCategorizer(e), i = t.doc.lineAt(e), a = e - i.from;
  91618. if (i.length == 0)
  91619. return me.cursor(e);
  91620. a == 0 ? n = 1 : a == i.length && (n = -1);
  91621. let o = a, s = a;
  91622. n < 0 ? o = _r(i.text, a, !1) : s = _r(i.text, a);
  91623. let l = r(i.text.slice(o, s));
  91624. for (; o > 0; ) {
  91625. let u = _r(i.text, o, !1);
  91626. if (r(i.text.slice(u, o)) != l)
  91627. break;
  91628. o = u;
  91629. }
  91630. for (; s < i.length; ) {
  91631. let u = _r(i.text, s);
  91632. if (r(i.text.slice(s, u)) != l)
  91633. break;
  91634. s = u;
  91635. }
  91636. return me.range(o + i.from, s + i.from);
  91637. }
  91638. function hot(t, e) {
  91639. return e.left > t ? e.left - t : Math.max(0, t - e.right);
  91640. }
  91641. function pot(t, e) {
  91642. return e.top > t ? e.top - t : Math.max(0, t - e.bottom);
  91643. }
  91644. function y$(t, e) {
  91645. return t.top < e.bottom - 1 && t.bottom > e.top + 1;
  91646. }
  91647. function WH(t, e) {
  91648. return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t;
  91649. }
  91650. function QH(t, e) {
  91651. return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t;
  91652. }
  91653. function PM(t, e, n) {
  91654. let r, i, a, o, s = !1, l, u, c, f;
  91655. for (let p = t.firstChild; p; p = p.nextSibling) {
  91656. let v = Jh(p);
  91657. for (let g = 0; g < v.length; g++) {
  91658. let m = v[g];
  91659. i && y$(i, m) && (m = WH(QH(m, i.bottom), i.top));
  91660. let y = hot(e, m), b = pot(n, m);
  91661. if (y == 0 && b == 0)
  91662. return p.nodeType == 3 ? HH(p, e, n) : PM(p, e, n);
  91663. if (!r || o > b || o == b && a > y) {
  91664. r = p, i = m, a = y, o = b;
  91665. let _ = b ? n < m.top ? -1 : 1 : y ? e < m.left ? -1 : 1 : 0;
  91666. s = !_ || (_ > 0 ? g < v.length - 1 : g > 0);
  91667. }
  91668. 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 && y$(c, m) ? c = QH(c, m.bottom) : f && y$(f, m) && (f = WH(f, m.top));
  91669. }
  91670. }
  91671. if (c && c.bottom >= n ? (r = l, i = c) : f && f.top <= n && (r = u, i = f), !r)
  91672. return { node: t, offset: 0 };
  91673. let d = Math.max(i.left, Math.min(i.right, e));
  91674. if (r.nodeType == 3)
  91675. return HH(r, d, n);
  91676. if (s && r.contentEditable != "false")
  91677. return PM(r, d, n);
  91678. let h = Array.prototype.indexOf.call(t.childNodes, r) + (e >= (i.left + i.right) / 2 ? 1 : 0);
  91679. return { node: t, offset: h };
  91680. }
  91681. function HH(t, e, n) {
  91682. let r = t.nodeValue.length, i = -1, a = 1e9, o = 0;
  91683. for (let s = 0; s < r; s++) {
  91684. let l = Pf(t, s, s + 1).getClientRects();
  91685. for (let u = 0; u < l.length; u++) {
  91686. let c = l[u];
  91687. if (c.top == c.bottom)
  91688. continue;
  91689. o || (o = e - c.left);
  91690. let f = (c.top > n ? c.top - n : n - c.bottom) - 1;
  91691. if (c.left - 1 <= e && c.right + 1 >= e && f < a) {
  91692. let d = e >= (c.left + c.right) / 2, h = d;
  91693. if ((Ne.chrome || Ne.gecko) && Pf(t, s).getBoundingClientRect().left == c.right && (h = !d), f <= 0)
  91694. return { node: t, offset: s + (h ? 1 : 0) };
  91695. i = s + (h ? 1 : 0), a = f;
  91696. }
  91697. }
  91698. }
  91699. return { node: t, offset: i > -1 ? i : o > 0 ? t.nodeValue.length : 0 };
  91700. }
  91701. function toe(t, e, n, r = -1) {
  91702. var i, a;
  91703. let o = t.contentDOM.getBoundingClientRect(), s = o.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: c, y: f } = e, d = f - s;
  91704. if (d < 0)
  91705. return 0;
  91706. if (d > u)
  91707. return t.state.doc.length;
  91708. for (let _ = t.viewState.heightOracle.textHeight / 2, O = !1; l = t.elementAtHeight(d), l.type != ei.Text; )
  91709. for (; d = r > 0 ? l.bottom + _ : l.top - _, !(d >= 0 && d <= u); ) {
  91710. if (O)
  91711. return n ? null : 0;
  91712. O = !0, r = -r;
  91713. }
  91714. f = s + d;
  91715. let h = l.from;
  91716. if (h < t.viewport.from)
  91717. return t.viewport.from == 0 ? 0 : n ? null : GH(t, o, l, c, f);
  91718. if (h > t.viewport.to)
  91719. return t.viewport.to == t.state.doc.length ? t.state.doc.length : n ? null : GH(t, o, l, c, f);
  91720. let p = t.dom.ownerDocument, v = t.root.elementFromPoint ? t.root : p, g = v.elementFromPoint(c, f);
  91721. 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));
  91722. let m, y = -1;
  91723. if (g && ((i = t.docView.nearest(g)) === null || i === void 0 ? void 0 : i.isEditable) != !1) {
  91724. if (p.caretPositionFromPoint) {
  91725. let _ = p.caretPositionFromPoint(c, f);
  91726. _ && ({ offsetNode: m, offset: y } = _);
  91727. } else if (p.caretRangeFromPoint) {
  91728. let _ = p.caretRangeFromPoint(c, f);
  91729. _ && ({ startContainer: m, startOffset: y } = _, (!t.contentDOM.contains(m) || Ne.safari && vot(m, y, c) || Ne.chrome && got(m, y, c)) && (m = void 0));
  91730. }
  91731. }
  91732. if (!m || !t.docView.dom.contains(m)) {
  91733. let _ = Ln.find(t.docView, h);
  91734. if (!_)
  91735. return d > l.top + l.height / 2 ? l.to : l.from;
  91736. ({ node: m, offset: y } = PM(_.dom, c, f));
  91737. }
  91738. let b = t.docView.nearest(m);
  91739. if (!b)
  91740. return null;
  91741. if (b.isWidget && ((a = b.dom) === null || a === void 0 ? void 0 : a.nodeType) == 1) {
  91742. let _ = b.dom.getBoundingClientRect();
  91743. return e.y < _.top || e.y <= _.bottom && e.x <= (_.left + _.right) / 2 ? b.posAtStart : b.posAtEnd;
  91744. } else
  91745. return b.localPosFromDOM(m, y) + b.posAtStart;
  91746. }
  91747. function GH(t, e, n, r, i) {
  91748. let a = Math.round((r - e.left) * t.defaultCharacterWidth);
  91749. if (t.lineWrapping && n.height > t.defaultLineHeight * 1.5) {
  91750. let s = t.viewState.heightOracle.textHeight, l = Math.floor((i - n.top - (t.defaultLineHeight - s) * 0.5) / s);
  91751. a += l * t.viewState.heightOracle.lineLength;
  91752. }
  91753. let o = t.state.sliceDoc(n.from, n.to);
  91754. return n.from + hM(o, a, t.state.tabSize);
  91755. }
  91756. function vot(t, e, n) {
  91757. let r;
  91758. if (t.nodeType != 3 || e != (r = t.nodeValue.length))
  91759. return !1;
  91760. for (let i = t.nextSibling; i; i = i.nextSibling)
  91761. if (i.nodeType != 1 || i.nodeName != "BR")
  91762. return !1;
  91763. return Pf(t, r - 1, r).getBoundingClientRect().left > n;
  91764. }
  91765. function got(t, e, n) {
  91766. if (e != 0)
  91767. return !1;
  91768. for (let i = t; ; ) {
  91769. let a = i.parentNode;
  91770. if (!a || a.nodeType != 1 || a.firstChild != i)
  91771. return !1;
  91772. if (a.classList.contains("cm-line"))
  91773. break;
  91774. i = a;
  91775. }
  91776. let r = t.nodeType == 1 ? t.getBoundingClientRect() : Pf(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect();
  91777. return n - r.left > 5;
  91778. }
  91779. function $M(t, e) {
  91780. let n = t.lineBlockAt(e);
  91781. if (Array.isArray(n.type)) {
  91782. for (let r of n.type)
  91783. if (r.to > e || r.to == e && (r.to == n.to || r.type == ei.Text))
  91784. return r;
  91785. }
  91786. return n;
  91787. }
  91788. function mot(t, e, n, r) {
  91789. let i = $M(t, e.head), a = !r || i.type != ei.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head);
  91790. if (a) {
  91791. let o = t.dom.getBoundingClientRect(), s = t.textDirectionAt(i.from), l = t.posAtCoords({
  91792. x: n == (s == pn.LTR) ? o.right - 1 : o.left + 1,
  91793. y: (a.top + a.bottom) / 2
  91794. });
  91795. if (l != null)
  91796. return me.cursor(l, n ? -1 : 1);
  91797. }
  91798. return me.cursor(n ? i.to : i.from, n ? -1 : 1);
  91799. }
  91800. function jH(t, e, n, r) {
  91801. let i = t.state.doc.lineAt(e.head), a = t.bidiSpans(i), o = t.textDirectionAt(i.from);
  91802. for (let s = e, l = null; ; ) {
  91803. let u = not(i, a, o, s, n), c = Bae;
  91804. if (!u) {
  91805. if (i.number == (n ? t.state.doc.lines : 1))
  91806. return s;
  91807. c = `
  91808. `, i = t.state.doc.line(i.number + (n ? 1 : -1)), a = t.bidiSpans(i), u = t.visualLineSide(i, !n);
  91809. }
  91810. if (l) {
  91811. if (!l(c))
  91812. return s;
  91813. } else {
  91814. if (!r)
  91815. return u;
  91816. l = r(c);
  91817. }
  91818. s = u;
  91819. }
  91820. }
  91821. function yot(t, e, n) {
  91822. let r = t.state.charCategorizer(e), i = r(n);
  91823. return (a) => {
  91824. let o = r(a);
  91825. return i == yn.Space && (i = o), i == o;
  91826. };
  91827. }
  91828. function bot(t, e, n, r) {
  91829. let i = e.head, a = n ? 1 : -1;
  91830. if (i == (n ? t.state.doc.length : 0))
  91831. return me.cursor(i, e.assoc);
  91832. let o = e.goalColumn, s, l = t.contentDOM.getBoundingClientRect(), u = t.coordsAtPos(i, e.assoc || -1), c = t.documentTop;
  91833. if (u)
  91834. o == null && (o = u.left - l.left), s = a < 0 ? u.top : u.bottom;
  91835. else {
  91836. let h = t.viewState.lineBlockAt(i);
  91837. o == null && (o = Math.min(l.right - l.left, t.defaultCharacterWidth * (i - h.from))), s = (a < 0 ? h.top : h.bottom) + c;
  91838. }
  91839. let f = l.left + o, d = r ?? t.viewState.heightOracle.textHeight >> 1;
  91840. for (let h = 0; ; h += 10) {
  91841. let p = s + (d + h) * a, v = toe(t, { x: f, y: p }, !1, a);
  91842. if (p < l.top || p > l.bottom || (a < 0 ? v < i : v > i)) {
  91843. let g = t.docView.coordsForChar(v), m = !g || p < g.top ? -1 : 1;
  91844. return me.cursor(v, m, void 0, o);
  91845. }
  91846. }
  91847. }
  91848. function o1(t, e, n) {
  91849. for (; ; ) {
  91850. let r = 0;
  91851. for (let i of t)
  91852. i.between(e - 1, e + 1, (a, o, s) => {
  91853. if (e > a && e < o) {
  91854. let l = r || n || (e - a < o - e ? -1 : 1);
  91855. e = l < 0 ? a : o, r = l;
  91856. }
  91857. });
  91858. if (!r)
  91859. return e;
  91860. }
  91861. }
  91862. function b$(t, e, n) {
  91863. let r = o1(t.state.facet(o4).map((i) => i(t)), n.from, e.head > n.from ? -1 : 1);
  91864. return r == n.from ? n : me.cursor(r, r < n.from ? 1 : -1);
  91865. }
  91866. class _ot {
  91867. setSelectionOrigin(e) {
  91868. this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now();
  91869. }
  91870. constructor(e) {
  91871. 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, Ne.safari && e.contentDOM.addEventListener("input", () => null), Ne.gecko && Lot(e.contentDOM.ownerDocument);
  91872. }
  91873. handleEvent(e) {
  91874. !$ot(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e);
  91875. }
  91876. runHandlers(e, n) {
  91877. let r = this.handlers[e];
  91878. if (r) {
  91879. for (let i of r.observers)
  91880. i(this.view, n);
  91881. for (let i of r.handlers) {
  91882. if (n.defaultPrevented)
  91883. break;
  91884. if (i(this.view, n)) {
  91885. n.preventDefault();
  91886. break;
  91887. }
  91888. }
  91889. }
  91890. }
  91891. ensureHandlers(e) {
  91892. let n = Oot(e), r = this.handlers, i = this.view.contentDOM;
  91893. for (let a in n)
  91894. if (a != "scroll") {
  91895. let o = !n[a].handlers.length, s = r[a];
  91896. s && o != !s.handlers.length && (i.removeEventListener(a, this.handleEvent), s = null), s || i.addEventListener(a, this.handleEvent, { passive: o });
  91897. }
  91898. for (let a in r)
  91899. a != "scroll" && !n[a] && i.removeEventListener(a, this.handleEvent);
  91900. this.handlers = n;
  91901. }
  91902. keydown(e) {
  91903. if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode))
  91904. return !0;
  91905. if (this.tabFocusMode > 0 && e.keyCode != 27 && roe.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), Ne.android && Ne.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8))
  91906. return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0;
  91907. let n;
  91908. return Ne.ios && !e.synthetic && !e.altKey && !e.metaKey && ((n = noe.find((r) => r.keyCode == e.keyCode)) && !e.ctrlKey || Sot.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);
  91909. }
  91910. flushIOSKey(e) {
  91911. let n = this.pendingIOSKey;
  91912. return !n || n.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, fh(this.view.contentDOM, n.key, n.keyCode, n instanceof KeyboardEvent ? n : void 0));
  91913. }
  91914. ignoreDuringComposition(e) {
  91915. return /^key/.test(e.type) ? this.composing > 0 ? !0 : Ne.safari && !Ne.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1 : !1;
  91916. }
  91917. startMouseSelection(e) {
  91918. this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e;
  91919. }
  91920. update(e) {
  91921. 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);
  91922. }
  91923. destroy() {
  91924. this.mouseSelection && this.mouseSelection.destroy();
  91925. }
  91926. }
  91927. function ZH(t, e) {
  91928. return (n, r) => {
  91929. try {
  91930. return e.call(t, r, n);
  91931. } catch (i) {
  91932. bi(n.state, i);
  91933. }
  91934. };
  91935. }
  91936. function Oot(t) {
  91937. let e = /* @__PURE__ */ Object.create(null);
  91938. function n(r) {
  91939. return e[r] || (e[r] = { observers: [], handlers: [] });
  91940. }
  91941. for (let r of t) {
  91942. let i = r.spec;
  91943. if (i && i.domEventHandlers)
  91944. for (let a in i.domEventHandlers) {
  91945. let o = i.domEventHandlers[a];
  91946. o && n(a).handlers.push(ZH(r.value, o));
  91947. }
  91948. if (i && i.domEventObservers)
  91949. for (let a in i.domEventObservers) {
  91950. let o = i.domEventObservers[a];
  91951. o && n(a).observers.push(ZH(r.value, o));
  91952. }
  91953. }
  91954. for (let r in fo)
  91955. n(r).handlers.push(fo[r]);
  91956. for (let r in Ra)
  91957. n(r).observers.push(Ra[r]);
  91958. return e;
  91959. }
  91960. const noe = [
  91961. { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" },
  91962. { key: "Enter", keyCode: 13, inputType: "insertParagraph" },
  91963. { key: "Enter", keyCode: 13, inputType: "insertLineBreak" },
  91964. { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }
  91965. ], Sot = "dthko", roe = [16, 17, 18, 20, 91, 92, 224, 225], Ub = 6;
  91966. function Xb(t) {
  91967. return Math.max(0, t) * 0.7 + 8;
  91968. }
  91969. function xot(t, e) {
  91970. return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY));
  91971. }
  91972. class wot {
  91973. constructor(e, n, r, i) {
  91974. 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 = Vat(e.contentDOM), this.atoms = e.state.facet(o4).map((o) => o(e));
  91975. let a = e.contentDOM.ownerDocument;
  91976. 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(At.allowMultipleSelections) && Cot(e, n), this.dragging = Pot(e, n) && soe(n) == 1 ? null : !1;
  91977. }
  91978. start(e) {
  91979. this.dragging === !1 && this.select(e);
  91980. }
  91981. move(e) {
  91982. var n;
  91983. if (e.buttons == 0)
  91984. return this.destroy();
  91985. if (this.dragging || this.dragging == null && xot(this.startEvent, e) < 10)
  91986. return;
  91987. this.select(this.lastEvent = e);
  91988. 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 = Jae(this.view);
  91989. e.clientX - o.left <= a.left + Ub ? r = -Xb(a.left - e.clientX) : e.clientX + o.right >= a.right - Ub && (r = Xb(e.clientX - a.right)), e.clientY - o.top <= a.top + Ub ? i = -Xb(a.top - e.clientY) : e.clientY + o.bottom >= a.bottom - Ub && (i = Xb(e.clientY - a.bottom)), this.setScrollSpeed(r, i);
  91990. }
  91991. up(e) {
  91992. this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy();
  91993. }
  91994. destroy() {
  91995. this.setScrollSpeed(0, 0);
  91996. let e = this.view.contentDOM.ownerDocument;
  91997. e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null;
  91998. }
  91999. setScrollSpeed(e, n) {
  92000. 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);
  92001. }
  92002. scroll() {
  92003. 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);
  92004. }
  92005. skipAtoms(e) {
  92006. let n = null;
  92007. for (let r = 0; r < e.ranges.length; r++) {
  92008. let i = e.ranges[r], a = null;
  92009. if (i.empty) {
  92010. let o = o1(this.atoms, i.from, 0);
  92011. o != i.from && (a = me.cursor(o, -1));
  92012. } else {
  92013. let o = o1(this.atoms, i.from, -1), s = o1(this.atoms, i.to, 1);
  92014. (o != i.from || s != i.to) && (a = me.range(i.from == i.anchor ? o : s, i.from == i.head ? o : s));
  92015. }
  92016. a && (n || (n = e.ranges.slice()), n[r] = a);
  92017. }
  92018. return n ? me.create(n, e.mainIndex) : e;
  92019. }
  92020. select(e) {
  92021. let { view: n } = this, r = this.skipAtoms(this.style.get(e, this.extend, this.multiple));
  92022. (this.mustSelect || !r.eq(n.state.selection, this.dragging === !1)) && this.view.dispatch({
  92023. selection: r,
  92024. userEvent: "select.pointer"
  92025. }), this.mustSelect = !1;
  92026. }
  92027. update(e) {
  92028. e.transactions.some((n) => n.isUserEvent("input.type")) ? this.destroy() : this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20);
  92029. }
  92030. }
  92031. function Cot(t, e) {
  92032. let n = t.state.facet(zae);
  92033. return n.length ? n[0](e) : Ne.mac ? e.metaKey : e.ctrlKey;
  92034. }
  92035. function Tot(t, e) {
  92036. let n = t.state.facet(Vae);
  92037. return n.length ? n[0](e) : Ne.mac ? !e.altKey : !e.ctrlKey;
  92038. }
  92039. function Pot(t, e) {
  92040. let { main: n } = t.state.selection;
  92041. if (n.empty)
  92042. return !1;
  92043. let r = qm(t.root);
  92044. if (!r || r.rangeCount == 0)
  92045. return !0;
  92046. let i = r.getRangeAt(0).getClientRects();
  92047. for (let a = 0; a < i.length; a++) {
  92048. let o = i[a];
  92049. if (o.left <= e.clientX && o.right >= e.clientX && o.top <= e.clientY && o.bottom >= e.clientY)
  92050. return !0;
  92051. }
  92052. return !1;
  92053. }
  92054. function $ot(t, e) {
  92055. if (!e.bubbles)
  92056. return !0;
  92057. if (e.defaultPrevented)
  92058. return !1;
  92059. for (let n = e.target, r; n != t.contentDOM; n = n.parentNode)
  92060. if (!n || n.nodeType == 11 || (r = Jt.get(n)) && r.ignoreEvent(e))
  92061. return !1;
  92062. return !0;
  92063. }
  92064. const fo = /* @__PURE__ */ Object.create(null), Ra = /* @__PURE__ */ Object.create(null), ioe = Ne.ie && Ne.ie_version < 15 || Ne.ios && Ne.webkit_version < 604;
  92065. function Aot(t) {
  92066. let e = t.dom.parentNode;
  92067. if (!e)
  92068. return;
  92069. let n = e.appendChild(document.createElement("textarea"));
  92070. n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus(), setTimeout(() => {
  92071. t.focus(), n.remove(), aoe(t, n.value);
  92072. }, 50);
  92073. }
  92074. function aoe(t, e) {
  92075. let { state: n } = t, r, i = 1, a = n.toText(e), o = a.lines == n.selection.ranges.length;
  92076. if (AM != null && n.selection.ranges.every((l) => l.empty) && AM == a.toString()) {
  92077. let l = -1;
  92078. r = n.changeByRange((u) => {
  92079. let c = n.doc.lineAt(u.from);
  92080. if (c.from == l)
  92081. return { range: u };
  92082. l = c.from;
  92083. let f = n.toText((o ? a.line(i++).text : e) + n.lineBreak);
  92084. return {
  92085. changes: { from: c.from, insert: f },
  92086. range: me.cursor(u.from + f.length)
  92087. };
  92088. });
  92089. } else o ? r = n.changeByRange((l) => {
  92090. let u = a.line(i++);
  92091. return {
  92092. changes: { from: l.from, to: l.to, insert: u.text },
  92093. range: me.cursor(l.from + u.length)
  92094. };
  92095. }) : r = n.replaceSelection(a);
  92096. t.dispatch(r, {
  92097. userEvent: "input.paste",
  92098. scrollIntoView: !0
  92099. });
  92100. }
  92101. Ra.scroll = (t) => {
  92102. t.inputState.lastScrollTop = t.scrollDOM.scrollTop, t.inputState.lastScrollLeft = t.scrollDOM.scrollLeft;
  92103. };
  92104. fo.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && t.inputState.tabFocusMode != 0 && (t.inputState.tabFocusMode = Date.now() + 2e3), !1);
  92105. Ra.touchstart = (t, e) => {
  92106. t.inputState.lastTouchTime = Date.now(), t.inputState.setSelectionOrigin("select.pointer");
  92107. };
  92108. Ra.touchmove = (t) => {
  92109. t.inputState.setSelectionOrigin("select.pointer");
  92110. };
  92111. fo.mousedown = (t, e) => {
  92112. if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3)
  92113. return !1;
  92114. let n = null;
  92115. for (let r of t.state.facet(Fae))
  92116. if (n = r(t, e), n)
  92117. break;
  92118. if (!n && e.button == 0 && (n = Iot(t, e)), n) {
  92119. let r = !t.hasFocus;
  92120. t.inputState.startMouseSelection(new wot(t, e, n, r)), r && t.observer.ignore(() => {
  92121. _ae(t.contentDOM);
  92122. let a = t.root.activeElement;
  92123. a && !a.contains(t.contentDOM) && a.blur();
  92124. });
  92125. let i = t.inputState.mouseSelection;
  92126. if (i)
  92127. return i.start(e), i.dragging === !1;
  92128. }
  92129. return !1;
  92130. };
  92131. function UH(t, e, n, r) {
  92132. if (r == 1)
  92133. return me.cursor(e, n);
  92134. if (r == 2)
  92135. return dot(t.state, e, n);
  92136. {
  92137. let i = Ln.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;
  92138. return s < t.state.doc.length && s == a.to && s++, me.range(o, s);
  92139. }
  92140. }
  92141. let ooe = (t, e) => t >= e.top && t <= e.bottom, XH = (t, e, n) => ooe(e, n) && t >= n.left && t <= n.right;
  92142. function Eot(t, e, n, r) {
  92143. let i = Ln.find(t.docView, e);
  92144. if (!i)
  92145. return 1;
  92146. let a = e - i.posAtStart;
  92147. if (a == 0)
  92148. return 1;
  92149. if (a == i.length)
  92150. return -1;
  92151. let o = i.coordsAt(a, -1);
  92152. if (o && XH(n, r, o))
  92153. return -1;
  92154. let s = i.coordsAt(a, 1);
  92155. return s && XH(n, r, s) ? 1 : o && ooe(r, o) ? -1 : 1;
  92156. }
  92157. function YH(t, e) {
  92158. let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1);
  92159. return { pos: n, bias: Eot(t, n, e.clientX, e.clientY) };
  92160. }
  92161. const Mot = Ne.ie && Ne.ie_version <= 11;
  92162. let qH = null, KH = 0, JH = 0;
  92163. function soe(t) {
  92164. if (!Mot)
  92165. return t.detail;
  92166. let e = qH, n = JH;
  92167. return qH = t, JH = Date.now(), KH = !e || n > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (KH + 1) % 3 : 1;
  92168. }
  92169. function Iot(t, e) {
  92170. let n = YH(t, e), r = soe(e), i = t.state.selection;
  92171. return {
  92172. update(a) {
  92173. a.docChanged && (n.pos = a.changes.mapPos(n.pos), i = i.map(a.changes));
  92174. },
  92175. get(a, o, s) {
  92176. let l = YH(t, a), u, c = UH(t, l.pos, l.bias, r);
  92177. if (n.pos != l.pos && !o) {
  92178. let f = UH(t, n.pos, n.bias, r), d = Math.min(f.from, c.from), h = Math.max(f.to, c.to);
  92179. c = d < c.from ? me.range(d, h) : me.range(h, d);
  92180. }
  92181. return o ? i.replaceRange(i.main.extend(c.from, c.to)) : s && r == 1 && i.ranges.length > 1 && (u = Dot(i, l.pos)) ? u : s ? i.addRange(c) : me.create([c]);
  92182. }
  92183. };
  92184. }
  92185. function Dot(t, e) {
  92186. for (let n = 0; n < t.ranges.length; n++) {
  92187. let { from: r, to: i } = t.ranges[n];
  92188. if (r <= e && i >= e)
  92189. return me.create(t.ranges.slice(0, n).concat(t.ranges.slice(n + 1)), t.mainIndex == n ? 0 : t.mainIndex - (t.mainIndex > n ? 1 : 0));
  92190. }
  92191. return null;
  92192. }
  92193. fo.dragstart = (t, e) => {
  92194. let { selection: { main: n } } = t.state;
  92195. if (e.target.draggable) {
  92196. let i = t.docView.nearest(e.target);
  92197. if (i && i.isWidget) {
  92198. let a = i.posAtStart, o = a + i.length;
  92199. (a >= n.to || o <= n.from) && (n = me.range(a, o));
  92200. }
  92201. }
  92202. let { inputState: r } = t;
  92203. 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;
  92204. };
  92205. fo.dragend = (t) => (t.inputState.draggedContent = null, !1);
  92206. function eG(t, e, n, r) {
  92207. if (!n)
  92208. return;
  92209. let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: a } = t.inputState, o = r && a && Tot(t, e) ? { from: a.from, to: a.to } : null, s = { from: i, insert: n }, l = t.state.changes(o ? [o, s] : s);
  92210. t.focus(), t.dispatch({
  92211. changes: l,
  92212. selection: { anchor: l.mapPos(i, -1), head: l.mapPos(i, 1) },
  92213. userEvent: o ? "move.drop" : "input.drop"
  92214. }), t.inputState.draggedContent = null;
  92215. }
  92216. fo.drop = (t, e) => {
  92217. if (!e.dataTransfer)
  92218. return !1;
  92219. if (t.state.readOnly)
  92220. return !0;
  92221. let n = e.dataTransfer.files;
  92222. if (n && n.length) {
  92223. let r = Array(n.length), i = 0, a = () => {
  92224. ++i == n.length && eG(t, e, r.filter((o) => o != null).join(t.state.lineBreak), !1);
  92225. };
  92226. for (let o = 0; o < n.length; o++) {
  92227. let s = new FileReader();
  92228. s.onerror = a, s.onload = () => {
  92229. /[\x00-\x08\x0e-\x1f]{2}/.test(s.result) || (r[o] = s.result), a();
  92230. }, s.readAsText(n[o]);
  92231. }
  92232. return !0;
  92233. } else {
  92234. let r = e.dataTransfer.getData("Text");
  92235. if (r)
  92236. return eG(t, e, r, !0), !0;
  92237. }
  92238. return !1;
  92239. };
  92240. fo.paste = (t, e) => {
  92241. if (t.state.readOnly)
  92242. return !0;
  92243. t.observer.flush();
  92244. let n = ioe ? null : e.clipboardData;
  92245. return n ? (aoe(t, n.getData("text/plain") || n.getData("text/uri-list")), !0) : (Aot(t), !1);
  92246. };
  92247. function Rot(t, e) {
  92248. let n = t.dom.parentNode;
  92249. if (!n)
  92250. return;
  92251. let r = n.appendChild(document.createElement("textarea"));
  92252. r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.value = e, r.focus(), r.selectionEnd = e.length, r.selectionStart = 0, setTimeout(() => {
  92253. r.remove(), t.focus();
  92254. }, 50);
  92255. }
  92256. function kot(t) {
  92257. let e = [], n = [], r = !1;
  92258. for (let i of t.selection.ranges)
  92259. i.empty || (e.push(t.sliceDoc(i.from, i.to)), n.push(i));
  92260. if (!e.length) {
  92261. let i = -1;
  92262. for (let { from: a } of t.selection.ranges) {
  92263. let o = t.doc.lineAt(a);
  92264. o.number > i && (e.push(o.text), n.push({ from: o.from, to: Math.min(t.doc.length, o.to + 1) })), i = o.number;
  92265. }
  92266. r = !0;
  92267. }
  92268. return { text: e.join(t.lineBreak), ranges: n, linewise: r };
  92269. }
  92270. let AM = null;
  92271. fo.copy = fo.cut = (t, e) => {
  92272. let { text: n, ranges: r, linewise: i } = kot(t.state);
  92273. if (!n && !i)
  92274. return !1;
  92275. AM = i ? n : null, e.type == "cut" && !t.state.readOnly && t.dispatch({
  92276. changes: r,
  92277. scrollIntoView: !0,
  92278. userEvent: "delete.cut"
  92279. });
  92280. let a = ioe ? null : e.clipboardData;
  92281. return a ? (a.clearData(), a.setData("text/plain", n), !0) : (Rot(t, n), !1);
  92282. };
  92283. const loe = /* @__PURE__ */ cl.define();
  92284. function uoe(t, e) {
  92285. let n = [];
  92286. for (let r of t.facet(Hae)) {
  92287. let i = r(t, e);
  92288. i && n.push(i);
  92289. }
  92290. return n ? t.update({ effects: n, annotations: loe.of(!0) }) : null;
  92291. }
  92292. function coe(t) {
  92293. setTimeout(() => {
  92294. let e = t.hasFocus;
  92295. if (e != t.inputState.notifiedFocused) {
  92296. let n = uoe(t.state, e);
  92297. n ? t.dispatch(n) : t.update([]);
  92298. }
  92299. }, 10);
  92300. }
  92301. Ra.focus = (t) => {
  92302. 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), coe(t);
  92303. };
  92304. Ra.blur = (t) => {
  92305. t.observer.clearSelectionRange(), coe(t);
  92306. };
  92307. Ra.compositionstart = Ra.compositionupdate = (t) => {
  92308. t.observer.editContext || (t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0));
  92309. };
  92310. Ra.compositionend = (t) => {
  92311. 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, Ne.chrome && Ne.android ? t.observer.flushSoon() : t.inputState.compositionPendingChange ? Promise.resolve().then(() => t.observer.flush()) : setTimeout(() => {
  92312. t.inputState.composing < 0 && t.docView.hasComposition && t.update([]);
  92313. }, 50));
  92314. };
  92315. Ra.contextmenu = (t) => {
  92316. t.inputState.lastContextMenu = Date.now();
  92317. };
  92318. fo.beforeinput = (t, e) => {
  92319. var n;
  92320. let r;
  92321. if (Ne.chrome && Ne.android && (r = noe.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(r.key, r.keyCode), r.key == "Backspace" || r.key == "Delete")) {
  92322. let i = ((n = window.visualViewport) === null || n === void 0 ? void 0 : n.height) || 0;
  92323. setTimeout(() => {
  92324. var a;
  92325. (((a = window.visualViewport) === null || a === void 0 ? void 0 : a.height) || 0) > i + 10 && t.hasFocus && (t.contentDOM.blur(), t.focus());
  92326. }, 100);
  92327. }
  92328. return Ne.ios && e.inputType == "deleteContentForward" && t.observer.flushSoon(), Ne.safari && e.inputType == "insertText" && t.inputState.composing >= 0 && setTimeout(() => Ra.compositionend(t, e), 20), !1;
  92329. };
  92330. const tG = /* @__PURE__ */ new Set();
  92331. function Lot(t) {
  92332. tG.has(t) || (tG.add(t), t.addEventListener("copy", () => {
  92333. }), t.addEventListener("cut", () => {
  92334. }));
  92335. }
  92336. const nG = ["pre-wrap", "normal", "pre-line", "break-spaces"];
  92337. class Not {
  92338. constructor(e) {
  92339. this.lineWrapping = e, this.doc = Ft.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1;
  92340. }
  92341. heightForGap(e, n) {
  92342. let r = this.doc.lineAt(n).number - this.doc.lineAt(e).number + 1;
  92343. return this.lineWrapping && (r += Math.max(0, Math.ceil((n - e - r * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * r;
  92344. }
  92345. heightForLine(e) {
  92346. return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight;
  92347. }
  92348. setDoc(e) {
  92349. return this.doc = e, this;
  92350. }
  92351. mustRefreshForWrapping(e) {
  92352. return nG.indexOf(e) > -1 != this.lineWrapping;
  92353. }
  92354. mustRefreshForHeights(e) {
  92355. let n = !1;
  92356. for (let r = 0; r < e.length; r++) {
  92357. let i = e[r];
  92358. i < 0 ? r++ : this.heightSamples[Math.floor(i * 10)] || (n = !0, this.heightSamples[Math.floor(i * 10)] = !0);
  92359. }
  92360. return n;
  92361. }
  92362. refresh(e, n, r, i, a, o) {
  92363. let s = nG.indexOf(e) > -1, l = Math.round(n) != Math.round(this.lineHeight) || this.lineWrapping != s;
  92364. if (this.lineWrapping = s, this.lineHeight = n, this.charWidth = r, this.textHeight = i, this.lineLength = a, l) {
  92365. this.heightSamples = {};
  92366. for (let u = 0; u < o.length; u++) {
  92367. let c = o[u];
  92368. c < 0 ? u++ : this.heightSamples[Math.floor(c * 10)] = !0;
  92369. }
  92370. }
  92371. return l;
  92372. }
  92373. }
  92374. class Bot {
  92375. constructor(e, n) {
  92376. this.from = e, this.heights = n, this.index = 0;
  92377. }
  92378. get more() {
  92379. return this.index < this.heights.length;
  92380. }
  92381. }
  92382. class zo {
  92383. /**
  92384. @internal
  92385. */
  92386. constructor(e, n, r, i, a) {
  92387. this.from = e, this.length = n, this.top = r, this.height = i, this._content = a;
  92388. }
  92389. /**
  92390. The type of element this is. When querying lines, this may be
  92391. an array of all the blocks that make up the line.
  92392. */
  92393. get type() {
  92394. return typeof this._content == "number" ? ei.Text : Array.isArray(this._content) ? this._content : this._content.type;
  92395. }
  92396. /**
  92397. The end of the element as a document position.
  92398. */
  92399. get to() {
  92400. return this.from + this.length;
  92401. }
  92402. /**
  92403. The bottom position of the element.
  92404. */
  92405. get bottom() {
  92406. return this.top + this.height;
  92407. }
  92408. /**
  92409. If this is a widget block, this will return the widget
  92410. associated with it.
  92411. */
  92412. get widget() {
  92413. return this._content instanceof gu ? this._content.widget : null;
  92414. }
  92415. /**
  92416. If this is a textblock, this holds the number of line breaks
  92417. that appear in widgets inside the block.
  92418. */
  92419. get widgetLineBreaks() {
  92420. return typeof this._content == "number" ? this._content : 0;
  92421. }
  92422. /**
  92423. @internal
  92424. */
  92425. join(e) {
  92426. let n = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]);
  92427. return new zo(this.from, this.length + e.length, this.top, this.height + e.height, n);
  92428. }
  92429. }
  92430. var cn = /* @__PURE__ */ function(t) {
  92431. return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t;
  92432. }(cn || (cn = {}));
  92433. const s1 = 1e-3;
  92434. class ti {
  92435. constructor(e, n, r = 2) {
  92436. this.length = e, this.height = n, this.flags = r;
  92437. }
  92438. get outdated() {
  92439. return (this.flags & 2) > 0;
  92440. }
  92441. set outdated(e) {
  92442. this.flags = (e ? 2 : 0) | this.flags & -3;
  92443. }
  92444. setHeight(e, n) {
  92445. this.height != n && (Math.abs(this.height - n) > s1 && (e.heightChanged = !0), this.height = n);
  92446. }
  92447. // Base case is to replace a leaf node, which simply builds a tree
  92448. // from the new nodes and returns that (HeightMapBranch and
  92449. // HeightMapGap override this to actually use from/to)
  92450. replace(e, n, r) {
  92451. return ti.of(r);
  92452. }
  92453. // Again, these are base cases, and are overridden for branch and gap nodes.
  92454. decomposeLeft(e, n) {
  92455. n.push(this);
  92456. }
  92457. decomposeRight(e, n) {
  92458. n.push(this);
  92459. }
  92460. applyChanges(e, n, r, i) {
  92461. let a = this, o = r.doc;
  92462. for (let s = i.length - 1; s >= 0; s--) {
  92463. let { fromA: l, toA: u, fromB: c, toB: f } = i[s], d = a.lineAt(l, cn.ByPosNoHeight, r.setDoc(n), 0, 0), h = d.to >= u ? d : a.lineAt(u, cn.ByPosNoHeight, r, 0, 0);
  92464. for (f += h.to - u, u = h.to; s > 0 && d.from <= i[s - 1].toA; )
  92465. l = i[s - 1].fromA, c = i[s - 1].fromB, s--, l < d.from && (d = a.lineAt(l, cn.ByPosNoHeight, r, 0, 0));
  92466. c += d.from - l, l = d.from;
  92467. let p = s4.build(r.setDoc(o), e, c, f);
  92468. a = a.replace(l, u, p);
  92469. }
  92470. return a.updateHeight(r, 0);
  92471. }
  92472. static empty() {
  92473. return new ki(0, 0);
  92474. }
  92475. // nodes uses null values to indicate the position of line breaks.
  92476. // There are never line breaks at the start or end of the array, or
  92477. // two line breaks next to each other, and the array isn't allowed
  92478. // to be empty (same restrictions as return value from the builder).
  92479. static of(e) {
  92480. if (e.length == 1)
  92481. return e[0];
  92482. let n = 0, r = e.length, i = 0, a = 0;
  92483. for (; ; )
  92484. if (n == r)
  92485. if (i > a * 2) {
  92486. let s = e[n - 1];
  92487. 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;
  92488. } else if (a > i * 2) {
  92489. let s = e[r];
  92490. 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;
  92491. } else
  92492. break;
  92493. else if (i < a) {
  92494. let s = e[n++];
  92495. s && (i += s.size);
  92496. } else {
  92497. let s = e[--r];
  92498. s && (a += s.size);
  92499. }
  92500. let o = 0;
  92501. return e[n - 1] == null ? (o = 1, n--) : e[n] == null && (o = 1, r++), new zot(ti.of(e.slice(0, n)), o, ti.of(e.slice(r)));
  92502. }
  92503. }
  92504. ti.prototype.size = 1;
  92505. class foe extends ti {
  92506. constructor(e, n, r) {
  92507. super(e, n), this.deco = r;
  92508. }
  92509. blockAt(e, n, r, i) {
  92510. return new zo(i, this.length, r, this.height, this.deco || 0);
  92511. }
  92512. lineAt(e, n, r, i, a) {
  92513. return this.blockAt(0, r, i, a);
  92514. }
  92515. forEachLine(e, n, r, i, a, o) {
  92516. e <= a + this.length && n >= a && o(this.blockAt(0, r, i, a));
  92517. }
  92518. updateHeight(e, n = 0, r = !1, i) {
  92519. return i && i.from <= n && i.more && this.setHeight(e, i.heights[i.index++]), this.outdated = !1, this;
  92520. }
  92521. toString() {
  92522. return `block(${this.length})`;
  92523. }
  92524. }
  92525. class ki extends foe {
  92526. constructor(e, n) {
  92527. super(e, n, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0;
  92528. }
  92529. blockAt(e, n, r, i) {
  92530. return new zo(i, this.length, r, this.height, this.breaks);
  92531. }
  92532. replace(e, n, r) {
  92533. let i = r[0];
  92534. return r.length == 1 && (i instanceof ki || i instanceof fr && i.flags & 4) && Math.abs(this.length - i.length) < 10 ? (i instanceof fr ? i = new ki(i.length, this.height) : i.height = this.height, this.outdated || (i.outdated = !1), i) : ti.of(r);
  92535. }
  92536. updateHeight(e, n = 0, r = !1, i) {
  92537. 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;
  92538. }
  92539. toString() {
  92540. return `line(${this.length}${this.collapsed ? -this.collapsed : ""}${this.widgetHeight ? ":" + this.widgetHeight : ""})`;
  92541. }
  92542. }
  92543. class fr extends ti {
  92544. constructor(e) {
  92545. super(e, 0);
  92546. }
  92547. heightMetrics(e, n) {
  92548. let r = e.doc.lineAt(n).number, i = e.doc.lineAt(n + this.length).number, a = i - r + 1, o, s = 0;
  92549. if (e.lineWrapping) {
  92550. let l = Math.min(this.height, e.lineHeight * a);
  92551. o = l / a, this.length > a + 1 && (s = (this.height - l) / (this.length - a - 1));
  92552. } else
  92553. o = this.height / a;
  92554. return { firstLine: r, lastLine: i, perLine: o, perChar: s };
  92555. }
  92556. blockAt(e, n, r, i) {
  92557. let { firstLine: a, lastLine: o, perLine: s, perChar: l } = this.heightMetrics(n, i);
  92558. if (n.lineWrapping) {
  92559. 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);
  92560. return new zo(c.from, c.length, d, f, 0);
  92561. } else {
  92562. let u = Math.max(0, Math.min(o - a, Math.floor((e - r) / s))), { from: c, length: f } = n.doc.line(a + u);
  92563. return new zo(c, f, r + s * u, s, 0);
  92564. }
  92565. }
  92566. lineAt(e, n, r, i, a) {
  92567. if (n == cn.ByHeight)
  92568. return this.blockAt(e, r, i, a);
  92569. if (n == cn.ByPosNoHeight) {
  92570. let { from: h, to: p } = r.doc.lineAt(e);
  92571. return new zo(h, p - h, 0, 0, 0);
  92572. }
  92573. 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);
  92574. return new zo(u.from, u.length, Math.max(i, Math.min(d, i + this.height - c)), c, 0);
  92575. }
  92576. forEachLine(e, n, r, i, a, o) {
  92577. e = Math.max(e, a), n = Math.min(n, a + this.length);
  92578. let { firstLine: s, perLine: l, perChar: u } = this.heightMetrics(r, a);
  92579. for (let c = e, f = i; c <= n; ) {
  92580. let d = r.doc.lineAt(c);
  92581. if (c == e) {
  92582. let p = d.number - s;
  92583. f += l * p + u * (e - a - p);
  92584. }
  92585. let h = l + u * d.length;
  92586. o(new zo(d.from, d.length, f, h, 0)), f += h, c = d.to + 1;
  92587. }
  92588. }
  92589. replace(e, n, r) {
  92590. let i = this.length - n;
  92591. if (i > 0) {
  92592. let a = r[r.length - 1];
  92593. a instanceof fr ? r[r.length - 1] = new fr(a.length + i) : r.push(null, new fr(i - 1));
  92594. }
  92595. if (e > 0) {
  92596. let a = r[0];
  92597. a instanceof fr ? r[0] = new fr(e + a.length) : r.unshift(new fr(e - 1), null);
  92598. }
  92599. return ti.of(r);
  92600. }
  92601. decomposeLeft(e, n) {
  92602. n.push(new fr(e - 1), null);
  92603. }
  92604. decomposeRight(e, n) {
  92605. n.push(null, new fr(this.length - e - 1));
  92606. }
  92607. updateHeight(e, n = 0, r = !1, i) {
  92608. let a = n + this.length;
  92609. if (i && i.from <= n + this.length && i.more) {
  92610. let o = [], s = Math.max(n, i.from), l = -1;
  92611. for (i.from > n && o.push(new fr(i.from - n - 1).updateHeight(e, n)); s <= a && i.more; ) {
  92612. let c = e.doc.lineAt(s).length;
  92613. o.length && o.push(null);
  92614. let f = i.heights[i.index++];
  92615. l == -1 ? l = f : Math.abs(f - l) >= s1 && (l = -2);
  92616. let d = new ki(c, f);
  92617. d.outdated = !1, o.push(d), s += c + 1;
  92618. }
  92619. s <= a && o.push(null, new fr(a - s).updateHeight(e, s));
  92620. let u = ti.of(o);
  92621. return (l < 0 || Math.abs(u.height - this.height) >= s1 || Math.abs(l - this.heightMetrics(e, n).perLine) >= s1) && (e.heightChanged = !0), u;
  92622. } else (r || this.outdated) && (this.setHeight(e, e.heightForGap(n, n + this.length)), this.outdated = !1);
  92623. return this;
  92624. }
  92625. toString() {
  92626. return `gap(${this.length})`;
  92627. }
  92628. }
  92629. class zot extends ti {
  92630. constructor(e, n, r) {
  92631. 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;
  92632. }
  92633. get break() {
  92634. return this.flags & 1;
  92635. }
  92636. blockAt(e, n, r, i) {
  92637. let a = r + this.left.height;
  92638. return e < a ? this.left.blockAt(e, n, r, i) : this.right.blockAt(e, n, a, i + this.left.length + this.break);
  92639. }
  92640. lineAt(e, n, r, i, a) {
  92641. let o = i + this.left.height, s = a + this.left.length + this.break, l = n == cn.ByHeight ? e < o : e < s, u = l ? this.left.lineAt(e, n, r, i, a) : this.right.lineAt(e, n, r, o, s);
  92642. if (this.break || (l ? u.to < s : u.from > s))
  92643. return u;
  92644. let c = n == cn.ByPosNoHeight ? cn.ByPosNoHeight : cn.ByPos;
  92645. return l ? u.join(this.right.lineAt(s, c, r, o, s)) : this.left.lineAt(s, c, r, i, a).join(u);
  92646. }
  92647. forEachLine(e, n, r, i, a, o) {
  92648. let s = i + this.left.height, l = a + this.left.length + this.break;
  92649. if (this.break)
  92650. e < l && this.left.forEachLine(e, n, r, i, a, o), n >= l && this.right.forEachLine(e, n, r, s, l, o);
  92651. else {
  92652. let u = this.lineAt(l, cn.ByPos, r, i, a);
  92653. 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);
  92654. }
  92655. }
  92656. replace(e, n, r) {
  92657. let i = this.left.length + this.break;
  92658. if (n < i)
  92659. return this.balanced(this.left.replace(e, n, r), this.right);
  92660. if (e > this.left.length)
  92661. return this.balanced(this.left, this.right.replace(e - i, n - i, r));
  92662. let a = [];
  92663. e > 0 && this.decomposeLeft(e, a);
  92664. let o = a.length;
  92665. for (let s of r)
  92666. a.push(s);
  92667. if (e > 0 && rG(a, o - 1), n < this.length) {
  92668. let s = a.length;
  92669. this.decomposeRight(n, a), rG(a, s);
  92670. }
  92671. return ti.of(a);
  92672. }
  92673. decomposeLeft(e, n) {
  92674. let r = this.left.length;
  92675. if (e <= r)
  92676. return this.left.decomposeLeft(e, n);
  92677. n.push(this.left), this.break && (r++, e >= r && n.push(null)), e > r && this.right.decomposeLeft(e - r, n);
  92678. }
  92679. decomposeRight(e, n) {
  92680. let r = this.left.length, i = r + this.break;
  92681. if (e >= i)
  92682. return this.right.decomposeRight(e - i, n);
  92683. e < r && this.left.decomposeRight(e, n), this.break && e < i && n.push(null), n.push(this.right);
  92684. }
  92685. balanced(e, n) {
  92686. return e.size > 2 * n.size || n.size > 2 * e.size ? ti.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);
  92687. }
  92688. updateHeight(e, n = 0, r = !1, i) {
  92689. let { left: a, right: o } = this, s = n + a.length + this.break, l = null;
  92690. 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);
  92691. }
  92692. toString() {
  92693. return this.left + (this.break ? " " : "-") + this.right;
  92694. }
  92695. }
  92696. function rG(t, e) {
  92697. let n, r;
  92698. t[e] == null && (n = t[e - 1]) instanceof fr && (r = t[e + 1]) instanceof fr && t.splice(e - 1, 3, new fr(n.length + 1 + r.length));
  92699. }
  92700. const Vot = 5;
  92701. class s4 {
  92702. constructor(e, n) {
  92703. this.pos = e, this.oracle = n, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e;
  92704. }
  92705. get isCovered() {
  92706. return this.covering && this.nodes[this.nodes.length - 1] == this.covering;
  92707. }
  92708. span(e, n) {
  92709. if (this.lineStart > -1) {
  92710. let r = Math.min(n, this.lineEnd), i = this.nodes[this.nodes.length - 1];
  92711. i instanceof ki ? i.length += r - this.pos : (r > this.pos || !this.isCovered) && this.nodes.push(new ki(r - this.pos, -1)), this.writtenTo = r, n > r && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1);
  92712. }
  92713. this.pos = n;
  92714. }
  92715. point(e, n, r) {
  92716. if (e < n || r.heightRelevant) {
  92717. let i = r.widget ? r.widget.estimatedHeight : 0, a = r.widget ? r.widget.lineBreaks : 0;
  92718. i < 0 && (i = this.oracle.lineHeight);
  92719. let o = n - e;
  92720. r.block ? this.addBlock(new foe(o, i, r)) : (o || a || i >= Vot) && this.addLineDeco(i, a, o);
  92721. } else n > e && this.span(e, n);
  92722. this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to);
  92723. }
  92724. enterLine() {
  92725. if (this.lineStart > -1)
  92726. return;
  92727. let { from: e, to: n } = this.oracle.doc.lineAt(this.pos);
  92728. 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 ki(this.pos - e, -1)), this.writtenTo = this.pos;
  92729. }
  92730. blankContent(e, n) {
  92731. let r = new fr(n - e);
  92732. return this.oracle.doc.lineAt(e).to == n && (r.flags |= 4), r;
  92733. }
  92734. ensureLine() {
  92735. this.enterLine();
  92736. let e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null;
  92737. if (e instanceof ki)
  92738. return e;
  92739. let n = new ki(0, -1);
  92740. return this.nodes.push(n), n;
  92741. }
  92742. addBlock(e) {
  92743. this.enterLine();
  92744. let n = e.deco;
  92745. 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);
  92746. }
  92747. addLineDeco(e, n, r) {
  92748. let i = this.ensureLine();
  92749. i.length += r, i.collapsed += r, i.widgetHeight = Math.max(i.widgetHeight, e), i.breaks += n, this.writtenTo = this.pos = this.pos + r;
  92750. }
  92751. finish(e) {
  92752. let n = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1];
  92753. this.lineStart > -1 && !(n instanceof ki) && !this.isCovered ? this.nodes.push(new ki(0, -1)) : (this.writtenTo < this.pos || n == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos));
  92754. let r = e;
  92755. for (let i of this.nodes)
  92756. i instanceof ki && i.updateHeight(this.oracle, r), r += i ? i.length : 1;
  92757. return this.nodes;
  92758. }
  92759. // Always called with a region that on both sides either stretches
  92760. // to a line break or the end of the document.
  92761. // The returned array uses null to indicate line breaks, but never
  92762. // starts or ends in a line break, or has multiple line breaks next
  92763. // to each other.
  92764. static build(e, n, r, i) {
  92765. let a = new s4(r, e);
  92766. return Vt.spans(n, r, i, a, 0), a.finish(r);
  92767. }
  92768. }
  92769. function Fot(t, e, n) {
  92770. let r = new Wot();
  92771. return Vt.compare(t, e, n, r, 0), r.changes;
  92772. }
  92773. class Wot {
  92774. constructor() {
  92775. this.changes = [];
  92776. }
  92777. compareRange() {
  92778. }
  92779. comparePoint(e, n, r, i) {
  92780. (e < n || r && r.heightRelevant || i && i.heightRelevant) && SM(e, n, this.changes, 5);
  92781. }
  92782. }
  92783. function Qot(t, e) {
  92784. 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);
  92785. for (let u = t.parentNode; u && u != r.body; )
  92786. if (u.nodeType == 1) {
  92787. let c = u, f = window.getComputedStyle(c);
  92788. if ((c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth) && f.overflow != "visible") {
  92789. let d = c.getBoundingClientRect();
  92790. 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);
  92791. }
  92792. u = f.position == "absolute" || f.position == "fixed" ? c.offsetParent : c.parentNode;
  92793. } else if (u.nodeType == 11)
  92794. u = u.host;
  92795. else
  92796. break;
  92797. return {
  92798. left: a - n.left,
  92799. right: Math.max(a, o) - n.left,
  92800. top: s - (n.top + e),
  92801. bottom: Math.max(s, l) - (n.top + e)
  92802. };
  92803. }
  92804. function Hot(t, e) {
  92805. let n = t.getBoundingClientRect();
  92806. return {
  92807. left: 0,
  92808. right: n.right - n.left,
  92809. top: e,
  92810. bottom: n.bottom - (n.top + e)
  92811. };
  92812. }
  92813. class _$ {
  92814. constructor(e, n, r) {
  92815. this.from = e, this.to = n, this.size = r;
  92816. }
  92817. static same(e, n) {
  92818. if (e.length != n.length)
  92819. return !1;
  92820. for (let r = 0; r < e.length; r++) {
  92821. let i = e[r], a = n[r];
  92822. if (i.from != a.from || i.to != a.to || i.size != a.size)
  92823. return !1;
  92824. }
  92825. return !0;
  92826. }
  92827. draw(e, n) {
  92828. return Ze.replace({
  92829. widget: new Got(this.size * (n ? e.scaleY : e.scaleX), n)
  92830. }).range(this.from, this.to);
  92831. }
  92832. }
  92833. class Got extends hs {
  92834. constructor(e, n) {
  92835. super(), this.size = e, this.vertical = n;
  92836. }
  92837. eq(e) {
  92838. return e.size == this.size && e.vertical == this.vertical;
  92839. }
  92840. toDOM() {
  92841. let e = document.createElement("div");
  92842. 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;
  92843. }
  92844. get estimatedHeight() {
  92845. return this.vertical ? this.size : -1;
  92846. }
  92847. }
  92848. class iG {
  92849. constructor(e) {
  92850. 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 = aG, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = pn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
  92851. let n = e.facet(a4).some((r) => typeof r != "function" && r.class == "cm-lineWrapping");
  92852. this.heightOracle = new Not(n), this.stateDeco = e.facet(Km).filter((r) => typeof r != "function"), this.heightMap = ti.empty().applyChanges(this.stateDeco, Ft.empty, this.heightOracle.setDoc(e.doc), [new Ca(0, 0, 0, e.doc.length)]);
  92853. for (let r = 0; r < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); r++)
  92854. ;
  92855. this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Ze.set(this.lineGaps.map((r) => r.draw(this, !1))), this.computeVisibleRanges();
  92856. }
  92857. updateForViewport() {
  92858. let e = [this.viewport], { main: n } = this.state.selection;
  92859. for (let r = 0; r <= 1; r++) {
  92860. let i = r ? n.head : n.anchor;
  92861. if (!e.some(({ from: a, to: o }) => i >= a && i <= o)) {
  92862. let { from: a, to: o } = this.lineBlockAt(i);
  92863. e.push(new Yb(a, o));
  92864. }
  92865. }
  92866. return this.viewports = e.sort((r, i) => r.from - i.from), this.updateScaler();
  92867. }
  92868. updateScaler() {
  92869. let e = this.scaler;
  92870. return this.scaler = this.heightMap.height <= 7e6 ? aG : new l4(this.heightOracle, this.heightMap, this.viewports), e.eq(this.scaler) ? 0 : 2;
  92871. }
  92872. updateViewportLines() {
  92873. this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => {
  92874. this.viewportLines.push(og(e, this.scaler));
  92875. });
  92876. }
  92877. update(e, n = null) {
  92878. this.state = e.state;
  92879. let r = this.stateDeco;
  92880. this.stateDeco = this.state.facet(Km).filter((c) => typeof c != "function");
  92881. let i = e.changedRanges, a = Ca.extendWithRanges(i, Fot(r, this.stateDeco, e ? e.changes : jn.empty(this.state.doc.length))), o = this.heightMap.height, s = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
  92882. 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);
  92883. let l = a.length ? this.mapViewport(this.viewport, e.changes) : this.viewport;
  92884. (n && (n.range.head < l.from || n.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, n));
  92885. let u = l.from != this.viewport.from || l.to != this.viewport.to;
  92886. 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(jae) && (this.mustEnforceCursorAssoc = !0);
  92887. }
  92888. measure(e) {
  92889. let n = e.contentDOM, r = window.getComputedStyle(n), i = this.heightOracle, a = r.whiteSpace;
  92890. this.defaultTextDirection = r.direction == "rtl" ? pn.RTL : pn.LTR;
  92891. let o = this.heightOracle.mustRefreshForWrapping(a), s = n.getBoundingClientRect(), l = o || this.mustMeasureContent || this.contentDOMHeight != s.height;
  92892. this.contentDOMHeight = s.height, this.mustMeasureContent = !1;
  92893. let u = 0, c = 0;
  92894. if (s.width && s.height) {
  92895. let { scaleX: _, scaleY: O } = bae(n, s);
  92896. (_ > 5e-3 && Math.abs(this.scaleX - _) > 5e-3 || O > 5e-3 && Math.abs(this.scaleY - O) > 5e-3) && (this.scaleX = _, this.scaleY = O, u |= 8, o = l = !0);
  92897. }
  92898. let f = (parseInt(r.paddingTop) || 0) * this.scaleY, d = (parseInt(r.paddingBottom) || 0) * this.scaleY;
  92899. (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);
  92900. let h = e.scrollDOM.scrollTop * this.scaleY;
  92901. this.scrollTop != h && (this.scrollAnchorHeight = -1, this.scrollTop = h), this.scrolledToBottom = Sae(e.scrollDOM);
  92902. let p = (this.printing ? Hot : Qot)(n, this.paddingTop), v = p.top - this.pixelViewport.top, g = p.bottom - this.pixelViewport.bottom;
  92903. this.pixelViewport = p;
  92904. let m = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left;
  92905. if (m != this.inView && (this.inView = m, m && (l = !0)), !this.inView && !this.scrollTarget)
  92906. return 0;
  92907. let y = s.width;
  92908. if ((this.contentDOMWidth != y || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = s.width, this.editorHeight = e.scrollDOM.clientHeight, u |= 8), l) {
  92909. let _ = e.docView.measureVisibleLineHeights(this.viewport);
  92910. if (i.mustRefreshForHeights(_) && (o = !0), o || i.lineWrapping && Math.abs(y - this.contentDOMWidth) > i.charWidth) {
  92911. let { lineHeight: O, charWidth: S, textHeight: x } = e.docView.measureTextSize();
  92912. o = O > 0 && i.refresh(a, O, S, x, y / S, _), o && (e.docView.minWidth = 0, u |= 8);
  92913. }
  92914. v > 0 && g > 0 ? c = Math.max(v, g) : v < 0 && g < 0 && (c = Math.min(v, g)), i.heightChanged = !1;
  92915. for (let O of this.viewports) {
  92916. let S = O.from == this.viewport.from ? _ : e.docView.measureVisibleLineHeights(O);
  92917. this.heightMap = (o ? ti.empty().applyChanges(this.stateDeco, Ft.empty, this.heightOracle, [new Ca(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, o, new Bot(O.from, S));
  92918. }
  92919. i.heightChanged && (u |= 2);
  92920. }
  92921. let b = !this.viewportIsAppropriate(this.viewport, c) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
  92922. return b && (u & 2 && (u |= this.updateScaler()), this.viewport = this.getViewport(c, this.scrollTarget), u |= this.updateForViewport()), (u & 2 || b) && 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;
  92923. }
  92924. get visibleTop() {
  92925. return this.scaler.fromDOM(this.pixelViewport.top);
  92926. }
  92927. get visibleBottom() {
  92928. return this.scaler.fromDOM(this.pixelViewport.bottom);
  92929. }
  92930. getViewport(e, n) {
  92931. 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 Yb(i.lineAt(o - r * 1e3, cn.ByHeight, a, 0, 0).from, i.lineAt(s + (1 - r) * 1e3, cn.ByHeight, a, 0, 0).to);
  92932. if (n) {
  92933. let { head: u } = n.range;
  92934. if (u < l.from || u > l.to) {
  92935. let c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = i.lineAt(u, cn.ByPos, a, 0, 0), d;
  92936. 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 Yb(i.lineAt(d - 1e3 / 2, cn.ByHeight, a, 0, 0).from, i.lineAt(d + c + 1e3 / 2, cn.ByHeight, a, 0, 0).to);
  92937. }
  92938. }
  92939. return l;
  92940. }
  92941. mapViewport(e, n) {
  92942. let r = n.mapPos(e.from, -1), i = n.mapPos(e.to, 1);
  92943. return new Yb(this.heightMap.lineAt(r, cn.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(i, cn.ByPos, this.heightOracle, 0, 0).to);
  92944. }
  92945. // Checks if a given viewport covers the visible part of the
  92946. // document and not too much beyond that.
  92947. viewportIsAppropriate({ from: e, to: n }, r = 0) {
  92948. if (!this.inView)
  92949. return !0;
  92950. let { top: i } = this.heightMap.lineAt(e, cn.ByPos, this.heightOracle, 0, 0), { bottom: a } = this.heightMap.lineAt(n, cn.ByPos, this.heightOracle, 0, 0), { visibleTop: o, visibleBottom: s } = this;
  92951. return (e == 0 || i <= o - Math.max(10, Math.min(
  92952. -r,
  92953. 250
  92954. /* VP.MaxCoverMargin */
  92955. ))) && (n == this.state.doc.length || a >= s + Math.max(10, Math.min(
  92956. r,
  92957. 250
  92958. /* VP.MaxCoverMargin */
  92959. ))) && i > o - 2 * 1e3 && a < s + 2 * 1e3;
  92960. }
  92961. mapLineGaps(e, n) {
  92962. if (!e.length || n.empty)
  92963. return e;
  92964. let r = [];
  92965. for (let i of e)
  92966. n.touchesRange(i.from, i.to) || r.push(new _$(n.mapPos(i.from), n.mapPos(i.to), i.size));
  92967. return r;
  92968. }
  92969. // Computes positions in the viewport where the start or end of a
  92970. // line should be hidden, trying to reuse existing line gaps when
  92971. // appropriate to avoid unneccesary redraws.
  92972. // Uses crude character-counting for the positioning and sizing,
  92973. // since actual DOM coordinates aren't always available and
  92974. // predictable. Relies on generous margins (see LG.Margin) to hide
  92975. // the artifacts this might produce from the user.
  92976. ensureLineGaps(e, n) {
  92977. let r = this.heightOracle.lineWrapping, i = r ? 1e4 : 2e3, a = i >> 1, o = i << 1;
  92978. if (this.defaultTextDirection != pn.LTR && !r)
  92979. return [];
  92980. let s = [], l = (c, f, d, h) => {
  92981. if (f - c < a)
  92982. return;
  92983. let p = this.state.selection.main, v = [p.from];
  92984. p.empty || v.push(p.to);
  92985. for (let m of v)
  92986. if (m > c && m < f) {
  92987. l(c, m - 10, d, h), l(m + 10, f, d, h);
  92988. return;
  92989. }
  92990. let g = Zot(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));
  92991. if (!g) {
  92992. if (f < d.to && n && r && n.visibleRanges.some((m) => m.from <= f && m.to >= f)) {
  92993. let m = n.moveToLineBoundary(me.cursor(f), !1, !0).head;
  92994. m > c && (f = m);
  92995. }
  92996. g = new _$(c, f, this.gapSize(d, c, f, h));
  92997. }
  92998. s.push(g);
  92999. }, u = (c) => {
  93000. if (c.length < o || c.type != ei.Text)
  93001. return;
  93002. let f = jot(c.from, c.to, this.stateDeco);
  93003. if (f.total < o)
  93004. return;
  93005. let d = this.scrollTarget ? this.scrollTarget.range.head : null, h, p;
  93006. if (r) {
  93007. let v = i / this.heightOracle.lineLength * this.heightOracle.lineHeight, g, m;
  93008. if (d != null) {
  93009. let y = Kb(f, d), b = ((this.visibleBottom - this.visibleTop) / 2 + v) / c.height;
  93010. g = y - b, m = y + b;
  93011. } else
  93012. g = (this.visibleTop - c.top - v) / c.height, m = (this.visibleBottom - c.top + v) / c.height;
  93013. h = qb(f, g), p = qb(f, m);
  93014. } else {
  93015. let v = f.total * this.heightOracle.charWidth, g = i * this.heightOracle.charWidth, m, y;
  93016. if (d != null) {
  93017. let b = Kb(f, d), _ = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + g) / v;
  93018. m = b - _, y = b + _;
  93019. } else
  93020. m = (this.pixelViewport.left - g) / v, y = (this.pixelViewport.right + g) / v;
  93021. h = qb(f, m), p = qb(f, y);
  93022. }
  93023. h > c.from && l(c.from, h, c, f), p < c.to && l(p, c.to, c, f);
  93024. };
  93025. for (let c of this.viewportLines)
  93026. Array.isArray(c.type) ? c.type.forEach(u) : u(c);
  93027. return s;
  93028. }
  93029. gapSize(e, n, r, i) {
  93030. let a = Kb(i, r) - Kb(i, n);
  93031. return this.heightOracle.lineWrapping ? e.height * a : i.total * this.heightOracle.charWidth * a;
  93032. }
  93033. updateLineGaps(e) {
  93034. _$.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = Ze.set(e.map((n) => n.draw(this, this.heightOracle.lineWrapping))));
  93035. }
  93036. computeVisibleRanges() {
  93037. let e = this.stateDeco;
  93038. this.lineGaps.length && (e = e.concat(this.lineGapDeco));
  93039. let n = [];
  93040. Vt.spans(e, this.viewport.from, this.viewport.to, {
  93041. span(i, a) {
  93042. n.push({ from: i, to: a });
  93043. },
  93044. point() {
  93045. }
  93046. }, 20);
  93047. let r = n.length != this.visibleRanges.length || this.visibleRanges.some((i, a) => i.from != n[a].from || i.to != n[a].to);
  93048. return this.visibleRanges = n, r ? 4 : 0;
  93049. }
  93050. lineBlockAt(e) {
  93051. return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) || og(this.heightMap.lineAt(e, cn.ByPos, this.heightOracle, 0, 0), this.scaler);
  93052. }
  93053. lineBlockAtHeight(e) {
  93054. return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((n) => n.top <= e && n.bottom >= e) || og(this.heightMap.lineAt(this.scaler.fromDOM(e), cn.ByHeight, this.heightOracle, 0, 0), this.scaler);
  93055. }
  93056. scrollAnchorAt(e) {
  93057. let n = this.lineBlockAtHeight(e + 8);
  93058. return n.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? n : this.viewportLines[0];
  93059. }
  93060. elementAtHeight(e) {
  93061. return og(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler);
  93062. }
  93063. get docHeight() {
  93064. return this.scaler.toDOM(this.heightMap.height);
  93065. }
  93066. get contentHeight() {
  93067. return this.docHeight + this.paddingTop + this.paddingBottom;
  93068. }
  93069. }
  93070. class Yb {
  93071. constructor(e, n) {
  93072. this.from = e, this.to = n;
  93073. }
  93074. }
  93075. function jot(t, e, n) {
  93076. let r = [], i = t, a = 0;
  93077. return Vt.spans(n, t, e, {
  93078. span() {
  93079. },
  93080. point(o, s) {
  93081. o > i && (r.push({ from: i, to: o }), a += o - i), i = s;
  93082. }
  93083. }, 20), i < e && (r.push({ from: i, to: e }), a += e - i), { total: a, ranges: r };
  93084. }
  93085. function qb({ total: t, ranges: e }, n) {
  93086. if (n <= 0)
  93087. return e[0].from;
  93088. if (n >= 1)
  93089. return e[e.length - 1].to;
  93090. let r = Math.floor(t * n);
  93091. for (let i = 0; ; i++) {
  93092. let { from: a, to: o } = e[i], s = o - a;
  93093. if (r <= s)
  93094. return a + r;
  93095. r -= s;
  93096. }
  93097. }
  93098. function Kb(t, e) {
  93099. let n = 0;
  93100. for (let { from: r, to: i } of t.ranges) {
  93101. if (e <= i) {
  93102. n += e - r;
  93103. break;
  93104. }
  93105. n += i - r;
  93106. }
  93107. return n / t.total;
  93108. }
  93109. function Zot(t, e) {
  93110. for (let n of t)
  93111. if (e(n))
  93112. return n;
  93113. }
  93114. const aG = {
  93115. toDOM(t) {
  93116. return t;
  93117. },
  93118. fromDOM(t) {
  93119. return t;
  93120. },
  93121. scale: 1,
  93122. eq(t) {
  93123. return t == this;
  93124. }
  93125. };
  93126. class l4 {
  93127. constructor(e, n, r) {
  93128. let i = 0, a = 0, o = 0;
  93129. this.viewports = r.map(({ from: s, to: l }) => {
  93130. let u = n.lineAt(s, cn.ByPos, e, 0, 0).top, c = n.lineAt(l, cn.ByPos, e, 0, 0).bottom;
  93131. return i += c - u, { from: s, to: l, top: u, bottom: c, domTop: 0, domBottom: 0 };
  93132. }), this.scale = (7e6 - i) / (n.height - i);
  93133. for (let s of this.viewports)
  93134. s.domTop = o + (s.top - a) * this.scale, o = s.domBottom = s.domTop + (s.bottom - s.top), a = s.bottom;
  93135. }
  93136. toDOM(e) {
  93137. for (let n = 0, r = 0, i = 0; ; n++) {
  93138. let a = n < this.viewports.length ? this.viewports[n] : null;
  93139. if (!a || e < a.top)
  93140. return i + (e - r) * this.scale;
  93141. if (e <= a.bottom)
  93142. return a.domTop + (e - a.top);
  93143. r = a.bottom, i = a.domBottom;
  93144. }
  93145. }
  93146. fromDOM(e) {
  93147. for (let n = 0, r = 0, i = 0; ; n++) {
  93148. let a = n < this.viewports.length ? this.viewports[n] : null;
  93149. if (!a || e < a.domTop)
  93150. return r + (e - i) / this.scale;
  93151. if (e <= a.domBottom)
  93152. return a.top + (e - a.domTop);
  93153. r = a.bottom, i = a.domBottom;
  93154. }
  93155. }
  93156. eq(e) {
  93157. return e instanceof l4 ? 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;
  93158. }
  93159. }
  93160. function og(t, e) {
  93161. if (e.scale == 1)
  93162. return t;
  93163. let n = e.toDOM(t.top), r = e.toDOM(t.bottom);
  93164. return new zo(t.from, t.length, n, r - n, Array.isArray(t._content) ? t._content.map((i) => og(i, e)) : t._content);
  93165. }
  93166. const Jb = /* @__PURE__ */ Be.define({ combine: (t) => t.join(" ") }), EM = /* @__PURE__ */ Be.define({ combine: (t) => t.indexOf(!0) > -1 }), MM = /* @__PURE__ */ pu.newName(), doe = /* @__PURE__ */ pu.newName(), hoe = /* @__PURE__ */ pu.newName(), poe = { "&light": "." + doe, "&dark": "." + hoe };
  93167. function IM(t, e, n) {
  93168. return new pu(e, {
  93169. finish(r) {
  93170. return /&/.test(r) ? r.replace(/&\w*/, (i) => {
  93171. if (i == "&")
  93172. return t;
  93173. if (!n || !n[i])
  93174. throw new RangeError(`Unsupported selector: ${i}`);
  93175. return n[i];
  93176. }) : t + " " + r;
  93177. }
  93178. });
  93179. }
  93180. const Uot = /* @__PURE__ */ IM("." + MM, {
  93181. "&": {
  93182. position: "relative !important",
  93183. boxSizing: "border-box",
  93184. "&.cm-focused": {
  93185. // Provide a simple default outline to make sure a focused
  93186. // editor is visually distinct. Can't leave the default behavior
  93187. // because that will apply to the content element, which is
  93188. // inside the scrollable container and doesn't include the
  93189. // gutters. We also can't use an 'auto' outline, since those
  93190. // are, for some reason, drawn behind the element content, which
  93191. // will cause things like the active line background to cover
  93192. // the outline (#297).
  93193. outline: "1px dotted #212121"
  93194. },
  93195. display: "flex !important",
  93196. flexDirection: "column"
  93197. },
  93198. ".cm-scroller": {
  93199. display: "flex !important",
  93200. alignItems: "flex-start !important",
  93201. fontFamily: "monospace",
  93202. lineHeight: 1.4,
  93203. height: "100%",
  93204. overflowX: "auto",
  93205. position: "relative",
  93206. zIndex: 0
  93207. },
  93208. ".cm-content": {
  93209. margin: 0,
  93210. flexGrow: 2,
  93211. flexShrink: 0,
  93212. display: "block",
  93213. whiteSpace: "pre",
  93214. wordWrap: "normal",
  93215. // https://github.com/codemirror/dev/issues/456
  93216. boxSizing: "border-box",
  93217. minHeight: "100%",
  93218. padding: "4px 0",
  93219. outline: "none",
  93220. "&[contenteditable=true]": {
  93221. WebkitUserModify: "read-write-plaintext-only"
  93222. }
  93223. },
  93224. ".cm-lineWrapping": {
  93225. whiteSpace_fallback: "pre-wrap",
  93226. // For IE
  93227. whiteSpace: "break-spaces",
  93228. wordBreak: "break-word",
  93229. // For Safari, which doesn't support overflow-wrap: anywhere
  93230. overflowWrap: "anywhere",
  93231. flexShrink: 1
  93232. },
  93233. "&light .cm-content": { caretColor: "black" },
  93234. "&dark .cm-content": { caretColor: "white" },
  93235. ".cm-line": {
  93236. display: "block",
  93237. padding: "0 2px 0 6px"
  93238. },
  93239. ".cm-layer": {
  93240. position: "absolute",
  93241. left: 0,
  93242. top: 0,
  93243. contain: "size style",
  93244. "& > *": {
  93245. position: "absolute"
  93246. }
  93247. },
  93248. "&light .cm-selectionBackground": {
  93249. background: "#d9d9d9"
  93250. },
  93251. "&dark .cm-selectionBackground": {
  93252. background: "#222"
  93253. },
  93254. "&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
  93255. background: "#d7d4f0"
  93256. },
  93257. "&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
  93258. background: "#233"
  93259. },
  93260. ".cm-cursorLayer": {
  93261. pointerEvents: "none"
  93262. },
  93263. "&.cm-focused > .cm-scroller > .cm-cursorLayer": {
  93264. animation: "steps(1) cm-blink 1.2s infinite"
  93265. },
  93266. // Two animations defined so that we can switch between them to
  93267. // restart the animation without forcing another style
  93268. // recomputation.
  93269. "@keyframes cm-blink": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  93270. "@keyframes cm-blink2": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  93271. ".cm-cursor, .cm-dropCursor": {
  93272. borderLeft: "1.2px solid black",
  93273. marginLeft: "-0.6px",
  93274. pointerEvents: "none"
  93275. },
  93276. ".cm-cursor": {
  93277. display: "none"
  93278. },
  93279. "&dark .cm-cursor": {
  93280. borderLeftColor: "#444"
  93281. },
  93282. ".cm-dropCursor": {
  93283. position: "absolute"
  93284. },
  93285. "&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": {
  93286. display: "block"
  93287. },
  93288. ".cm-iso": {
  93289. unicodeBidi: "isolate"
  93290. },
  93291. ".cm-announced": {
  93292. position: "fixed",
  93293. top: "-10000px"
  93294. },
  93295. "@media print": {
  93296. ".cm-announced": { display: "none" }
  93297. },
  93298. "&light .cm-activeLine": { backgroundColor: "#cceeff44" },
  93299. "&dark .cm-activeLine": { backgroundColor: "#99eeff33" },
  93300. "&light .cm-specialChar": { color: "red" },
  93301. "&dark .cm-specialChar": { color: "#f78" },
  93302. ".cm-gutters": {
  93303. flexShrink: 0,
  93304. display: "flex",
  93305. height: "100%",
  93306. boxSizing: "border-box",
  93307. insetInlineStart: 0,
  93308. zIndex: 200
  93309. },
  93310. "&light .cm-gutters": {
  93311. backgroundColor: "#f5f5f5",
  93312. color: "#6c6c6c",
  93313. borderRight: "1px solid #ddd"
  93314. },
  93315. "&dark .cm-gutters": {
  93316. backgroundColor: "#333338",
  93317. color: "#ccc"
  93318. },
  93319. ".cm-gutter": {
  93320. display: "flex !important",
  93321. // Necessary -- prevents margin collapsing
  93322. flexDirection: "column",
  93323. flexShrink: 0,
  93324. boxSizing: "border-box",
  93325. minHeight: "100%",
  93326. overflow: "hidden"
  93327. },
  93328. ".cm-gutterElement": {
  93329. boxSizing: "border-box"
  93330. },
  93331. ".cm-lineNumbers .cm-gutterElement": {
  93332. padding: "0 3px 0 5px",
  93333. minWidth: "20px",
  93334. textAlign: "right",
  93335. whiteSpace: "nowrap"
  93336. },
  93337. "&light .cm-activeLineGutter": {
  93338. backgroundColor: "#e2f2ff"
  93339. },
  93340. "&dark .cm-activeLineGutter": {
  93341. backgroundColor: "#222227"
  93342. },
  93343. ".cm-panels": {
  93344. boxSizing: "border-box",
  93345. position: "sticky",
  93346. left: 0,
  93347. right: 0
  93348. },
  93349. "&light .cm-panels": {
  93350. backgroundColor: "#f5f5f5",
  93351. color: "black"
  93352. },
  93353. "&light .cm-panels-top": {
  93354. borderBottom: "1px solid #ddd"
  93355. },
  93356. "&light .cm-panels-bottom": {
  93357. borderTop: "1px solid #ddd"
  93358. },
  93359. "&dark .cm-panels": {
  93360. backgroundColor: "#333338",
  93361. color: "white"
  93362. },
  93363. ".cm-tab": {
  93364. display: "inline-block",
  93365. overflow: "hidden",
  93366. verticalAlign: "bottom"
  93367. },
  93368. ".cm-widgetBuffer": {
  93369. verticalAlign: "text-top",
  93370. height: "1em",
  93371. width: 0,
  93372. display: "inline"
  93373. },
  93374. ".cm-placeholder": {
  93375. color: "#888",
  93376. display: "inline-block",
  93377. verticalAlign: "top"
  93378. },
  93379. ".cm-highlightSpace:before": {
  93380. content: "attr(data-display)",
  93381. position: "absolute",
  93382. pointerEvents: "none",
  93383. color: "#888"
  93384. },
  93385. ".cm-highlightTab": {
  93386. 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>')`,
  93387. backgroundSize: "auto 100%",
  93388. backgroundPosition: "right 90%",
  93389. backgroundRepeat: "no-repeat"
  93390. },
  93391. ".cm-trailingSpace": {
  93392. backgroundColor: "#ff332255"
  93393. },
  93394. ".cm-button": {
  93395. verticalAlign: "middle",
  93396. color: "inherit",
  93397. fontSize: "70%",
  93398. padding: ".2em 1em",
  93399. borderRadius: "1px"
  93400. },
  93401. "&light .cm-button": {
  93402. backgroundImage: "linear-gradient(#eff1f5, #d9d9df)",
  93403. border: "1px solid #888",
  93404. "&:active": {
  93405. backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)"
  93406. }
  93407. },
  93408. "&dark .cm-button": {
  93409. backgroundImage: "linear-gradient(#393939, #111)",
  93410. border: "1px solid #888",
  93411. "&:active": {
  93412. backgroundImage: "linear-gradient(#111, #333)"
  93413. }
  93414. },
  93415. ".cm-textfield": {
  93416. verticalAlign: "middle",
  93417. color: "inherit",
  93418. fontSize: "70%",
  93419. border: "1px solid silver",
  93420. padding: ".2em .5em"
  93421. },
  93422. "&light .cm-textfield": {
  93423. backgroundColor: "white"
  93424. },
  93425. "&dark .cm-textfield": {
  93426. border: "1px solid #555",
  93427. backgroundColor: "inherit"
  93428. }
  93429. }, poe), sg = "￿";
  93430. class Xot {
  93431. constructor(e, n) {
  93432. this.points = e, this.text = "", this.lineSeparator = n.facet(At.lineSeparator);
  93433. }
  93434. append(e) {
  93435. this.text += e;
  93436. }
  93437. lineBreak() {
  93438. this.text += sg;
  93439. }
  93440. readRange(e, n) {
  93441. if (!e)
  93442. return this;
  93443. let r = e.parentNode;
  93444. for (let i = e; ; ) {
  93445. this.findPointBefore(r, i);
  93446. let a = this.text.length;
  93447. this.readNode(i);
  93448. let o = i.nextSibling;
  93449. if (o == n)
  93450. break;
  93451. let s = Jt.get(i), l = Jt.get(o);
  93452. (s && l ? s.breakAfter : (s ? s.breakAfter : iS(i)) || iS(o) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > a) && this.lineBreak(), i = o;
  93453. }
  93454. return this.findPointBefore(r, n), this;
  93455. }
  93456. readTextNode(e) {
  93457. let n = e.nodeValue;
  93458. for (let r of this.points)
  93459. r.node == e && (r.pos = this.text.length + Math.min(r.offset, n.length));
  93460. for (let r = 0, i = this.lineSeparator ? null : /\r\n?|\n/g; ; ) {
  93461. let a = -1, o = 1, s;
  93462. 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)
  93463. break;
  93464. if (this.lineBreak(), o > 1)
  93465. for (let l of this.points)
  93466. l.node == e && l.pos > this.text.length && (l.pos -= o - 1);
  93467. r = a + o;
  93468. }
  93469. }
  93470. readNode(e) {
  93471. if (e.cmIgnore)
  93472. return;
  93473. let n = Jt.get(e), r = n && n.overrideDOMText;
  93474. if (r != null) {
  93475. this.findPointInside(e, r.length);
  93476. for (let i = r.iter(); !i.next().done; )
  93477. i.lineBreak ? this.lineBreak() : this.append(i.value);
  93478. } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null);
  93479. }
  93480. findPointBefore(e, n) {
  93481. for (let r of this.points)
  93482. r.node == e && e.childNodes[r.offset] == n && (r.pos = this.text.length);
  93483. }
  93484. findPointInside(e, n) {
  93485. for (let r of this.points)
  93486. (e.nodeType == 3 ? r.node == e : e.contains(r.node)) && (r.pos = this.text.length + (Yot(e, r.node, r.offset) ? n : 0));
  93487. }
  93488. }
  93489. function Yot(t, e, n) {
  93490. for (; ; ) {
  93491. if (!e || n < el(e))
  93492. return !1;
  93493. if (e == t)
  93494. return !0;
  93495. n = Tf(e) + 1, e = e.parentNode;
  93496. }
  93497. }
  93498. class oG {
  93499. constructor(e, n) {
  93500. this.node = e, this.offset = n, this.pos = -1;
  93501. }
  93502. }
  93503. class qot {
  93504. constructor(e, n, r, i) {
  93505. this.typeOver = i, this.bounds = null, this.text = "", this.domChanged = n > -1;
  93506. let { impreciseHead: a, impreciseAnchor: o } = e.docView;
  93507. if (e.state.readOnly && n > -1)
  93508. this.newSel = null;
  93509. else if (n > -1 && (this.bounds = e.docView.domBoundsAround(n, r, 0))) {
  93510. let s = a || o ? [] : est(e), l = new Xot(s, e.state);
  93511. l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = tst(s, this.bounds.from);
  93512. } else {
  93513. let s = e.observer.selectionRange, l = a && a.node == s.focusNode && a.offset == s.focusOffset || !gM(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 || !gM(e.contentDOM, s.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(s.anchorNode, s.anchorOffset), c = e.viewport;
  93514. if ((Ne.ios || Ne.chrome) && e.state.selection.main.empty && l != u && (c.from > 0 || c.to < e.state.doc.length)) {
  93515. let f = Math.min(l, u), d = Math.max(l, u), h = c.from - f, p = c.to - d;
  93516. (h == 0 || h == 1 || f == 0) && (p == 0 || p == -1 || d == e.state.doc.length) && (l = 0, u = e.state.doc.length);
  93517. }
  93518. this.newSel = me.single(u, l);
  93519. }
  93520. }
  93521. }
  93522. function voe(t, e) {
  93523. let n, { newSel: r } = e, i = t.state.selection.main, a = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1;
  93524. if (e.bounds) {
  93525. let { from: o, to: s } = e.bounds, l = i.from, u = null;
  93526. (a === 8 || Ne.android && e.text.length < s - o) && (l = i.to, u = "end");
  93527. let c = Jot(t.state.doc.sliceString(o, s, sg), e.text, l - o, u);
  93528. c && (Ne.chrome && a == 13 && c.toB == c.from + 2 && e.text.slice(c.from, c.toB) == sg + sg && c.toB--, n = {
  93529. from: o + c.from,
  93530. to: o + c.toA,
  93531. insert: Ft.of(e.text.slice(c.from, c.toB).split(sg))
  93532. });
  93533. } else r && (!t.hasFocus && t.state.facet(El) || r.main.eq(i)) && (r = null);
  93534. if (!n && !r)
  93535. return !1;
  93536. 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 = {
  93537. from: i.from,
  93538. to: i.to,
  93539. insert: t.state.doc.slice(i.from, n.from).append(n.insert).append(t.state.doc.slice(n.to, i.to))
  93540. } : (Ne.mac || Ne.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 = me.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: Ft.of([" "]) }) : Ne.chrome && n && n.from == n.to && n.from == i.head && n.insert.toString() == `
  93541. ` && t.lineWrapping && (r && (r = me.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: Ft.of([" "]) }), n)
  93542. return goe(t, n, r, a);
  93543. if (r && !r.main.eq(i)) {
  93544. let o = !1, s = "select";
  93545. 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;
  93546. } else
  93547. return !1;
  93548. }
  93549. function goe(t, e, n, r = -1) {
  93550. if (Ne.ios && t.inputState.flushIOSKey(e))
  93551. return !0;
  93552. let i = t.state.selection.main;
  93553. if (Ne.android && (e.to == i.to && // GBoard will sometimes remove a space it just inserted
  93554. // after a completion when you press enter
  93555. (e.from == i.from || e.from == i.from - 1 && t.state.sliceDoc(e.from, i.from) == " ") && e.insert.length == 1 && e.insert.lines == 2 && fh(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) && fh(t.contentDOM, "Backspace", 8) || e.from == i.from && e.to == i.to + 1 && e.insert.length == 0 && fh(t.contentDOM, "Delete", 46)))
  93556. return !0;
  93557. let a = e.insert.toString();
  93558. t.inputState.composing >= 0 && t.inputState.composing++;
  93559. let o, s = () => o || (o = Kot(t, e, n));
  93560. return t.state.facet(Qae).some((l) => l(t, e.from, e.to, a, s)) || t.dispatch(s()), !0;
  93561. }
  93562. function Kot(t, e, n) {
  93563. let r, i = t.state, a = i.selection.main;
  93564. 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) {
  93565. let s = a.from < e.from ? i.sliceDoc(a.from, e.from) : "", l = a.to > e.to ? i.sliceDoc(e.to, a.to) : "";
  93566. r = i.replaceSelection(t.state.toText(s + e.insert.sliceString(0, void 0, t.state.lineBreak) + l));
  93567. } else {
  93568. let s = i.changes(e), l = n && n.main.to <= s.newLength ? n.main : void 0;
  93569. if (i.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= a.to && e.to >= a.to - 10) {
  93570. let u = t.state.sliceDoc(e.from, e.to), c, f = n && eoe(t, n.main.head);
  93571. if (f) {
  93572. let p = e.insert.length - (e.to - e.from);
  93573. c = { from: f.from, to: f.to - p };
  93574. } else
  93575. c = t.state.doc.lineAt(a.head);
  93576. let d = a.to - e.to, h = a.to - a.from;
  93577. r = i.changeByRange((p) => {
  93578. if (p.from == a.from && p.to == a.to)
  93579. return { changes: s, range: l || p.map(s) };
  93580. let v = p.to - d, g = v - u.length;
  93581. if (p.to - p.from != h || t.state.sliceDoc(g, v) != u || // Unfortunately, there's no way to make multiple
  93582. // changes in the same node work without aborting
  93583. // composition, so cursors in the composition range are
  93584. // ignored.
  93585. p.to >= c.from && p.from <= c.to)
  93586. return { range: p };
  93587. let m = i.changes({ from: g, to: v, insert: e.insert }), y = p.to - a.to;
  93588. return {
  93589. changes: m,
  93590. range: l ? me.range(Math.max(0, l.anchor + y), Math.max(0, l.head + y)) : p.map(m)
  93591. };
  93592. });
  93593. } else
  93594. r = {
  93595. changes: s,
  93596. selection: l && i.selection.replaceRange(l)
  93597. };
  93598. }
  93599. let o = "input.type";
  93600. 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 });
  93601. }
  93602. function Jot(t, e, n, r) {
  93603. let i = Math.min(t.length, e.length), a = 0;
  93604. for (; a < i && t.charCodeAt(a) == e.charCodeAt(a); )
  93605. a++;
  93606. if (a == i && t.length == e.length)
  93607. return null;
  93608. let o = t.length, s = e.length;
  93609. for (; o > 0 && s > 0 && t.charCodeAt(o - 1) == e.charCodeAt(s - 1); )
  93610. o--, s--;
  93611. if (r == "end") {
  93612. let l = Math.max(0, a - Math.min(o, s));
  93613. n -= o + l - a;
  93614. }
  93615. if (o < a && t.length < e.length) {
  93616. let l = n <= a && n >= o ? a - n : 0;
  93617. a -= l, s = a + (s - o), o = a;
  93618. } else if (s < a) {
  93619. let l = n <= a && n >= s ? a - n : 0;
  93620. a -= l, o = a + (o - s), s = a;
  93621. }
  93622. return { from: a, toA: o, toB: s };
  93623. }
  93624. function est(t) {
  93625. let e = [];
  93626. if (t.root.activeElement != t.contentDOM)
  93627. return e;
  93628. let { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a } = t.observer.selectionRange;
  93629. return n && (e.push(new oG(n, r)), (i != n || a != r) && e.push(new oG(i, a))), e;
  93630. }
  93631. function tst(t, e) {
  93632. if (t.length == 0)
  93633. return null;
  93634. let n = t[0].pos, r = t.length == 2 ? t[1].pos : n;
  93635. return n > -1 && r > -1 ? me.single(n + e, r + e) : null;
  93636. }
  93637. const nst = {
  93638. childList: !0,
  93639. characterData: !0,
  93640. subtree: !0,
  93641. attributes: !0,
  93642. characterDataOldValue: !0
  93643. }, O$ = Ne.ie && Ne.ie_version <= 11;
  93644. class rst {
  93645. constructor(e) {
  93646. this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new Fat(), 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) => {
  93647. for (let r of n)
  93648. this.queue.push(r);
  93649. (Ne.ie && Ne.ie_version <= 11 || Ne.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();
  93650. }), window.EditContext && e.constructor.EDIT_CONTEXT !== !1 && // Chrome <126 doesn't support inverted selections in edit context (#1392)
  93651. !(Ne.chrome && Ne.chrome_version < 126) && (this.editContext = new ast(e), e.state.facet(El) && (e.contentDOM.editContext = this.editContext.editContext)), O$ && (this.onCharData = (n) => {
  93652. this.queue.push({
  93653. target: n.target,
  93654. type: "characterData",
  93655. oldValue: n.prevValue
  93656. }), this.flushSoon();
  93657. }), 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(() => {
  93658. var n;
  93659. ((n = this.view.docView) === null || n === void 0 ? void 0 : n.lastUpdate) < Date.now() - 75 && this.onResize();
  93660. }), this.resizeScroll.observe(e.scrollDOM)), this.addWindowListeners(this.win = e.win), this.start(), typeof IntersectionObserver == "function" && (this.intersection = new IntersectionObserver((n) => {
  93661. 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")));
  93662. }, { threshold: [0, 1e-3] }), this.intersection.observe(this.dom), this.gapIntersection = new IntersectionObserver((n) => {
  93663. n.length > 0 && n[n.length - 1].intersectionRatio > 0 && this.onScrollChanged(document.createEvent("Event"));
  93664. }, {})), this.listenForScroll(), this.readSelectionRange();
  93665. }
  93666. onScrollChanged(e) {
  93667. this.view.inputState.runHandlers("scroll", e), this.intersecting && this.view.measure();
  93668. }
  93669. onScroll(e) {
  93670. this.intersecting && this.flush(!1), this.editContext && this.view.requestMeasure(this.editContext.measureReq), this.onScrollChanged(e);
  93671. }
  93672. onResize() {
  93673. this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout(() => {
  93674. this.resizeTimeout = -1, this.view.requestMeasure();
  93675. }, 50));
  93676. }
  93677. onPrint(e) {
  93678. e.type == "change" && !e.matches || (this.view.viewState.printing = !0, this.view.measure(), setTimeout(() => {
  93679. this.view.viewState.printing = !1, this.view.requestMeasure();
  93680. }, 500));
  93681. }
  93682. updateGaps(e) {
  93683. if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((n, r) => n != e[r]))) {
  93684. this.gapIntersection.disconnect();
  93685. for (let n of e)
  93686. this.gapIntersection.observe(n);
  93687. this.gaps = e;
  93688. }
  93689. }
  93690. onSelectionChange(e) {
  93691. let n = this.selectionChanged;
  93692. if (!this.readSelectionRange() || this.delayedAndroidKey)
  93693. return;
  93694. let { view: r } = this, i = this.selectionRange;
  93695. if (r.state.facet(El) ? r.root.activeElement != this.dom : !a1(r.dom, i))
  93696. return;
  93697. let a = i.anchorNode && r.docView.nearest(i.anchorNode);
  93698. if (a && a.ignoreEvent(e)) {
  93699. n || (this.selectionChanged = !1);
  93700. return;
  93701. }
  93702. (Ne.ie && Ne.ie_version <= 11 || Ne.android && Ne.chrome) && !r.state.selection.main.empty && // (Selection.isCollapsed isn't reliable on IE)
  93703. i.focusNode && Zg(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1);
  93704. }
  93705. readSelectionRange() {
  93706. let { view: e } = this, n = qm(e.root);
  93707. if (!n)
  93708. return !1;
  93709. let r = Ne.safari && e.root.nodeType == 11 && Nat(this.dom.ownerDocument) == this.dom && ist(this.view, n) || n;
  93710. if (!r || this.selectionRange.eq(r))
  93711. return !1;
  93712. let i = a1(this.dom, r);
  93713. return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && Qat(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), i && (this.selectionChanged = !0), !0);
  93714. }
  93715. setSelectionRange(e, n) {
  93716. this.selectionRange.set(e.node, e.offset, n.node, n.offset), this.selectionChanged = !1;
  93717. }
  93718. clearSelectionRange() {
  93719. this.selectionRange.set(null, 0, null, 0);
  93720. }
  93721. listenForScroll() {
  93722. this.parentCheck = -1;
  93723. let e = 0, n = null;
  93724. for (let r = this.dom; r; )
  93725. if (r.nodeType == 1)
  93726. !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;
  93727. else if (r.nodeType == 11)
  93728. r = r.host;
  93729. else
  93730. break;
  93731. if (e < this.scrollTargets.length && !n && (n = this.scrollTargets.slice(0, e)), n) {
  93732. for (let r of this.scrollTargets)
  93733. r.removeEventListener("scroll", this.onScroll);
  93734. for (let r of this.scrollTargets = n)
  93735. r.addEventListener("scroll", this.onScroll);
  93736. }
  93737. }
  93738. ignore(e) {
  93739. if (!this.active)
  93740. return e();
  93741. try {
  93742. return this.stop(), e();
  93743. } finally {
  93744. this.start(), this.clear();
  93745. }
  93746. }
  93747. start() {
  93748. this.active || (this.observer.observe(this.dom, nst), O$ && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0);
  93749. }
  93750. stop() {
  93751. this.active && (this.active = !1, this.observer.disconnect(), O$ && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData));
  93752. }
  93753. // Throw away any pending changes
  93754. clear() {
  93755. this.processRecords(), this.queue.length = 0, this.selectionChanged = !1;
  93756. }
  93757. // Chrome Android, especially in combination with GBoard, not only
  93758. // doesn't reliably fire regular key events, but also often
  93759. // surrounds the effect of enter or backspace with a bunch of
  93760. // composition events that, when interrupted, cause text duplication
  93761. // or other kinds of corruption. This hack makes the editor back off
  93762. // from handling DOM changes for a moment when such a key is
  93763. // detected (via beforeinput or keydown), and then tries to flush
  93764. // them or, if that has no effect, dispatches the given key.
  93765. delayAndroidKey(e, n) {
  93766. var r;
  93767. if (!this.delayedAndroidKey) {
  93768. let i = () => {
  93769. let a = this.delayedAndroidKey;
  93770. a && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = a.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && a.force && fh(this.dom, a.key, a.keyCode));
  93771. };
  93772. this.flushingAndroidKey = this.view.win.requestAnimationFrame(i);
  93773. }
  93774. (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = {
  93775. key: e,
  93776. keyCode: n,
  93777. // Only run the key handler when no changes are detected if
  93778. // this isn't coming right after another change, in which case
  93779. // it is probably part of a weird chain of updates, and should
  93780. // be ignored if it returns the DOM to its previous state.
  93781. force: this.lastChange < Date.now() - 50 || !!(!((r = this.delayedAndroidKey) === null || r === void 0) && r.force)
  93782. });
  93783. }
  93784. clearDelayedAndroidKey() {
  93785. this.win.cancelAnimationFrame(this.flushingAndroidKey), this.delayedAndroidKey = null, this.flushingAndroidKey = -1;
  93786. }
  93787. flushSoon() {
  93788. this.delayedFlush < 0 && (this.delayedFlush = this.view.win.requestAnimationFrame(() => {
  93789. this.delayedFlush = -1, this.flush();
  93790. }));
  93791. }
  93792. forceFlush() {
  93793. this.delayedFlush >= 0 && (this.view.win.cancelAnimationFrame(this.delayedFlush), this.delayedFlush = -1), this.flush();
  93794. }
  93795. pendingRecords() {
  93796. for (let e of this.observer.takeRecords())
  93797. this.queue.push(e);
  93798. return this.queue;
  93799. }
  93800. processRecords() {
  93801. let e = this.pendingRecords();
  93802. e.length && (this.queue = []);
  93803. let n = -1, r = -1, i = !1;
  93804. for (let a of e) {
  93805. let o = this.readMutation(a);
  93806. o && (o.typeOver && (i = !0), n == -1 ? { from: n, to: r } = o : (n = Math.min(o.from, n), r = Math.max(o.to, r)));
  93807. }
  93808. return { from: n, to: r, typeOver: i };
  93809. }
  93810. readChange() {
  93811. let { from: e, to: n, typeOver: r } = this.processRecords(), i = this.selectionChanged && a1(this.dom, this.selectionRange);
  93812. if (e < 0 && !i)
  93813. return null;
  93814. e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1;
  93815. let a = new qot(this.view, e, n, r);
  93816. return this.view.docView.domChanged = { newSel: a.newSel ? a.newSel.main : null }, a;
  93817. }
  93818. // Apply pending changes, if any
  93819. flush(e = !0) {
  93820. if (this.delayedFlush >= 0 || this.delayedAndroidKey)
  93821. return !1;
  93822. e && this.readSelectionRange();
  93823. let n = this.readChange();
  93824. if (!n)
  93825. return this.view.requestMeasure(), !1;
  93826. let r = this.view.state, i = voe(this.view, n);
  93827. return this.view.state == r && (n.domChanged || n.newSel && !n.newSel.main.eq(this.view.state.selection.main)) && this.view.update([]), i;
  93828. }
  93829. readMutation(e) {
  93830. let n = this.view.docView.nearest(e.target);
  93831. if (!n || n.ignoreMutation(e))
  93832. return null;
  93833. if (n.markDirty(e.type == "attributes"), e.type == "attributes" && (n.flags |= 4), e.type == "childList") {
  93834. let r = sG(n, e.previousSibling || e.target.previousSibling, -1), i = sG(n, e.nextSibling || e.target.nextSibling, 1);
  93835. return {
  93836. from: r ? n.posAfter(r) : n.posAtStart,
  93837. to: i ? n.posBefore(i) : n.posAtEnd,
  93838. typeOver: !1
  93839. };
  93840. } else return e.type == "characterData" ? { from: n.posAtStart, to: n.posAtEnd, typeOver: e.target.nodeValue == e.oldValue } : null;
  93841. }
  93842. setWindow(e) {
  93843. e != this.win && (this.removeWindowListeners(this.win), this.win = e, this.addWindowListeners(this.win));
  93844. }
  93845. addWindowListeners(e) {
  93846. 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);
  93847. }
  93848. removeWindowListeners(e) {
  93849. 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);
  93850. }
  93851. update(e) {
  93852. this.editContext && (this.editContext.update(e), e.startState.facet(El) != e.state.facet(El) && (e.view.contentDOM.editContext = e.state.facet(El) ? this.editContext.editContext : null));
  93853. }
  93854. destroy() {
  93855. var e, n, r;
  93856. 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();
  93857. for (let i of this.scrollTargets)
  93858. i.removeEventListener("scroll", this.onScroll);
  93859. this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey);
  93860. }
  93861. }
  93862. function sG(t, e, n) {
  93863. for (; e; ) {
  93864. let r = Jt.get(e);
  93865. if (r && r.parent == t)
  93866. return r;
  93867. let i = e.parentNode;
  93868. e = i != t.dom ? i : n > 0 ? e.nextSibling : e.previousSibling;
  93869. }
  93870. return null;
  93871. }
  93872. function lG(t, e) {
  93873. let n = e.startContainer, r = e.startOffset, i = e.endContainer, a = e.endOffset, o = t.docView.domAtPos(t.state.selection.main.anchor);
  93874. return Zg(o.node, o.offset, i, a) && ([n, r, i, a] = [i, a, n, r]), { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a };
  93875. }
  93876. function ist(t, e) {
  93877. if (e.getComposedRanges) {
  93878. let i = e.getComposedRanges(t.root)[0];
  93879. if (i)
  93880. return lG(t, i);
  93881. }
  93882. let n = null;
  93883. function r(i) {
  93884. i.preventDefault(), i.stopImmediatePropagation(), n = i.getTargetRanges()[0];
  93885. }
  93886. return t.contentDOM.addEventListener("beforeinput", r, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", r, !0), n ? lG(t, n) : null;
  93887. }
  93888. class ast {
  93889. constructor(e) {
  93890. this.from = 0, this.to = 0, this.pendingContextChange = null, this.resetRange(e.state);
  93891. let n = this.editContext = new window.EditContext({
  93892. text: e.state.doc.sliceString(this.from, this.to),
  93893. selectionStart: this.toContextPos(Math.max(this.from, Math.min(this.to, e.state.selection.main.anchor))),
  93894. selectionEnd: this.toContextPos(e.state.selection.main.head)
  93895. });
  93896. n.addEventListener("textupdate", (r) => {
  93897. let { anchor: i } = e.state.selection.main, a = {
  93898. from: this.toEditorPos(r.updateRangeStart),
  93899. to: this.toEditorPos(r.updateRangeEnd),
  93900. insert: Ft.of(r.text.split(`
  93901. `))
  93902. };
  93903. 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, goe(e, a, me.single(this.toEditorPos(r.selectionStart), this.toEditorPos(r.selectionEnd))), this.pendingContextChange && this.revertPending(e.state));
  93904. }), n.addEventListener("characterboundsupdate", (r) => {
  93905. let i = [], a = null;
  93906. for (let o = this.toEditorPos(r.rangeStart), s = this.toEditorPos(r.rangeEnd); o < s; o++) {
  93907. let l = e.coordsForChar(o);
  93908. a = l && new DOMRect(l.left, l.top, l.right - l.left, l.bottom - l.top) || a || new DOMRect(), i.push(a);
  93909. }
  93910. n.updateCharacterBounds(r.rangeStart, i);
  93911. }), n.addEventListener("textformatupdate", (r) => {
  93912. let i = [];
  93913. for (let a of r.getTextFormats()) {
  93914. let o = a.underlineStyle, s = a.underlineThickness;
  93915. if (o != "None" && s != "None") {
  93916. let l = `text-decoration: underline ${o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : ""}${s == "Thin" ? 1 : 2}px`;
  93917. i.push(Ze.mark({ attributes: { style: l } }).range(this.toEditorPos(a.rangeStart), this.toEditorPos(a.rangeEnd)));
  93918. }
  93919. }
  93920. e.dispatch({ effects: Uae.of(Ze.set(i)) });
  93921. }), n.addEventListener("compositionstart", () => {
  93922. e.inputState.composing < 0 && (e.inputState.composing = 0, e.inputState.compositionFirstChange = !0);
  93923. }), n.addEventListener("compositionend", () => {
  93924. e.inputState.composing = -1, e.inputState.compositionFirstChange = null;
  93925. }), this.measureReq = { read: (r) => {
  93926. this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());
  93927. let i = qm(r.root);
  93928. i && i.rangeCount && this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect());
  93929. } };
  93930. }
  93931. applyEdits(e) {
  93932. let n = 0, r = !1, i = this.pendingContextChange;
  93933. return e.changes.iterChanges((a, o, s, l, u) => {
  93934. if (r)
  93935. return;
  93936. let c = u.length - (o - a);
  93937. if (i && o >= i.to)
  93938. if (i.from == a && i.to == o && i.insert.eq(u)) {
  93939. i = this.pendingContextChange = null, n += c, this.to += c;
  93940. return;
  93941. } else
  93942. i = null, this.revertPending(e.state);
  93943. if (a += n, o += n, o <= this.from)
  93944. this.from += c, this.to += c;
  93945. else if (a < this.to) {
  93946. if (a < this.from || o > this.to || this.to - this.from + u.length > 3e4) {
  93947. r = !0;
  93948. return;
  93949. }
  93950. this.editContext.updateText(this.toContextPos(a), this.toContextPos(o), u.toString()), this.to += c;
  93951. }
  93952. n += c;
  93953. }), i && !r && this.revertPending(e.state), !r;
  93954. }
  93955. update(e) {
  93956. !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);
  93957. }
  93958. resetRange(e) {
  93959. let { head: n } = e.selection.main;
  93960. this.from = Math.max(
  93961. 0,
  93962. n - 1e4
  93963. /* CxVp.Margin */
  93964. ), this.to = Math.min(
  93965. e.doc.length,
  93966. n + 1e4
  93967. /* CxVp.Margin */
  93968. );
  93969. }
  93970. revertPending(e) {
  93971. let n = this.pendingContextChange;
  93972. this.pendingContextChange = null, this.editContext.updateText(this.toContextPos(n.from), this.toContextPos(n.to + n.insert.length), e.doc.sliceString(n.from, n.to));
  93973. }
  93974. setSelection(e) {
  93975. let { main: n } = e.selection, r = this.toContextPos(Math.max(this.from, Math.min(this.to, n.anchor))), i = this.toContextPos(n.head);
  93976. (this.editContext.selectionStart != r || this.editContext.selectionEnd != i) && this.editContext.updateSelection(r, i);
  93977. }
  93978. rangeIsValid(e) {
  93979. let { head: n } = e.selection.main;
  93980. return !(this.from > 0 && n - this.from < 500 || this.to < e.doc.length && this.to - n < 500 || this.to - this.from > 1e4 * 3);
  93981. }
  93982. toEditorPos(e) {
  93983. return e + this.from;
  93984. }
  93985. toContextPos(e) {
  93986. return e - this.from;
  93987. }
  93988. }
  93989. class De {
  93990. /**
  93991. The current editor state.
  93992. */
  93993. get state() {
  93994. return this.viewState.state;
  93995. }
  93996. /**
  93997. To be able to display large documents without consuming too much
  93998. memory or overloading the browser, CodeMirror only draws the
  93999. code that is visible (plus a margin around it) to the DOM. This
  94000. property tells you the extent of the current drawn viewport, in
  94001. document positions.
  94002. */
  94003. get viewport() {
  94004. return this.viewState.viewport;
  94005. }
  94006. /**
  94007. When there are, for example, large collapsed ranges in the
  94008. viewport, its size can be a lot bigger than the actual visible
  94009. content. Thus, if you are doing something like styling the
  94010. content in the viewport, it is preferable to only do so for
  94011. these ranges, which are the subset of the viewport that is
  94012. actually drawn.
  94013. */
  94014. get visibleRanges() {
  94015. return this.viewState.visibleRanges;
  94016. }
  94017. /**
  94018. Returns false when the editor is entirely scrolled out of view
  94019. or otherwise hidden.
  94020. */
  94021. get inView() {
  94022. return this.viewState.inView;
  94023. }
  94024. /**
  94025. Indicates whether the user is currently composing text via
  94026. [IME](https://en.wikipedia.org/wiki/Input_method), and at least
  94027. one change has been made in the current composition.
  94028. */
  94029. get composing() {
  94030. return this.inputState.composing > 0;
  94031. }
  94032. /**
  94033. Indicates whether the user is currently in composing state. Note
  94034. that on some platforms, like Android, this will be the case a
  94035. lot, since just putting the cursor on a word starts a
  94036. composition there.
  94037. */
  94038. get compositionStarted() {
  94039. return this.inputState.composing >= 0;
  94040. }
  94041. /**
  94042. The document or shadow root that the view lives in.
  94043. */
  94044. get root() {
  94045. return this._root;
  94046. }
  94047. /**
  94048. @internal
  94049. */
  94050. get win() {
  94051. return this.dom.ownerDocument.defaultView || window;
  94052. }
  94053. /**
  94054. Construct a new view. You'll want to either provide a `parent`
  94055. option, or put `view.dom` into your document after creating a
  94056. view, so that the user can see the editor.
  94057. */
  94058. constructor(e = {}) {
  94059. 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);
  94060. let { dispatch: n } = e;
  94061. 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 || Wat(e.parent) || document, this.viewState = new iG(e.state || At.create(e)), e.scrollTo && e.scrollTo.is(Zb) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(ig).map((r) => new m$(r));
  94062. for (let r of this.plugins)
  94063. r.update(this);
  94064. this.observer = new rst(this), this.inputState = new _ot(this), this.inputState.ensureHandlers(this.plugins), this.docView = new VH(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure();
  94065. }
  94066. dispatch(...e) {
  94067. let n = e.length == 1 && e[0] instanceof Fn ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)];
  94068. this.dispatchTransactions(n, this);
  94069. }
  94070. /**
  94071. Update the view for the given array of transactions. This will
  94072. update the visible document and selection to match the state
  94073. produced by the transactions, and notify view plugins of the
  94074. change. You should usually call
  94075. [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead, which uses this
  94076. as a primitive.
  94077. */
  94078. update(e) {
  94079. if (this.updateState != 0)
  94080. throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
  94081. let n = !1, r = !1, i, a = this.state;
  94082. for (let d of e) {
  94083. if (d.startState != a)
  94084. throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");
  94085. a = d.state;
  94086. }
  94087. if (this.destroyed) {
  94088. this.viewState.state = a;
  94089. return;
  94090. }
  94091. let o = this.hasFocus, s = 0, l = null;
  94092. e.some((d) => d.annotation(loe)) ? (this.inputState.notifiedFocused = o, s = 1) : o != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = o, l = uoe(a, o), l || (s = 1));
  94093. let u = this.observer.delayedAndroidKey, c = null;
  94094. 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(At.phrases) != this.state.facet(At.phrases))
  94095. return this.setState(a);
  94096. i = oS.create(this, a, e), i.flags |= s;
  94097. let f = this.viewState.scrollTarget;
  94098. try {
  94099. this.updateState = 2;
  94100. for (let d of e) {
  94101. if (f && (f = f.map(d.changes)), d.scrollIntoView) {
  94102. let { main: h } = d.state.selection;
  94103. f = new dh(h.empty ? h : me.cursor(h.head, h.head > h.anchor ? -1 : 1));
  94104. }
  94105. for (let h of d.effects)
  94106. h.is(Zb) && (f = h.value.clip(this.state));
  94107. }
  94108. this.viewState.update(i, f), this.bidiCache = sS.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), n = this.docView.update(i), this.state.facet(ag) != this.styleModules && this.mountStyles(), r = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(n, e.some((d) => d.isUserEvent("select.pointer")));
  94109. } finally {
  94110. this.updateState = 0;
  94111. }
  94112. if (i.startState.facet(Jb) != i.state.facet(Jb) && (this.viewState.mustMeasureContent = !0), (n || r || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), n && this.docViewUpdate(), !i.empty)
  94113. for (let d of this.state.facet(TM))
  94114. try {
  94115. d(i);
  94116. } catch (h) {
  94117. bi(this.state, h, "update listener");
  94118. }
  94119. (l || c) && Promise.resolve().then(() => {
  94120. l && this.state == l.startState && this.dispatch(l), c && !voe(this, c) && u.force && fh(this.contentDOM, u.key, u.keyCode);
  94121. });
  94122. }
  94123. /**
  94124. Reset the view to the given state. (This will cause the entire
  94125. document to be redrawn and all view plugins to be reinitialized,
  94126. so you should probably only use it when the new state isn't
  94127. derived from the old state. Otherwise, use
  94128. [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
  94129. */
  94130. setState(e) {
  94131. if (this.updateState != 0)
  94132. throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
  94133. if (this.destroyed) {
  94134. this.viewState.state = e;
  94135. return;
  94136. }
  94137. this.updateState = 2;
  94138. let n = this.hasFocus;
  94139. try {
  94140. for (let r of this.plugins)
  94141. r.destroy(this);
  94142. this.viewState = new iG(e), this.plugins = e.facet(ig).map((r) => new m$(r)), this.pluginMap.clear();
  94143. for (let r of this.plugins)
  94144. r.update(this);
  94145. this.docView.destroy(), this.docView = new VH(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
  94146. } finally {
  94147. this.updateState = 0;
  94148. }
  94149. n && this.focus(), this.requestMeasure();
  94150. }
  94151. updatePlugins(e) {
  94152. let n = e.startState.facet(ig), r = e.state.facet(ig);
  94153. if (n != r) {
  94154. let i = [];
  94155. for (let a of r) {
  94156. let o = n.indexOf(a);
  94157. if (o < 0)
  94158. i.push(new m$(a));
  94159. else {
  94160. let s = this.plugins[o];
  94161. s.mustUpdate = e, i.push(s);
  94162. }
  94163. }
  94164. for (let a of this.plugins)
  94165. a.mustUpdate != e && a.destroy(this);
  94166. this.plugins = i, this.pluginMap.clear();
  94167. } else
  94168. for (let i of this.plugins)
  94169. i.mustUpdate = e;
  94170. for (let i = 0; i < this.plugins.length; i++)
  94171. this.plugins[i].update(this);
  94172. n != r && this.inputState.ensureHandlers(this.plugins);
  94173. }
  94174. docViewUpdate() {
  94175. for (let e of this.plugins) {
  94176. let n = e.value;
  94177. if (n && n.docViewUpdate)
  94178. try {
  94179. n.docViewUpdate(this);
  94180. } catch (r) {
  94181. bi(this.state, r, "doc view update listener");
  94182. }
  94183. }
  94184. }
  94185. /**
  94186. @internal
  94187. */
  94188. measure(e = !0) {
  94189. if (this.destroyed)
  94190. return;
  94191. if (this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.observer.delayedAndroidKey) {
  94192. this.measureScheduled = -1, this.requestMeasure();
  94193. return;
  94194. }
  94195. this.measureScheduled = 0, e && this.observer.forceFlush();
  94196. let n = null, r = this.scrollDOM, i = r.scrollTop * this.scaleY, { scrollAnchorPos: a, scrollAnchorHeight: o } = this.viewState;
  94197. Math.abs(i - this.viewState.scrollTop) > 1 && (o = -1), this.viewState.scrollAnchorHeight = -1;
  94198. try {
  94199. for (let s = 0; ; s++) {
  94200. if (o < 0)
  94201. if (Sae(r))
  94202. a = -1, o = this.viewState.heightMap.height;
  94203. else {
  94204. let h = this.viewState.scrollAnchorAt(i);
  94205. a = h.from, o = h.top;
  94206. }
  94207. this.updateState = 1;
  94208. let l = this.viewState.measure(this);
  94209. if (!l && !this.measureRequests.length && this.viewState.scrollTarget == null)
  94210. break;
  94211. if (s > 5) {
  94212. console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
  94213. break;
  94214. }
  94215. let u = [];
  94216. l & 4 || ([this.measureRequests, u] = [u, this.measureRequests]);
  94217. let c = u.map((h) => {
  94218. try {
  94219. return h.read(this);
  94220. } catch (p) {
  94221. return bi(this.state, p), uG;
  94222. }
  94223. }), f = oS.create(this, this.state, []), d = !1;
  94224. 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());
  94225. for (let h = 0; h < u.length; h++)
  94226. if (c[h] != uG)
  94227. try {
  94228. let p = u[h];
  94229. p.write && p.write(c[h], this);
  94230. } catch (p) {
  94231. bi(this.state, p);
  94232. }
  94233. if (d && this.docView.updateSelection(!0), !f.viewportChanged && this.measureRequests.length == 0) {
  94234. if (this.viewState.editorHeight)
  94235. if (this.viewState.scrollTarget) {
  94236. this.docView.scrollIntoView(this.viewState.scrollTarget), this.viewState.scrollTarget = null, o = -1;
  94237. continue;
  94238. } else {
  94239. let p = (a < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(a).top) - o;
  94240. if (p > 1 || p < -1) {
  94241. i = i + p, r.scrollTop = i / this.scaleY, o = -1;
  94242. continue;
  94243. }
  94244. }
  94245. break;
  94246. }
  94247. }
  94248. } finally {
  94249. this.updateState = 0, this.measureScheduled = -1;
  94250. }
  94251. if (n && !n.empty)
  94252. for (let s of this.state.facet(TM))
  94253. s(n);
  94254. }
  94255. /**
  94256. Get the CSS classes for the currently active editor themes.
  94257. */
  94258. get themeClasses() {
  94259. return MM + " " + (this.state.facet(EM) ? hoe : doe) + " " + this.state.facet(Jb);
  94260. }
  94261. updateAttrs() {
  94262. let e = cG(this, Xae, {
  94263. class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses
  94264. }), n = {
  94265. spellcheck: "false",
  94266. autocorrect: "off",
  94267. autocapitalize: "off",
  94268. translate: "no",
  94269. contenteditable: this.state.facet(El) ? "true" : "false",
  94270. class: "cm-content",
  94271. style: `${Ne.tabSize}: ${this.state.tabSize}`,
  94272. role: "textbox",
  94273. "aria-multiline": "true"
  94274. };
  94275. this.state.readOnly && (n["aria-readonly"] = "true"), cG(this, a4, n);
  94276. let r = this.observer.ignore(() => {
  94277. let i = OM(this.contentDOM, this.contentAttrs, n), a = OM(this.dom, this.editorAttrs, e);
  94278. return i || a;
  94279. });
  94280. return this.editorAttrs = e, this.contentAttrs = n, r;
  94281. }
  94282. showAnnouncements(e) {
  94283. let n = !0;
  94284. for (let r of e)
  94285. for (let i of r.effects)
  94286. if (i.is(De.announce)) {
  94287. n && (this.announceDOM.textContent = ""), n = !1;
  94288. let a = this.announceDOM.appendChild(document.createElement("div"));
  94289. a.textContent = i.value;
  94290. }
  94291. }
  94292. mountStyles() {
  94293. this.styleModules = this.state.facet(ag);
  94294. let e = this.state.facet(De.cspNonce);
  94295. pu.mount(this.root, this.styleModules.concat(Uot).reverse(), e ? { nonce: e } : void 0);
  94296. }
  94297. readMeasured() {
  94298. if (this.updateState == 2)
  94299. throw new Error("Reading the editor layout isn't allowed during an update");
  94300. this.updateState == 0 && this.measureScheduled > -1 && this.measure(!1);
  94301. }
  94302. /**
  94303. Schedule a layout measurement, optionally providing callbacks to
  94304. do custom DOM measuring followed by a DOM write phase. Using
  94305. this is preferable reading DOM layout directly from, for
  94306. example, an event handler, because it'll make sure measuring and
  94307. drawing done by other components is synchronized, avoiding
  94308. unnecessary DOM layout computations.
  94309. */
  94310. requestMeasure(e) {
  94311. if (this.measureScheduled < 0 && (this.measureScheduled = this.win.requestAnimationFrame(() => this.measure())), e) {
  94312. if (this.measureRequests.indexOf(e) > -1)
  94313. return;
  94314. if (e.key != null) {
  94315. for (let n = 0; n < this.measureRequests.length; n++)
  94316. if (this.measureRequests[n].key === e.key) {
  94317. this.measureRequests[n] = e;
  94318. return;
  94319. }
  94320. }
  94321. this.measureRequests.push(e);
  94322. }
  94323. }
  94324. /**
  94325. Get the value of a specific plugin, if present. Note that
  94326. plugins that crash can be dropped from a view, so even when you
  94327. know you registered a given plugin, it is recommended to check
  94328. the return value of this method.
  94329. */
  94330. plugin(e) {
  94331. let n = this.pluginMap.get(e);
  94332. 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;
  94333. }
  94334. /**
  94335. The top position of the document, in screen coordinates. This
  94336. may be negative when the editor is scrolled down. Points
  94337. directly to the top of the first line, not above the padding.
  94338. */
  94339. get documentTop() {
  94340. return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop;
  94341. }
  94342. /**
  94343. Reports the padding above and below the document.
  94344. */
  94345. get documentPadding() {
  94346. return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom };
  94347. }
  94348. /**
  94349. If the editor is transformed with CSS, this provides the scale
  94350. along the X axis. Otherwise, it will just be 1. Note that
  94351. transforms other than translation and scaling are not supported.
  94352. */
  94353. get scaleX() {
  94354. return this.viewState.scaleX;
  94355. }
  94356. /**
  94357. Provide the CSS transformed scale along the Y axis.
  94358. */
  94359. get scaleY() {
  94360. return this.viewState.scaleY;
  94361. }
  94362. /**
  94363. Find the text line or block widget at the given vertical
  94364. position (which is interpreted as relative to the [top of the
  94365. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop)).
  94366. */
  94367. elementAtHeight(e) {
  94368. return this.readMeasured(), this.viewState.elementAtHeight(e);
  94369. }
  94370. /**
  94371. Find the line block (see
  94372. [`lineBlockAt`](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) at the given
  94373. height, again interpreted relative to the [top of the
  94374. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop).
  94375. */
  94376. lineBlockAtHeight(e) {
  94377. return this.readMeasured(), this.viewState.lineBlockAtHeight(e);
  94378. }
  94379. /**
  94380. Get the extent and vertical position of all [line
  94381. blocks](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) in the viewport. Positions
  94382. are relative to the [top of the
  94383. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop);
  94384. */
  94385. get viewportLineBlocks() {
  94386. return this.viewState.viewportLines;
  94387. }
  94388. /**
  94389. Find the line block around the given document position. A line
  94390. block is a range delimited on both sides by either a
  94391. non-[hidden](https://codemirror.net/6/docs/ref/#view.Decoration^replace) line breaks, or the
  94392. start/end of the document. It will usually just hold a line of
  94393. text, but may be broken into multiple textblocks by block
  94394. widgets.
  94395. */
  94396. lineBlockAt(e) {
  94397. return this.viewState.lineBlockAt(e);
  94398. }
  94399. /**
  94400. The editor's total content height.
  94401. */
  94402. get contentHeight() {
  94403. return this.viewState.contentHeight;
  94404. }
  94405. /**
  94406. Move a cursor position by [grapheme
  94407. cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak). `forward` determines whether
  94408. the motion is away from the line start, or towards it. In
  94409. bidirectional text, the line is traversed in visual order, using
  94410. the editor's [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
  94411. When the start position was the last one on the line, the
  94412. returned position will be across the line break. If there is no
  94413. further line, the original position is returned.
  94414. By default, this method moves over a single cluster. The
  94415. optional `by` argument can be used to move across more. It will
  94416. be called with the first cluster as argument, and should return
  94417. a predicate that determines, for each subsequent cluster,
  94418. whether it should also be moved over.
  94419. */
  94420. moveByChar(e, n, r) {
  94421. return b$(this, e, jH(this, e, n, r));
  94422. }
  94423. /**
  94424. Move a cursor position across the next group of either
  94425. [letters](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) or non-letter
  94426. non-whitespace characters.
  94427. */
  94428. moveByGroup(e, n) {
  94429. return b$(this, e, jH(this, e, n, (r) => yot(this, e.head, r)));
  94430. }
  94431. /**
  94432. Get the cursor position visually at the start or end of a line.
  94433. Note that this may differ from the _logical_ position at its
  94434. start or end (which is simply at `line.from`/`line.to`) if text
  94435. at the start or end goes against the line's base text direction.
  94436. */
  94437. visualLineSide(e, n) {
  94438. let r = this.bidiSpans(e), i = this.textDirectionAt(e.from), a = r[n ? r.length - 1 : 0];
  94439. return me.cursor(a.side(n, i) + e.from, a.forward(!n, i) ? 1 : -1);
  94440. }
  94441. /**
  94442. Move to the next line boundary in the given direction. If
  94443. `includeWrap` is true, line wrapping is on, and there is a
  94444. further wrap point on the current line, the wrap point will be
  94445. returned. Otherwise this function will return the start or end
  94446. of the line.
  94447. */
  94448. moveToLineBoundary(e, n, r = !0) {
  94449. return mot(this, e, n, r);
  94450. }
  94451. /**
  94452. Move a cursor position vertically. When `distance` isn't given,
  94453. it defaults to moving to the next line (including wrapped
  94454. lines). Otherwise, `distance` should provide a positive distance
  94455. in pixels.
  94456. When `start` has a
  94457. [`goalColumn`](https://codemirror.net/6/docs/ref/#state.SelectionRange.goalColumn), the vertical
  94458. motion will use that as a target horizontal position. Otherwise,
  94459. the cursor's own horizontal position is used. The returned
  94460. cursor will have its goal column set to whichever column was
  94461. used.
  94462. */
  94463. moveVertically(e, n, r) {
  94464. return b$(this, e, bot(this, e, n, r));
  94465. }
  94466. /**
  94467. Find the DOM parent node and offset (child offset if `node` is
  94468. an element, character offset when it is a text node) at the
  94469. given document position.
  94470. Note that for positions that aren't currently in
  94471. `visibleRanges`, the resulting DOM position isn't necessarily
  94472. meaningful (it may just point before or after a placeholder
  94473. element).
  94474. */
  94475. domAtPos(e) {
  94476. return this.docView.domAtPos(e);
  94477. }
  94478. /**
  94479. Find the document position at the given DOM node. Can be useful
  94480. for associating positions with DOM events. Will raise an error
  94481. when `node` isn't part of the editor content.
  94482. */
  94483. posAtDOM(e, n = 0) {
  94484. return this.docView.posFromDOM(e, n);
  94485. }
  94486. posAtCoords(e, n = !0) {
  94487. return this.readMeasured(), toe(this, e, n);
  94488. }
  94489. /**
  94490. Get the screen coordinates at the given document position.
  94491. `side` determines whether the coordinates are based on the
  94492. element before (-1) or after (1) the position (if no element is
  94493. available on the given side, the method will transparently use
  94494. another strategy to get reasonable coordinates).
  94495. */
  94496. coordsAtPos(e, n = 1) {
  94497. this.readMeasured();
  94498. let r = this.docView.coordsAt(e, n);
  94499. if (!r || r.left == r.right)
  94500. return r;
  94501. let i = this.state.doc.lineAt(e), a = this.bidiSpans(i), o = a[Hl.find(a, e - i.from, -1, n)];
  94502. return Dw(r, o.dir == pn.LTR == n > 0);
  94503. }
  94504. /**
  94505. Return the rectangle around a given character. If `pos` does not
  94506. point in front of a character that is in the viewport and
  94507. rendered (i.e. not replaced, not a line break), this will return
  94508. null. For space characters that are a line wrap point, this will
  94509. return the position before the line break.
  94510. */
  94511. coordsForChar(e) {
  94512. return this.readMeasured(), this.docView.coordsForChar(e);
  94513. }
  94514. /**
  94515. The default width of a character in the editor. May not
  94516. accurately reflect the width of all characters (given variable
  94517. width fonts or styling of invididual ranges).
  94518. */
  94519. get defaultCharacterWidth() {
  94520. return this.viewState.heightOracle.charWidth;
  94521. }
  94522. /**
  94523. The default height of a line in the editor. May not be accurate
  94524. for all lines.
  94525. */
  94526. get defaultLineHeight() {
  94527. return this.viewState.heightOracle.lineHeight;
  94528. }
  94529. /**
  94530. The text direction
  94531. ([`direction`](https://developer.mozilla.org/en-US/docs/Web/CSS/direction)
  94532. CSS property) of the editor's content element.
  94533. */
  94534. get textDirection() {
  94535. return this.viewState.defaultTextDirection;
  94536. }
  94537. /**
  94538. Find the text direction of the block at the given position, as
  94539. assigned by CSS. If
  94540. [`perLineTextDirection`](https://codemirror.net/6/docs/ref/#view.EditorView^perLineTextDirection)
  94541. isn't enabled, or the given position is outside of the viewport,
  94542. this will always return the same as
  94543. [`textDirection`](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection). Note that
  94544. this may trigger a DOM layout.
  94545. */
  94546. textDirectionAt(e) {
  94547. return !this.state.facet(Gae) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e));
  94548. }
  94549. /**
  94550. Whether this editor [wraps lines](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping)
  94551. (as determined by the
  94552. [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)
  94553. CSS property of its content element).
  94554. */
  94555. get lineWrapping() {
  94556. return this.viewState.heightOracle.lineWrapping;
  94557. }
  94558. /**
  94559. Returns the bidirectional text structure of the given line
  94560. (which should be in the current document) as an array of span
  94561. objects. The order of these spans matches the [text
  94562. direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection)—if that is
  94563. left-to-right, the leftmost spans come first, otherwise the
  94564. rightmost spans come first.
  94565. */
  94566. bidiSpans(e) {
  94567. if (e.length > ost)
  94568. return Nae(e.length);
  94569. let n = this.textDirectionAt(e.from), r;
  94570. for (let a of this.bidiCache)
  94571. if (a.from == e.from && a.dir == n && (a.fresh || Lae(a.isolates, r = zH(this, e))))
  94572. return a.order;
  94573. r || (r = zH(this, e));
  94574. let i = tot(e.text, n, r);
  94575. return this.bidiCache.push(new sS(e.from, e.to, n, r, !0, i)), i;
  94576. }
  94577. /**
  94578. Check whether the editor has focus.
  94579. */
  94580. get hasFocus() {
  94581. var e;
  94582. return (this.dom.ownerDocument.hasFocus() || Ne.safari && ((e = this.inputState) === null || e === void 0 ? void 0 : e.lastContextMenu) > Date.now() - 3e4) && this.root.activeElement == this.contentDOM;
  94583. }
  94584. /**
  94585. Put focus on the editor.
  94586. */
  94587. focus() {
  94588. this.observer.ignore(() => {
  94589. _ae(this.contentDOM), this.docView.updateSelection();
  94590. });
  94591. }
  94592. /**
  94593. Update the [root](https://codemirror.net/6/docs/ref/##view.EditorViewConfig.root) in which the editor lives. This is only
  94594. necessary when moving the editor's existing DOM to a new window or shadow root.
  94595. */
  94596. setRoot(e) {
  94597. this._root != e && (this._root = e, this.observer.setWindow((e.nodeType == 9 ? e : e.ownerDocument).defaultView || window), this.mountStyles());
  94598. }
  94599. /**
  94600. Clean up this editor view, removing its element from the
  94601. document, unregistering event handlers, and notifying
  94602. plugins. The view instance can no longer be used after
  94603. calling this.
  94604. */
  94605. destroy() {
  94606. this.root.activeElement == this.contentDOM && this.contentDOM.blur();
  94607. for (let e of this.plugins)
  94608. e.destroy(this);
  94609. 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;
  94610. }
  94611. /**
  94612. Returns an effect that can be
  94613. [added](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) to a transaction to
  94614. cause it to scroll the given position or range into view.
  94615. */
  94616. static scrollIntoView(e, n = {}) {
  94617. return Zb.of(new dh(typeof e == "number" ? me.cursor(e) : e, n.y, n.x, n.yMargin, n.xMargin));
  94618. }
  94619. /**
  94620. Return an effect that resets the editor to its current (at the
  94621. time this method was called) scroll position. Note that this
  94622. only affects the editor's own scrollable element, not parents.
  94623. See also
  94624. [`EditorViewConfig.scrollTo`](https://codemirror.net/6/docs/ref/#view.EditorViewConfig.scrollTo).
  94625. The effect should be used with a document identical to the one
  94626. it was created for. Failing to do so is not an error, but may
  94627. not scroll to the expected position. You can
  94628. [map](https://codemirror.net/6/docs/ref/#state.StateEffect.map) the effect to account for changes.
  94629. */
  94630. scrollSnapshot() {
  94631. let { scrollTop: e, scrollLeft: n } = this.scrollDOM, r = this.viewState.scrollAnchorAt(e);
  94632. return Zb.of(new dh(me.cursor(r.from), "start", "start", r.top - e, n, !0));
  94633. }
  94634. /**
  94635. Enable or disable tab-focus mode, which disables key bindings
  94636. for Tab and Shift-Tab, letting the browser's default
  94637. focus-changing behavior go through instead. This is useful to
  94638. prevent trapping keyboard users in your editor.
  94639. Without argument, this toggles the mode. With a boolean, it
  94640. enables (true) or disables it (false). Given a number, it
  94641. temporarily enables the mode until that number of milliseconds
  94642. have passed or another non-Tab key is pressed.
  94643. */
  94644. setTabFocusMode(e) {
  94645. 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);
  94646. }
  94647. /**
  94648. Returns an extension that can be used to add DOM event handlers.
  94649. The value should be an object mapping event names to handler
  94650. functions. For any given event, such functions are ordered by
  94651. extension precedence, and the first handler to return true will
  94652. be assumed to have handled that event, and no other handlers or
  94653. built-in behavior will be activated for it. These are registered
  94654. on the [content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM), except
  94655. for `scroll` handlers, which will be called any time the
  94656. editor's [scroll element](https://codemirror.net/6/docs/ref/#view.EditorView.scrollDOM) or one of
  94657. its parent nodes is scrolled.
  94658. */
  94659. static domEventHandlers(e) {
  94660. return kn.define(() => ({}), { eventHandlers: e });
  94661. }
  94662. /**
  94663. Create an extension that registers DOM event observers. Contrary
  94664. to event [handlers](https://codemirror.net/6/docs/ref/#view.EditorView^domEventHandlers),
  94665. observers can't be prevented from running by a higher-precedence
  94666. handler returning true. They also don't prevent other handlers
  94667. and observers from running when they return true, and should not
  94668. call `preventDefault`.
  94669. */
  94670. static domEventObservers(e) {
  94671. return kn.define(() => ({}), { eventObservers: e });
  94672. }
  94673. /**
  94674. Create a theme extension. The first argument can be a
  94675. [`style-mod`](https://github.com/marijnh/style-mod#documentation)
  94676. style spec providing the styles for the theme. These will be
  94677. prefixed with a generated class for the style.
  94678. Because the selectors will be prefixed with a scope class, rule
  94679. that directly match the editor's [wrapper
  94680. element](https://codemirror.net/6/docs/ref/#view.EditorView.dom)—to which the scope class will be
  94681. added—need to be explicitly differentiated by adding an `&` to
  94682. the selector for that element—for example
  94683. `&.cm-focused`.
  94684. When `dark` is set to true, the theme will be marked as dark,
  94685. which will cause the `&dark` rules from [base
  94686. themes](https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme) to be used (as opposed to
  94687. `&light` when a light theme is active).
  94688. */
  94689. static theme(e, n) {
  94690. let r = pu.newName(), i = [Jb.of(r), ag.of(IM(`.${r}`, e))];
  94691. return n && n.dark && i.push(EM.of(!0)), i;
  94692. }
  94693. /**
  94694. Create an extension that adds styles to the base theme. Like
  94695. with [`theme`](https://codemirror.net/6/docs/ref/#view.EditorView^theme), use `&` to indicate the
  94696. place of the editor wrapper element when directly targeting
  94697. that. You can also use `&dark` or `&light` instead to only
  94698. target editors with a dark or light theme.
  94699. */
  94700. static baseTheme(e) {
  94701. return Eu.lowest(ag.of(IM("." + MM, e, poe)));
  94702. }
  94703. /**
  94704. Retrieve an editor view instance from the view's DOM
  94705. representation.
  94706. */
  94707. static findFromDOM(e) {
  94708. var n;
  94709. let r = e.querySelector(".cm-content"), i = r && Jt.get(r) || Jt.get(e);
  94710. return ((n = i == null ? void 0 : i.rootView) === null || n === void 0 ? void 0 : n.view) || null;
  94711. }
  94712. }
  94713. De.styleModule = ag;
  94714. De.inputHandler = Qae;
  94715. De.scrollHandler = Zae;
  94716. De.focusChangeEffect = Hae;
  94717. De.perLineTextDirection = Gae;
  94718. De.exceptionSink = Wae;
  94719. De.updateListener = TM;
  94720. De.editable = El;
  94721. De.mouseSelectionStyle = Fae;
  94722. De.dragMovesSelection = Vae;
  94723. De.clickAddsSelectionRange = zae;
  94724. De.decorations = Km;
  94725. De.outerDecorations = Yae;
  94726. De.atomicRanges = o4;
  94727. De.bidiIsolatedRanges = qae;
  94728. De.scrollMargins = Kae;
  94729. De.darkTheme = EM;
  94730. De.cspNonce = /* @__PURE__ */ Be.define({ combine: (t) => t.length ? t[0] : "" });
  94731. De.contentAttributes = a4;
  94732. De.editorAttributes = Xae;
  94733. De.lineWrapping = /* @__PURE__ */ De.contentAttributes.of({ class: "cm-lineWrapping" });
  94734. De.announce = /* @__PURE__ */ dt.define();
  94735. const ost = 4096, uG = {};
  94736. class sS {
  94737. constructor(e, n, r, i, a, o) {
  94738. this.from = e, this.to = n, this.dir = r, this.isolates = i, this.fresh = a, this.order = o;
  94739. }
  94740. static update(e, n) {
  94741. if (n.empty && !e.some((a) => a.fresh))
  94742. return e;
  94743. let r = [], i = e.length ? e[e.length - 1].dir : pn.LTR;
  94744. for (let a = Math.max(0, e.length - 10); a < e.length; a++) {
  94745. let o = e[a];
  94746. o.dir == i && !n.touchesRange(o.from, o.to) && r.push(new sS(n.mapPos(o.from, 1), n.mapPos(o.to, -1), o.dir, o.isolates, !1, o.order));
  94747. }
  94748. return r;
  94749. }
  94750. }
  94751. function cG(t, e, n) {
  94752. for (let r = t.state.facet(e), i = r.length - 1; i >= 0; i--) {
  94753. let a = r[i], o = typeof a == "function" ? a(t) : a;
  94754. o && _M(o, n);
  94755. }
  94756. return n;
  94757. }
  94758. const sst = Ne.mac ? "mac" : Ne.windows ? "win" : Ne.linux ? "linux" : "key";
  94759. function lst(t, e) {
  94760. const n = t.split(/-(?!$)/);
  94761. let r = n[n.length - 1];
  94762. r == "Space" && (r = " ");
  94763. let i, a, o, s;
  94764. for (let l = 0; l < n.length - 1; ++l) {
  94765. const u = n[l];
  94766. if (/^(cmd|meta|m)$/i.test(u))
  94767. s = !0;
  94768. else if (/^a(lt)?$/i.test(u))
  94769. i = !0;
  94770. else if (/^(c|ctrl|control)$/i.test(u))
  94771. a = !0;
  94772. else if (/^s(hift)?$/i.test(u))
  94773. o = !0;
  94774. else if (/^mod$/i.test(u))
  94775. e == "mac" ? s = !0 : a = !0;
  94776. else
  94777. throw new Error("Unrecognized modifier name: " + u);
  94778. }
  94779. return i && (r = "Alt-" + r), a && (r = "Ctrl-" + r), s && (r = "Meta-" + r), o && (r = "Shift-" + r), r;
  94780. }
  94781. function e_(t, e, n) {
  94782. return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n !== !1 && e.shiftKey && (t = "Shift-" + t), t;
  94783. }
  94784. const ust = /* @__PURE__ */ Eu.default(/* @__PURE__ */ De.domEventHandlers({
  94785. keydown(t, e) {
  94786. return yoe(moe(e.state), t, e, "editor");
  94787. }
  94788. })), sy = /* @__PURE__ */ Be.define({ enables: ust }), fG = /* @__PURE__ */ new WeakMap();
  94789. function moe(t) {
  94790. let e = t.facet(sy), n = fG.get(e);
  94791. return n || fG.set(e, n = dst(e.reduce((r, i) => r.concat(i), []))), n;
  94792. }
  94793. function cst(t, e, n) {
  94794. return yoe(moe(t.state), e, t, n);
  94795. }
  94796. let Ml = null;
  94797. const fst = 4e3;
  94798. function dst(t, e = sst) {
  94799. let n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), i = (o, s) => {
  94800. let l = r[o];
  94801. if (l == null)
  94802. r[o] = s;
  94803. else if (l != s)
  94804. throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix");
  94805. }, a = (o, s, l, u, c) => {
  94806. var f, d;
  94807. let h = n[o] || (n[o] = /* @__PURE__ */ Object.create(null)), p = s.split(/ (?!$)/).map((m) => lst(m, e));
  94808. for (let m = 1; m < p.length; m++) {
  94809. let y = p.slice(0, m).join(" ");
  94810. i(y, !0), h[y] || (h[y] = {
  94811. preventDefault: !0,
  94812. stopPropagation: !1,
  94813. run: [(b) => {
  94814. let _ = Ml = { view: b, prefix: y, scope: o };
  94815. return setTimeout(() => {
  94816. Ml == _ && (Ml = null);
  94817. }, fst), !0;
  94818. }]
  94819. });
  94820. }
  94821. let v = p.join(" ");
  94822. i(v, !1);
  94823. let g = h[v] || (h[v] = {
  94824. preventDefault: !1,
  94825. stopPropagation: !1,
  94826. run: ((d = (f = h._any) === null || f === void 0 ? void 0 : f.run) === null || d === void 0 ? void 0 : d.slice()) || []
  94827. });
  94828. l && g.run.push(l), u && (g.preventDefault = !0), c && (g.stopPropagation = !0);
  94829. };
  94830. for (let o of t) {
  94831. let s = o.scope ? o.scope.split(" ") : ["editor"];
  94832. if (o.any)
  94833. for (let u of s) {
  94834. let c = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
  94835. c._any || (c._any = { preventDefault: !1, stopPropagation: !1, run: [] });
  94836. let { any: f } = o;
  94837. for (let d in c)
  94838. c[d].run.push((h) => f(h, DM));
  94839. }
  94840. let l = o[e] || o.key;
  94841. if (l)
  94842. for (let u of s)
  94843. a(u, l, o.run, o.preventDefault, o.stopPropagation), o.shift && a(u, "Shift-" + l, o.shift, o.preventDefault, o.stopPropagation);
  94844. }
  94845. return n;
  94846. }
  94847. let DM = null;
  94848. function yoe(t, e, n, r) {
  94849. DM = e;
  94850. let i = Lat(e), a = gr(i, 0), o = ya(a) == i.length && i != " ", s = "", l = !1, u = !1, c = !1;
  94851. Ml && Ml.view == n && Ml.scope == r && (s = Ml.prefix + " ", roe.indexOf(e.keyCode) < 0 && (u = !0, Ml = null));
  94852. let f = /* @__PURE__ */ new Set(), d = (g) => {
  94853. if (g) {
  94854. for (let m of g.run)
  94855. if (!f.has(m) && (f.add(m), m(n)))
  94856. return g.stopPropagation && (c = !0), !0;
  94857. g.preventDefault && (g.stopPropagation && (c = !0), u = !0);
  94858. }
  94859. return !1;
  94860. }, h = t[r], p, v;
  94861. return h && (d(h[s + e_(i, e, !o)]) ? l = !0 : o && (e.altKey || e.metaKey || e.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
  94862. !(Ne.windows && e.ctrlKey && e.altKey) && (p = vu[e.keyCode]) && p != i ? (d(h[s + e_(p, e, !0)]) || e.shiftKey && (v = Ym[e.keyCode]) != i && v != p && d(h[s + e_(v, e, !1)])) && (l = !0) : o && e.shiftKey && d(h[s + e_(i, e, !0)]) && (l = !0), !l && d(h._any) && (l = !0)), u && (l = !0), l && c && e.stopPropagation(), DM = null, l;
  94863. }
  94864. class ly {
  94865. /**
  94866. Create a marker with the given class and dimensions. If `width`
  94867. is null, the DOM element will get no width style.
  94868. */
  94869. constructor(e, n, r, i, a) {
  94870. this.className = e, this.left = n, this.top = r, this.width = i, this.height = a;
  94871. }
  94872. draw() {
  94873. let e = document.createElement("div");
  94874. return e.className = this.className, this.adjust(e), e;
  94875. }
  94876. update(e, n) {
  94877. return n.className != this.className ? !1 : (this.adjust(e), !0);
  94878. }
  94879. adjust(e) {
  94880. 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";
  94881. }
  94882. eq(e) {
  94883. return this.left == e.left && this.top == e.top && this.width == e.width && this.height == e.height && this.className == e.className;
  94884. }
  94885. /**
  94886. Create a set of rectangles for the given selection range,
  94887. assigning them theclass`className`. Will create a single
  94888. rectangle for empty ranges, and a set of selection-style
  94889. rectangles covering the range's content (in a bidi-aware
  94890. way) for non-empty ones.
  94891. */
  94892. static forRange(e, n, r) {
  94893. if (r.empty) {
  94894. let i = e.coordsAtPos(r.head, r.assoc || 1);
  94895. if (!i)
  94896. return [];
  94897. let a = boe(e);
  94898. return [new ly(n, i.left - a.left, i.top - a.top, null, i.bottom - i.top)];
  94899. } else
  94900. return hst(e, n, r);
  94901. }
  94902. }
  94903. function boe(t) {
  94904. let e = t.scrollDOM.getBoundingClientRect();
  94905. return { left: (t.textDirection == pn.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY };
  94906. }
  94907. function dG(t, e, n, r) {
  94908. let i = t.coordsAtPos(e, n * 2);
  94909. if (!i)
  94910. return r;
  94911. 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 });
  94912. return s == null || l == null ? r : { from: Math.max(r.from, Math.min(s, l)), to: Math.min(r.to, Math.max(s, l)) };
  94913. }
  94914. function hst(t, e, n) {
  94915. if (n.to <= t.viewport.from || n.from >= t.viewport.to)
  94916. return [];
  94917. let r = Math.max(n.from, t.viewport.from), i = Math.min(n.to, t.viewport.to), a = t.textDirection == pn.LTR, o = t.contentDOM, s = o.getBoundingClientRect(), l = boe(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 = $M(t, r), p = $M(t, i), v = h.type == ei.Text ? h : null, g = p.type == ei.Text ? p : null;
  94918. if (v && (t.lineWrapping || h.widgetLineBreaks) && (v = dG(t, r, 1, v)), g && (t.lineWrapping || p.widgetLineBreaks) && (g = dG(t, i, -1, g)), v && g && v.from == g.from && v.to == g.to)
  94919. return y(b(n.from, n.to, v));
  94920. {
  94921. let O = v ? b(n.from, null, v) : _(h, !1), S = g ? b(null, n.to, g) : _(p, !0), x = [];
  94922. return (v || h).to < (g || p).from - (v && g ? 1 : 0) || h.widgetLineBreaks > 1 && O.bottom + t.defaultLineHeight / 2 < S.top ? x.push(m(f, O.bottom, d, S.top)) : O.bottom < S.top && t.elementAtHeight((O.bottom + S.top) / 2).type == ei.Text && (O.bottom = S.top = (O.bottom + S.top) / 2), y(O).concat(x).concat(y(S));
  94923. }
  94924. function m(O, S, x, C) {
  94925. return new ly(
  94926. e,
  94927. O - l.left,
  94928. S - l.top - 0.01,
  94929. x - O,
  94930. C - S + 0.01
  94931. /* C.Epsilon */
  94932. );
  94933. }
  94934. function y({ top: O, bottom: S, horizontal: x }) {
  94935. let C = [];
  94936. for (let T = 0; T < x.length; T += 2)
  94937. C.push(m(x[T], O, x[T + 1], S));
  94938. return C;
  94939. }
  94940. function b(O, S, x) {
  94941. let C = 1e9, T = -1e9, w = [];
  94942. function P(D, E, R, N, V) {
  94943. let B = t.coordsAtPos(D, D == x.to ? -2 : 2), W = t.coordsAtPos(R, R == x.from ? 2 : -2);
  94944. !B || !W || (C = Math.min(B.top, W.top, C), T = Math.max(B.bottom, W.bottom, T), V == pn.LTR ? w.push(a && E ? f : B.left, a && N ? d : W.right) : w.push(!a && N ? f : W.left, !a && E ? d : B.right));
  94945. }
  94946. let $ = O ?? x.from, A = S ?? x.to;
  94947. for (let D of t.visibleRanges)
  94948. if (D.to > $ && D.from < A)
  94949. for (let E = Math.max(D.from, $), R = Math.min(D.to, A); ; ) {
  94950. let N = t.state.doc.lineAt(E);
  94951. for (let V of t.bidiSpans(N)) {
  94952. let B = V.from + N.from, W = V.to + N.from;
  94953. if (B >= R)
  94954. break;
  94955. W > E && P(Math.max(B, E), O == null && B <= $, Math.min(W, R), S == null && W >= A, V.dir);
  94956. }
  94957. if (E = N.to + 1, E >= R)
  94958. break;
  94959. }
  94960. return w.length == 0 && P($, O == null, A, S == null, t.textDirection), { top: C, bottom: T, horizontal: w };
  94961. }
  94962. function _(O, S) {
  94963. let x = s.top + (S ? O.top : O.bottom);
  94964. return { top: x, bottom: x, horizontal: [] };
  94965. }
  94966. }
  94967. function pst(t, e) {
  94968. return t.constructor == e.constructor && t.eq(e);
  94969. }
  94970. class vst {
  94971. constructor(e, n) {
  94972. 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);
  94973. }
  94974. update(e) {
  94975. e.startState.facet(l1) != e.state.facet(l1) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq));
  94976. }
  94977. docViewUpdate(e) {
  94978. this.layer.updateOnDocViewUpdate !== !1 && e.requestMeasure(this.measureReq);
  94979. }
  94980. setOrder(e) {
  94981. let n = 0, r = e.facet(l1);
  94982. for (; n < r.length && r[n] != this.layer; )
  94983. n++;
  94984. this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - n);
  94985. }
  94986. measure() {
  94987. return this.layer.markers(this.view);
  94988. }
  94989. scale() {
  94990. let { scaleX: e, scaleY: n } = this.view;
  94991. (e != this.scaleX || n != this.scaleY) && (this.scaleX = e, this.scaleY = n, this.dom.style.transform = `scale(${1 / e}, ${1 / n})`);
  94992. }
  94993. draw(e) {
  94994. if (e.length != this.drawn.length || e.some((n, r) => !pst(n, this.drawn[r]))) {
  94995. let n = this.dom.firstChild, r = 0;
  94996. for (let i of e)
  94997. 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);
  94998. for (; n; ) {
  94999. let i = n.nextSibling;
  95000. n.remove(), n = i;
  95001. }
  95002. this.drawn = e;
  95003. }
  95004. }
  95005. destroy() {
  95006. this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove();
  95007. }
  95008. }
  95009. const l1 = /* @__PURE__ */ Be.define();
  95010. function _oe(t) {
  95011. return [
  95012. kn.define((e) => new vst(e, t)),
  95013. l1.of(t)
  95014. ];
  95015. }
  95016. const Ooe = !Ne.ios, Jm = /* @__PURE__ */ Be.define({
  95017. combine(t) {
  95018. return ds(t, {
  95019. cursorBlinkRate: 1200,
  95020. drawRangeCursor: !0
  95021. }, {
  95022. cursorBlinkRate: (e, n) => Math.min(e, n),
  95023. drawRangeCursor: (e, n) => e || n
  95024. });
  95025. }
  95026. });
  95027. function gst(t = {}) {
  95028. return [
  95029. Jm.of(t),
  95030. mst,
  95031. yst,
  95032. bst,
  95033. jae.of(!0)
  95034. ];
  95035. }
  95036. function Soe(t) {
  95037. return t.startState.facet(Jm) != t.state.facet(Jm);
  95038. }
  95039. const mst = /* @__PURE__ */ _oe({
  95040. above: !0,
  95041. markers(t) {
  95042. let { state: e } = t, n = e.facet(Jm), r = [];
  95043. for (let i of e.selection.ranges) {
  95044. let a = i == e.selection.main;
  95045. if (i.empty ? !a || Ooe : n.drawRangeCursor) {
  95046. let o = a ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", s = i.empty ? i : me.cursor(i.head, i.head > i.anchor ? -1 : 1);
  95047. for (let l of ly.forRange(t, o, s))
  95048. r.push(l);
  95049. }
  95050. }
  95051. return r;
  95052. },
  95053. update(t, e) {
  95054. t.transactions.some((r) => r.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink");
  95055. let n = Soe(t);
  95056. return n && hG(t.state, e), t.docChanged || t.selectionSet || n;
  95057. },
  95058. mount(t, e) {
  95059. hG(e.state, t);
  95060. },
  95061. class: "cm-cursorLayer"
  95062. });
  95063. function hG(t, e) {
  95064. e.style.animationDuration = t.facet(Jm).cursorBlinkRate + "ms";
  95065. }
  95066. const yst = /* @__PURE__ */ _oe({
  95067. above: !1,
  95068. markers(t) {
  95069. return t.state.selection.ranges.map((e) => e.empty ? [] : ly.forRange(t, "cm-selectionBackground", e)).reduce((e, n) => e.concat(n));
  95070. },
  95071. update(t, e) {
  95072. return t.docChanged || t.selectionSet || t.viewportChanged || Soe(t);
  95073. },
  95074. class: "cm-selectionLayer"
  95075. }), RM = {
  95076. ".cm-line": {
  95077. "& ::selection, &::selection": { backgroundColor: "transparent !important" }
  95078. },
  95079. ".cm-content": {
  95080. "& :focus": {
  95081. caretColor: "initial !important",
  95082. "&::selection, & ::selection": {
  95083. backgroundColor: "Highlight !important"
  95084. }
  95085. }
  95086. }
  95087. };
  95088. Ooe && (RM[".cm-line"].caretColor = RM[".cm-content"].caretColor = "transparent !important");
  95089. const bst = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ De.theme(RM)), xoe = /* @__PURE__ */ dt.define({
  95090. map(t, e) {
  95091. return t == null ? null : e.mapPos(t);
  95092. }
  95093. }), lg = /* @__PURE__ */ ur.define({
  95094. create() {
  95095. return null;
  95096. },
  95097. update(t, e) {
  95098. return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((n, r) => r.is(xoe) ? r.value : n, t);
  95099. }
  95100. }), _st = /* @__PURE__ */ kn.fromClass(class {
  95101. constructor(t) {
  95102. this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) };
  95103. }
  95104. update(t) {
  95105. var e;
  95106. let n = t.state.field(lg);
  95107. 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(lg) != n || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq));
  95108. }
  95109. readPos() {
  95110. let { view: t } = this, e = t.state.field(lg), n = e != null && t.coordsAtPos(e);
  95111. if (!n)
  95112. return null;
  95113. let r = t.scrollDOM.getBoundingClientRect();
  95114. return {
  95115. left: n.left - r.left + t.scrollDOM.scrollLeft * t.scaleX,
  95116. top: n.top - r.top + t.scrollDOM.scrollTop * t.scaleY,
  95117. height: n.bottom - n.top
  95118. };
  95119. }
  95120. drawCursor(t) {
  95121. if (this.cursor) {
  95122. let { scaleX: e, scaleY: n } = this.view;
  95123. 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";
  95124. }
  95125. }
  95126. destroy() {
  95127. this.cursor && this.cursor.remove();
  95128. }
  95129. setDropPos(t) {
  95130. this.view.state.field(lg) != t && this.view.dispatch({ effects: xoe.of(t) });
  95131. }
  95132. }, {
  95133. eventObservers: {
  95134. dragover(t) {
  95135. this.setDropPos(this.view.posAtCoords({ x: t.clientX, y: t.clientY }));
  95136. },
  95137. dragleave(t) {
  95138. (t.target == this.view.contentDOM || !this.view.contentDOM.contains(t.relatedTarget)) && this.setDropPos(null);
  95139. },
  95140. dragend() {
  95141. this.setDropPos(null);
  95142. },
  95143. drop() {
  95144. this.setDropPos(null);
  95145. }
  95146. }
  95147. });
  95148. function Ost() {
  95149. return [lg, _st];
  95150. }
  95151. function pG(t, e, n, r, i) {
  95152. e.lastIndex = 0;
  95153. for (let a = t.iterRange(n, r), o = n, s; !a.next().done; o += a.value.length)
  95154. if (!a.lineBreak)
  95155. for (; s = e.exec(a.value); )
  95156. i(o + s.index, s);
  95157. }
  95158. function Sst(t, e) {
  95159. let n = t.visibleRanges;
  95160. if (n.length == 1 && n[0].from == t.viewport.from && n[0].to == t.viewport.to)
  95161. return n;
  95162. let r = [];
  95163. for (let { from: i, to: a } of n)
  95164. 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 });
  95165. return r;
  95166. }
  95167. class xst {
  95168. /**
  95169. Create a decorator.
  95170. */
  95171. constructor(e) {
  95172. const { regexp: n, decoration: r, decorate: i, boundary: a, maxLength: o = 1e3 } = e;
  95173. if (!n.global)
  95174. throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");
  95175. if (this.regexp = n, i)
  95176. this.addMatch = (s, l, u, c) => i(c, u, u + s[0].length, s, l);
  95177. else if (typeof r == "function")
  95178. this.addMatch = (s, l, u, c) => {
  95179. let f = r(s, l, u);
  95180. f && c(u, u + s[0].length, f);
  95181. };
  95182. else if (r)
  95183. this.addMatch = (s, l, u, c) => c(u, u + s[0].length, r);
  95184. else
  95185. throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");
  95186. this.boundary = a, this.maxLength = o;
  95187. }
  95188. /**
  95189. Compute the full set of decorations for matches in the given
  95190. view's viewport. You'll want to call this when initializing your
  95191. plugin.
  95192. */
  95193. createDeco(e) {
  95194. let n = new hu(), r = n.add.bind(n);
  95195. for (let { from: i, to: a } of Sst(e, this.maxLength))
  95196. pG(e.state.doc, this.regexp, i, a, (o, s) => this.addMatch(s, e, o, r));
  95197. return n.finish();
  95198. }
  95199. /**
  95200. Update a set of decorations for a view update. `deco` _must_ be
  95201. the set of decorations produced by _this_ `MatchDecorator` for
  95202. the view state before the update.
  95203. */
  95204. updateDeco(e, n) {
  95205. let r = 1e9, i = -1;
  95206. return e.docChanged && e.changes.iterChanges((a, o, s, l) => {
  95207. l > e.view.viewport.from && s < e.view.viewport.to && (r = Math.min(s, r), i = Math.max(l, i));
  95208. }), e.viewportChanged || i - r > 1e3 ? this.createDeco(e.view) : i > -1 ? this.updateRange(e.view, n.map(e.changes), r, i) : n;
  95209. }
  95210. updateRange(e, n, r, i) {
  95211. for (let a of e.visibleRanges) {
  95212. let o = Math.max(a.from, r), s = Math.min(a.to, i);
  95213. if (s > o) {
  95214. 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);
  95215. if (this.boundary) {
  95216. for (; o > l.from; o--)
  95217. if (this.boundary.test(l.text[o - 1 - l.from])) {
  95218. c = o;
  95219. break;
  95220. }
  95221. for (; s < u.to; s++)
  95222. if (this.boundary.test(u.text[s - u.from])) {
  95223. f = s;
  95224. break;
  95225. }
  95226. }
  95227. let d = [], h, p = (v, g, m) => d.push(m.range(v, g));
  95228. if (l == u)
  95229. for (this.regexp.lastIndex = c - l.from; (h = this.regexp.exec(l.text)) && h.index < f - l.from; )
  95230. this.addMatch(h, e, h.index + l.from, p);
  95231. else
  95232. pG(e.state.doc, this.regexp, c, f, (v, g) => this.addMatch(g, e, v, p));
  95233. n = n.update({ filterFrom: c, filterTo: f, filter: (v, g) => v < c || g > f, add: d });
  95234. }
  95235. }
  95236. return n;
  95237. }
  95238. }
  95239. const kM = /x/.unicode != null ? "gu" : "g", wst = /* @__PURE__ */ new RegExp(`[\0-\b
  95240. --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`, kM), Cst = {
  95241. 0: "null",
  95242. 7: "bell",
  95243. 8: "backspace",
  95244. 10: "newline",
  95245. 11: "vertical tab",
  95246. 13: "carriage return",
  95247. 27: "escape",
  95248. 8203: "zero width space",
  95249. 8204: "zero width non-joiner",
  95250. 8205: "zero width joiner",
  95251. 8206: "left-to-right mark",
  95252. 8207: "right-to-left mark",
  95253. 8232: "line separator",
  95254. 8237: "left-to-right override",
  95255. 8238: "right-to-left override",
  95256. 8294: "left-to-right isolate",
  95257. 8295: "right-to-left isolate",
  95258. 8297: "pop directional isolate",
  95259. 8233: "paragraph separator",
  95260. 65279: "zero width no-break space",
  95261. 65532: "object replacement"
  95262. };
  95263. let S$ = null;
  95264. function Tst() {
  95265. var t;
  95266. if (S$ == null && typeof document < "u" && document.body) {
  95267. let e = document.body.style;
  95268. S$ = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null;
  95269. }
  95270. return S$ || !1;
  95271. }
  95272. const u1 = /* @__PURE__ */ Be.define({
  95273. combine(t) {
  95274. let e = ds(t, {
  95275. render: null,
  95276. specialChars: wst,
  95277. addSpecialChars: null
  95278. });
  95279. return (e.replaceTabs = !Tst()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, kM)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, kM)), e;
  95280. }
  95281. });
  95282. function Pst(t = {}) {
  95283. return [u1.of(t), $st()];
  95284. }
  95285. let vG = null;
  95286. function $st() {
  95287. return vG || (vG = kn.fromClass(class {
  95288. constructor(t) {
  95289. this.view = t, this.decorations = Ze.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(u1)), this.decorations = this.decorator.createDeco(t);
  95290. }
  95291. makeDecorator(t) {
  95292. return new xst({
  95293. regexp: t.specialChars,
  95294. decoration: (e, n, r) => {
  95295. let { doc: i } = n.state, a = gr(e[0], 0);
  95296. if (a == 9) {
  95297. let o = i.lineAt(r), s = n.state.tabSize, l = zp(o.text, s, r - o.from);
  95298. return Ze.replace({
  95299. widget: new Ist((s - l % s) * this.view.defaultCharacterWidth / this.view.scaleX)
  95300. });
  95301. }
  95302. return this.decorationCache[a] || (this.decorationCache[a] = Ze.replace({ widget: new Mst(t, a) }));
  95303. },
  95304. boundary: t.replaceTabs ? void 0 : /[^]/
  95305. });
  95306. }
  95307. update(t) {
  95308. let e = t.state.facet(u1);
  95309. t.startState.facet(u1) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations);
  95310. }
  95311. }, {
  95312. decorations: (t) => t.decorations
  95313. }));
  95314. }
  95315. const Ast = "•";
  95316. function Est(t) {
  95317. return t >= 32 ? Ast : t == 10 ? "␤" : String.fromCharCode(9216 + t);
  95318. }
  95319. class Mst extends hs {
  95320. constructor(e, n) {
  95321. super(), this.options = e, this.code = n;
  95322. }
  95323. eq(e) {
  95324. return e.code == this.code;
  95325. }
  95326. toDOM(e) {
  95327. let n = Est(this.code), r = e.state.phrase("Control character") + " " + (Cst[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, r, n);
  95328. if (i)
  95329. return i;
  95330. let a = document.createElement("span");
  95331. return a.textContent = n, a.title = r, a.setAttribute("aria-label", r), a.className = "cm-specialChar", a;
  95332. }
  95333. ignoreEvent() {
  95334. return !1;
  95335. }
  95336. }
  95337. class Ist extends hs {
  95338. constructor(e) {
  95339. super(), this.width = e;
  95340. }
  95341. eq(e) {
  95342. return e.width == this.width;
  95343. }
  95344. toDOM() {
  95345. let e = document.createElement("span");
  95346. return e.textContent = " ", e.className = "cm-tab", e.style.width = this.width + "px", e;
  95347. }
  95348. ignoreEvent() {
  95349. return !1;
  95350. }
  95351. }
  95352. function Dst() {
  95353. return kst;
  95354. }
  95355. const Rst = /* @__PURE__ */ Ze.line({ class: "cm-activeLine" }), kst = /* @__PURE__ */ kn.fromClass(class {
  95356. constructor(t) {
  95357. this.decorations = this.getDeco(t);
  95358. }
  95359. update(t) {
  95360. (t.docChanged || t.selectionSet) && (this.decorations = this.getDeco(t.view));
  95361. }
  95362. getDeco(t) {
  95363. let e = -1, n = [];
  95364. for (let r of t.state.selection.ranges) {
  95365. let i = t.lineBlockAt(r.head);
  95366. i.from > e && (n.push(Rst.range(i.from)), e = i.from);
  95367. }
  95368. return Ze.set(n);
  95369. }
  95370. }, {
  95371. decorations: (t) => t.decorations
  95372. });
  95373. class Lst extends hs {
  95374. constructor(e) {
  95375. super(), this.content = e;
  95376. }
  95377. toDOM() {
  95378. let e = document.createElement("span");
  95379. 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;
  95380. }
  95381. coordsAt(e) {
  95382. let n = e.firstChild ? Jh(e.firstChild) : [];
  95383. if (!n.length)
  95384. return null;
  95385. let r = window.getComputedStyle(e.parentNode), i = Dw(n[0], r.direction != "rtl"), a = parseInt(r.lineHeight);
  95386. return i.bottom - i.top > a * 1.5 ? { left: i.left, right: i.right, top: i.top, bottom: i.top + a } : i;
  95387. }
  95388. ignoreEvent() {
  95389. return !1;
  95390. }
  95391. }
  95392. function Nst(t) {
  95393. return kn.fromClass(class {
  95394. constructor(e) {
  95395. this.view = e, this.placeholder = t ? Ze.set([Ze.widget({ widget: new Lst(t), side: 1 }).range(0)]) : Ze.none;
  95396. }
  95397. get decorations() {
  95398. return this.view.state.doc.length ? Ze.none : this.placeholder;
  95399. }
  95400. }, { decorations: (e) => e.decorations });
  95401. }
  95402. const LM = 2e3;
  95403. function Bst(t, e, n) {
  95404. let r = Math.min(e.line, n.line), i = Math.max(e.line, n.line), a = [];
  95405. if (e.off > LM || n.off > LM || e.col < 0 || n.col < 0) {
  95406. let o = Math.min(e.off, n.off), s = Math.max(e.off, n.off);
  95407. for (let l = r; l <= i; l++) {
  95408. let u = t.doc.line(l);
  95409. u.length <= s && a.push(me.range(u.from + o, u.to + s));
  95410. }
  95411. } else {
  95412. let o = Math.min(e.col, n.col), s = Math.max(e.col, n.col);
  95413. for (let l = r; l <= i; l++) {
  95414. let u = t.doc.line(l), c = hM(u.text, o, t.tabSize, !0);
  95415. if (c < 0)
  95416. a.push(me.cursor(u.to));
  95417. else {
  95418. let f = hM(u.text, s, t.tabSize);
  95419. a.push(me.range(u.from + c, u.from + f));
  95420. }
  95421. }
  95422. }
  95423. return a;
  95424. }
  95425. function zst(t, e) {
  95426. let n = t.coordsAtPos(t.viewport.from);
  95427. return n ? Math.round(Math.abs((n.left - e) / t.defaultCharacterWidth)) : -1;
  95428. }
  95429. function gG(t, e) {
  95430. let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), r = t.state.doc.lineAt(n), i = n - r.from, a = i > LM ? -1 : i == r.length ? zst(t, e.clientX) : zp(r.text, t.state.tabSize, n - r.from);
  95431. return { line: r.number, col: a, off: i };
  95432. }
  95433. function Vst(t, e) {
  95434. let n = gG(t, e), r = t.state.selection;
  95435. return n ? {
  95436. update(i) {
  95437. if (i.docChanged) {
  95438. let a = i.changes.mapPos(i.startState.doc.line(n.line).from), o = i.state.doc.lineAt(a);
  95439. n = { line: o.number, col: n.col, off: Math.min(n.off, o.length) }, r = r.map(i.changes);
  95440. }
  95441. },
  95442. get(i, a, o) {
  95443. let s = gG(t, i);
  95444. if (!s)
  95445. return r;
  95446. let l = Bst(t.state, n, s);
  95447. return l.length ? o ? me.create(l.concat(r.ranges)) : me.create(l) : r;
  95448. }
  95449. } : null;
  95450. }
  95451. function Fst(t) {
  95452. let e = (n) => n.altKey && n.button == 0;
  95453. return De.mouseSelectionStyle.of((n, r) => e(r) ? Vst(n, r) : null);
  95454. }
  95455. const Wst = {
  95456. Alt: [18, (t) => !!t.altKey],
  95457. Control: [17, (t) => !!t.ctrlKey],
  95458. Shift: [16, (t) => !!t.shiftKey],
  95459. Meta: [91, (t) => !!t.metaKey]
  95460. }, Qst = { style: "cursor: crosshair" };
  95461. function Hst(t = {}) {
  95462. let [e, n] = Wst[t.key || "Alt"], r = kn.fromClass(class {
  95463. constructor(i) {
  95464. this.view = i, this.isDown = !1;
  95465. }
  95466. set(i) {
  95467. this.isDown != i && (this.isDown = i, this.view.update([]));
  95468. }
  95469. }, {
  95470. eventObservers: {
  95471. keydown(i) {
  95472. this.set(i.keyCode == e || n(i));
  95473. },
  95474. keyup(i) {
  95475. (i.keyCode == e || !n(i)) && this.set(!1);
  95476. },
  95477. mousemove(i) {
  95478. this.set(n(i));
  95479. }
  95480. }
  95481. });
  95482. return [
  95483. r,
  95484. De.contentAttributes.of((i) => {
  95485. var a;
  95486. return !((a = i.plugin(r)) === null || a === void 0) && a.isDown ? Qst : null;
  95487. })
  95488. ];
  95489. }
  95490. const Rv = "-10000px";
  95491. class woe {
  95492. constructor(e, n, r, i) {
  95493. this.facet = n, this.createTooltipView = r, this.removeTooltipView = i, this.input = e.state.facet(n), this.tooltips = this.input.filter((o) => o);
  95494. let a = null;
  95495. this.tooltipViews = this.tooltips.map((o) => a = r(o, a));
  95496. }
  95497. update(e, n) {
  95498. var r;
  95499. let i = e.state.facet(this.facet), a = i.filter((l) => l);
  95500. if (i === this.input) {
  95501. for (let l of this.tooltipViews)
  95502. l.update && l.update(e);
  95503. return !1;
  95504. }
  95505. let o = [], s = n ? [] : null;
  95506. for (let l = 0; l < a.length; l++) {
  95507. let u = a[l], c = -1;
  95508. if (u) {
  95509. for (let f = 0; f < this.tooltips.length; f++) {
  95510. let d = this.tooltips[f];
  95511. d && d.create == u.create && (c = f);
  95512. }
  95513. if (c < 0)
  95514. o[l] = this.createTooltipView(u, l ? o[l - 1] : null), s && (s[l] = !!u.above);
  95515. else {
  95516. let f = o[l] = this.tooltipViews[c];
  95517. s && (s[l] = n[c]), f.update && f.update(e);
  95518. }
  95519. }
  95520. }
  95521. for (let l of this.tooltipViews)
  95522. o.indexOf(l) < 0 && (this.removeTooltipView(l), (r = l.destroy) === null || r === void 0 || r.call(l));
  95523. return n && (s.forEach((l, u) => n[u] = l), n.length = s.length), this.input = i, this.tooltips = a, this.tooltipViews = o, !0;
  95524. }
  95525. }
  95526. function Gst(t) {
  95527. let { win: e } = t;
  95528. return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth };
  95529. }
  95530. const x$ = /* @__PURE__ */ Be.define({
  95531. combine: (t) => {
  95532. var e, n, r;
  95533. return {
  95534. position: Ne.ios ? "absolute" : ((e = t.find((i) => i.position)) === null || e === void 0 ? void 0 : e.position) || "fixed",
  95535. parent: ((n = t.find((i) => i.parent)) === null || n === void 0 ? void 0 : n.parent) || null,
  95536. tooltipSpace: ((r = t.find((i) => i.tooltipSpace)) === null || r === void 0 ? void 0 : r.tooltipSpace) || Gst
  95537. };
  95538. }
  95539. }), mG = /* @__PURE__ */ new WeakMap(), u4 = /* @__PURE__ */ kn.fromClass(class {
  95540. constructor(t) {
  95541. this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1;
  95542. let e = t.state.facet(x$);
  95543. 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 woe(t, c4, (n, r) => this.createTooltip(n, r), (n) => {
  95544. this.resizeObserver && this.resizeObserver.unobserve(n.dom), n.dom.remove();
  95545. }), this.above = this.manager.tooltips.map((n) => !!n.above), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((n) => {
  95546. Date.now() > this.lastTransaction - 50 && n.length > 0 && n[n.length - 1].intersectionRatio < 1 && this.measureSoon();
  95547. }, { threshold: [1] }) : null, this.observeIntersection(), t.win.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure();
  95548. }
  95549. createContainer() {
  95550. 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;
  95551. }
  95552. observeIntersection() {
  95553. if (this.intersectionObserver) {
  95554. this.intersectionObserver.disconnect();
  95555. for (let t of this.manager.tooltipViews)
  95556. this.intersectionObserver.observe(t.dom);
  95557. }
  95558. }
  95559. measureSoon() {
  95560. this.measureTimeout < 0 && (this.measureTimeout = setTimeout(() => {
  95561. this.measureTimeout = -1, this.maybeMeasure();
  95562. }, 50));
  95563. }
  95564. update(t) {
  95565. t.transactions.length && (this.lastTransaction = Date.now());
  95566. let e = this.manager.update(t, this.above);
  95567. e && this.observeIntersection();
  95568. let n = e || t.geometryChanged, r = t.state.facet(x$);
  95569. if (r.position != this.position && !this.madeAbsolute) {
  95570. this.position = r.position;
  95571. for (let i of this.manager.tooltipViews)
  95572. i.dom.style.position = this.position;
  95573. n = !0;
  95574. }
  95575. if (r.parent != this.parent) {
  95576. this.parent && this.container.remove(), this.parent = r.parent, this.createContainer();
  95577. for (let i of this.manager.tooltipViews)
  95578. this.container.appendChild(i.dom);
  95579. n = !0;
  95580. } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses);
  95581. n && this.maybeMeasure();
  95582. }
  95583. createTooltip(t, e) {
  95584. let n = t.create(this.view), r = e ? e.dom : null;
  95585. if (n.dom.classList.add("cm-tooltip"), t.arrow && !n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) {
  95586. let i = document.createElement("div");
  95587. i.className = "cm-tooltip-arrow", n.dom.appendChild(i);
  95588. }
  95589. return n.dom.style.position = this.position, n.dom.style.top = Rv, 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;
  95590. }
  95591. destroy() {
  95592. var t, e, n;
  95593. this.view.win.removeEventListener("resize", this.measureSoon);
  95594. for (let r of this.manager.tooltipViews)
  95595. r.dom.remove(), (t = r.destroy) === null || t === void 0 || t.call(r);
  95596. 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);
  95597. }
  95598. readMeasure() {
  95599. let t = this.view.dom.getBoundingClientRect(), e = 1, n = 1, r = !1;
  95600. if (this.position == "fixed" && this.manager.tooltipViews.length) {
  95601. let { dom: i } = this.manager.tooltipViews[0];
  95602. if (Ne.gecko)
  95603. r = i.offsetParent != this.container.ownerDocument.body;
  95604. else if (i.style.top == Rv && i.style.left == "0px") {
  95605. let a = i.getBoundingClientRect();
  95606. r = Math.abs(a.top + 1e4) > 1 || Math.abs(a.left) > 1;
  95607. }
  95608. }
  95609. if (r || this.position == "absolute")
  95610. if (this.parent) {
  95611. let i = this.parent.getBoundingClientRect();
  95612. i.width && i.height && (e = i.width / this.parent.offsetWidth, n = i.height / this.parent.offsetHeight);
  95613. } else
  95614. ({ scaleX: e, scaleY: n } = this.view.viewState);
  95615. return {
  95616. editor: t,
  95617. parent: this.parent ? this.container.getBoundingClientRect() : t,
  95618. pos: this.manager.tooltips.map((i, a) => {
  95619. let o = this.manager.tooltipViews[a];
  95620. return o.getCoords ? o.getCoords(i.pos) : this.view.coordsAtPos(i.pos);
  95621. }),
  95622. size: this.manager.tooltipViews.map(({ dom: i }) => i.getBoundingClientRect()),
  95623. space: this.view.state.facet(x$).tooltipSpace(this.view),
  95624. scaleX: e,
  95625. scaleY: n,
  95626. makeAbsolute: r
  95627. };
  95628. }
  95629. writeMeasure(t) {
  95630. var e;
  95631. if (t.makeAbsolute) {
  95632. this.madeAbsolute = !0, this.position = "absolute";
  95633. for (let s of this.manager.tooltipViews)
  95634. s.dom.style.position = "absolute";
  95635. }
  95636. let { editor: n, space: r, scaleX: i, scaleY: a } = t, o = [];
  95637. for (let s = 0; s < this.manager.tooltips.length; s++) {
  95638. let l = this.manager.tooltips[s], u = this.manager.tooltipViews[s], { dom: c } = u, f = t.pos[s], d = t.size[s];
  95639. 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) {
  95640. c.style.top = Rv;
  95641. continue;
  95642. }
  95643. let h = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, p = h ? 7 : 0, v = d.right - d.left, g = (e = mG.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, m = u.offset || Zst, y = this.view.textDirection == pn.LTR, b = 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), _ = this.above[s];
  95644. !l.strictSide && (_ ? f.top - (d.bottom - d.top) - m.y < r.top : f.bottom + (d.bottom - d.top) + m.y > r.bottom) && _ == r.bottom - f.bottom > f.top - r.top && (_ = this.above[s] = !_);
  95645. let O = (_ ? f.top - r.top : r.bottom - f.bottom) - p;
  95646. if (O < g && u.resize !== !1) {
  95647. if (O < this.view.defaultLineHeight) {
  95648. c.style.top = Rv;
  95649. continue;
  95650. }
  95651. mG.set(u, g), c.style.height = (g = O) / a + "px";
  95652. } else c.style.height && (c.style.height = "");
  95653. let S = _ ? f.top - g - p - m.y : f.bottom + p + m.y, x = b + v;
  95654. if (u.overlap !== !0)
  95655. for (let C of o)
  95656. C.left < x && C.right > b && C.top < S + g && C.bottom > S && (S = _ ? C.top - g - 2 - p : C.bottom + p + 2);
  95657. if (this.position == "absolute" ? (c.style.top = (S - t.parent.top) / a + "px", c.style.left = (b - t.parent.left) / i + "px") : (c.style.top = S / a + "px", c.style.left = b / i + "px"), h) {
  95658. let C = f.left + (y ? m.x : -m.x) - (b + 14 - 7);
  95659. h.style.left = C / i + "px";
  95660. }
  95661. u.overlap !== !0 && o.push({ left: b, top: S, right: x, bottom: S + g }), c.classList.toggle("cm-tooltip-above", _), c.classList.toggle("cm-tooltip-below", !_), u.positioned && u.positioned(t.space);
  95662. }
  95663. }
  95664. maybeMeasure() {
  95665. 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)))
  95666. for (let t of this.manager.tooltipViews)
  95667. t.dom.style.top = Rv;
  95668. }
  95669. }, {
  95670. eventObservers: {
  95671. scroll() {
  95672. this.maybeMeasure();
  95673. }
  95674. }
  95675. }), jst = /* @__PURE__ */ De.baseTheme({
  95676. ".cm-tooltip": {
  95677. zIndex: 100,
  95678. boxSizing: "border-box"
  95679. },
  95680. "&light .cm-tooltip": {
  95681. border: "1px solid #bbb",
  95682. backgroundColor: "#f5f5f5"
  95683. },
  95684. "&light .cm-tooltip-section:not(:first-child)": {
  95685. borderTop: "1px solid #bbb"
  95686. },
  95687. "&dark .cm-tooltip": {
  95688. backgroundColor: "#333338",
  95689. color: "white"
  95690. },
  95691. ".cm-tooltip-arrow": {
  95692. height: "7px",
  95693. width: `${7 * 2}px`,
  95694. position: "absolute",
  95695. zIndex: -1,
  95696. overflow: "hidden",
  95697. "&:before, &:after": {
  95698. content: "''",
  95699. position: "absolute",
  95700. width: 0,
  95701. height: 0,
  95702. borderLeft: "7px solid transparent",
  95703. borderRight: "7px solid transparent"
  95704. },
  95705. ".cm-tooltip-above &": {
  95706. bottom: "-7px",
  95707. "&:before": {
  95708. borderTop: "7px solid #bbb"
  95709. },
  95710. "&:after": {
  95711. borderTop: "7px solid #f5f5f5",
  95712. bottom: "1px"
  95713. }
  95714. },
  95715. ".cm-tooltip-below &": {
  95716. top: "-7px",
  95717. "&:before": {
  95718. borderBottom: "7px solid #bbb"
  95719. },
  95720. "&:after": {
  95721. borderBottom: "7px solid #f5f5f5",
  95722. top: "1px"
  95723. }
  95724. }
  95725. },
  95726. "&dark .cm-tooltip .cm-tooltip-arrow": {
  95727. "&:before": {
  95728. borderTopColor: "#333338",
  95729. borderBottomColor: "#333338"
  95730. },
  95731. "&:after": {
  95732. borderTopColor: "transparent",
  95733. borderBottomColor: "transparent"
  95734. }
  95735. }
  95736. }), Zst = { x: 0, y: 0 }, c4 = /* @__PURE__ */ Be.define({
  95737. enables: [u4, jst]
  95738. }), lS = /* @__PURE__ */ Be.define({
  95739. combine: (t) => t.reduce((e, n) => e.concat(n), [])
  95740. });
  95741. class kw {
  95742. // Needs to be static so that host tooltip instances always match
  95743. static create(e) {
  95744. return new kw(e);
  95745. }
  95746. constructor(e) {
  95747. this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new woe(e, lS, (n, r) => this.createHostedView(n, r), (n) => n.dom.remove());
  95748. }
  95749. createHostedView(e, n) {
  95750. let r = e.create(this.view);
  95751. 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;
  95752. }
  95753. mount(e) {
  95754. for (let n of this.manager.tooltipViews)
  95755. n.mount && n.mount(e);
  95756. this.mounted = !0;
  95757. }
  95758. positioned(e) {
  95759. for (let n of this.manager.tooltipViews)
  95760. n.positioned && n.positioned(e);
  95761. }
  95762. update(e) {
  95763. this.manager.update(e);
  95764. }
  95765. destroy() {
  95766. var e;
  95767. for (let n of this.manager.tooltipViews)
  95768. (e = n.destroy) === null || e === void 0 || e.call(n);
  95769. }
  95770. passProp(e) {
  95771. let n;
  95772. for (let r of this.manager.tooltipViews) {
  95773. let i = r[e];
  95774. if (i !== void 0) {
  95775. if (n === void 0)
  95776. n = i;
  95777. else if (n !== i)
  95778. return;
  95779. }
  95780. }
  95781. return n;
  95782. }
  95783. get offset() {
  95784. return this.passProp("offset");
  95785. }
  95786. get getCoords() {
  95787. return this.passProp("getCoords");
  95788. }
  95789. get overlap() {
  95790. return this.passProp("overlap");
  95791. }
  95792. get resize() {
  95793. return this.passProp("resize");
  95794. }
  95795. }
  95796. const Ust = /* @__PURE__ */ c4.compute([lS], (t) => {
  95797. let e = t.facet(lS);
  95798. return e.length === 0 ? null : {
  95799. pos: Math.min(...e.map((n) => n.pos)),
  95800. end: Math.max(...e.map((n) => {
  95801. var r;
  95802. return (r = n.end) !== null && r !== void 0 ? r : n.pos;
  95803. })),
  95804. create: kw.create,
  95805. above: e[0].above,
  95806. arrow: e.some((n) => n.arrow)
  95807. };
  95808. });
  95809. class Xst {
  95810. constructor(e, n, r, i, a) {
  95811. 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));
  95812. }
  95813. update() {
  95814. this.pending && (this.pending = null, clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(() => this.startHover(), 20));
  95815. }
  95816. get active() {
  95817. return this.view.state.field(this.field);
  95818. }
  95819. checkHover() {
  95820. if (this.hoverTimeout = -1, this.active.length)
  95821. return;
  95822. let e = Date.now() - this.lastMove.time;
  95823. e < this.hoverTime ? this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e) : this.startHover();
  95824. }
  95825. startHover() {
  95826. clearTimeout(this.restartTimeout);
  95827. let { view: e, lastMove: n } = this, r = e.docView.nearest(n.target);
  95828. if (!r)
  95829. return;
  95830. let i, a = 1;
  95831. if (r instanceof Ql)
  95832. i = r.posAtStart;
  95833. else {
  95834. if (i = e.posAtCoords(n), i == null)
  95835. return;
  95836. let s = e.coordsAtPos(i);
  95837. if (!s || n.y < s.top || n.y > s.bottom || n.x < s.left - e.defaultCharacterWidth || n.x > s.right + e.defaultCharacterWidth)
  95838. return;
  95839. let l = e.bidiSpans(e.state.doc.lineAt(i)).find((c) => c.from <= i && c.to >= i), u = l && l.dir == pn.RTL ? -1 : 1;
  95840. a = n.x < s.left ? -u : u;
  95841. }
  95842. let o = this.source(e, i, a);
  95843. if (o != null && o.then) {
  95844. let s = this.pending = { pos: i };
  95845. o.then((l) => {
  95846. this.pending == s && (this.pending = null, l && !(Array.isArray(l) && !l.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(l) ? l : [l]) }));
  95847. }, (l) => bi(e.state, l, "hover tooltip"));
  95848. } else o && !(Array.isArray(o) && !o.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(o) ? o : [o]) });
  95849. }
  95850. get tooltip() {
  95851. let e = this.view.plugin(u4), n = e ? e.manager.tooltips.findIndex((r) => r.create == kw.create) : -1;
  95852. return n > -1 ? e.manager.tooltipViews[n] : null;
  95853. }
  95854. mousemove(e) {
  95855. var n, r;
  95856. this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime));
  95857. let { active: i, tooltip: a } = this;
  95858. if (i.length && a && !Yst(a.dom, e) || this.pending) {
  95859. 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;
  95860. (o == s ? this.view.posAtCoords(this.lastMove) != o : !qst(this.view, o, s, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), this.pending = null);
  95861. }
  95862. }
  95863. mouseleave(e) {
  95864. clearTimeout(this.hoverTimeout), this.hoverTimeout = -1;
  95865. let { active: n } = this;
  95866. if (n.length) {
  95867. let { tooltip: r } = this;
  95868. r && r.dom.contains(e.relatedTarget) ? this.watchTooltipLeave(r.dom) : this.view.dispatch({ effects: this.setHover.of([]) });
  95869. }
  95870. }
  95871. watchTooltipLeave(e) {
  95872. let n = (r) => {
  95873. e.removeEventListener("mouseleave", n), this.active.length && !this.view.dom.contains(r.relatedTarget) && this.view.dispatch({ effects: this.setHover.of([]) });
  95874. };
  95875. e.addEventListener("mouseleave", n);
  95876. }
  95877. destroy() {
  95878. clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove);
  95879. }
  95880. }
  95881. const t_ = 4;
  95882. function Yst(t, e) {
  95883. let n = t.getBoundingClientRect();
  95884. return e.clientX >= n.left - t_ && e.clientX <= n.right + t_ && e.clientY >= n.top - t_ && e.clientY <= n.bottom + t_;
  95885. }
  95886. function qst(t, e, n, r, i, a) {
  95887. let o = t.scrollDOM.getBoundingClientRect(), s = t.documentTop + t.documentPadding.top + t.contentHeight;
  95888. if (o.left > r || o.right < r || o.top > i || Math.min(o.bottom, s) < i)
  95889. return !1;
  95890. let l = t.posAtCoords({ x: r, y: i }, !1);
  95891. return l >= e && l <= n;
  95892. }
  95893. function Kst(t, e = {}) {
  95894. let n = dt.define(), r = ur.define({
  95895. create() {
  95896. return [];
  95897. },
  95898. update(i, a) {
  95899. if (i.length && (e.hideOnChange && (a.docChanged || a.selection) ? i = [] : e.hideOn && (i = i.filter((o) => !e.hideOn(a, o))), a.docChanged)) {
  95900. let o = [];
  95901. for (let s of i) {
  95902. let l = a.changes.mapPos(s.pos, -1, yr.TrackDel);
  95903. if (l != null) {
  95904. let u = Object.assign(/* @__PURE__ */ Object.create(null), s);
  95905. u.pos = l, u.end != null && (u.end = a.changes.mapPos(u.end)), o.push(u);
  95906. }
  95907. }
  95908. i = o;
  95909. }
  95910. for (let o of a.effects)
  95911. o.is(n) && (i = o.value), o.is(Jst) && (i = []);
  95912. return i;
  95913. },
  95914. provide: (i) => lS.from(i)
  95915. });
  95916. return [
  95917. r,
  95918. kn.define((i) => new Xst(
  95919. i,
  95920. t,
  95921. r,
  95922. n,
  95923. e.hoverTime || 300
  95924. /* Hover.Time */
  95925. )),
  95926. Ust
  95927. ];
  95928. }
  95929. function Coe(t, e) {
  95930. let n = t.plugin(u4);
  95931. if (!n)
  95932. return null;
  95933. let r = n.manager.tooltips.indexOf(e);
  95934. return r < 0 ? null : n.manager.tooltipViews[r];
  95935. }
  95936. const Jst = /* @__PURE__ */ dt.define(), yG = /* @__PURE__ */ Be.define({
  95937. combine(t) {
  95938. let e, n;
  95939. for (let r of t)
  95940. e = e || r.topContainer, n = n || r.bottomContainer;
  95941. return { topContainer: e, bottomContainer: n };
  95942. }
  95943. });
  95944. function e0(t, e) {
  95945. let n = t.plugin(Toe), r = n ? n.specs.indexOf(e) : -1;
  95946. return r > -1 ? n.panels[r] : null;
  95947. }
  95948. const Toe = /* @__PURE__ */ kn.fromClass(class {
  95949. constructor(t) {
  95950. this.input = t.state.facet(t0), this.specs = this.input.filter((n) => n), this.panels = this.specs.map((n) => n(t));
  95951. let e = t.state.facet(yG);
  95952. this.top = new n_(t, !0, e.topContainer), this.bottom = new n_(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((n) => n.top)), this.bottom.sync(this.panels.filter((n) => !n.top));
  95953. for (let n of this.panels)
  95954. n.dom.classList.add("cm-panel"), n.mount && n.mount();
  95955. }
  95956. update(t) {
  95957. let e = t.state.facet(yG);
  95958. this.top.container != e.topContainer && (this.top.sync([]), this.top = new n_(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new n_(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses();
  95959. let n = t.state.facet(t0);
  95960. if (n != this.input) {
  95961. let r = n.filter((l) => l), i = [], a = [], o = [], s = [];
  95962. for (let l of r) {
  95963. let u = this.specs.indexOf(l), c;
  95964. 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);
  95965. }
  95966. this.specs = r, this.panels = i, this.top.sync(a), this.bottom.sync(o);
  95967. for (let l of s)
  95968. l.dom.classList.add("cm-panel"), l.mount && l.mount();
  95969. } else
  95970. for (let r of this.panels)
  95971. r.update && r.update(t);
  95972. }
  95973. destroy() {
  95974. this.top.sync([]), this.bottom.sync([]);
  95975. }
  95976. }, {
  95977. provide: (t) => De.scrollMargins.of((e) => {
  95978. let n = e.plugin(t);
  95979. return n && { top: n.top.scrollMargin(), bottom: n.bottom.scrollMargin() };
  95980. })
  95981. });
  95982. class n_ {
  95983. constructor(e, n, r) {
  95984. this.view = e, this.top = n, this.container = r, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses();
  95985. }
  95986. sync(e) {
  95987. for (let n of this.panels)
  95988. n.destroy && e.indexOf(n) < 0 && n.destroy();
  95989. this.panels = e, this.syncDOM();
  95990. }
  95991. syncDOM() {
  95992. if (this.panels.length == 0) {
  95993. this.dom && (this.dom.remove(), this.dom = void 0);
  95994. return;
  95995. }
  95996. if (!this.dom) {
  95997. 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";
  95998. let n = this.container || this.view.dom;
  95999. n.insertBefore(this.dom, this.top ? n.firstChild : null);
  96000. }
  96001. let e = this.dom.firstChild;
  96002. for (let n of this.panels)
  96003. if (n.dom.parentNode == this.dom) {
  96004. for (; e != n.dom; )
  96005. e = bG(e);
  96006. e = e.nextSibling;
  96007. } else
  96008. this.dom.insertBefore(n.dom, e);
  96009. for (; e; )
  96010. e = bG(e);
  96011. }
  96012. scrollMargin() {
  96013. 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);
  96014. }
  96015. syncClasses() {
  96016. if (!(!this.container || this.classes == this.view.themeClasses)) {
  96017. for (let e of this.classes.split(" "))
  96018. e && this.container.classList.remove(e);
  96019. for (let e of (this.classes = this.view.themeClasses).split(" "))
  96020. e && this.container.classList.add(e);
  96021. }
  96022. }
  96023. }
  96024. function bG(t) {
  96025. let e = t.nextSibling;
  96026. return t.remove(), e;
  96027. }
  96028. const t0 = /* @__PURE__ */ Be.define({
  96029. enables: Toe
  96030. });
  96031. class nl extends Cf {
  96032. /**
  96033. @internal
  96034. */
  96035. compare(e) {
  96036. return this == e || this.constructor == e.constructor && this.eq(e);
  96037. }
  96038. /**
  96039. Compare this marker to another marker of the same type.
  96040. */
  96041. eq(e) {
  96042. return !1;
  96043. }
  96044. /**
  96045. Called if the marker has a `toDOM` method and its representation
  96046. was removed from a gutter.
  96047. */
  96048. destroy(e) {
  96049. }
  96050. }
  96051. nl.prototype.elementClass = "";
  96052. nl.prototype.toDOM = void 0;
  96053. nl.prototype.mapMode = yr.TrackBefore;
  96054. nl.prototype.startSide = nl.prototype.endSide = -1;
  96055. nl.prototype.point = !0;
  96056. const c1 = /* @__PURE__ */ Be.define(), elt = {
  96057. class: "",
  96058. renderEmptyElements: !1,
  96059. elementStyle: "",
  96060. markers: () => Vt.empty,
  96061. lineMarker: () => null,
  96062. widgetMarker: () => null,
  96063. lineMarkerChange: null,
  96064. initialSpacer: null,
  96065. updateSpacer: null,
  96066. domEventHandlers: {}
  96067. }, Xg = /* @__PURE__ */ Be.define();
  96068. function tlt(t) {
  96069. return [Poe(), Xg.of(Object.assign(Object.assign({}, elt), t))];
  96070. }
  96071. const _G = /* @__PURE__ */ Be.define({
  96072. combine: (t) => t.some((e) => e)
  96073. });
  96074. function Poe(t) {
  96075. return [
  96076. nlt
  96077. ];
  96078. }
  96079. const nlt = /* @__PURE__ */ kn.fromClass(class {
  96080. constructor(t) {
  96081. 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(Xg).map((e) => new SG(t, e));
  96082. for (let e of this.gutters)
  96083. this.dom.appendChild(e.dom);
  96084. this.fixed = !t.state.facet(_G), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM);
  96085. }
  96086. update(t) {
  96087. if (this.updateGutters(t)) {
  96088. let e = this.prevViewport, n = t.view.viewport, r = Math.min(e.to, n.to) - Math.max(e.from, n.from);
  96089. this.syncGutters(r < (n.to - n.from) * 0.8);
  96090. }
  96091. t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(_G) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport;
  96092. }
  96093. syncGutters(t) {
  96094. let e = this.dom.nextSibling;
  96095. t && this.dom.remove();
  96096. let n = Vt.iter(this.view.state.facet(c1), this.view.viewport.from), r = [], i = this.gutters.map((a) => new rlt(a, this.view.viewport, -this.view.documentPadding.top));
  96097. for (let a of this.view.viewportLineBlocks)
  96098. if (r.length && (r = []), Array.isArray(a.type)) {
  96099. let o = !0;
  96100. for (let s of a.type)
  96101. if (s.type == ei.Text && o) {
  96102. NM(n, r, s.from);
  96103. for (let l of i)
  96104. l.line(this.view, s, r);
  96105. o = !1;
  96106. } else if (s.widget)
  96107. for (let l of i)
  96108. l.widget(this.view, s);
  96109. } else if (a.type == ei.Text) {
  96110. NM(n, r, a.from);
  96111. for (let o of i)
  96112. o.line(this.view, a, r);
  96113. } else if (a.widget)
  96114. for (let o of i)
  96115. o.widget(this.view, a);
  96116. for (let a of i)
  96117. a.finish();
  96118. t && this.view.scrollDOM.insertBefore(this.dom, e);
  96119. }
  96120. updateGutters(t) {
  96121. let e = t.startState.facet(Xg), n = t.state.facet(Xg), r = t.docChanged || t.heightChanged || t.viewportChanged || !Vt.eq(t.startState.facet(c1), t.state.facet(c1), t.view.viewport.from, t.view.viewport.to);
  96122. if (e == n)
  96123. for (let i of this.gutters)
  96124. i.update(t) && (r = !0);
  96125. else {
  96126. r = !0;
  96127. let i = [];
  96128. for (let a of n) {
  96129. let o = e.indexOf(a);
  96130. o < 0 ? i.push(new SG(this.view, a)) : (this.gutters[o].update(t), i.push(this.gutters[o]));
  96131. }
  96132. for (let a of this.gutters)
  96133. a.dom.remove(), i.indexOf(a) < 0 && a.destroy();
  96134. for (let a of i)
  96135. this.dom.appendChild(a.dom);
  96136. this.gutters = i;
  96137. }
  96138. return r;
  96139. }
  96140. destroy() {
  96141. for (let t of this.gutters)
  96142. t.destroy();
  96143. this.dom.remove();
  96144. }
  96145. }, {
  96146. provide: (t) => De.scrollMargins.of((e) => {
  96147. let n = e.plugin(t);
  96148. return !n || n.gutters.length == 0 || !n.fixed ? null : e.textDirection == pn.LTR ? { left: n.dom.offsetWidth * e.scaleX } : { right: n.dom.offsetWidth * e.scaleX };
  96149. })
  96150. });
  96151. function OG(t) {
  96152. return Array.isArray(t) ? t : [t];
  96153. }
  96154. function NM(t, e, n) {
  96155. for (; t.value && t.from <= n; )
  96156. t.from == n && e.push(t.value), t.next();
  96157. }
  96158. class rlt {
  96159. constructor(e, n, r) {
  96160. this.gutter = e, this.height = r, this.i = 0, this.cursor = Vt.iter(e.markers, n.from);
  96161. }
  96162. addElement(e, n, r) {
  96163. let { gutter: i } = this, a = (n.top - this.height) / e.scaleY, o = n.height / e.scaleY;
  96164. if (this.i == i.elements.length) {
  96165. let s = new $oe(e, o, a, r);
  96166. i.elements.push(s), i.dom.appendChild(s.dom);
  96167. } else
  96168. i.elements[this.i].update(e, o, a, r);
  96169. this.height = n.bottom, this.i++;
  96170. }
  96171. line(e, n, r) {
  96172. let i = [];
  96173. NM(this.cursor, i, n.from), r.length && (i = i.concat(r));
  96174. let a = this.gutter.config.lineMarker(e, n, i);
  96175. a && i.unshift(a);
  96176. let o = this.gutter;
  96177. i.length == 0 && !o.config.renderEmptyElements || this.addElement(e, n, i);
  96178. }
  96179. widget(e, n) {
  96180. let r = this.gutter.config.widgetMarker(e, n.widget, n);
  96181. r && this.addElement(e, n, [r]);
  96182. }
  96183. finish() {
  96184. let e = this.gutter;
  96185. for (; e.elements.length > this.i; ) {
  96186. let n = e.elements.pop();
  96187. e.dom.removeChild(n.dom), n.destroy();
  96188. }
  96189. }
  96190. }
  96191. class SG {
  96192. constructor(e, n) {
  96193. 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 : "");
  96194. for (let r in n.domEventHandlers)
  96195. this.dom.addEventListener(r, (i) => {
  96196. let a = i.target, o;
  96197. if (a != this.dom && this.dom.contains(a)) {
  96198. for (; a.parentNode != this.dom; )
  96199. a = a.parentNode;
  96200. let l = a.getBoundingClientRect();
  96201. o = (l.top + l.bottom) / 2;
  96202. } else
  96203. o = i.clientY;
  96204. let s = e.lineBlockAtHeight(o - e.documentTop);
  96205. n.domEventHandlers[r](e, s, i) && i.preventDefault();
  96206. });
  96207. this.markers = OG(n.markers(e)), n.initialSpacer && (this.spacer = new $oe(e, 0, 0, [n.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
  96208. }
  96209. update(e) {
  96210. let n = this.markers;
  96211. if (this.markers = OG(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) {
  96212. let i = this.config.updateSpacer(this.spacer.markers[0], e);
  96213. i != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [i]);
  96214. }
  96215. let r = e.view.viewport;
  96216. return !Vt.eq(this.markers, n, r.from, r.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1);
  96217. }
  96218. destroy() {
  96219. for (let e of this.elements)
  96220. e.destroy();
  96221. }
  96222. }
  96223. class $oe {
  96224. constructor(e, n, r, i) {
  96225. this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, n, r, i);
  96226. }
  96227. update(e, n, r, i) {
  96228. this.height != n && (this.height = n, this.dom.style.height = n + "px"), this.above != r && (this.dom.style.marginTop = (this.above = r) ? r + "px" : ""), ilt(this.markers, i) || this.setMarkers(e, i);
  96229. }
  96230. setMarkers(e, n) {
  96231. let r = "cm-gutterElement", i = this.dom.firstChild;
  96232. for (let a = 0, o = 0; ; ) {
  96233. let s = o, l = a < n.length ? n[a++] : null, u = !1;
  96234. if (l) {
  96235. let c = l.elementClass;
  96236. c && (r += " " + c);
  96237. for (let f = o; f < this.markers.length; f++)
  96238. if (this.markers[f].compare(l)) {
  96239. s = f, u = !0;
  96240. break;
  96241. }
  96242. } else
  96243. s = this.markers.length;
  96244. for (; o < s; ) {
  96245. let c = this.markers[o++];
  96246. if (c.toDOM) {
  96247. c.destroy(i);
  96248. let f = i.nextSibling;
  96249. i.remove(), i = f;
  96250. }
  96251. }
  96252. if (!l)
  96253. break;
  96254. l.toDOM && (u ? i = i.nextSibling : this.dom.insertBefore(l.toDOM(e), i)), u && o++;
  96255. }
  96256. this.dom.className = r, this.markers = n;
  96257. }
  96258. destroy() {
  96259. this.setMarkers(null, []);
  96260. }
  96261. }
  96262. function ilt(t, e) {
  96263. if (t.length != e.length)
  96264. return !1;
  96265. for (let n = 0; n < t.length; n++)
  96266. if (!t[n].compare(e[n]))
  96267. return !1;
  96268. return !0;
  96269. }
  96270. const alt = /* @__PURE__ */ Be.define(), Hd = /* @__PURE__ */ Be.define({
  96271. combine(t) {
  96272. return ds(t, { formatNumber: String, domEventHandlers: {} }, {
  96273. domEventHandlers(e, n) {
  96274. let r = Object.assign({}, e);
  96275. for (let i in n) {
  96276. let a = r[i], o = n[i];
  96277. r[i] = a ? (s, l, u) => a(s, l, u) || o(s, l, u) : o;
  96278. }
  96279. return r;
  96280. }
  96281. });
  96282. }
  96283. });
  96284. class w$ extends nl {
  96285. constructor(e) {
  96286. super(), this.number = e;
  96287. }
  96288. eq(e) {
  96289. return this.number == e.number;
  96290. }
  96291. toDOM() {
  96292. return document.createTextNode(this.number);
  96293. }
  96294. }
  96295. function C$(t, e) {
  96296. return t.state.facet(Hd).formatNumber(e, t.state);
  96297. }
  96298. const olt = /* @__PURE__ */ Xg.compute([Hd], (t) => ({
  96299. class: "cm-lineNumbers",
  96300. renderEmptyElements: !1,
  96301. markers(e) {
  96302. return e.state.facet(alt);
  96303. },
  96304. lineMarker(e, n, r) {
  96305. return r.some((i) => i.toDOM) ? null : new w$(C$(e, e.state.doc.lineAt(n.from).number));
  96306. },
  96307. widgetMarker: () => null,
  96308. lineMarkerChange: (e) => e.startState.facet(Hd) != e.state.facet(Hd),
  96309. initialSpacer(e) {
  96310. return new w$(C$(e, xG(e.state.doc.lines)));
  96311. },
  96312. updateSpacer(e, n) {
  96313. let r = C$(n.view, xG(n.view.state.doc.lines));
  96314. return r == e.number ? e : new w$(r);
  96315. },
  96316. domEventHandlers: t.facet(Hd).domEventHandlers
  96317. }));
  96318. function slt(t = {}) {
  96319. return [
  96320. Hd.of(t),
  96321. Poe(),
  96322. olt
  96323. ];
  96324. }
  96325. function xG(t) {
  96326. let e = 9;
  96327. for (; e < t; )
  96328. e = e * 10 + 9;
  96329. return e;
  96330. }
  96331. const llt = /* @__PURE__ */ new class extends nl {
  96332. constructor() {
  96333. super(...arguments), this.elementClass = "cm-activeLineGutter";
  96334. }
  96335. }(), ult = /* @__PURE__ */ c1.compute(["selection"], (t) => {
  96336. let e = [], n = -1;
  96337. for (let r of t.selection.ranges) {
  96338. let i = t.doc.lineAt(r.head).from;
  96339. i > n && (n = i, e.push(llt.range(i)));
  96340. }
  96341. return Vt.of(e);
  96342. });
  96343. function clt() {
  96344. return ult;
  96345. }
  96346. const Aoe = 1024;
  96347. let flt = 0;
  96348. class T$ {
  96349. constructor(e, n) {
  96350. this.from = e, this.to = n;
  96351. }
  96352. }
  96353. class Pt {
  96354. /**
  96355. Create a new node prop type.
  96356. */
  96357. constructor(e = {}) {
  96358. this.id = flt++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
  96359. throw new Error("This node type doesn't define a deserialize function");
  96360. });
  96361. }
  96362. /**
  96363. This is meant to be used with
  96364. [`NodeSet.extend`](#common.NodeSet.extend) or
  96365. [`LRParser.configure`](#lr.ParserConfig.props) to compute
  96366. prop values for each node type in the set. Takes a [match
  96367. object](#common.NodeType^match) or function that returns undefined
  96368. if the node type doesn't get this prop, and the prop's value if
  96369. it does.
  96370. */
  96371. add(e) {
  96372. if (this.perNode)
  96373. throw new RangeError("Can't add per-node props to node types");
  96374. return typeof e != "function" && (e = Pi.match(e)), (n) => {
  96375. let r = e(n);
  96376. return r === void 0 ? null : [this, r];
  96377. };
  96378. }
  96379. }
  96380. Pt.closedBy = new Pt({ deserialize: (t) => t.split(" ") });
  96381. Pt.openedBy = new Pt({ deserialize: (t) => t.split(" ") });
  96382. Pt.group = new Pt({ deserialize: (t) => t.split(" ") });
  96383. Pt.isolate = new Pt({ deserialize: (t) => {
  96384. if (t && t != "rtl" && t != "ltr" && t != "auto")
  96385. throw new RangeError("Invalid value for isolate: " + t);
  96386. return t || "auto";
  96387. } });
  96388. Pt.contextHash = new Pt({ perNode: !0 });
  96389. Pt.lookAhead = new Pt({ perNode: !0 });
  96390. Pt.mounted = new Pt({ perNode: !0 });
  96391. class uS {
  96392. constructor(e, n, r) {
  96393. this.tree = e, this.overlay = n, this.parser = r;
  96394. }
  96395. /**
  96396. @internal
  96397. */
  96398. static get(e) {
  96399. return e && e.props && e.props[Pt.mounted.id];
  96400. }
  96401. }
  96402. const dlt = /* @__PURE__ */ Object.create(null);
  96403. class Pi {
  96404. /**
  96405. @internal
  96406. */
  96407. constructor(e, n, r, i = 0) {
  96408. this.name = e, this.props = n, this.id = r, this.flags = i;
  96409. }
  96410. /**
  96411. Define a node type.
  96412. */
  96413. static define(e) {
  96414. let n = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : dlt, r = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Pi(e.name || "", n, e.id, r);
  96415. if (e.props) {
  96416. for (let a of e.props)
  96417. if (Array.isArray(a) || (a = a(i)), a) {
  96418. if (a[0].perNode)
  96419. throw new RangeError("Can't store a per-node prop on a node type");
  96420. n[a[0].id] = a[1];
  96421. }
  96422. }
  96423. return i;
  96424. }
  96425. /**
  96426. Retrieves a node prop for this type. Will return `undefined` if
  96427. the prop isn't present on this node.
  96428. */
  96429. prop(e) {
  96430. return this.props[e.id];
  96431. }
  96432. /**
  96433. True when this is the top node of a grammar.
  96434. */
  96435. get isTop() {
  96436. return (this.flags & 1) > 0;
  96437. }
  96438. /**
  96439. True when this node is produced by a skip rule.
  96440. */
  96441. get isSkipped() {
  96442. return (this.flags & 2) > 0;
  96443. }
  96444. /**
  96445. Indicates whether this is an error node.
  96446. */
  96447. get isError() {
  96448. return (this.flags & 4) > 0;
  96449. }
  96450. /**
  96451. When true, this node type doesn't correspond to a user-declared
  96452. named node, for example because it is used to cache repetition.
  96453. */
  96454. get isAnonymous() {
  96455. return (this.flags & 8) > 0;
  96456. }
  96457. /**
  96458. Returns true when this node's name or one of its
  96459. [groups](#common.NodeProp^group) matches the given string.
  96460. */
  96461. is(e) {
  96462. if (typeof e == "string") {
  96463. if (this.name == e)
  96464. return !0;
  96465. let n = this.prop(Pt.group);
  96466. return n ? n.indexOf(e) > -1 : !1;
  96467. }
  96468. return this.id == e;
  96469. }
  96470. /**
  96471. Create a function from node types to arbitrary values by
  96472. specifying an object whose property names are node or
  96473. [group](#common.NodeProp^group) names. Often useful with
  96474. [`NodeProp.add`](#common.NodeProp.add). You can put multiple
  96475. names, separated by spaces, in a single property name to map
  96476. multiple node names to a single value.
  96477. */
  96478. static match(e) {
  96479. let n = /* @__PURE__ */ Object.create(null);
  96480. for (let r in e)
  96481. for (let i of r.split(" "))
  96482. n[i] = e[r];
  96483. return (r) => {
  96484. for (let i = r.prop(Pt.group), a = -1; a < (i ? i.length : 0); a++) {
  96485. let o = n[a < 0 ? r.name : i[a]];
  96486. if (o)
  96487. return o;
  96488. }
  96489. };
  96490. }
  96491. }
  96492. Pi.none = new Pi(
  96493. "",
  96494. /* @__PURE__ */ Object.create(null),
  96495. 0,
  96496. 8
  96497. /* NodeFlag.Anonymous */
  96498. );
  96499. class f4 {
  96500. /**
  96501. Create a set with the given types. The `id` property of each
  96502. type should correspond to its position within the array.
  96503. */
  96504. constructor(e) {
  96505. this.types = e;
  96506. for (let n = 0; n < e.length; n++)
  96507. if (e[n].id != n)
  96508. throw new RangeError("Node type ids should correspond to array positions when creating a node set");
  96509. }
  96510. /**
  96511. Create a copy of this set with some node properties added. The
  96512. arguments to this method can be created with
  96513. [`NodeProp.add`](#common.NodeProp.add).
  96514. */
  96515. extend(...e) {
  96516. let n = [];
  96517. for (let r of this.types) {
  96518. let i = null;
  96519. for (let a of e) {
  96520. let o = a(r);
  96521. o && (i || (i = Object.assign({}, r.props)), i[o[0].id] = o[1]);
  96522. }
  96523. n.push(i ? new Pi(r.name, i, r.id, r.flags) : r);
  96524. }
  96525. return new f4(n);
  96526. }
  96527. }
  96528. const r_ = /* @__PURE__ */ new WeakMap(), wG = /* @__PURE__ */ new WeakMap();
  96529. var Zn;
  96530. (function(t) {
  96531. t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays";
  96532. })(Zn || (Zn = {}));
  96533. class Wn {
  96534. /**
  96535. Construct a new tree. See also [`Tree.build`](#common.Tree^build).
  96536. */
  96537. constructor(e, n, r, i, a) {
  96538. if (this.type = e, this.children = n, this.positions = r, this.length = i, this.props = null, a && a.length) {
  96539. this.props = /* @__PURE__ */ Object.create(null);
  96540. for (let [o, s] of a)
  96541. this.props[typeof o == "number" ? o : o.id] = s;
  96542. }
  96543. }
  96544. /**
  96545. @internal
  96546. */
  96547. toString() {
  96548. let e = uS.get(this);
  96549. if (e && !e.overlay)
  96550. return e.tree.toString();
  96551. let n = "";
  96552. for (let r of this.children) {
  96553. let i = r.toString();
  96554. i && (n && (n += ","), n += i);
  96555. }
  96556. return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n.length ? "(" + n + ")" : "") : n;
  96557. }
  96558. /**
  96559. Get a [tree cursor](#common.TreeCursor) positioned at the top of
  96560. the tree. Mode can be used to [control](#common.IterMode) which
  96561. nodes the cursor visits.
  96562. */
  96563. cursor(e = 0) {
  96564. return new zM(this.topNode, e);
  96565. }
  96566. /**
  96567. Get a [tree cursor](#common.TreeCursor) pointing into this tree
  96568. at the given position and side (see
  96569. [`moveTo`](#common.TreeCursor.moveTo).
  96570. */
  96571. cursorAt(e, n = 0, r = 0) {
  96572. let i = r_.get(this) || this.topNode, a = new zM(i);
  96573. return a.moveTo(e, n), r_.set(this, a._tree), a;
  96574. }
  96575. /**
  96576. Get a [syntax node](#common.SyntaxNode) object for the top of the
  96577. tree.
  96578. */
  96579. get topNode() {
  96580. return new Ci(this, 0, 0, null);
  96581. }
  96582. /**
  96583. Get the [syntax node](#common.SyntaxNode) at the given position.
  96584. If `side` is -1, this will move into nodes that end at the
  96585. position. If 1, it'll move into nodes that start at the
  96586. position. With 0, it'll only enter nodes that cover the position
  96587. from both sides.
  96588. Note that this will not enter
  96589. [overlays](#common.MountedTree.overlay), and you often want
  96590. [`resolveInner`](#common.Tree.resolveInner) instead.
  96591. */
  96592. resolve(e, n = 0) {
  96593. let r = n0(r_.get(this) || this.topNode, e, n, !1);
  96594. return r_.set(this, r), r;
  96595. }
  96596. /**
  96597. Like [`resolve`](#common.Tree.resolve), but will enter
  96598. [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
  96599. pointing into the innermost overlaid tree at the given position
  96600. (with parent links going through all parent structure, including
  96601. the host trees).
  96602. */
  96603. resolveInner(e, n = 0) {
  96604. let r = n0(wG.get(this) || this.topNode, e, n, !0);
  96605. return wG.set(this, r), r;
  96606. }
  96607. /**
  96608. In some situations, it can be useful to iterate through all
  96609. nodes around a position, including those in overlays that don't
  96610. directly cover the position. This method gives you an iterator
  96611. that will produce all nodes, from small to big, around the given
  96612. position.
  96613. */
  96614. resolveStack(e, n = 0) {
  96615. return vlt(this, e, n);
  96616. }
  96617. /**
  96618. Iterate over the tree and its children, calling `enter` for any
  96619. node that touches the `from`/`to` region (if given) before
  96620. running over such a node's children, and `leave` (if given) when
  96621. leaving the node. When `enter` returns `false`, that node will
  96622. not have its children iterated over (or `leave` called).
  96623. */
  96624. iterate(e) {
  96625. let { enter: n, leave: r, from: i = 0, to: a = this.length } = e, o = e.mode || 0, s = (o & Zn.IncludeAnonymous) > 0;
  96626. for (let l = this.cursor(o | Zn.IncludeAnonymous); ; ) {
  96627. let u = !1;
  96628. if (l.from <= a && l.to >= i && (!s && l.type.isAnonymous || n(l) !== !1)) {
  96629. if (l.firstChild())
  96630. continue;
  96631. u = !0;
  96632. }
  96633. for (; u && r && (s || !l.type.isAnonymous) && r(l), !l.nextSibling(); ) {
  96634. if (!l.parent())
  96635. return;
  96636. u = !0;
  96637. }
  96638. }
  96639. }
  96640. /**
  96641. Get the value of the given [node prop](#common.NodeProp) for this
  96642. node. Works with both per-node and per-type props.
  96643. */
  96644. prop(e) {
  96645. return e.perNode ? this.props ? this.props[e.id] : void 0 : this.type.prop(e);
  96646. }
  96647. /**
  96648. Returns the node's [per-node props](#common.NodeProp.perNode) in a
  96649. format that can be passed to the [`Tree`](#common.Tree)
  96650. constructor.
  96651. */
  96652. get propValues() {
  96653. let e = [];
  96654. if (this.props)
  96655. for (let n in this.props)
  96656. e.push([+n, this.props[n]]);
  96657. return e;
  96658. }
  96659. /**
  96660. Balance the direct children of this tree, producing a copy of
  96661. which may have children grouped into subtrees with type
  96662. [`NodeType.none`](#common.NodeType^none).
  96663. */
  96664. balance(e = {}) {
  96665. return this.children.length <= 8 ? this : p4(Pi.none, this.children, this.positions, 0, this.children.length, 0, this.length, (n, r, i) => new Wn(this.type, n, r, i, this.propValues), e.makeTree || ((n, r, i) => new Wn(Pi.none, n, r, i)));
  96666. }
  96667. /**
  96668. Build a tree from a postfix-ordered buffer of node information,
  96669. or a cursor over such a buffer.
  96670. */
  96671. static build(e) {
  96672. return glt(e);
  96673. }
  96674. }
  96675. Wn.empty = new Wn(Pi.none, [], [], 0);
  96676. class d4 {
  96677. constructor(e, n) {
  96678. this.buffer = e, this.index = n;
  96679. }
  96680. get id() {
  96681. return this.buffer[this.index - 4];
  96682. }
  96683. get start() {
  96684. return this.buffer[this.index - 3];
  96685. }
  96686. get end() {
  96687. return this.buffer[this.index - 2];
  96688. }
  96689. get size() {
  96690. return this.buffer[this.index - 1];
  96691. }
  96692. get pos() {
  96693. return this.index;
  96694. }
  96695. next() {
  96696. this.index -= 4;
  96697. }
  96698. fork() {
  96699. return new d4(this.buffer, this.index);
  96700. }
  96701. }
  96702. class mu {
  96703. /**
  96704. Create a tree buffer.
  96705. */
  96706. constructor(e, n, r) {
  96707. this.buffer = e, this.length = n, this.set = r;
  96708. }
  96709. /**
  96710. @internal
  96711. */
  96712. get type() {
  96713. return Pi.none;
  96714. }
  96715. /**
  96716. @internal
  96717. */
  96718. toString() {
  96719. let e = [];
  96720. for (let n = 0; n < this.buffer.length; )
  96721. e.push(this.childString(n)), n = this.buffer[n + 3];
  96722. return e.join(",");
  96723. }
  96724. /**
  96725. @internal
  96726. */
  96727. childString(e) {
  96728. let n = this.buffer[e], r = this.buffer[e + 3], i = this.set.types[n], a = i.name;
  96729. if (/\W/.test(a) && !i.isError && (a = JSON.stringify(a)), e += 4, r == e)
  96730. return a;
  96731. let o = [];
  96732. for (; e < r; )
  96733. o.push(this.childString(e)), e = this.buffer[e + 3];
  96734. return a + "(" + o.join(",") + ")";
  96735. }
  96736. /**
  96737. @internal
  96738. */
  96739. findChild(e, n, r, i, a) {
  96740. let { buffer: o } = this, s = -1;
  96741. for (let l = e; l != n && !(Eoe(a, i, o[l + 1], o[l + 2]) && (s = l, r > 0)); l = o[l + 3])
  96742. ;
  96743. return s;
  96744. }
  96745. /**
  96746. @internal
  96747. */
  96748. slice(e, n, r) {
  96749. let i = this.buffer, a = new Uint16Array(n - e), o = 0;
  96750. for (let s = e, l = 0; s < n; ) {
  96751. a[l++] = i[s++], a[l++] = i[s++] - r;
  96752. let u = a[l++] = i[s++] - r;
  96753. a[l++] = i[s++] - e, o = Math.max(o, u);
  96754. }
  96755. return new mu(a, o, this.set);
  96756. }
  96757. }
  96758. function Eoe(t, e, n, r) {
  96759. switch (t) {
  96760. case -2:
  96761. return n < e;
  96762. case -1:
  96763. return r >= e && n < e;
  96764. case 0:
  96765. return n < e && r > e;
  96766. case 1:
  96767. return n <= e && r > e;
  96768. case 2:
  96769. return r > e;
  96770. case 4:
  96771. return !0;
  96772. }
  96773. }
  96774. function n0(t, e, n, r) {
  96775. for (var i; t.from == t.to || (n < 1 ? t.from >= e : t.from > e) || (n > -1 ? t.to <= e : t.to < e); ) {
  96776. let o = !r && t instanceof Ci && t.index < 0 ? null : t.parent;
  96777. if (!o)
  96778. return t;
  96779. t = o;
  96780. }
  96781. let a = r ? 0 : Zn.IgnoreOverlays;
  96782. if (r)
  96783. for (let o = t, s = o.parent; s; o = s, s = o.parent)
  96784. o instanceof Ci && o.index < 0 && ((i = s.enter(e, n, a)) === null || i === void 0 ? void 0 : i.from) != o.from && (t = s);
  96785. for (; ; ) {
  96786. let o = t.enter(e, n, a);
  96787. if (!o)
  96788. return t;
  96789. t = o;
  96790. }
  96791. }
  96792. class Moe {
  96793. cursor(e = 0) {
  96794. return new zM(this, e);
  96795. }
  96796. getChild(e, n = null, r = null) {
  96797. let i = CG(this, e, n, r);
  96798. return i.length ? i[0] : null;
  96799. }
  96800. getChildren(e, n = null, r = null) {
  96801. return CG(this, e, n, r);
  96802. }
  96803. resolve(e, n = 0) {
  96804. return n0(this, e, n, !1);
  96805. }
  96806. resolveInner(e, n = 0) {
  96807. return n0(this, e, n, !0);
  96808. }
  96809. matchContext(e) {
  96810. return BM(this, e);
  96811. }
  96812. enterUnfinishedNodesBefore(e) {
  96813. let n = this.childBefore(e), r = this;
  96814. for (; n; ) {
  96815. let i = n.lastChild;
  96816. if (!i || i.to != n.to)
  96817. break;
  96818. i.type.isError && i.from == i.to ? (r = n, n = i.prevSibling) : n = i;
  96819. }
  96820. return r;
  96821. }
  96822. get node() {
  96823. return this;
  96824. }
  96825. get next() {
  96826. return this.parent;
  96827. }
  96828. }
  96829. class Ci extends Moe {
  96830. constructor(e, n, r, i) {
  96831. super(), this._tree = e, this.from = n, this.index = r, this._parent = i;
  96832. }
  96833. get type() {
  96834. return this._tree.type;
  96835. }
  96836. get name() {
  96837. return this._tree.type.name;
  96838. }
  96839. get to() {
  96840. return this.from + this._tree.length;
  96841. }
  96842. nextChild(e, n, r, i, a = 0) {
  96843. for (let o = this; ; ) {
  96844. for (let { children: s, positions: l } = o._tree, u = n > 0 ? s.length : -1; e != u; e += n) {
  96845. let c = s[e], f = l[e] + o.from;
  96846. if (Eoe(i, r, f, f + c.length)) {
  96847. if (c instanceof mu) {
  96848. if (a & Zn.ExcludeBuffers)
  96849. continue;
  96850. let d = c.findChild(0, c.buffer.length, n, r - f, i);
  96851. if (d > -1)
  96852. return new Ho(new hlt(o, c, e, f), null, d);
  96853. } else if (a & Zn.IncludeAnonymous || !c.type.isAnonymous || h4(c)) {
  96854. let d;
  96855. if (!(a & Zn.IgnoreMounts) && (d = uS.get(c)) && !d.overlay)
  96856. return new Ci(d.tree, f, e, o);
  96857. let h = new Ci(c, f, e, o);
  96858. return a & Zn.IncludeAnonymous || !h.type.isAnonymous ? h : h.nextChild(n < 0 ? c.children.length - 1 : 0, n, r, i);
  96859. }
  96860. }
  96861. }
  96862. if (a & Zn.IncludeAnonymous || !o.type.isAnonymous || (o.index >= 0 ? e = o.index + n : e = n < 0 ? -1 : o._parent._tree.children.length, o = o._parent, !o))
  96863. return null;
  96864. }
  96865. }
  96866. get firstChild() {
  96867. return this.nextChild(
  96868. 0,
  96869. 1,
  96870. 0,
  96871. 4
  96872. /* Side.DontCare */
  96873. );
  96874. }
  96875. get lastChild() {
  96876. return this.nextChild(
  96877. this._tree.children.length - 1,
  96878. -1,
  96879. 0,
  96880. 4
  96881. /* Side.DontCare */
  96882. );
  96883. }
  96884. childAfter(e) {
  96885. return this.nextChild(
  96886. 0,
  96887. 1,
  96888. e,
  96889. 2
  96890. /* Side.After */
  96891. );
  96892. }
  96893. childBefore(e) {
  96894. return this.nextChild(
  96895. this._tree.children.length - 1,
  96896. -1,
  96897. e,
  96898. -2
  96899. /* Side.Before */
  96900. );
  96901. }
  96902. enter(e, n, r = 0) {
  96903. let i;
  96904. if (!(r & Zn.IgnoreOverlays) && (i = uS.get(this._tree)) && i.overlay) {
  96905. let a = e - this.from;
  96906. for (let { from: o, to: s } of i.overlay)
  96907. if ((n > 0 ? o <= a : o < a) && (n < 0 ? s >= a : s > a))
  96908. return new Ci(i.tree, i.overlay[0].from + this.from, -1, this);
  96909. }
  96910. return this.nextChild(0, 1, e, n, r);
  96911. }
  96912. nextSignificantParent() {
  96913. let e = this;
  96914. for (; e.type.isAnonymous && e._parent; )
  96915. e = e._parent;
  96916. return e;
  96917. }
  96918. get parent() {
  96919. return this._parent ? this._parent.nextSignificantParent() : null;
  96920. }
  96921. get nextSibling() {
  96922. return this._parent && this.index >= 0 ? this._parent.nextChild(
  96923. this.index + 1,
  96924. 1,
  96925. 0,
  96926. 4
  96927. /* Side.DontCare */
  96928. ) : null;
  96929. }
  96930. get prevSibling() {
  96931. return this._parent && this.index >= 0 ? this._parent.nextChild(
  96932. this.index - 1,
  96933. -1,
  96934. 0,
  96935. 4
  96936. /* Side.DontCare */
  96937. ) : null;
  96938. }
  96939. get tree() {
  96940. return this._tree;
  96941. }
  96942. toTree() {
  96943. return this._tree;
  96944. }
  96945. /**
  96946. @internal
  96947. */
  96948. toString() {
  96949. return this._tree.toString();
  96950. }
  96951. }
  96952. function CG(t, e, n, r) {
  96953. let i = t.cursor(), a = [];
  96954. if (!i.firstChild())
  96955. return a;
  96956. if (n != null) {
  96957. for (let o = !1; !o; )
  96958. if (o = i.type.is(n), !i.nextSibling())
  96959. return a;
  96960. }
  96961. for (; ; ) {
  96962. if (r != null && i.type.is(r))
  96963. return a;
  96964. if (i.type.is(e) && a.push(i.node), !i.nextSibling())
  96965. return r == null ? a : [];
  96966. }
  96967. }
  96968. function BM(t, e, n = e.length - 1) {
  96969. for (let r = t.parent; n >= 0; r = r.parent) {
  96970. if (!r)
  96971. return !1;
  96972. if (!r.type.isAnonymous) {
  96973. if (e[n] && e[n] != r.name)
  96974. return !1;
  96975. n--;
  96976. }
  96977. }
  96978. return !0;
  96979. }
  96980. class hlt {
  96981. constructor(e, n, r, i) {
  96982. this.parent = e, this.buffer = n, this.index = r, this.start = i;
  96983. }
  96984. }
  96985. class Ho extends Moe {
  96986. get name() {
  96987. return this.type.name;
  96988. }
  96989. get from() {
  96990. return this.context.start + this.context.buffer.buffer[this.index + 1];
  96991. }
  96992. get to() {
  96993. return this.context.start + this.context.buffer.buffer[this.index + 2];
  96994. }
  96995. constructor(e, n, r) {
  96996. super(), this.context = e, this._parent = n, this.index = r, this.type = e.buffer.set.types[e.buffer.buffer[r]];
  96997. }
  96998. child(e, n, r) {
  96999. let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.context.start, r);
  97000. return a < 0 ? null : new Ho(this.context, this, a);
  97001. }
  97002. get firstChild() {
  97003. return this.child(
  97004. 1,
  97005. 0,
  97006. 4
  97007. /* Side.DontCare */
  97008. );
  97009. }
  97010. get lastChild() {
  97011. return this.child(
  97012. -1,
  97013. 0,
  97014. 4
  97015. /* Side.DontCare */
  97016. );
  97017. }
  97018. childAfter(e) {
  97019. return this.child(
  97020. 1,
  97021. e,
  97022. 2
  97023. /* Side.After */
  97024. );
  97025. }
  97026. childBefore(e) {
  97027. return this.child(
  97028. -1,
  97029. e,
  97030. -2
  97031. /* Side.Before */
  97032. );
  97033. }
  97034. enter(e, n, r = 0) {
  97035. if (r & Zn.ExcludeBuffers)
  97036. return null;
  97037. 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);
  97038. return a < 0 ? null : new Ho(this.context, this, a);
  97039. }
  97040. get parent() {
  97041. return this._parent || this.context.parent.nextSignificantParent();
  97042. }
  97043. externalSibling(e) {
  97044. return this._parent ? null : this.context.parent.nextChild(
  97045. this.context.index + e,
  97046. e,
  97047. 0,
  97048. 4
  97049. /* Side.DontCare */
  97050. );
  97051. }
  97052. get nextSibling() {
  97053. let { buffer: e } = this.context, n = e.buffer[this.index + 3];
  97054. return n < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new Ho(this.context, this._parent, n) : this.externalSibling(1);
  97055. }
  97056. get prevSibling() {
  97057. let { buffer: e } = this.context, n = this._parent ? this._parent.index + 4 : 0;
  97058. return this.index == n ? this.externalSibling(-1) : new Ho(this.context, this._parent, e.findChild(
  97059. n,
  97060. this.index,
  97061. -1,
  97062. 0,
  97063. 4
  97064. /* Side.DontCare */
  97065. ));
  97066. }
  97067. get tree() {
  97068. return null;
  97069. }
  97070. toTree() {
  97071. let e = [], n = [], { buffer: r } = this.context, i = this.index + 4, a = r.buffer[this.index + 3];
  97072. if (a > i) {
  97073. let o = r.buffer[this.index + 1];
  97074. e.push(r.slice(i, a, o)), n.push(0);
  97075. }
  97076. return new Wn(this.type, e, n, this.to - this.from);
  97077. }
  97078. /**
  97079. @internal
  97080. */
  97081. toString() {
  97082. return this.context.buffer.childString(this.index);
  97083. }
  97084. }
  97085. function Ioe(t) {
  97086. if (!t.length)
  97087. return null;
  97088. let e = 0, n = t[0];
  97089. for (let a = 1; a < t.length; a++) {
  97090. let o = t[a];
  97091. (o.from > n.from || o.to < n.to) && (n = o, e = a);
  97092. }
  97093. let r = n instanceof Ci && n.index < 0 ? null : n.parent, i = t.slice();
  97094. return r ? i[e] = r : i.splice(e, 1), new plt(i, n);
  97095. }
  97096. class plt {
  97097. constructor(e, n) {
  97098. this.heads = e, this.node = n;
  97099. }
  97100. get next() {
  97101. return Ioe(this.heads);
  97102. }
  97103. }
  97104. function vlt(t, e, n) {
  97105. let r = t.resolveInner(e, n), i = null;
  97106. for (let a = r instanceof Ci ? r : r.context.parent; a; a = a.parent)
  97107. if (a.index < 0) {
  97108. let o = a.parent;
  97109. (i || (i = [r])).push(o.resolve(e, n)), a = o;
  97110. } else {
  97111. let o = uS.get(a.tree);
  97112. if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
  97113. let s = new Ci(o.tree, o.overlay[0].from + a.from, -1, a);
  97114. (i || (i = [r])).push(n0(s, e, n, !1));
  97115. }
  97116. }
  97117. return i ? Ioe(i) : r;
  97118. }
  97119. class zM {
  97120. /**
  97121. Shorthand for `.type.name`.
  97122. */
  97123. get name() {
  97124. return this.type.name;
  97125. }
  97126. /**
  97127. @internal
  97128. */
  97129. constructor(e, n = 0) {
  97130. if (this.mode = n, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof Ci)
  97131. this.yieldNode(e);
  97132. else {
  97133. this._tree = e.context.parent, this.buffer = e.context;
  97134. for (let r = e._parent; r; r = r._parent)
  97135. this.stack.unshift(r.index);
  97136. this.bufferNode = e, this.yieldBuf(e.index);
  97137. }
  97138. }
  97139. yieldNode(e) {
  97140. return e ? (this._tree = e, this.type = e.type, this.from = e.from, this.to = e.to, !0) : !1;
  97141. }
  97142. yieldBuf(e, n) {
  97143. this.index = e;
  97144. let { start: r, buffer: i } = this.buffer;
  97145. 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;
  97146. }
  97147. /**
  97148. @internal
  97149. */
  97150. yield(e) {
  97151. return e ? e instanceof Ci ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
  97152. }
  97153. /**
  97154. @internal
  97155. */
  97156. toString() {
  97157. return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
  97158. }
  97159. /**
  97160. @internal
  97161. */
  97162. enterChild(e, n, r) {
  97163. if (!this.buffer)
  97164. return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, n, r, this.mode));
  97165. let { buffer: i } = this.buffer, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.buffer.start, r);
  97166. return a < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(a));
  97167. }
  97168. /**
  97169. Move the cursor to this node's first child. When this returns
  97170. false, the node has no child, and the cursor has not been moved.
  97171. */
  97172. firstChild() {
  97173. return this.enterChild(
  97174. 1,
  97175. 0,
  97176. 4
  97177. /* Side.DontCare */
  97178. );
  97179. }
  97180. /**
  97181. Move the cursor to this node's last child.
  97182. */
  97183. lastChild() {
  97184. return this.enterChild(
  97185. -1,
  97186. 0,
  97187. 4
  97188. /* Side.DontCare */
  97189. );
  97190. }
  97191. /**
  97192. Move the cursor to the first child that ends after `pos`.
  97193. */
  97194. childAfter(e) {
  97195. return this.enterChild(
  97196. 1,
  97197. e,
  97198. 2
  97199. /* Side.After */
  97200. );
  97201. }
  97202. /**
  97203. Move to the last child that starts before `pos`.
  97204. */
  97205. childBefore(e) {
  97206. return this.enterChild(
  97207. -1,
  97208. e,
  97209. -2
  97210. /* Side.Before */
  97211. );
  97212. }
  97213. /**
  97214. Move the cursor to the child around `pos`. If side is -1 the
  97215. child may end at that position, when 1 it may start there. This
  97216. will also enter [overlaid](#common.MountedTree.overlay)
  97217. [mounted](#common.NodeProp^mounted) trees unless `overlays` is
  97218. set to false.
  97219. */
  97220. enter(e, n, r = this.mode) {
  97221. return this.buffer ? r & Zn.ExcludeBuffers ? !1 : this.enterChild(1, e, n) : this.yield(this._tree.enter(e, n, r));
  97222. }
  97223. /**
  97224. Move to the node's parent node, if this isn't the top node.
  97225. */
  97226. parent() {
  97227. if (!this.buffer)
  97228. return this.yieldNode(this.mode & Zn.IncludeAnonymous ? this._tree._parent : this._tree.parent);
  97229. if (this.stack.length)
  97230. return this.yieldBuf(this.stack.pop());
  97231. let e = this.mode & Zn.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
  97232. return this.buffer = null, this.yieldNode(e);
  97233. }
  97234. /**
  97235. @internal
  97236. */
  97237. sibling(e) {
  97238. if (!this.buffer)
  97239. 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;
  97240. let { buffer: n } = this.buffer, r = this.stack.length - 1;
  97241. if (e < 0) {
  97242. let i = r < 0 ? 0 : this.stack[r] + 4;
  97243. if (this.index != i)
  97244. return this.yieldBuf(n.findChild(
  97245. i,
  97246. this.index,
  97247. -1,
  97248. 0,
  97249. 4
  97250. /* Side.DontCare */
  97251. ));
  97252. } else {
  97253. let i = n.buffer[this.index + 3];
  97254. if (i < (r < 0 ? n.buffer.length : n.buffer[this.stack[r] + 3]))
  97255. return this.yieldBuf(i);
  97256. }
  97257. return r < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
  97258. }
  97259. /**
  97260. Move to this node's next sibling, if any.
  97261. */
  97262. nextSibling() {
  97263. return this.sibling(1);
  97264. }
  97265. /**
  97266. Move to this node's previous sibling, if any.
  97267. */
  97268. prevSibling() {
  97269. return this.sibling(-1);
  97270. }
  97271. atLastNode(e) {
  97272. let n, r, { buffer: i } = this;
  97273. if (i) {
  97274. if (e > 0) {
  97275. if (this.index < i.buffer.buffer.length)
  97276. return !1;
  97277. } else
  97278. for (let a = 0; a < this.index; a++)
  97279. if (i.buffer.buffer[a + 3] < this.index)
  97280. return !1;
  97281. ({ index: n, parent: r } = i);
  97282. } else
  97283. ({ index: n, _parent: r } = this._tree);
  97284. for (; r; { index: n, _parent: r } = r)
  97285. if (n > -1)
  97286. for (let a = n + e, o = e < 0 ? -1 : r._tree.children.length; a != o; a += e) {
  97287. let s = r._tree.children[a];
  97288. if (this.mode & Zn.IncludeAnonymous || s instanceof mu || !s.type.isAnonymous || h4(s))
  97289. return !1;
  97290. }
  97291. return !0;
  97292. }
  97293. move(e, n) {
  97294. if (n && this.enterChild(
  97295. e,
  97296. 0,
  97297. 4
  97298. /* Side.DontCare */
  97299. ))
  97300. return !0;
  97301. for (; ; ) {
  97302. if (this.sibling(e))
  97303. return !0;
  97304. if (this.atLastNode(e) || !this.parent())
  97305. return !1;
  97306. }
  97307. }
  97308. /**
  97309. Move to the next node in a
  97310. [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
  97311. traversal, going from a node to its first child or, if the
  97312. current node is empty or `enter` is false, its next sibling or
  97313. the next sibling of the first parent node that has one.
  97314. */
  97315. next(e = !0) {
  97316. return this.move(1, e);
  97317. }
  97318. /**
  97319. Move to the next node in a last-to-first pre-order traveral. A
  97320. node is followed by its last child or, if it has none, its
  97321. previous sibling or the previous sibling of the first parent
  97322. node that has one.
  97323. */
  97324. prev(e = !0) {
  97325. return this.move(-1, e);
  97326. }
  97327. /**
  97328. Move the cursor to the innermost node that covers `pos`. If
  97329. `side` is -1, it will enter nodes that end at `pos`. If it is 1,
  97330. it will enter nodes that start at `pos`.
  97331. */
  97332. moveTo(e, n = 0) {
  97333. for (; (this.from == this.to || (n < 1 ? this.from >= e : this.from > e) || (n > -1 ? this.to <= e : this.to < e)) && this.parent(); )
  97334. ;
  97335. for (; this.enterChild(1, e, n); )
  97336. ;
  97337. return this;
  97338. }
  97339. /**
  97340. Get a [syntax node](#common.SyntaxNode) at the cursor's current
  97341. position.
  97342. */
  97343. get node() {
  97344. if (!this.buffer)
  97345. return this._tree;
  97346. let e = this.bufferNode, n = null, r = 0;
  97347. if (e && e.context == this.buffer)
  97348. e: for (let i = this.index, a = this.stack.length; a >= 0; ) {
  97349. for (let o = e; o; o = o._parent)
  97350. if (o.index == i) {
  97351. if (i == this.index)
  97352. return o;
  97353. n = o, r = a + 1;
  97354. break e;
  97355. }
  97356. i = this.stack[--a];
  97357. }
  97358. for (let i = r; i < this.stack.length; i++)
  97359. n = new Ho(this.buffer, n, this.stack[i]);
  97360. return this.bufferNode = new Ho(this.buffer, n, this.index);
  97361. }
  97362. /**
  97363. Get the [tree](#common.Tree) that represents the current node, if
  97364. any. Will return null when the node is in a [tree
  97365. buffer](#common.TreeBuffer).
  97366. */
  97367. get tree() {
  97368. return this.buffer ? null : this._tree._tree;
  97369. }
  97370. /**
  97371. Iterate over the current node and all its descendants, calling
  97372. `enter` when entering a node and `leave`, if given, when leaving
  97373. one. When `enter` returns `false`, any children of that node are
  97374. skipped, and `leave` isn't called for it.
  97375. */
  97376. iterate(e, n) {
  97377. for (let r = 0; ; ) {
  97378. let i = !1;
  97379. if (this.type.isAnonymous || e(this) !== !1) {
  97380. if (this.firstChild()) {
  97381. r++;
  97382. continue;
  97383. }
  97384. this.type.isAnonymous || (i = !0);
  97385. }
  97386. for (; i && n && n(this), i = this.type.isAnonymous, !this.nextSibling(); ) {
  97387. if (!r)
  97388. return;
  97389. this.parent(), r--, i = !0;
  97390. }
  97391. }
  97392. }
  97393. /**
  97394. Test whether the current node matches a given context—a sequence
  97395. of direct parent node names. Empty strings in the context array
  97396. are treated as wildcards.
  97397. */
  97398. matchContext(e) {
  97399. if (!this.buffer)
  97400. return BM(this.node, e);
  97401. let { buffer: n } = this.buffer, { types: r } = n.set;
  97402. for (let i = e.length - 1, a = this.stack.length - 1; i >= 0; a--) {
  97403. if (a < 0)
  97404. return BM(this.node, e, i);
  97405. let o = r[n.buffer[this.stack[a]]];
  97406. if (!o.isAnonymous) {
  97407. if (e[i] && e[i] != o.name)
  97408. return !1;
  97409. i--;
  97410. }
  97411. }
  97412. return !0;
  97413. }
  97414. }
  97415. function h4(t) {
  97416. return t.children.some((e) => e instanceof mu || !e.type.isAnonymous || h4(e));
  97417. }
  97418. function glt(t) {
  97419. var e;
  97420. let { buffer: n, nodeSet: r, maxBufferLength: i = Aoe, reused: a = [], minRepeatType: o = r.types.length } = t, s = Array.isArray(n) ? new d4(n, n.length) : n, l = r.types, u = 0, c = 0;
  97421. function f(O, S, x, C, T, w) {
  97422. let { id: P, start: $, end: A, size: D } = s, E = c;
  97423. for (; D < 0; )
  97424. if (s.next(), D == -1) {
  97425. let W = a[P];
  97426. x.push(W), C.push($ - O);
  97427. return;
  97428. } else if (D == -3) {
  97429. u = P;
  97430. return;
  97431. } else if (D == -4) {
  97432. c = P;
  97433. return;
  97434. } else
  97435. throw new RangeError(`Unrecognized record size: ${D}`);
  97436. let R = l[P], N, V, B = $ - O;
  97437. if (A - $ <= i && (V = g(s.pos - S, T))) {
  97438. let W = new Uint16Array(V.size - V.skip), F = s.pos - V.size, Q = W.length;
  97439. for (; s.pos > F; )
  97440. Q = m(V.start, W, Q);
  97441. N = new mu(W, A - V.start, r), B = V.start - O;
  97442. } else {
  97443. let W = s.pos - D;
  97444. s.next();
  97445. let F = [], Q = [], Z = P >= o ? P : -1, ne = 0, ee = A;
  97446. for (; s.pos > W; )
  97447. Z >= 0 && s.id == Z && s.size >= 0 ? (s.end <= ee - i && (p(F, Q, $, ne, s.end, ee, Z, E), ne = F.length, ee = s.end), s.next()) : w > 2500 ? d($, W, F, Q) : f($, W, F, Q, Z, w + 1);
  97448. if (Z >= 0 && ne > 0 && ne < F.length && p(F, Q, $, ne, $, ee, Z, E), F.reverse(), Q.reverse(), Z > -1 && ne > 0) {
  97449. let oe = h(R);
  97450. N = p4(R, F, Q, 0, F.length, 0, A - $, oe, oe);
  97451. } else
  97452. N = v(R, F, Q, A - $, E - A);
  97453. }
  97454. x.push(N), C.push(B);
  97455. }
  97456. function d(O, S, x, C) {
  97457. let T = [], w = 0, P = -1;
  97458. for (; s.pos > S; ) {
  97459. let { id: $, start: A, end: D, size: E } = s;
  97460. if (E > 4)
  97461. s.next();
  97462. else {
  97463. if (P > -1 && A < P)
  97464. break;
  97465. P < 0 && (P = D - i), T.push($, A, D), w++, s.next();
  97466. }
  97467. }
  97468. if (w) {
  97469. let $ = new Uint16Array(w * 4), A = T[T.length - 2];
  97470. for (let D = T.length - 3, E = 0; D >= 0; D -= 3)
  97471. $[E++] = T[D], $[E++] = T[D + 1] - A, $[E++] = T[D + 2] - A, $[E++] = E;
  97472. x.push(new mu($, T[2] - A, r)), C.push(A - O);
  97473. }
  97474. }
  97475. function h(O) {
  97476. return (S, x, C) => {
  97477. let T = 0, w = S.length - 1, P, $;
  97478. if (w >= 0 && (P = S[w]) instanceof Wn) {
  97479. if (!w && P.type == O && P.length == C)
  97480. return P;
  97481. ($ = P.prop(Pt.lookAhead)) && (T = x[w] + P.length + $);
  97482. }
  97483. return v(O, S, x, C, T);
  97484. };
  97485. }
  97486. function p(O, S, x, C, T, w, P, $) {
  97487. let A = [], D = [];
  97488. for (; O.length > C; )
  97489. A.push(O.pop()), D.push(S.pop() + x - T);
  97490. O.push(v(r.types[P], A, D, w - T, $ - w)), S.push(T - x);
  97491. }
  97492. function v(O, S, x, C, T = 0, w) {
  97493. if (u) {
  97494. let P = [Pt.contextHash, u];
  97495. w = w ? [P].concat(w) : [P];
  97496. }
  97497. if (T > 25) {
  97498. let P = [Pt.lookAhead, T];
  97499. w = w ? [P].concat(w) : [P];
  97500. }
  97501. return new Wn(O, S, x, C, w);
  97502. }
  97503. function g(O, S) {
  97504. let x = s.fork(), C = 0, T = 0, w = 0, P = x.end - i, $ = { size: 0, start: 0, skip: 0 };
  97505. e: for (let A = x.pos - O; x.pos > A; ) {
  97506. let D = x.size;
  97507. if (x.id == S && D >= 0) {
  97508. $.size = C, $.start = T, $.skip = w, w += 4, C += 4, x.next();
  97509. continue;
  97510. }
  97511. let E = x.pos - D;
  97512. if (D < 0 || E < A || x.start < P)
  97513. break;
  97514. let R = x.id >= o ? 4 : 0, N = x.start;
  97515. for (x.next(); x.pos > E; ) {
  97516. if (x.size < 0)
  97517. if (x.size == -3)
  97518. R += 4;
  97519. else
  97520. break e;
  97521. else x.id >= o && (R += 4);
  97522. x.next();
  97523. }
  97524. T = N, C += D, w += R;
  97525. }
  97526. return (S < 0 || C == O) && ($.size = C, $.start = T, $.skip = w), $.size > 4 ? $ : void 0;
  97527. }
  97528. function m(O, S, x) {
  97529. let { id: C, start: T, end: w, size: P } = s;
  97530. if (s.next(), P >= 0 && C < o) {
  97531. let $ = x;
  97532. if (P > 4) {
  97533. let A = s.pos - (P - 4);
  97534. for (; s.pos > A; )
  97535. x = m(O, S, x);
  97536. }
  97537. S[--x] = $, S[--x] = w - O, S[--x] = T - O, S[--x] = C;
  97538. } else P == -3 ? u = C : P == -4 && (c = C);
  97539. return x;
  97540. }
  97541. let y = [], b = [];
  97542. for (; s.pos > 0; )
  97543. f(t.start || 0, t.bufferStart || 0, y, b, -1, 0);
  97544. let _ = (e = t.length) !== null && e !== void 0 ? e : y.length ? b[0] + y[0].length : 0;
  97545. return new Wn(l[t.topID], y.reverse(), b.reverse(), _);
  97546. }
  97547. const TG = /* @__PURE__ */ new WeakMap();
  97548. function f1(t, e) {
  97549. if (!t.isAnonymous || e instanceof mu || e.type != t)
  97550. return 1;
  97551. let n = TG.get(e);
  97552. if (n == null) {
  97553. n = 1;
  97554. for (let r of e.children) {
  97555. if (r.type != t || !(r instanceof Wn)) {
  97556. n = 1;
  97557. break;
  97558. }
  97559. n += f1(t, r);
  97560. }
  97561. TG.set(e, n);
  97562. }
  97563. return n;
  97564. }
  97565. function p4(t, e, n, r, i, a, o, s, l) {
  97566. let u = 0;
  97567. for (let p = r; p < i; p++)
  97568. u += f1(t, e[p]);
  97569. let c = Math.ceil(
  97570. u * 1.5 / 8
  97571. /* Balance.BranchFactor */
  97572. ), f = [], d = [];
  97573. function h(p, v, g, m, y) {
  97574. for (let b = g; b < m; ) {
  97575. let _ = b, O = v[b], S = f1(t, p[b]);
  97576. for (b++; b < m; b++) {
  97577. let x = f1(t, p[b]);
  97578. if (S + x >= c)
  97579. break;
  97580. S += x;
  97581. }
  97582. if (b == _ + 1) {
  97583. if (S > c) {
  97584. let x = p[_];
  97585. h(x.children, x.positions, 0, x.children.length, v[_] + y);
  97586. continue;
  97587. }
  97588. f.push(p[_]);
  97589. } else {
  97590. let x = v[b - 1] + p[b - 1].length - O;
  97591. f.push(p4(t, p, v, _, b, O, x, null, l));
  97592. }
  97593. d.push(O + y - a);
  97594. }
  97595. }
  97596. return h(e, n, r, i, 0), (s || l)(f, d, o);
  97597. }
  97598. class mlt {
  97599. constructor() {
  97600. this.map = /* @__PURE__ */ new WeakMap();
  97601. }
  97602. setBuffer(e, n, r) {
  97603. let i = this.map.get(e);
  97604. i || this.map.set(e, i = /* @__PURE__ */ new Map()), i.set(n, r);
  97605. }
  97606. getBuffer(e, n) {
  97607. let r = this.map.get(e);
  97608. return r && r.get(n);
  97609. }
  97610. /**
  97611. Set the value for this syntax node.
  97612. */
  97613. set(e, n) {
  97614. e instanceof Ho ? this.setBuffer(e.context.buffer, e.index, n) : e instanceof Ci && this.map.set(e.tree, n);
  97615. }
  97616. /**
  97617. Retrieve value for this syntax node, if it exists in the map.
  97618. */
  97619. get(e) {
  97620. return e instanceof Ho ? this.getBuffer(e.context.buffer, e.index) : e instanceof Ci ? this.map.get(e.tree) : void 0;
  97621. }
  97622. /**
  97623. Set the value for the node that a cursor currently points to.
  97624. */
  97625. cursorSet(e, n) {
  97626. e.buffer ? this.setBuffer(e.buffer.buffer, e.index, n) : this.map.set(e.tree, n);
  97627. }
  97628. /**
  97629. Retrieve the value for the node that a cursor currently points
  97630. to.
  97631. */
  97632. cursorGet(e) {
  97633. return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree);
  97634. }
  97635. }
  97636. class of {
  97637. /**
  97638. Construct a tree fragment. You'll usually want to use
  97639. [`addTree`](#common.TreeFragment^addTree) and
  97640. [`applyChanges`](#common.TreeFragment^applyChanges) instead of
  97641. calling this directly.
  97642. */
  97643. constructor(e, n, r, i, a = !1, o = !1) {
  97644. this.from = e, this.to = n, this.tree = r, this.offset = i, this.open = (a ? 1 : 0) | (o ? 2 : 0);
  97645. }
  97646. /**
  97647. Whether the start of the fragment represents the start of a
  97648. parse, or the end of a change. (In the second case, it may not
  97649. be safe to reuse some nodes at the start, depending on the
  97650. parsing algorithm.)
  97651. */
  97652. get openStart() {
  97653. return (this.open & 1) > 0;
  97654. }
  97655. /**
  97656. Whether the end of the fragment represents the end of a
  97657. full-document parse, or the start of a change.
  97658. */
  97659. get openEnd() {
  97660. return (this.open & 2) > 0;
  97661. }
  97662. /**
  97663. Create a set of fragments from a freshly parsed tree, or update
  97664. an existing set of fragments by replacing the ones that overlap
  97665. with a tree with content from the new tree. When `partial` is
  97666. true, the parse is treated as incomplete, and the resulting
  97667. fragment has [`openEnd`](#common.TreeFragment.openEnd) set to
  97668. true.
  97669. */
  97670. static addTree(e, n = [], r = !1) {
  97671. let i = [new of(0, e.length, e, 0, !1, r)];
  97672. for (let a of n)
  97673. a.to > e.length && i.push(a);
  97674. return i;
  97675. }
  97676. /**
  97677. Apply a set of edits to an array of fragments, removing or
  97678. splitting fragments as necessary to remove edited ranges, and
  97679. adjusting offsets for fragments that moved.
  97680. */
  97681. static applyChanges(e, n, r = 128) {
  97682. if (!n.length)
  97683. return e;
  97684. let i = [], a = 1, o = e.length ? e[0] : null;
  97685. for (let s = 0, l = 0, u = 0; ; s++) {
  97686. let c = s < n.length ? n[s] : null, f = c ? c.fromA : 1e9;
  97687. if (f - l >= r)
  97688. for (; o && o.from < f; ) {
  97689. let d = o;
  97690. if (l >= d.from || f <= d.to || u) {
  97691. let h = Math.max(d.from, l) - u, p = Math.min(d.to, f) - u;
  97692. d = h >= p ? null : new of(h, p, d.tree, d.offset + u, s > 0, !!c);
  97693. }
  97694. if (d && i.push(d), o.to > f)
  97695. break;
  97696. o = a < e.length ? e[a++] : null;
  97697. }
  97698. if (!c)
  97699. break;
  97700. l = c.toA, u = c.toA - c.toB;
  97701. }
  97702. return i;
  97703. }
  97704. }
  97705. class Doe {
  97706. /**
  97707. Start a parse, returning a [partial parse](#common.PartialParse)
  97708. object. [`fragments`](#common.TreeFragment) can be passed in to
  97709. make the parse incremental.
  97710. By default, the entire input is parsed. You can pass `ranges`,
  97711. which should be a sorted array of non-empty, non-overlapping
  97712. ranges, to parse only those ranges. The tree returned in that
  97713. case will start at `ranges[0].from`.
  97714. */
  97715. startParse(e, n, r) {
  97716. return typeof e == "string" && (e = new ylt(e)), r = r ? r.length ? r.map((i) => new T$(i.from, i.to)) : [new T$(0, 0)] : [new T$(0, e.length)], this.createParse(e, n || [], r);
  97717. }
  97718. /**
  97719. Run a full parse, returning the resulting tree.
  97720. */
  97721. parse(e, n, r) {
  97722. let i = this.startParse(e, n, r);
  97723. for (; ; ) {
  97724. let a = i.advance();
  97725. if (a)
  97726. return a;
  97727. }
  97728. }
  97729. }
  97730. class ylt {
  97731. constructor(e) {
  97732. this.string = e;
  97733. }
  97734. get length() {
  97735. return this.string.length;
  97736. }
  97737. chunk(e) {
  97738. return this.string.slice(e);
  97739. }
  97740. get lineChunks() {
  97741. return !1;
  97742. }
  97743. read(e, n) {
  97744. return this.string.slice(e, n);
  97745. }
  97746. }
  97747. new Pt({ perNode: !0 });
  97748. let blt = 0;
  97749. class ko {
  97750. /**
  97751. @internal
  97752. */
  97753. constructor(e, n, r) {
  97754. this.set = e, this.base = n, this.modified = r, this.id = blt++;
  97755. }
  97756. /**
  97757. Define a new tag. If `parent` is given, the tag is treated as a
  97758. sub-tag of that parent, and
  97759. [highlighters](#highlight.tagHighlighter) that don't mention
  97760. this tag will try to fall back to the parent tag (or grandparent
  97761. tag, etc).
  97762. */
  97763. static define(e) {
  97764. if (e != null && e.base)
  97765. throw new Error("Can not derive from a modified tag");
  97766. let n = new ko([], null, []);
  97767. if (n.set.push(n), e)
  97768. for (let r of e.set)
  97769. n.set.push(r);
  97770. return n;
  97771. }
  97772. /**
  97773. Define a tag _modifier_, which is a function that, given a tag,
  97774. will return a tag that is a subtag of the original. Applying the
  97775. same modifier to a twice tag will return the same value (`m1(t1)
  97776. == m1(t1)`) and applying multiple modifiers will, regardless or
  97777. order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
  97778. When multiple modifiers are applied to a given base tag, each
  97779. smaller set of modifiers is registered as a parent, so that for
  97780. example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
  97781. `m1(m3(t1)`, and so on.
  97782. */
  97783. static defineModifier() {
  97784. let e = new cS();
  97785. return (n) => n.modified.indexOf(e) > -1 ? n : cS.get(n.base || n, n.modified.concat(e).sort((r, i) => r.id - i.id));
  97786. }
  97787. }
  97788. let _lt = 0;
  97789. class cS {
  97790. constructor() {
  97791. this.instances = [], this.id = _lt++;
  97792. }
  97793. static get(e, n) {
  97794. if (!n.length)
  97795. return e;
  97796. let r = n[0].instances.find((s) => s.base == e && Olt(n, s.modified));
  97797. if (r)
  97798. return r;
  97799. let i = [], a = new ko(i, e, n);
  97800. for (let s of n)
  97801. s.instances.push(a);
  97802. let o = Slt(n);
  97803. for (let s of e.set)
  97804. if (!s.modified.length)
  97805. for (let l of o)
  97806. i.push(cS.get(s, l));
  97807. return a;
  97808. }
  97809. }
  97810. function Olt(t, e) {
  97811. return t.length == e.length && t.every((n, r) => n == e[r]);
  97812. }
  97813. function Slt(t) {
  97814. let e = [[]];
  97815. for (let n = 0; n < t.length; n++)
  97816. for (let r = 0, i = e.length; r < i; r++)
  97817. e.push(e[r].concat(t[n]));
  97818. return e.sort((n, r) => r.length - n.length);
  97819. }
  97820. function v4(t) {
  97821. let e = /* @__PURE__ */ Object.create(null);
  97822. for (let n in t) {
  97823. let r = t[n];
  97824. Array.isArray(r) || (r = [r]);
  97825. for (let i of n.split(" "))
  97826. if (i) {
  97827. let a = [], o = 2, s = i;
  97828. for (let f = 0; ; ) {
  97829. if (s == "..." && f > 0 && f + 3 == i.length) {
  97830. o = 1;
  97831. break;
  97832. }
  97833. let d = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);
  97834. if (!d)
  97835. throw new RangeError("Invalid path: " + i);
  97836. if (a.push(d[0] == "*" ? "" : d[0][0] == '"' ? JSON.parse(d[0]) : d[0]), f += d[0].length, f == i.length)
  97837. break;
  97838. let h = i[f++];
  97839. if (f == i.length && h == "!") {
  97840. o = 0;
  97841. break;
  97842. }
  97843. if (h != "/")
  97844. throw new RangeError("Invalid path: " + i);
  97845. s = i.slice(f);
  97846. }
  97847. let l = a.length - 1, u = a[l];
  97848. if (!u)
  97849. throw new RangeError("Invalid path: " + i);
  97850. let c = new fS(r, o, l > 0 ? a.slice(0, l) : null);
  97851. e[u] = c.sort(e[u]);
  97852. }
  97853. }
  97854. return Roe.add(e);
  97855. }
  97856. const Roe = new Pt();
  97857. class fS {
  97858. constructor(e, n, r, i) {
  97859. this.tags = e, this.mode = n, this.context = r, this.next = i;
  97860. }
  97861. get opaque() {
  97862. return this.mode == 0;
  97863. }
  97864. get inherit() {
  97865. return this.mode == 1;
  97866. }
  97867. sort(e) {
  97868. return !e || e.depth < this.depth ? (this.next = e, this) : (e.next = this.sort(e.next), e);
  97869. }
  97870. get depth() {
  97871. return this.context ? this.context.length : 0;
  97872. }
  97873. }
  97874. fS.empty = new fS([], 2, null);
  97875. function koe(t, e) {
  97876. let n = /* @__PURE__ */ Object.create(null);
  97877. for (let a of t)
  97878. if (!Array.isArray(a.tag))
  97879. n[a.tag.id] = a.class;
  97880. else
  97881. for (let o of a.tag)
  97882. n[o.id] = a.class;
  97883. let { scope: r, all: i = null } = e || {};
  97884. return {
  97885. style: (a) => {
  97886. let o = i;
  97887. for (let s of a)
  97888. for (let l of s.set) {
  97889. let u = n[l.id];
  97890. if (u) {
  97891. o = o ? o + " " + u : u;
  97892. break;
  97893. }
  97894. }
  97895. return o;
  97896. },
  97897. scope: r
  97898. };
  97899. }
  97900. function xlt(t, e) {
  97901. let n = null;
  97902. for (let r of t) {
  97903. let i = r.style(e);
  97904. i && (n = n ? n + " " + i : i);
  97905. }
  97906. return n;
  97907. }
  97908. function wlt(t, e, n, r = 0, i = t.length) {
  97909. let a = new Clt(r, Array.isArray(e) ? e : [e], n);
  97910. a.highlightRange(t.cursor(), r, i, "", a.highlighters), a.flush(i);
  97911. }
  97912. class Clt {
  97913. constructor(e, n, r) {
  97914. this.at = e, this.highlighters = n, this.span = r, this.class = "";
  97915. }
  97916. startSpan(e, n) {
  97917. n != this.class && (this.flush(e), e > this.at && (this.at = e), this.class = n);
  97918. }
  97919. flush(e) {
  97920. e > this.at && this.class && this.span(this.at, e, this.class);
  97921. }
  97922. highlightRange(e, n, r, i, a) {
  97923. let { type: o, from: s, to: l } = e;
  97924. if (s >= r || l <= n)
  97925. return;
  97926. o.isTop && (a = this.highlighters.filter((h) => !h.scope || h.scope(o)));
  97927. let u = i, c = Tlt(e) || fS.empty, f = xlt(a, c.tags);
  97928. if (f && (u && (u += " "), u += f, c.mode == 1 && (i += (i ? " " : "") + f)), this.startSpan(Math.max(n, s), u), c.opaque)
  97929. return;
  97930. let d = e.tree && e.tree.prop(Pt.mounted);
  97931. if (d && d.overlay) {
  97932. 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();
  97933. for (let g = 0, m = s; ; g++) {
  97934. let y = g < d.overlay.length ? d.overlay[g] : null, b = y ? y.from + s : l, _ = Math.max(n, m), O = Math.min(r, b);
  97935. if (_ < O && v)
  97936. for (; e.from < O && (this.highlightRange(e, _, O, i, a), this.startSpan(Math.min(O, e.to), u), !(e.to >= b || !e.nextSibling())); )
  97937. ;
  97938. if (!y || b > r)
  97939. break;
  97940. 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));
  97941. }
  97942. v && e.parent();
  97943. } else if (e.firstChild()) {
  97944. d && (i = "");
  97945. do
  97946. if (!(e.to <= n)) {
  97947. if (e.from >= r)
  97948. break;
  97949. this.highlightRange(e, n, r, i, a), this.startSpan(Math.min(r, e.to), u);
  97950. }
  97951. while (e.nextSibling());
  97952. e.parent();
  97953. }
  97954. }
  97955. }
  97956. function Tlt(t) {
  97957. let e = t.type.prop(Roe);
  97958. for (; e && e.context && !t.matchContext(e.context); )
  97959. e = e.next;
  97960. return e || null;
  97961. }
  97962. const Ae = ko.define, i_ = Ae(), Tl = Ae(), PG = Ae(Tl), $G = Ae(Tl), Pl = Ae(), a_ = Ae(Pl), P$ = Ae(Pl), Mo = Ae(), cc = Ae(Mo), To = Ae(), Po = Ae(), VM = Ae(), kv = Ae(VM), o_ = Ae(), J = {
  97963. /**
  97964. A comment.
  97965. */
  97966. comment: i_,
  97967. /**
  97968. A line [comment](#highlight.tags.comment).
  97969. */
  97970. lineComment: Ae(i_),
  97971. /**
  97972. A block [comment](#highlight.tags.comment).
  97973. */
  97974. blockComment: Ae(i_),
  97975. /**
  97976. A documentation [comment](#highlight.tags.comment).
  97977. */
  97978. docComment: Ae(i_),
  97979. /**
  97980. Any kind of identifier.
  97981. */
  97982. name: Tl,
  97983. /**
  97984. The [name](#highlight.tags.name) of a variable.
  97985. */
  97986. variableName: Ae(Tl),
  97987. /**
  97988. A type [name](#highlight.tags.name).
  97989. */
  97990. typeName: PG,
  97991. /**
  97992. A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
  97993. */
  97994. tagName: Ae(PG),
  97995. /**
  97996. A property or field [name](#highlight.tags.name).
  97997. */
  97998. propertyName: $G,
  97999. /**
  98000. An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
  98001. */
  98002. attributeName: Ae($G),
  98003. /**
  98004. The [name](#highlight.tags.name) of a class.
  98005. */
  98006. className: Ae(Tl),
  98007. /**
  98008. A label [name](#highlight.tags.name).
  98009. */
  98010. labelName: Ae(Tl),
  98011. /**
  98012. A namespace [name](#highlight.tags.name).
  98013. */
  98014. namespace: Ae(Tl),
  98015. /**
  98016. The [name](#highlight.tags.name) of a macro.
  98017. */
  98018. macroName: Ae(Tl),
  98019. /**
  98020. A literal value.
  98021. */
  98022. literal: Pl,
  98023. /**
  98024. A string [literal](#highlight.tags.literal).
  98025. */
  98026. string: a_,
  98027. /**
  98028. A documentation [string](#highlight.tags.string).
  98029. */
  98030. docString: Ae(a_),
  98031. /**
  98032. A character literal (subtag of [string](#highlight.tags.string)).
  98033. */
  98034. character: Ae(a_),
  98035. /**
  98036. An attribute value (subtag of [string](#highlight.tags.string)).
  98037. */
  98038. attributeValue: Ae(a_),
  98039. /**
  98040. A number [literal](#highlight.tags.literal).
  98041. */
  98042. number: P$,
  98043. /**
  98044. An integer [number](#highlight.tags.number) literal.
  98045. */
  98046. integer: Ae(P$),
  98047. /**
  98048. A floating-point [number](#highlight.tags.number) literal.
  98049. */
  98050. float: Ae(P$),
  98051. /**
  98052. A boolean [literal](#highlight.tags.literal).
  98053. */
  98054. bool: Ae(Pl),
  98055. /**
  98056. Regular expression [literal](#highlight.tags.literal).
  98057. */
  98058. regexp: Ae(Pl),
  98059. /**
  98060. An escape [literal](#highlight.tags.literal), for example a
  98061. backslash escape in a string.
  98062. */
  98063. escape: Ae(Pl),
  98064. /**
  98065. A color [literal](#highlight.tags.literal).
  98066. */
  98067. color: Ae(Pl),
  98068. /**
  98069. A URL [literal](#highlight.tags.literal).
  98070. */
  98071. url: Ae(Pl),
  98072. /**
  98073. A language keyword.
  98074. */
  98075. keyword: To,
  98076. /**
  98077. The [keyword](#highlight.tags.keyword) for the self or this
  98078. object.
  98079. */
  98080. self: Ae(To),
  98081. /**
  98082. The [keyword](#highlight.tags.keyword) for null.
  98083. */
  98084. null: Ae(To),
  98085. /**
  98086. A [keyword](#highlight.tags.keyword) denoting some atomic value.
  98087. */
  98088. atom: Ae(To),
  98089. /**
  98090. A [keyword](#highlight.tags.keyword) that represents a unit.
  98091. */
  98092. unit: Ae(To),
  98093. /**
  98094. A modifier [keyword](#highlight.tags.keyword).
  98095. */
  98096. modifier: Ae(To),
  98097. /**
  98098. A [keyword](#highlight.tags.keyword) that acts as an operator.
  98099. */
  98100. operatorKeyword: Ae(To),
  98101. /**
  98102. A control-flow related [keyword](#highlight.tags.keyword).
  98103. */
  98104. controlKeyword: Ae(To),
  98105. /**
  98106. A [keyword](#highlight.tags.keyword) that defines something.
  98107. */
  98108. definitionKeyword: Ae(To),
  98109. /**
  98110. A [keyword](#highlight.tags.keyword) related to defining or
  98111. interfacing with modules.
  98112. */
  98113. moduleKeyword: Ae(To),
  98114. /**
  98115. An operator.
  98116. */
  98117. operator: Po,
  98118. /**
  98119. An [operator](#highlight.tags.operator) that dereferences something.
  98120. */
  98121. derefOperator: Ae(Po),
  98122. /**
  98123. Arithmetic-related [operator](#highlight.tags.operator).
  98124. */
  98125. arithmeticOperator: Ae(Po),
  98126. /**
  98127. Logical [operator](#highlight.tags.operator).
  98128. */
  98129. logicOperator: Ae(Po),
  98130. /**
  98131. Bit [operator](#highlight.tags.operator).
  98132. */
  98133. bitwiseOperator: Ae(Po),
  98134. /**
  98135. Comparison [operator](#highlight.tags.operator).
  98136. */
  98137. compareOperator: Ae(Po),
  98138. /**
  98139. [Operator](#highlight.tags.operator) that updates its operand.
  98140. */
  98141. updateOperator: Ae(Po),
  98142. /**
  98143. [Operator](#highlight.tags.operator) that defines something.
  98144. */
  98145. definitionOperator: Ae(Po),
  98146. /**
  98147. Type-related [operator](#highlight.tags.operator).
  98148. */
  98149. typeOperator: Ae(Po),
  98150. /**
  98151. Control-flow [operator](#highlight.tags.operator).
  98152. */
  98153. controlOperator: Ae(Po),
  98154. /**
  98155. Program or markup punctuation.
  98156. */
  98157. punctuation: VM,
  98158. /**
  98159. [Punctuation](#highlight.tags.punctuation) that separates
  98160. things.
  98161. */
  98162. separator: Ae(VM),
  98163. /**
  98164. Bracket-style [punctuation](#highlight.tags.punctuation).
  98165. */
  98166. bracket: kv,
  98167. /**
  98168. Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
  98169. tokens).
  98170. */
  98171. angleBracket: Ae(kv),
  98172. /**
  98173. Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
  98174. tokens).
  98175. */
  98176. squareBracket: Ae(kv),
  98177. /**
  98178. Parentheses (usually `(` and `)` tokens). Subtag of
  98179. [bracket](#highlight.tags.bracket).
  98180. */
  98181. paren: Ae(kv),
  98182. /**
  98183. Braces (usually `{` and `}` tokens). Subtag of
  98184. [bracket](#highlight.tags.bracket).
  98185. */
  98186. brace: Ae(kv),
  98187. /**
  98188. Content, for example plain text in XML or markup documents.
  98189. */
  98190. content: Mo,
  98191. /**
  98192. [Content](#highlight.tags.content) that represents a heading.
  98193. */
  98194. heading: cc,
  98195. /**
  98196. A level 1 [heading](#highlight.tags.heading).
  98197. */
  98198. heading1: Ae(cc),
  98199. /**
  98200. A level 2 [heading](#highlight.tags.heading).
  98201. */
  98202. heading2: Ae(cc),
  98203. /**
  98204. A level 3 [heading](#highlight.tags.heading).
  98205. */
  98206. heading3: Ae(cc),
  98207. /**
  98208. A level 4 [heading](#highlight.tags.heading).
  98209. */
  98210. heading4: Ae(cc),
  98211. /**
  98212. A level 5 [heading](#highlight.tags.heading).
  98213. */
  98214. heading5: Ae(cc),
  98215. /**
  98216. A level 6 [heading](#highlight.tags.heading).
  98217. */
  98218. heading6: Ae(cc),
  98219. /**
  98220. A prose separator (such as a horizontal rule).
  98221. */
  98222. contentSeparator: Ae(Mo),
  98223. /**
  98224. [Content](#highlight.tags.content) that represents a list.
  98225. */
  98226. list: Ae(Mo),
  98227. /**
  98228. [Content](#highlight.tags.content) that represents a quote.
  98229. */
  98230. quote: Ae(Mo),
  98231. /**
  98232. [Content](#highlight.tags.content) that is emphasized.
  98233. */
  98234. emphasis: Ae(Mo),
  98235. /**
  98236. [Content](#highlight.tags.content) that is styled strong.
  98237. */
  98238. strong: Ae(Mo),
  98239. /**
  98240. [Content](#highlight.tags.content) that is part of a link.
  98241. */
  98242. link: Ae(Mo),
  98243. /**
  98244. [Content](#highlight.tags.content) that is styled as code or
  98245. monospace.
  98246. */
  98247. monospace: Ae(Mo),
  98248. /**
  98249. [Content](#highlight.tags.content) that has a strike-through
  98250. style.
  98251. */
  98252. strikethrough: Ae(Mo),
  98253. /**
  98254. Inserted text in a change-tracking format.
  98255. */
  98256. inserted: Ae(),
  98257. /**
  98258. Deleted text.
  98259. */
  98260. deleted: Ae(),
  98261. /**
  98262. Changed text.
  98263. */
  98264. changed: Ae(),
  98265. /**
  98266. An invalid or unsyntactic element.
  98267. */
  98268. invalid: Ae(),
  98269. /**
  98270. Metadata or meta-instruction.
  98271. */
  98272. meta: o_,
  98273. /**
  98274. [Metadata](#highlight.tags.meta) that applies to the entire
  98275. document.
  98276. */
  98277. documentMeta: Ae(o_),
  98278. /**
  98279. [Metadata](#highlight.tags.meta) that annotates or adds
  98280. attributes to a given syntactic element.
  98281. */
  98282. annotation: Ae(o_),
  98283. /**
  98284. Processing instruction or preprocessor directive. Subtag of
  98285. [meta](#highlight.tags.meta).
  98286. */
  98287. processingInstruction: Ae(o_),
  98288. /**
  98289. [Modifier](#highlight.Tag^defineModifier) that indicates that a
  98290. given element is being defined. Expected to be used with the
  98291. various [name](#highlight.tags.name) tags.
  98292. */
  98293. definition: ko.defineModifier(),
  98294. /**
  98295. [Modifier](#highlight.Tag^defineModifier) that indicates that
  98296. something is constant. Mostly expected to be used with
  98297. [variable names](#highlight.tags.variableName).
  98298. */
  98299. constant: ko.defineModifier(),
  98300. /**
  98301. [Modifier](#highlight.Tag^defineModifier) used to indicate that
  98302. a [variable](#highlight.tags.variableName) or [property
  98303. name](#highlight.tags.propertyName) is being called or defined
  98304. as a function.
  98305. */
  98306. function: ko.defineModifier(),
  98307. /**
  98308. [Modifier](#highlight.Tag^defineModifier) that can be applied to
  98309. [names](#highlight.tags.name) to indicate that they belong to
  98310. the language's standard environment.
  98311. */
  98312. standard: ko.defineModifier(),
  98313. /**
  98314. [Modifier](#highlight.Tag^defineModifier) that indicates a given
  98315. [names](#highlight.tags.name) is local to some scope.
  98316. */
  98317. local: ko.defineModifier(),
  98318. /**
  98319. A generic variant [modifier](#highlight.Tag^defineModifier) that
  98320. can be used to tag language-specific alternative variants of
  98321. some common tag. It is recommended for themes to define special
  98322. forms of at least the [string](#highlight.tags.string) and
  98323. [variable name](#highlight.tags.variableName) tags, since those
  98324. come up a lot.
  98325. */
  98326. special: ko.defineModifier()
  98327. };
  98328. koe([
  98329. { tag: J.link, class: "tok-link" },
  98330. { tag: J.heading, class: "tok-heading" },
  98331. { tag: J.emphasis, class: "tok-emphasis" },
  98332. { tag: J.strong, class: "tok-strong" },
  98333. { tag: J.keyword, class: "tok-keyword" },
  98334. { tag: J.atom, class: "tok-atom" },
  98335. { tag: J.bool, class: "tok-bool" },
  98336. { tag: J.url, class: "tok-url" },
  98337. { tag: J.labelName, class: "tok-labelName" },
  98338. { tag: J.inserted, class: "tok-inserted" },
  98339. { tag: J.deleted, class: "tok-deleted" },
  98340. { tag: J.literal, class: "tok-literal" },
  98341. { tag: J.string, class: "tok-string" },
  98342. { tag: J.number, class: "tok-number" },
  98343. { tag: [J.regexp, J.escape, J.special(J.string)], class: "tok-string2" },
  98344. { tag: J.variableName, class: "tok-variableName" },
  98345. { tag: J.local(J.variableName), class: "tok-variableName tok-local" },
  98346. { tag: J.definition(J.variableName), class: "tok-variableName tok-definition" },
  98347. { tag: J.special(J.variableName), class: "tok-variableName2" },
  98348. { tag: J.definition(J.propertyName), class: "tok-propertyName tok-definition" },
  98349. { tag: J.typeName, class: "tok-typeName" },
  98350. { tag: J.namespace, class: "tok-namespace" },
  98351. { tag: J.className, class: "tok-className" },
  98352. { tag: J.macroName, class: "tok-macroName" },
  98353. { tag: J.propertyName, class: "tok-propertyName" },
  98354. { tag: J.operator, class: "tok-operator" },
  98355. { tag: J.comment, class: "tok-comment" },
  98356. { tag: J.meta, class: "tok-meta" },
  98357. { tag: J.invalid, class: "tok-invalid" },
  98358. { tag: J.punctuation, class: "tok-punctuation" }
  98359. ]);
  98360. var $$;
  98361. const Gd = /* @__PURE__ */ new Pt();
  98362. function Loe(t) {
  98363. return Be.define({
  98364. combine: t ? (e) => e.concat(t) : void 0
  98365. });
  98366. }
  98367. const g4 = /* @__PURE__ */ new Pt();
  98368. class Ka {
  98369. /**
  98370. Construct a language object. If you need to invoke this
  98371. directly, first define a data facet with
  98372. [`defineLanguageFacet`](https://codemirror.net/6/docs/ref/#language.defineLanguageFacet), and then
  98373. configure your parser to [attach](https://codemirror.net/6/docs/ref/#language.languageDataProp) it
  98374. to the language's outer syntax node.
  98375. */
  98376. constructor(e, n, r = [], i = "") {
  98377. this.data = e, this.name = i, At.prototype.hasOwnProperty("tree") || Object.defineProperty(At.prototype, "tree", { get() {
  98378. return nr(this);
  98379. } }), this.parser = n, this.extension = [
  98380. yu.of(this),
  98381. At.languageData.of((a, o, s) => {
  98382. let l = AG(a, o, s), u = l.type.prop(Gd);
  98383. if (!u)
  98384. return [];
  98385. let c = a.facet(u), f = l.type.prop(g4);
  98386. if (f) {
  98387. let d = l.resolve(o - l.from, s);
  98388. for (let h of f)
  98389. if (h.test(d, a)) {
  98390. let p = a.facet(h.facet);
  98391. return h.type == "replace" ? p : p.concat(c);
  98392. }
  98393. }
  98394. return c;
  98395. })
  98396. ].concat(r);
  98397. }
  98398. /**
  98399. Query whether this language is active at the given position.
  98400. */
  98401. isActiveAt(e, n, r = -1) {
  98402. return AG(e, n, r).type.prop(Gd) == this.data;
  98403. }
  98404. /**
  98405. Find the document regions that were parsed using this language.
  98406. The returned regions will _include_ any nested languages rooted
  98407. in this language, when those exist.
  98408. */
  98409. findRegions(e) {
  98410. let n = e.facet(yu);
  98411. if ((n == null ? void 0 : n.data) == this.data)
  98412. return [{ from: 0, to: e.doc.length }];
  98413. if (!n || !n.allowsNesting)
  98414. return [];
  98415. let r = [], i = (a, o) => {
  98416. if (a.prop(Gd) == this.data) {
  98417. r.push({ from: o, to: o + a.length });
  98418. return;
  98419. }
  98420. let s = a.prop(Pt.mounted);
  98421. if (s) {
  98422. if (s.tree.prop(Gd) == this.data) {
  98423. if (s.overlay)
  98424. for (let l of s.overlay)
  98425. r.push({ from: l.from + o, to: l.to + o });
  98426. else
  98427. r.push({ from: o, to: o + a.length });
  98428. return;
  98429. } else if (s.overlay) {
  98430. let l = r.length;
  98431. if (i(s.tree, s.overlay[0].from + o), r.length > l)
  98432. return;
  98433. }
  98434. }
  98435. for (let l = 0; l < a.children.length; l++) {
  98436. let u = a.children[l];
  98437. u instanceof Wn && i(u, a.positions[l] + o);
  98438. }
  98439. };
  98440. return i(nr(e), 0), r;
  98441. }
  98442. /**
  98443. Indicates whether this language allows nested languages. The
  98444. default implementation returns true.
  98445. */
  98446. get allowsNesting() {
  98447. return !0;
  98448. }
  98449. }
  98450. Ka.setState = /* @__PURE__ */ dt.define();
  98451. function AG(t, e, n) {
  98452. let r = t.facet(yu), i = nr(t).topNode;
  98453. if (!r || r.allowsNesting)
  98454. for (let a = i; a; a = a.enter(e, n, Zn.ExcludeBuffers))
  98455. a.type.isTop && (i = a);
  98456. return i;
  98457. }
  98458. class r0 extends Ka {
  98459. constructor(e, n, r) {
  98460. super(e, n, [], r), this.parser = n;
  98461. }
  98462. /**
  98463. Define a language from a parser.
  98464. */
  98465. static define(e) {
  98466. let n = Loe(e.languageData);
  98467. return new r0(n, e.parser.configure({
  98468. props: [Gd.add((r) => r.isTop ? n : void 0)]
  98469. }), e.name);
  98470. }
  98471. /**
  98472. Create a new instance of this language with a reconfigured
  98473. version of its parser and optionally a new name.
  98474. */
  98475. configure(e, n) {
  98476. return new r0(this.data, this.parser.configure(e), n || this.name);
  98477. }
  98478. get allowsNesting() {
  98479. return this.parser.hasWrappers();
  98480. }
  98481. }
  98482. function nr(t) {
  98483. let e = t.field(Ka.state, !1);
  98484. return e ? e.tree : Wn.empty;
  98485. }
  98486. class Plt {
  98487. /**
  98488. Create an input object for the given document.
  98489. */
  98490. constructor(e) {
  98491. this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter();
  98492. }
  98493. get length() {
  98494. return this.doc.length;
  98495. }
  98496. syncTo(e) {
  98497. return this.string = this.cursor.next(e - this.cursorPos).value, this.cursorPos = e + this.string.length, this.cursorPos - this.string.length;
  98498. }
  98499. chunk(e) {
  98500. return this.syncTo(e), this.string;
  98501. }
  98502. get lineChunks() {
  98503. return !0;
  98504. }
  98505. read(e, n) {
  98506. let r = this.cursorPos - this.string.length;
  98507. return e < r || n >= this.cursorPos ? this.doc.sliceString(e, n) : this.string.slice(e - r, n - r);
  98508. }
  98509. }
  98510. let Lv = null;
  98511. class dS {
  98512. constructor(e, n, r = [], i, a, o, s, l) {
  98513. 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 = [];
  98514. }
  98515. /**
  98516. @internal
  98517. */
  98518. static create(e, n, r) {
  98519. return new dS(e, n, [], Wn.empty, 0, r, [], null);
  98520. }
  98521. startParse() {
  98522. return this.parser.startParse(new Plt(this.state.doc), this.fragments);
  98523. }
  98524. /**
  98525. @internal
  98526. */
  98527. work(e, n) {
  98528. return n != null && n >= this.state.doc.length && (n = void 0), this.tree != Wn.empty && this.isDone(n ?? this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => {
  98529. var r;
  98530. if (typeof e == "number") {
  98531. let i = Date.now() + e;
  98532. e = () => Date.now() > i;
  98533. }
  98534. 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); ; ) {
  98535. let i = this.parse.advance();
  98536. if (i)
  98537. if (this.fragments = this.withoutTempSkipped(of.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))
  98538. this.parse = this.startParse();
  98539. else
  98540. return !0;
  98541. if (e())
  98542. return !1;
  98543. }
  98544. });
  98545. }
  98546. /**
  98547. @internal
  98548. */
  98549. takeTree() {
  98550. let e, n;
  98551. this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => {
  98552. for (; !(n = this.parse.advance()); )
  98553. ;
  98554. }), this.treeLen = e, this.tree = n, this.fragments = this.withoutTempSkipped(of.addTree(this.tree, this.fragments, !0)), this.parse = null);
  98555. }
  98556. withContext(e) {
  98557. let n = Lv;
  98558. Lv = this;
  98559. try {
  98560. return e();
  98561. } finally {
  98562. Lv = n;
  98563. }
  98564. }
  98565. withoutTempSkipped(e) {
  98566. for (let n; n = this.tempSkipped.pop(); )
  98567. e = EG(e, n.from, n.to);
  98568. return e;
  98569. }
  98570. /**
  98571. @internal
  98572. */
  98573. changes(e, n) {
  98574. let { fragments: r, tree: i, treeLen: a, viewport: o, skipped: s } = this;
  98575. if (this.takeTree(), !e.empty) {
  98576. let l = [];
  98577. if (e.iterChangedRanges((u, c, f, d) => l.push({ fromA: u, toA: c, fromB: f, toB: d })), r = of.applyChanges(r, l), i = Wn.empty, a = 0, o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }, this.skipped.length) {
  98578. s = [];
  98579. for (let u of this.skipped) {
  98580. let c = e.mapPos(u.from, 1), f = e.mapPos(u.to, -1);
  98581. c < f && s.push({ from: c, to: f });
  98582. }
  98583. }
  98584. }
  98585. return new dS(this.parser, n, r, i, a, o, s, this.scheduleOn);
  98586. }
  98587. /**
  98588. @internal
  98589. */
  98590. updateViewport(e) {
  98591. if (this.viewport.from == e.from && this.viewport.to == e.to)
  98592. return !1;
  98593. this.viewport = e;
  98594. let n = this.skipped.length;
  98595. for (let r = 0; r < this.skipped.length; r++) {
  98596. let { from: i, to: a } = this.skipped[r];
  98597. i < e.to && a > e.from && (this.fragments = EG(this.fragments, i, a), this.skipped.splice(r--, 1));
  98598. }
  98599. return this.skipped.length >= n ? !1 : (this.reset(), !0);
  98600. }
  98601. /**
  98602. @internal
  98603. */
  98604. reset() {
  98605. this.parse && (this.takeTree(), this.parse = null);
  98606. }
  98607. /**
  98608. Notify the parse scheduler that the given region was skipped
  98609. because it wasn't in view, and the parse should be restarted
  98610. when it comes into view.
  98611. */
  98612. skipUntilInView(e, n) {
  98613. this.skipped.push({ from: e, to: n });
  98614. }
  98615. /**
  98616. Returns a parser intended to be used as placeholder when
  98617. asynchronously loading a nested parser. It'll skip its input and
  98618. mark it as not-really-parsed, so that the next update will parse
  98619. it again.
  98620. When `until` is given, a reparse will be scheduled when that
  98621. promise resolves.
  98622. */
  98623. static getSkippingParser(e) {
  98624. return new class extends Doe {
  98625. createParse(n, r, i) {
  98626. let a = i[0].from, o = i[i.length - 1].to;
  98627. return {
  98628. parsedPos: a,
  98629. advance() {
  98630. let l = Lv;
  98631. if (l) {
  98632. for (let u of i)
  98633. l.tempSkipped.push(u);
  98634. e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e);
  98635. }
  98636. return this.parsedPos = o, new Wn(Pi.none, [], [], o - a);
  98637. },
  98638. stoppedAt: null,
  98639. stopAt() {
  98640. }
  98641. };
  98642. }
  98643. }();
  98644. }
  98645. /**
  98646. @internal
  98647. */
  98648. isDone(e) {
  98649. e = Math.min(e, this.state.doc.length);
  98650. let n = this.fragments;
  98651. return this.treeLen >= e && n.length && n[0].from == 0 && n[0].to >= e;
  98652. }
  98653. /**
  98654. Get the context for the current parse, or `null` if no editor
  98655. parse is in progress.
  98656. */
  98657. static get() {
  98658. return Lv;
  98659. }
  98660. }
  98661. function EG(t, e, n) {
  98662. return of.applyChanges(t, [{ fromA: e, toA: n, fromB: e, toB: n }]);
  98663. }
  98664. class np {
  98665. constructor(e) {
  98666. this.context = e, this.tree = e.tree;
  98667. }
  98668. apply(e) {
  98669. if (!e.docChanged && this.tree == this.context.tree)
  98670. return this;
  98671. 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);
  98672. return n.work(20, r) || n.takeTree(), new np(n);
  98673. }
  98674. static init(e) {
  98675. let n = Math.min(3e3, e.doc.length), r = dS.create(e.facet(yu).parser, e, { from: 0, to: n });
  98676. return r.work(20, n) || r.takeTree(), new np(r);
  98677. }
  98678. }
  98679. Ka.state = /* @__PURE__ */ ur.define({
  98680. create: np.init,
  98681. update(t, e) {
  98682. for (let n of e.effects)
  98683. if (n.is(Ka.setState))
  98684. return n.value;
  98685. return e.startState.facet(yu) != e.state.facet(yu) ? np.init(e.state) : t.apply(e);
  98686. }
  98687. });
  98688. let Noe = (t) => {
  98689. let e = setTimeout(
  98690. () => t(),
  98691. 500
  98692. /* Work.MaxPause */
  98693. );
  98694. return () => clearTimeout(e);
  98695. };
  98696. typeof requestIdleCallback < "u" && (Noe = (t) => {
  98697. let e = -1, n = setTimeout(
  98698. () => {
  98699. e = requestIdleCallback(t, {
  98700. timeout: 400
  98701. /* Work.MinPause */
  98702. });
  98703. },
  98704. 100
  98705. /* Work.MinPause */
  98706. );
  98707. return () => e < 0 ? clearTimeout(n) : cancelIdleCallback(e);
  98708. });
  98709. const A$ = typeof navigator < "u" && (!(($$ = navigator.scheduling) === null || $$ === void 0) && $$.isInputPending) ? () => navigator.scheduling.isInputPending() : null, $lt = /* @__PURE__ */ kn.fromClass(class {
  98710. constructor(e) {
  98711. this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork();
  98712. }
  98713. update(e) {
  98714. let n = this.view.state.field(Ka.state).context;
  98715. (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);
  98716. }
  98717. scheduleWork() {
  98718. if (this.working)
  98719. return;
  98720. let { state: e } = this.view, n = e.field(Ka.state);
  98721. (n.tree != n.context.tree || !n.context.isDone(e.doc.length)) && (this.working = Noe(this.work));
  98722. }
  98723. work(e) {
  98724. this.working = null;
  98725. let n = Date.now();
  98726. if (this.chunkEnd < n && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = n + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0)
  98727. return;
  98728. let { state: r, viewport: { to: i } } = this.view, a = r.field(Ka.state);
  98729. if (a.tree == a.context.tree && a.context.isDone(
  98730. i + 1e5
  98731. /* Work.MaxParseAhead */
  98732. ))
  98733. return;
  98734. let o = Date.now() + Math.min(this.chunkBudget, 100, e && !A$ ? Math.max(25, e.timeRemaining() - 5) : 1e9), s = a.context.treeLen < i && r.doc.length > i + 1e3, l = a.context.work(() => A$ && A$() || Date.now() > o, i + (s ? 0 : 1e5));
  98735. this.chunkBudget -= Date.now() - n, (l || this.chunkBudget <= 0) && (a.context.takeTree(), this.view.dispatch({ effects: Ka.setState.of(new np(a.context)) })), this.chunkBudget > 0 && !(l && !s) && this.scheduleWork(), this.checkAsyncSchedule(a.context);
  98736. }
  98737. checkAsyncSchedule(e) {
  98738. e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((n) => bi(this.view.state, n)).then(() => this.workScheduled--), e.scheduleOn = null);
  98739. }
  98740. destroy() {
  98741. this.working && this.working();
  98742. }
  98743. isWorking() {
  98744. return !!(this.working || this.workScheduled > 0);
  98745. }
  98746. }, {
  98747. eventHandlers: { focus() {
  98748. this.scheduleWork();
  98749. } }
  98750. }), yu = /* @__PURE__ */ Be.define({
  98751. combine(t) {
  98752. return t.length ? t[0] : null;
  98753. },
  98754. enables: (t) => [
  98755. Ka.state,
  98756. $lt,
  98757. De.contentAttributes.compute([t], (e) => {
  98758. let n = e.facet(t);
  98759. return n && n.name ? { "data-language": n.name } : {};
  98760. })
  98761. ]
  98762. });
  98763. class Boe {
  98764. /**
  98765. Create a language support object.
  98766. */
  98767. constructor(e, n = []) {
  98768. this.language = e, this.support = n, this.extension = [e, n];
  98769. }
  98770. }
  98771. const Alt = /* @__PURE__ */ Be.define(), uy = /* @__PURE__ */ Be.define({
  98772. combine: (t) => {
  98773. if (!t.length)
  98774. return " ";
  98775. let e = t[0];
  98776. if (!e || /\S/.test(e) || Array.from(e).some((n) => n != e[0]))
  98777. throw new Error("Invalid indent unit: " + JSON.stringify(t[0]));
  98778. return e;
  98779. }
  98780. });
  98781. function hS(t) {
  98782. let e = t.facet(uy);
  98783. return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length;
  98784. }
  98785. function i0(t, e) {
  98786. let n = "", r = t.tabSize, i = t.facet(uy)[0];
  98787. if (i == " ") {
  98788. for (; e >= r; )
  98789. n += " ", e -= r;
  98790. i = " ";
  98791. }
  98792. for (let a = 0; a < e; a++)
  98793. n += i;
  98794. return n;
  98795. }
  98796. function m4(t, e) {
  98797. t instanceof At && (t = new Lw(t));
  98798. for (let r of t.state.facet(Alt)) {
  98799. let i = r(t, e);
  98800. if (i !== void 0)
  98801. return i;
  98802. }
  98803. let n = nr(t.state);
  98804. return n.length >= e ? Elt(t, n, e) : null;
  98805. }
  98806. class Lw {
  98807. /**
  98808. Create an indent context.
  98809. */
  98810. constructor(e, n = {}) {
  98811. this.state = e, this.options = n, this.unit = hS(e);
  98812. }
  98813. /**
  98814. Get a description of the line at the given position, taking
  98815. [simulated line
  98816. breaks](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  98817. into account. If there is such a break at `pos`, the `bias`
  98818. argument determines whether the part of the line line before or
  98819. after the break is used.
  98820. */
  98821. lineAt(e, n = 1) {
  98822. let r = this.state.doc.lineAt(e), { simulateBreak: i, simulateDoubleBreak: a } = this.options;
  98823. 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;
  98824. }
  98825. /**
  98826. Get the text directly after `pos`, either the entire line
  98827. or the next 100 characters, whichever is shorter.
  98828. */
  98829. textAfterPos(e, n = 1) {
  98830. if (this.options.simulateDoubleBreak && e == this.options.simulateBreak)
  98831. return "";
  98832. let { text: r, from: i } = this.lineAt(e, n);
  98833. return r.slice(e - i, Math.min(r.length, e + 100 - i));
  98834. }
  98835. /**
  98836. Find the column for the given position.
  98837. */
  98838. column(e, n = 1) {
  98839. let { text: r, from: i } = this.lineAt(e, n), a = this.countColumn(r, e - i), o = this.options.overrideIndentation ? this.options.overrideIndentation(i) : -1;
  98840. return o > -1 && (a += o - this.countColumn(r, r.search(/\S|$/))), a;
  98841. }
  98842. /**
  98843. Find the column position (taking tabs into account) of the given
  98844. position in the given string.
  98845. */
  98846. countColumn(e, n = e.length) {
  98847. return zp(e, this.state.tabSize, n);
  98848. }
  98849. /**
  98850. Find the indentation column of the line at the given point.
  98851. */
  98852. lineIndent(e, n = 1) {
  98853. let { text: r, from: i } = this.lineAt(e, n), a = this.options.overrideIndentation;
  98854. if (a) {
  98855. let o = a(i);
  98856. if (o > -1)
  98857. return o;
  98858. }
  98859. return this.countColumn(r, r.search(/\S|$/));
  98860. }
  98861. /**
  98862. Returns the [simulated line
  98863. break](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  98864. for this context, if any.
  98865. */
  98866. get simulatedBreak() {
  98867. return this.options.simulateBreak || null;
  98868. }
  98869. }
  98870. const y4 = /* @__PURE__ */ new Pt();
  98871. function Elt(t, e, n) {
  98872. let r = e.resolveStack(n), i = r.node.enterUnfinishedNodesBefore(n);
  98873. if (i != r.node) {
  98874. let a = [];
  98875. for (let o = i; o != r.node; o = o.parent)
  98876. a.push(o);
  98877. for (let o = a.length - 1; o >= 0; o--)
  98878. r = { node: a[o], next: r };
  98879. }
  98880. return zoe(r, t, n);
  98881. }
  98882. function zoe(t, e, n) {
  98883. for (let r = t; r; r = r.next) {
  98884. let i = Ilt(r.node);
  98885. if (i)
  98886. return i(b4.create(e, n, r));
  98887. }
  98888. return 0;
  98889. }
  98890. function Mlt(t) {
  98891. return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak;
  98892. }
  98893. function Ilt(t) {
  98894. let e = t.type.prop(y4);
  98895. if (e)
  98896. return e;
  98897. let n = t.firstChild, r;
  98898. if (n && (r = n.type.prop(Pt.closedBy))) {
  98899. let i = t.lastChild, a = i && r.indexOf(i.name) > -1;
  98900. return (o) => Voe(o, !0, 1, void 0, a && !Mlt(o) ? i.from : void 0);
  98901. }
  98902. return t.parent == null ? Dlt : null;
  98903. }
  98904. function Dlt() {
  98905. return 0;
  98906. }
  98907. class b4 extends Lw {
  98908. constructor(e, n, r) {
  98909. super(e.state, e.options), this.base = e, this.pos = n, this.context = r;
  98910. }
  98911. /**
  98912. The syntax tree node to which the indentation strategy
  98913. applies.
  98914. */
  98915. get node() {
  98916. return this.context.node;
  98917. }
  98918. /**
  98919. @internal
  98920. */
  98921. static create(e, n, r) {
  98922. return new b4(e, n, r);
  98923. }
  98924. /**
  98925. Get the text directly after `this.pos`, either the entire line
  98926. or the next 100 characters, whichever is shorter.
  98927. */
  98928. get textAfter() {
  98929. return this.textAfterPos(this.pos);
  98930. }
  98931. /**
  98932. Get the indentation at the reference line for `this.node`, which
  98933. is the line on which it starts, unless there is a node that is
  98934. _not_ a parent of this node covering the start of that line. If
  98935. so, the line at the start of that node is tried, again skipping
  98936. on if it is covered by another such node.
  98937. */
  98938. get baseIndent() {
  98939. return this.baseIndentFor(this.node);
  98940. }
  98941. /**
  98942. Get the indentation for the reference line of the given node
  98943. (see [`baseIndent`](https://codemirror.net/6/docs/ref/#language.TreeIndentContext.baseIndent)).
  98944. */
  98945. baseIndentFor(e) {
  98946. let n = this.state.doc.lineAt(e.from);
  98947. for (; ; ) {
  98948. let r = e.resolve(n.from);
  98949. for (; r.parent && r.parent.from == r.from; )
  98950. r = r.parent;
  98951. if (Rlt(r, e))
  98952. break;
  98953. n = this.state.doc.lineAt(r.from);
  98954. }
  98955. return this.lineIndent(n.from);
  98956. }
  98957. /**
  98958. Continue looking for indentations in the node's parent nodes,
  98959. and return the result of that.
  98960. */
  98961. continue() {
  98962. return zoe(this.context.next, this.base, this.pos);
  98963. }
  98964. }
  98965. function Rlt(t, e) {
  98966. for (let n = e; n; n = n.parent)
  98967. if (t == n)
  98968. return !0;
  98969. return !1;
  98970. }
  98971. function klt(t) {
  98972. let e = t.node, n = e.childAfter(e.from), r = e.lastChild;
  98973. if (!n)
  98974. return null;
  98975. 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);
  98976. for (let s = n.to; ; ) {
  98977. let l = e.childAfter(s);
  98978. if (!l || l == r)
  98979. return null;
  98980. if (!l.type.isSkipped)
  98981. return l.from < o ? n : null;
  98982. s = l.to;
  98983. }
  98984. }
  98985. function Llt({ closing: t, align: e = !0, units: n = 1 }) {
  98986. return (r) => Voe(r, e, n, t);
  98987. }
  98988. function Voe(t, e, n, r, i) {
  98989. 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 ? klt(t) : null;
  98990. return l ? s ? t.column(l.from) : t.column(l.to) : t.baseIndent + (s ? 0 : t.unit * n);
  98991. }
  98992. const Nlt = (t) => t.baseIndent;
  98993. function Yg({ except: t, units: e = 1 } = {}) {
  98994. return (n) => {
  98995. let r = t && t.test(n.textAfter);
  98996. return n.baseIndent + (r ? 0 : e * n.unit);
  98997. };
  98998. }
  98999. const Blt = 200;
  99000. function zlt() {
  99001. return At.transactionFilter.of((t) => {
  99002. if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete"))
  99003. return t;
  99004. let e = t.startState.languageDataAt("indentOnInput", t.startState.selection.main.head);
  99005. if (!e.length)
  99006. return t;
  99007. let n = t.newDoc, { head: r } = t.newSelection.main, i = n.lineAt(r);
  99008. if (r > i.from + Blt)
  99009. return t;
  99010. let a = n.sliceString(i.from, r);
  99011. if (!e.some((u) => u.test(a)))
  99012. return t;
  99013. let { state: o } = t, s = -1, l = [];
  99014. for (let { head: u } of o.selection.ranges) {
  99015. let c = o.doc.lineAt(u);
  99016. if (c.from == s)
  99017. continue;
  99018. s = c.from;
  99019. let f = m4(o, c.from);
  99020. if (f == null)
  99021. continue;
  99022. let d = /^\s*/.exec(c.text)[0], h = i0(o, f);
  99023. d != h && l.push({ from: c.from, to: c.from + d.length, insert: h });
  99024. }
  99025. return l.length ? [t, { changes: l, sequential: !0 }] : t;
  99026. });
  99027. }
  99028. const Vlt = /* @__PURE__ */ Be.define(), _4 = /* @__PURE__ */ new Pt();
  99029. function Foe(t) {
  99030. let e = t.firstChild, n = t.lastChild;
  99031. return e && e.to < n.from ? { from: e.to, to: n.type.isError ? t.to : n.from } : null;
  99032. }
  99033. function Flt(t, e, n) {
  99034. let r = nr(t);
  99035. if (r.length < n)
  99036. return null;
  99037. let i = r.resolveStack(n, 1), a = null;
  99038. for (let o = i; o; o = o.next) {
  99039. let s = o.node;
  99040. if (s.to <= n || s.from > n)
  99041. continue;
  99042. if (a && s.from < e)
  99043. break;
  99044. let l = s.type.prop(_4);
  99045. if (l && (s.to < r.length - 50 || r.length == t.doc.length || !Wlt(s))) {
  99046. let u = l(s, t);
  99047. u && u.from <= n && u.from >= e && u.to > n && (a = u);
  99048. }
  99049. }
  99050. return a;
  99051. }
  99052. function Wlt(t) {
  99053. let e = t.lastChild;
  99054. return e && e.to == t.to && e.type.isError;
  99055. }
  99056. function pS(t, e, n) {
  99057. for (let r of t.facet(Vlt)) {
  99058. let i = r(t, e, n);
  99059. if (i)
  99060. return i;
  99061. }
  99062. return Flt(t, e, n);
  99063. }
  99064. function Woe(t, e) {
  99065. let n = e.mapPos(t.from, 1), r = e.mapPos(t.to, -1);
  99066. return n >= r ? void 0 : { from: n, to: r };
  99067. }
  99068. const Nw = /* @__PURE__ */ dt.define({ map: Woe }), cy = /* @__PURE__ */ dt.define({ map: Woe });
  99069. function Qoe(t) {
  99070. let e = [];
  99071. for (let { head: n } of t.state.selection.ranges)
  99072. e.some((r) => r.from <= n && r.to >= n) || e.push(t.lineBlockAt(n));
  99073. return e;
  99074. }
  99075. const Af = /* @__PURE__ */ ur.define({
  99076. create() {
  99077. return Ze.none;
  99078. },
  99079. update(t, e) {
  99080. t = t.map(e.changes);
  99081. for (let n of e.effects)
  99082. if (n.is(Nw) && !Qlt(t, n.value.from, n.value.to)) {
  99083. let { preparePlaceholder: r } = e.state.facet(joe), i = r ? Ze.replace({ widget: new Ylt(r(e.state, n.value)) }) : MG;
  99084. t = t.update({ add: [i.range(n.value.from, n.value.to)] });
  99085. } else n.is(cy) && (t = t.update({
  99086. filter: (r, i) => n.value.from != r || n.value.to != i,
  99087. filterFrom: n.value.from,
  99088. filterTo: n.value.to
  99089. }));
  99090. if (e.selection) {
  99091. let n = !1, { head: r } = e.selection.main;
  99092. t.between(r, r, (i, a) => {
  99093. i < r && a > r && (n = !0);
  99094. }), n && (t = t.update({
  99095. filterFrom: r,
  99096. filterTo: r,
  99097. filter: (i, a) => a <= r || i >= r
  99098. }));
  99099. }
  99100. return t;
  99101. },
  99102. provide: (t) => De.decorations.from(t),
  99103. toJSON(t, e) {
  99104. let n = [];
  99105. return t.between(0, e.doc.length, (r, i) => {
  99106. n.push(r, i);
  99107. }), n;
  99108. },
  99109. fromJSON(t) {
  99110. if (!Array.isArray(t) || t.length % 2)
  99111. throw new RangeError("Invalid JSON for fold state");
  99112. let e = [];
  99113. for (let n = 0; n < t.length; ) {
  99114. let r = t[n++], i = t[n++];
  99115. if (typeof r != "number" || typeof i != "number")
  99116. throw new RangeError("Invalid JSON for fold state");
  99117. e.push(MG.range(r, i));
  99118. }
  99119. return Ze.set(e, !0);
  99120. }
  99121. });
  99122. function vS(t, e, n) {
  99123. var r;
  99124. let i = null;
  99125. return (r = t.field(Af, !1)) === null || r === void 0 || r.between(e, n, (a, o) => {
  99126. (!i || i.from > a) && (i = { from: a, to: o });
  99127. }), i;
  99128. }
  99129. function Qlt(t, e, n) {
  99130. let r = !1;
  99131. return t.between(e, e, (i, a) => {
  99132. i == e && a == n && (r = !0);
  99133. }), r;
  99134. }
  99135. function Hoe(t, e) {
  99136. return t.field(Af, !1) ? e : e.concat(dt.appendConfig.of(Zoe()));
  99137. }
  99138. const Hlt = (t) => {
  99139. for (let e of Qoe(t)) {
  99140. let n = pS(t.state, e.from, e.to);
  99141. if (n)
  99142. return t.dispatch({ effects: Hoe(t.state, [Nw.of(n), Goe(t, n)]) }), !0;
  99143. }
  99144. return !1;
  99145. }, Glt = (t) => {
  99146. if (!t.state.field(Af, !1))
  99147. return !1;
  99148. let e = [];
  99149. for (let n of Qoe(t)) {
  99150. let r = vS(t.state, n.from, n.to);
  99151. r && e.push(cy.of(r), Goe(t, r, !1));
  99152. }
  99153. return e.length && t.dispatch({ effects: e }), e.length > 0;
  99154. };
  99155. function Goe(t, e, n = !0) {
  99156. let r = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number;
  99157. return De.announce.of(`${t.state.phrase(n ? "Folded lines" : "Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`);
  99158. }
  99159. const jlt = (t) => {
  99160. let { state: e } = t, n = [];
  99161. for (let r = 0; r < e.doc.length; ) {
  99162. let i = t.lineBlockAt(r), a = pS(e, i.from, i.to);
  99163. a && n.push(Nw.of(a)), r = (a ? t.lineBlockAt(a.to) : i).to + 1;
  99164. }
  99165. return n.length && t.dispatch({ effects: Hoe(t.state, n) }), !!n.length;
  99166. }, Zlt = (t) => {
  99167. let e = t.state.field(Af, !1);
  99168. if (!e || !e.size)
  99169. return !1;
  99170. let n = [];
  99171. return e.between(0, t.state.doc.length, (r, i) => {
  99172. n.push(cy.of({ from: r, to: i }));
  99173. }), t.dispatch({ effects: n }), !0;
  99174. }, Ult = [
  99175. { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: Hlt },
  99176. { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: Glt },
  99177. { key: "Ctrl-Alt-[", run: jlt },
  99178. { key: "Ctrl-Alt-]", run: Zlt }
  99179. ], Xlt = {
  99180. placeholderDOM: null,
  99181. preparePlaceholder: null,
  99182. placeholderText: "…"
  99183. }, joe = /* @__PURE__ */ Be.define({
  99184. combine(t) {
  99185. return ds(t, Xlt);
  99186. }
  99187. });
  99188. function Zoe(t) {
  99189. return [Af, Jlt];
  99190. }
  99191. function Uoe(t, e) {
  99192. let { state: n } = t, r = n.facet(joe), i = (o) => {
  99193. let s = t.lineBlockAt(t.posAtDOM(o.target)), l = vS(t.state, s.from, s.to);
  99194. l && t.dispatch({ effects: cy.of(l) }), o.preventDefault();
  99195. };
  99196. if (r.placeholderDOM)
  99197. return r.placeholderDOM(t, i, e);
  99198. let a = document.createElement("span");
  99199. 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;
  99200. }
  99201. const MG = /* @__PURE__ */ Ze.replace({ widget: /* @__PURE__ */ new class extends hs {
  99202. toDOM(t) {
  99203. return Uoe(t, null);
  99204. }
  99205. }() });
  99206. class Ylt extends hs {
  99207. constructor(e) {
  99208. super(), this.value = e;
  99209. }
  99210. eq(e) {
  99211. return this.value == e.value;
  99212. }
  99213. toDOM(e) {
  99214. return Uoe(e, this.value);
  99215. }
  99216. }
  99217. const qlt = {
  99218. openText: "⌄",
  99219. closedText: "›",
  99220. markerDOM: null,
  99221. domEventHandlers: {},
  99222. foldingChanged: () => !1
  99223. };
  99224. class E$ extends nl {
  99225. constructor(e, n) {
  99226. super(), this.config = e, this.open = n;
  99227. }
  99228. eq(e) {
  99229. return this.config == e.config && this.open == e.open;
  99230. }
  99231. toDOM(e) {
  99232. if (this.config.markerDOM)
  99233. return this.config.markerDOM(this.open);
  99234. let n = document.createElement("span");
  99235. return n.textContent = this.open ? this.config.openText : this.config.closedText, n.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), n;
  99236. }
  99237. }
  99238. function Klt(t = {}) {
  99239. let e = Object.assign(Object.assign({}, qlt), t), n = new E$(e, !0), r = new E$(e, !1), i = kn.fromClass(class {
  99240. constructor(o) {
  99241. this.from = o.viewport.from, this.markers = this.buildMarkers(o);
  99242. }
  99243. update(o) {
  99244. (o.docChanged || o.viewportChanged || o.startState.facet(yu) != o.state.facet(yu) || o.startState.field(Af, !1) != o.state.field(Af, !1) || nr(o.startState) != nr(o.state) || e.foldingChanged(o)) && (this.markers = this.buildMarkers(o.view));
  99245. }
  99246. buildMarkers(o) {
  99247. let s = new hu();
  99248. for (let l of o.viewportLineBlocks) {
  99249. let u = vS(o.state, l.from, l.to) ? r : pS(o.state, l.from, l.to) ? n : null;
  99250. u && s.add(l.from, l.from, u);
  99251. }
  99252. return s.finish();
  99253. }
  99254. }), { domEventHandlers: a } = e;
  99255. return [
  99256. i,
  99257. tlt({
  99258. class: "cm-foldGutter",
  99259. markers(o) {
  99260. var s;
  99261. return ((s = o.plugin(i)) === null || s === void 0 ? void 0 : s.markers) || Vt.empty;
  99262. },
  99263. initialSpacer() {
  99264. return new E$(e, !1);
  99265. },
  99266. domEventHandlers: Object.assign(Object.assign({}, a), { click: (o, s, l) => {
  99267. if (a.click && a.click(o, s, l))
  99268. return !0;
  99269. let u = vS(o.state, s.from, s.to);
  99270. if (u)
  99271. return o.dispatch({ effects: cy.of(u) }), !0;
  99272. let c = pS(o.state, s.from, s.to);
  99273. return c ? (o.dispatch({ effects: Nw.of(c) }), !0) : !1;
  99274. } })
  99275. }),
  99276. Zoe()
  99277. ];
  99278. }
  99279. const Jlt = /* @__PURE__ */ De.baseTheme({
  99280. ".cm-foldPlaceholder": {
  99281. backgroundColor: "#eee",
  99282. border: "1px solid #ddd",
  99283. color: "#888",
  99284. borderRadius: ".2em",
  99285. margin: "0 1px",
  99286. padding: "0 1px",
  99287. cursor: "pointer"
  99288. },
  99289. ".cm-foldGutter span": {
  99290. padding: "0 1px",
  99291. cursor: "pointer"
  99292. }
  99293. });
  99294. class fy {
  99295. constructor(e, n) {
  99296. this.specs = e;
  99297. let r;
  99298. function i(s) {
  99299. let l = pu.newName();
  99300. return (r || (r = /* @__PURE__ */ Object.create(null)))["." + l] = s, l;
  99301. }
  99302. const a = typeof n.all == "string" ? n.all : n.all ? i(n.all) : void 0, o = n.scope;
  99303. this.scope = o instanceof Ka ? (s) => s.prop(Gd) == o.data : o ? (s) => s == o : void 0, this.style = koe(e.map((s) => ({
  99304. tag: s.tag,
  99305. class: s.class || i(Object.assign({}, s, { tag: null }))
  99306. })), {
  99307. all: a
  99308. }).style, this.module = r ? new pu(r) : null, this.themeType = n.themeType;
  99309. }
  99310. /**
  99311. Create a highlighter style that associates the given styles to
  99312. the given tags. The specs must be objects that hold a style tag
  99313. or array of tags in their `tag` property, and either a single
  99314. `class` property providing a static CSS class (for highlighter
  99315. that rely on external styling), or a
  99316. [`style-mod`](https://github.com/marijnh/style-mod#documentation)-style
  99317. set of CSS properties (which define the styling for those tags).
  99318. The CSS rules created for a highlighter will be emitted in the
  99319. order of the spec's properties. That means that for elements that
  99320. have multiple tags associated with them, styles defined further
  99321. down in the list will have a higher CSS precedence than styles
  99322. defined earlier.
  99323. */
  99324. static define(e, n) {
  99325. return new fy(e, n || {});
  99326. }
  99327. }
  99328. const FM = /* @__PURE__ */ Be.define(), Xoe = /* @__PURE__ */ Be.define({
  99329. combine(t) {
  99330. return t.length ? [t[0]] : null;
  99331. }
  99332. });
  99333. function M$(t) {
  99334. let e = t.facet(FM);
  99335. return e.length ? e : t.facet(Xoe);
  99336. }
  99337. function Yoe(t, e) {
  99338. let n = [tut], r;
  99339. return t instanceof fy && (t.module && n.push(De.styleModule.of(t.module)), r = t.themeType), e != null && e.fallback ? n.push(Xoe.of(t)) : r ? n.push(FM.computeN([De.darkTheme], (i) => i.facet(De.darkTheme) == (r == "dark") ? [t] : [])) : n.push(FM.of(t)), n;
  99340. }
  99341. class eut {
  99342. constructor(e) {
  99343. this.markCache = /* @__PURE__ */ Object.create(null), this.tree = nr(e.state), this.decorations = this.buildDeco(e, M$(e.state)), this.decoratedTo = e.viewport.to;
  99344. }
  99345. update(e) {
  99346. let n = nr(e.state), r = M$(e.state), i = r != M$(e.startState), { viewport: a } = e.view, o = e.changes.mapPos(this.decoratedTo, 1);
  99347. 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);
  99348. }
  99349. buildDeco(e, n) {
  99350. if (!n || !this.tree.length)
  99351. return Ze.none;
  99352. let r = new hu();
  99353. for (let { from: i, to: a } of e.visibleRanges)
  99354. wlt(this.tree, n, (o, s, l) => {
  99355. r.add(o, s, this.markCache[l] || (this.markCache[l] = Ze.mark({ class: l })));
  99356. }, i, a);
  99357. return r.finish();
  99358. }
  99359. }
  99360. const tut = /* @__PURE__ */ Eu.high(/* @__PURE__ */ kn.fromClass(eut, {
  99361. decorations: (t) => t.decorations
  99362. })), nut = /* @__PURE__ */ fy.define([
  99363. {
  99364. tag: J.meta,
  99365. color: "#404740"
  99366. },
  99367. {
  99368. tag: J.link,
  99369. textDecoration: "underline"
  99370. },
  99371. {
  99372. tag: J.heading,
  99373. textDecoration: "underline",
  99374. fontWeight: "bold"
  99375. },
  99376. {
  99377. tag: J.emphasis,
  99378. fontStyle: "italic"
  99379. },
  99380. {
  99381. tag: J.strong,
  99382. fontWeight: "bold"
  99383. },
  99384. {
  99385. tag: J.strikethrough,
  99386. textDecoration: "line-through"
  99387. },
  99388. {
  99389. tag: J.keyword,
  99390. color: "#708"
  99391. },
  99392. {
  99393. tag: [J.atom, J.bool, J.url, J.contentSeparator, J.labelName],
  99394. color: "#219"
  99395. },
  99396. {
  99397. tag: [J.literal, J.inserted],
  99398. color: "#164"
  99399. },
  99400. {
  99401. tag: [J.string, J.deleted],
  99402. color: "#a11"
  99403. },
  99404. {
  99405. tag: [J.regexp, J.escape, /* @__PURE__ */ J.special(J.string)],
  99406. color: "#e40"
  99407. },
  99408. {
  99409. tag: /* @__PURE__ */ J.definition(J.variableName),
  99410. color: "#00f"
  99411. },
  99412. {
  99413. tag: /* @__PURE__ */ J.local(J.variableName),
  99414. color: "#30a"
  99415. },
  99416. {
  99417. tag: [J.typeName, J.namespace],
  99418. color: "#085"
  99419. },
  99420. {
  99421. tag: J.className,
  99422. color: "#167"
  99423. },
  99424. {
  99425. tag: [/* @__PURE__ */ J.special(J.variableName), J.macroName],
  99426. color: "#256"
  99427. },
  99428. {
  99429. tag: /* @__PURE__ */ J.definition(J.propertyName),
  99430. color: "#00c"
  99431. },
  99432. {
  99433. tag: J.comment,
  99434. color: "#940"
  99435. },
  99436. {
  99437. tag: J.invalid,
  99438. color: "#f00"
  99439. }
  99440. ]), rut = /* @__PURE__ */ De.baseTheme({
  99441. "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
  99442. "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
  99443. }), qoe = 1e4, Koe = "()[]{}", Joe = /* @__PURE__ */ Be.define({
  99444. combine(t) {
  99445. return ds(t, {
  99446. afterCursor: !0,
  99447. brackets: Koe,
  99448. maxScanDistance: qoe,
  99449. renderMatch: out
  99450. });
  99451. }
  99452. }), iut = /* @__PURE__ */ Ze.mark({ class: "cm-matchingBracket" }), aut = /* @__PURE__ */ Ze.mark({ class: "cm-nonmatchingBracket" });
  99453. function out(t) {
  99454. let e = [], n = t.matched ? iut : aut;
  99455. return e.push(n.range(t.start.from, t.start.to)), t.end && e.push(n.range(t.end.from, t.end.to)), e;
  99456. }
  99457. const sut = /* @__PURE__ */ ur.define({
  99458. create() {
  99459. return Ze.none;
  99460. },
  99461. update(t, e) {
  99462. if (!e.docChanged && !e.selection)
  99463. return t;
  99464. let n = [], r = e.state.facet(Joe);
  99465. for (let i of e.state.selection.ranges) {
  99466. if (!i.empty)
  99467. continue;
  99468. let a = Go(e.state, i.head, -1, r) || i.head > 0 && Go(e.state, i.head - 1, 1, r) || r.afterCursor && (Go(e.state, i.head, 1, r) || i.head < e.state.doc.length && Go(e.state, i.head + 1, -1, r));
  99469. a && (n = n.concat(r.renderMatch(a, e.state)));
  99470. }
  99471. return Ze.set(n, !0);
  99472. },
  99473. provide: (t) => De.decorations.from(t)
  99474. }), lut = [
  99475. sut,
  99476. rut
  99477. ];
  99478. function uut(t = {}) {
  99479. return [Joe.of(t), lut];
  99480. }
  99481. const cut = /* @__PURE__ */ new Pt();
  99482. function WM(t, e, n) {
  99483. let r = t.prop(e < 0 ? Pt.openedBy : Pt.closedBy);
  99484. if (r)
  99485. return r;
  99486. if (t.name.length == 1) {
  99487. let i = n.indexOf(t.name);
  99488. if (i > -1 && i % 2 == (e < 0 ? 1 : 0))
  99489. return [n[i + e]];
  99490. }
  99491. return null;
  99492. }
  99493. function QM(t) {
  99494. let e = t.type.prop(cut);
  99495. return e ? e(t.node) : t;
  99496. }
  99497. function Go(t, e, n, r = {}) {
  99498. let i = r.maxScanDistance || qoe, a = r.brackets || Koe, o = nr(t), s = o.resolveInner(e, n);
  99499. for (let l = s; l; l = l.parent) {
  99500. let u = WM(l.type, n, a);
  99501. if (u && l.from < l.to) {
  99502. let c = QM(l);
  99503. if (c && (n > 0 ? e >= c.from && e < c.to : e > c.from && e <= c.to))
  99504. return fut(t, e, n, l, c, u, a);
  99505. }
  99506. }
  99507. return dut(t, e, n, o, s.type, i, a);
  99508. }
  99509. function fut(t, e, n, r, i, a, o) {
  99510. let s = r.parent, l = { from: i.from, to: i.to }, u = 0, c = s == null ? void 0 : s.cursor();
  99511. if (c && (n < 0 ? c.childBefore(r.from) : c.childAfter(r.to)))
  99512. do
  99513. if (n < 0 ? c.to <= r.from : c.from >= r.to) {
  99514. if (u == 0 && a.indexOf(c.type.name) > -1 && c.from < c.to) {
  99515. let f = QM(c);
  99516. return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 };
  99517. } else if (WM(c.type, n, o))
  99518. u++;
  99519. else if (WM(c.type, -n, o)) {
  99520. if (u == 0) {
  99521. let f = QM(c);
  99522. return {
  99523. start: l,
  99524. end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0,
  99525. matched: !1
  99526. };
  99527. }
  99528. u--;
  99529. }
  99530. }
  99531. while (n < 0 ? c.prevSibling() : c.nextSibling());
  99532. return { start: l, matched: !1 };
  99533. }
  99534. function dut(t, e, n, r, i, a, o) {
  99535. let s = n < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = o.indexOf(s);
  99536. if (l < 0 || l % 2 == 0 != n > 0)
  99537. return null;
  99538. 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;
  99539. for (let d = 0; !c.next().done && d <= a; ) {
  99540. let h = c.value;
  99541. n < 0 && (d += h.length);
  99542. let p = e + d * n;
  99543. for (let v = n > 0 ? 0 : h.length - 1, g = n > 0 ? h.length : -1; v != g; v += n) {
  99544. let m = o.indexOf(h[v]);
  99545. if (!(m < 0 || r.resolveInner(p + v, 1).type != i))
  99546. if (m % 2 == 0 == n > 0)
  99547. f++;
  99548. else {
  99549. if (f == 1)
  99550. return { start: u, end: { from: p + v, to: p + v + 1 }, matched: m >> 1 == l >> 1 };
  99551. f--;
  99552. }
  99553. }
  99554. n > 0 && (d += h.length);
  99555. }
  99556. return c.done ? { start: u, matched: !1 } : null;
  99557. }
  99558. const hut = /* @__PURE__ */ Object.create(null), IG = [Pi.none], DG = [], RG = /* @__PURE__ */ Object.create(null), put = /* @__PURE__ */ Object.create(null);
  99559. for (let [t, e] of [
  99560. ["variable", "variableName"],
  99561. ["variable-2", "variableName.special"],
  99562. ["string-2", "string.special"],
  99563. ["def", "variableName.definition"],
  99564. ["tag", "tagName"],
  99565. ["attribute", "attributeName"],
  99566. ["type", "typeName"],
  99567. ["builtin", "variableName.standard"],
  99568. ["qualifier", "modifier"],
  99569. ["error", "invalid"],
  99570. ["header", "heading"],
  99571. ["property", "propertyName"]
  99572. ])
  99573. put[t] = /* @__PURE__ */ vut(hut, e);
  99574. function I$(t, e) {
  99575. DG.indexOf(t) > -1 || (DG.push(t), console.warn(e));
  99576. }
  99577. function vut(t, e) {
  99578. let n = [];
  99579. for (let s of e.split(" ")) {
  99580. let l = [];
  99581. for (let u of s.split(".")) {
  99582. let c = t[u] || J[u];
  99583. c ? typeof c == "function" ? l.length ? l = l.map(c) : I$(u, `Modifier ${u} used at start of tag`) : l.length ? I$(u, `Tag ${u} used as modifier`) : l = Array.isArray(c) ? c : [c] : I$(u, `Unknown highlighting tag ${u}`);
  99584. }
  99585. for (let u of l)
  99586. n.push(u);
  99587. }
  99588. if (!n.length)
  99589. return 0;
  99590. let r = e.replace(/ /g, "_"), i = r + " " + n.map((s) => s.id), a = RG[i];
  99591. if (a)
  99592. return a.id;
  99593. let o = RG[i] = Pi.define({
  99594. id: IG.length,
  99595. name: r,
  99596. props: [v4({ [r]: n })]
  99597. });
  99598. return IG.push(o), o.id;
  99599. }
  99600. pn.RTL, pn.LTR;
  99601. const gut = (t) => {
  99602. let { state: e } = t, n = e.doc.lineAt(e.selection.main.from), r = S4(t.state, n.from);
  99603. return r.line ? mut(t) : r.block ? but(t) : !1;
  99604. };
  99605. function O4(t, e) {
  99606. return ({ state: n, dispatch: r }) => {
  99607. if (n.readOnly)
  99608. return !1;
  99609. let i = t(e, n);
  99610. return i ? (r(n.update(i)), !0) : !1;
  99611. };
  99612. }
  99613. const mut = /* @__PURE__ */ O4(
  99614. Sut,
  99615. 0
  99616. /* CommentOption.Toggle */
  99617. ), yut = /* @__PURE__ */ O4(
  99618. ese,
  99619. 0
  99620. /* CommentOption.Toggle */
  99621. ), but = /* @__PURE__ */ O4(
  99622. (t, e) => ese(t, e, Out(e)),
  99623. 0
  99624. /* CommentOption.Toggle */
  99625. );
  99626. function S4(t, e) {
  99627. let n = t.languageDataAt("commentTokens", e);
  99628. return n.length ? n[0] : {};
  99629. }
  99630. const Nv = 50;
  99631. function _ut(t, { open: e, close: n }, r, i) {
  99632. let a = t.sliceDoc(r - Nv, r), o = t.sliceDoc(i, i + Nv), s = /\s*$/.exec(a)[0].length, l = /^\s*/.exec(o)[0].length, u = a.length - s;
  99633. if (a.slice(u - e.length, u) == e && o.slice(l, l + n.length) == n)
  99634. return {
  99635. open: { pos: r - s, margin: s && 1 },
  99636. close: { pos: i + l, margin: l && 1 }
  99637. };
  99638. let c, f;
  99639. i - r <= 2 * Nv ? c = f = t.sliceDoc(r, i) : (c = t.sliceDoc(r, r + Nv), f = t.sliceDoc(i - Nv, i));
  99640. let d = /^\s*/.exec(c)[0].length, h = /\s*$/.exec(f)[0].length, p = f.length - h - n.length;
  99641. return c.slice(d, d + e.length) == e && f.slice(p, p + n.length) == n ? {
  99642. open: {
  99643. pos: r + d + e.length,
  99644. margin: /\s/.test(c.charAt(d + e.length)) ? 1 : 0
  99645. },
  99646. close: {
  99647. pos: i - h - n.length,
  99648. margin: /\s/.test(f.charAt(p - 1)) ? 1 : 0
  99649. }
  99650. } : null;
  99651. }
  99652. function Out(t) {
  99653. let e = [];
  99654. for (let n of t.selection.ranges) {
  99655. let r = t.doc.lineAt(n.from), i = n.to <= r.to ? r : t.doc.lineAt(n.to), a = e.length - 1;
  99656. 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 });
  99657. }
  99658. return e;
  99659. }
  99660. function ese(t, e, n = e.selection.ranges) {
  99661. let r = n.map((a) => S4(e, a.from).block);
  99662. if (!r.every((a) => a))
  99663. return null;
  99664. let i = n.map((a, o) => _ut(e, r[o], a.from, a.to));
  99665. if (t != 2 && !i.every((a) => a))
  99666. return { changes: e.changes(n.map((a, o) => i[o] ? [] : [{ from: a.from, insert: r[o].open + " " }, { from: a.to, insert: " " + r[o].close }])) };
  99667. if (t != 1 && i.some((a) => a)) {
  99668. let a = [];
  99669. for (let o = 0, s; o < i.length; o++)
  99670. if (s = i[o]) {
  99671. let l = r[o], { open: u, close: c } = s;
  99672. a.push({ from: u.pos - l.open.length, to: u.pos + u.margin }, { from: c.pos - c.margin, to: c.pos + l.close.length });
  99673. }
  99674. return { changes: a };
  99675. }
  99676. return null;
  99677. }
  99678. function Sut(t, e, n = e.selection.ranges) {
  99679. let r = [], i = -1;
  99680. for (let { from: a, to: o } of n) {
  99681. let s = r.length, l = 1e9, u = S4(e, a).line;
  99682. if (u) {
  99683. for (let c = a; c <= o; ) {
  99684. let f = e.doc.lineAt(c);
  99685. if (f.from > i && (a == o || o > f.from)) {
  99686. i = f.from;
  99687. let d = /^\s*/.exec(f.text)[0].length, h = d == f.length, p = f.text.slice(d, d + u.length) == u ? d : -1;
  99688. d < f.text.length && d < l && (l = d), r.push({ line: f, comment: p, token: u, indent: d, empty: h, single: !1 });
  99689. }
  99690. c = f.to + 1;
  99691. }
  99692. if (l < 1e9)
  99693. for (let c = s; c < r.length; c++)
  99694. r[c].indent < r[c].line.text.length && (r[c].indent = l);
  99695. r.length == s + 1 && (r[s].single = !0);
  99696. }
  99697. }
  99698. if (t != 2 && r.some((a) => a.comment < 0 && (!a.empty || a.single))) {
  99699. let a = [];
  99700. for (let { line: s, token: l, indent: u, empty: c, single: f } of r)
  99701. (f || !c) && a.push({ from: s.from + u, insert: l + " " });
  99702. let o = e.changes(a);
  99703. return { changes: o, selection: e.selection.map(o, 1) };
  99704. } else if (t != 1 && r.some((a) => a.comment >= 0)) {
  99705. let a = [];
  99706. for (let { line: o, comment: s, token: l } of r)
  99707. if (s >= 0) {
  99708. let u = o.from + s, c = u + l.length;
  99709. o.text[c - o.from] == " " && c++, a.push({ from: u, to: c });
  99710. }
  99711. return { changes: a };
  99712. }
  99713. return null;
  99714. }
  99715. const HM = /* @__PURE__ */ cl.define(), xut = /* @__PURE__ */ cl.define(), wut = /* @__PURE__ */ Be.define(), tse = /* @__PURE__ */ Be.define({
  99716. combine(t) {
  99717. return ds(t, {
  99718. minDepth: 100,
  99719. newGroupDelay: 500,
  99720. joinToEvent: (e, n) => n
  99721. }, {
  99722. minDepth: Math.max,
  99723. newGroupDelay: Math.min,
  99724. joinToEvent: (e, n) => (r, i) => e(r, i) || n(r, i)
  99725. });
  99726. }
  99727. }), nse = /* @__PURE__ */ ur.define({
  99728. create() {
  99729. return jo.empty;
  99730. },
  99731. update(t, e) {
  99732. let n = e.state.facet(tse), r = e.annotation(HM);
  99733. if (r) {
  99734. let l = _i.fromTransaction(e, r.selection), u = r.side, c = u == 0 ? t.undone : t.done;
  99735. return l ? c = gS(c, c.length, n.minDepth, l) : c = ase(c, e.startState.selection), new jo(u == 0 ? r.rest : c, u == 0 ? c : r.rest);
  99736. }
  99737. let i = e.annotation(xut);
  99738. if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(Fn.addToHistory) === !1)
  99739. return e.changes.empty ? t : t.addMapping(e.changes.desc);
  99740. let a = _i.fromTransaction(e), o = e.annotation(Fn.time), s = e.annotation(Fn.userEvent);
  99741. 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;
  99742. },
  99743. toJSON(t) {
  99744. return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
  99745. },
  99746. fromJSON(t) {
  99747. return new jo(t.done.map(_i.fromJSON), t.undone.map(_i.fromJSON));
  99748. }
  99749. });
  99750. function Cut(t = {}) {
  99751. return [
  99752. nse,
  99753. tse.of(t),
  99754. De.domEventHandlers({
  99755. beforeinput(e, n) {
  99756. let r = e.inputType == "historyUndo" ? rse : e.inputType == "historyRedo" ? GM : null;
  99757. return r ? (e.preventDefault(), r(n)) : !1;
  99758. }
  99759. })
  99760. ];
  99761. }
  99762. function Bw(t, e) {
  99763. return function({ state: n, dispatch: r }) {
  99764. if (!e && n.readOnly)
  99765. return !1;
  99766. let i = n.field(nse, !1);
  99767. if (!i)
  99768. return !1;
  99769. let a = i.pop(t, n, e);
  99770. return a ? (r(a), !0) : !1;
  99771. };
  99772. }
  99773. const rse = /* @__PURE__ */ Bw(0, !1), GM = /* @__PURE__ */ Bw(1, !1), Tut = /* @__PURE__ */ Bw(0, !0), Put = /* @__PURE__ */ Bw(1, !0);
  99774. class _i {
  99775. constructor(e, n, r, i, a) {
  99776. this.changes = e, this.effects = n, this.mapped = r, this.startSelection = i, this.selectionsAfter = a;
  99777. }
  99778. setSelAfter(e) {
  99779. return new _i(this.changes, this.effects, this.mapped, this.startSelection, e);
  99780. }
  99781. toJSON() {
  99782. var e, n, r;
  99783. return {
  99784. changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(),
  99785. mapped: (n = this.mapped) === null || n === void 0 ? void 0 : n.toJSON(),
  99786. startSelection: (r = this.startSelection) === null || r === void 0 ? void 0 : r.toJSON(),
  99787. selectionsAfter: this.selectionsAfter.map((i) => i.toJSON())
  99788. };
  99789. }
  99790. static fromJSON(e) {
  99791. return new _i(e.changes && jn.fromJSON(e.changes), [], e.mapped && qo.fromJSON(e.mapped), e.startSelection && me.fromJSON(e.startSelection), e.selectionsAfter.map(me.fromJSON));
  99792. }
  99793. // This does not check `addToHistory` and such, it assumes the
  99794. // transaction needs to be converted to an item. Returns null when
  99795. // there are no changes or effects in the transaction.
  99796. static fromTransaction(e, n) {
  99797. let r = _a;
  99798. for (let i of e.startState.facet(wut)) {
  99799. let a = i(e);
  99800. a.length && (r = r.concat(a));
  99801. }
  99802. return !r.length && e.changes.empty ? null : new _i(e.changes.invert(e.startState.doc), r, void 0, n || e.startState.selection, _a);
  99803. }
  99804. static selection(e) {
  99805. return new _i(void 0, _a, void 0, void 0, e);
  99806. }
  99807. }
  99808. function gS(t, e, n, r) {
  99809. let i = e + 1 > n + 20 ? e - n - 1 : 0, a = t.slice(i, e);
  99810. return a.push(r), a;
  99811. }
  99812. function $ut(t, e) {
  99813. let n = [], r = !1;
  99814. return t.iterChangedRanges((i, a) => n.push(i, a)), e.iterChangedRanges((i, a, o, s) => {
  99815. for (let l = 0; l < n.length; ) {
  99816. let u = n[l++], c = n[l++];
  99817. s >= u && o <= c && (r = !0);
  99818. }
  99819. }), r;
  99820. }
  99821. function Aut(t, e) {
  99822. return t.ranges.length == e.ranges.length && t.ranges.filter((n, r) => n.empty != e.ranges[r].empty).length === 0;
  99823. }
  99824. function ise(t, e) {
  99825. return t.length ? e.length ? t.concat(e) : t : e;
  99826. }
  99827. const _a = [], Eut = 200;
  99828. function ase(t, e) {
  99829. if (t.length) {
  99830. let n = t[t.length - 1], r = n.selectionsAfter.slice(Math.max(0, n.selectionsAfter.length - Eut));
  99831. return r.length && r[r.length - 1].eq(e) ? t : (r.push(e), gS(t, t.length - 1, 1e9, n.setSelAfter(r)));
  99832. } else
  99833. return [_i.selection([e])];
  99834. }
  99835. function Mut(t) {
  99836. let e = t[t.length - 1], n = t.slice();
  99837. return n[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), n;
  99838. }
  99839. function D$(t, e) {
  99840. if (!t.length)
  99841. return t;
  99842. let n = t.length, r = _a;
  99843. for (; n; ) {
  99844. let i = Iut(t[n - 1], e, r);
  99845. if (i.changes && !i.changes.empty || i.effects.length) {
  99846. let a = t.slice(0, n);
  99847. return a[n - 1] = i, a;
  99848. } else
  99849. e = i.mapped, n--, r = i.selectionsAfter;
  99850. }
  99851. return r.length ? [_i.selection(r)] : _a;
  99852. }
  99853. function Iut(t, e, n) {
  99854. let r = ise(t.selectionsAfter.length ? t.selectionsAfter.map((s) => s.map(e)) : _a, n);
  99855. if (!t.changes)
  99856. return _i.selection(r);
  99857. let i = t.changes.map(e), a = e.mapDesc(t.changes, !0), o = t.mapped ? t.mapped.composeDesc(a) : a;
  99858. return new _i(i, dt.mapEffects(t.effects, e), o, t.startSelection.map(a), r);
  99859. }
  99860. const Dut = /^(input\.type|delete)($|\.)/;
  99861. class jo {
  99862. constructor(e, n, r = 0, i = void 0) {
  99863. this.done = e, this.undone = n, this.prevTime = r, this.prevUserEvent = i;
  99864. }
  99865. isolate() {
  99866. return this.prevTime ? new jo(this.done, this.undone) : this;
  99867. }
  99868. addChanges(e, n, r, i, a) {
  99869. let o = this.done, s = o[o.length - 1];
  99870. return s && s.changes && !s.changes.empty && e.changes && (!r || Dut.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, $ut(s.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
  99871. r == "input.type.compose") ? o = gS(o, o.length - 1, i.minDepth, new _i(e.changes.compose(s.changes), ise(e.effects, s.effects), s.mapped, s.startSelection, _a)) : o = gS(o, o.length, i.minDepth, e), new jo(o, _a, n, r);
  99872. }
  99873. addSelection(e, n, r, i) {
  99874. let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : _a;
  99875. return a.length > 0 && n - this.prevTime < i && r == this.prevUserEvent && r && /^select($|\.)/.test(r) && Aut(a[a.length - 1], e) ? this : new jo(ase(this.done, e), this.undone, n, r);
  99876. }
  99877. addMapping(e) {
  99878. return new jo(D$(this.done, e), D$(this.undone, e), this.prevTime, this.prevUserEvent);
  99879. }
  99880. pop(e, n, r) {
  99881. let i = e == 0 ? this.done : this.undone;
  99882. if (i.length == 0)
  99883. return null;
  99884. let a = i[i.length - 1], o = a.selectionsAfter[0] || n.selection;
  99885. if (r && a.selectionsAfter.length)
  99886. return n.update({
  99887. selection: a.selectionsAfter[a.selectionsAfter.length - 1],
  99888. annotations: HM.of({ side: e, rest: Mut(i), selection: o }),
  99889. userEvent: e == 0 ? "select.undo" : "select.redo",
  99890. scrollIntoView: !0
  99891. });
  99892. if (a.changes) {
  99893. let s = i.length == 1 ? _a : i.slice(0, i.length - 1);
  99894. return a.mapped && (s = D$(s, a.mapped)), n.update({
  99895. changes: a.changes,
  99896. selection: a.startSelection,
  99897. effects: a.effects,
  99898. annotations: HM.of({ side: e, rest: s, selection: o }),
  99899. filter: !1,
  99900. userEvent: e == 0 ? "undo" : "redo",
  99901. scrollIntoView: !0
  99902. });
  99903. } else
  99904. return null;
  99905. }
  99906. }
  99907. jo.empty = /* @__PURE__ */ new jo(_a, _a);
  99908. const Rut = [
  99909. { key: "Mod-z", run: rse, preventDefault: !0 },
  99910. { key: "Mod-y", mac: "Mod-Shift-z", run: GM, preventDefault: !0 },
  99911. { linux: "Ctrl-Shift-z", run: GM, preventDefault: !0 },
  99912. { key: "Mod-u", run: Tut, preventDefault: !0 },
  99913. { key: "Alt-u", mac: "Mod-Shift-u", run: Put, preventDefault: !0 }
  99914. ];
  99915. function Vp(t, e) {
  99916. return me.create(t.ranges.map(e), t.mainIndex);
  99917. }
  99918. function ps(t, e) {
  99919. return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
  99920. }
  99921. function bo({ state: t, dispatch: e }, n) {
  99922. let r = Vp(t.selection, n);
  99923. return r.eq(t.selection, !0) ? !1 : (e(ps(t, r)), !0);
  99924. }
  99925. function zw(t, e) {
  99926. return me.cursor(e ? t.to : t.from);
  99927. }
  99928. function ose(t, e) {
  99929. return bo(t, (n) => n.empty ? t.moveByChar(n, e) : zw(n, e));
  99930. }
  99931. function Vr(t) {
  99932. return t.textDirectionAt(t.state.selection.main.head) == pn.LTR;
  99933. }
  99934. const sse = (t) => ose(t, !Vr(t)), lse = (t) => ose(t, Vr(t));
  99935. function use(t, e) {
  99936. return bo(t, (n) => n.empty ? t.moveByGroup(n, e) : zw(n, e));
  99937. }
  99938. const kut = (t) => use(t, !Vr(t)), Lut = (t) => use(t, Vr(t));
  99939. function Nut(t, e, n) {
  99940. if (e.type.prop(n))
  99941. return !0;
  99942. let r = e.to - e.from;
  99943. return r && (r > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
  99944. }
  99945. function Vw(t, e, n) {
  99946. let r = nr(t).resolveInner(e.head), i = n ? Pt.closedBy : Pt.openedBy;
  99947. for (let l = e.head; ; ) {
  99948. let u = n ? r.childAfter(l) : r.childBefore(l);
  99949. if (!u)
  99950. break;
  99951. Nut(t, u, i) ? r = u : l = n ? u.to : u.from;
  99952. }
  99953. let a = r.type.prop(i), o, s;
  99954. return a && (o = n ? Go(t, r.from, 1) : Go(t, r.to, -1)) && o.matched ? s = n ? o.end.to : o.end.from : s = n ? r.to : r.from, me.cursor(s, n ? -1 : 1);
  99955. }
  99956. const But = (t) => bo(t, (e) => Vw(t.state, e, !Vr(t))), zut = (t) => bo(t, (e) => Vw(t.state, e, Vr(t)));
  99957. function cse(t, e) {
  99958. return bo(t, (n) => {
  99959. if (!n.empty)
  99960. return zw(n, e);
  99961. let r = t.moveVertically(n, e);
  99962. return r.head != n.head ? r : t.moveToLineBoundary(n, e);
  99963. });
  99964. }
  99965. const fse = (t) => cse(t, !1), dse = (t) => cse(t, !0);
  99966. function hse(t) {
  99967. let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, n = 0, r = 0, i;
  99968. if (e) {
  99969. for (let a of t.state.facet(De.scrollMargins)) {
  99970. let o = a(t);
  99971. 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));
  99972. }
  99973. i = t.scrollDOM.clientHeight - n - r;
  99974. } else
  99975. i = (t.dom.ownerDocument.defaultView || window).innerHeight;
  99976. return {
  99977. marginTop: n,
  99978. marginBottom: r,
  99979. selfScroll: e,
  99980. height: Math.max(t.defaultLineHeight, i - 5)
  99981. };
  99982. }
  99983. function pse(t, e) {
  99984. let n = hse(t), { state: r } = t, i = Vp(r.selection, (o) => o.empty ? t.moveVertically(o, e, n.height) : zw(o, e));
  99985. if (i.eq(r.selection))
  99986. return !1;
  99987. let a;
  99988. if (n.selfScroll) {
  99989. let o = t.coordsAtPos(r.selection.main.head), s = t.scrollDOM.getBoundingClientRect(), l = s.top + n.marginTop, u = s.bottom - n.marginBottom;
  99990. o && o.top > l && o.bottom < u && (a = De.scrollIntoView(i.main.head, { y: "start", yMargin: o.top - l }));
  99991. }
  99992. return t.dispatch(ps(r, i), { effects: a }), !0;
  99993. }
  99994. const kG = (t) => pse(t, !1), jM = (t) => pse(t, !0);
  99995. function Mu(t, e, n) {
  99996. let r = t.lineBlockAt(e.head), i = t.moveToLineBoundary(e, n);
  99997. 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) {
  99998. let a = /^\s*/.exec(t.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
  99999. a && e.head != r.from + a && (i = me.cursor(r.from + a));
  100000. }
  100001. return i;
  100002. }
  100003. const Vut = (t) => bo(t, (e) => Mu(t, e, !0)), Fut = (t) => bo(t, (e) => Mu(t, e, !1)), Wut = (t) => bo(t, (e) => Mu(t, e, !Vr(t))), Qut = (t) => bo(t, (e) => Mu(t, e, Vr(t))), Hut = (t) => bo(t, (e) => me.cursor(t.lineBlockAt(e.head).from, 1)), Gut = (t) => bo(t, (e) => me.cursor(t.lineBlockAt(e.head).to, -1));
  100004. function jut(t, e, n) {
  100005. let r = !1, i = Vp(t.selection, (a) => {
  100006. let o = Go(t, a.head, -1) || Go(t, a.head, 1) || a.head > 0 && Go(t, a.head - 1, 1) || a.head < t.doc.length && Go(t, a.head + 1, -1);
  100007. if (!o || !o.end)
  100008. return a;
  100009. r = !0;
  100010. let s = o.start.from == a.head ? o.end.to : o.end.from;
  100011. return me.cursor(s);
  100012. });
  100013. return r ? (e(ps(t, i)), !0) : !1;
  100014. }
  100015. const Zut = ({ state: t, dispatch: e }) => jut(t, e);
  100016. function Fa(t, e) {
  100017. let n = Vp(t.state.selection, (r) => {
  100018. let i = e(r);
  100019. return me.range(r.anchor, i.head, i.goalColumn, i.bidiLevel || void 0);
  100020. });
  100021. return n.eq(t.state.selection) ? !1 : (t.dispatch(ps(t.state, n)), !0);
  100022. }
  100023. function vse(t, e) {
  100024. return Fa(t, (n) => t.moveByChar(n, e));
  100025. }
  100026. const gse = (t) => vse(t, !Vr(t)), mse = (t) => vse(t, Vr(t));
  100027. function yse(t, e) {
  100028. return Fa(t, (n) => t.moveByGroup(n, e));
  100029. }
  100030. const Uut = (t) => yse(t, !Vr(t)), Xut = (t) => yse(t, Vr(t)), Yut = (t) => Fa(t, (e) => Vw(t.state, e, !Vr(t))), qut = (t) => Fa(t, (e) => Vw(t.state, e, Vr(t)));
  100031. function bse(t, e) {
  100032. return Fa(t, (n) => t.moveVertically(n, e));
  100033. }
  100034. const _se = (t) => bse(t, !1), Ose = (t) => bse(t, !0);
  100035. function Sse(t, e) {
  100036. return Fa(t, (n) => t.moveVertically(n, e, hse(t).height));
  100037. }
  100038. const LG = (t) => Sse(t, !1), NG = (t) => Sse(t, !0), Kut = (t) => Fa(t, (e) => Mu(t, e, !0)), Jut = (t) => Fa(t, (e) => Mu(t, e, !1)), ect = (t) => Fa(t, (e) => Mu(t, e, !Vr(t))), tct = (t) => Fa(t, (e) => Mu(t, e, Vr(t))), nct = (t) => Fa(t, (e) => me.cursor(t.lineBlockAt(e.head).from)), rct = (t) => Fa(t, (e) => me.cursor(t.lineBlockAt(e.head).to)), BG = ({ state: t, dispatch: e }) => (e(ps(t, { anchor: 0 })), !0), zG = ({ state: t, dispatch: e }) => (e(ps(t, { anchor: t.doc.length })), !0), VG = ({ state: t, dispatch: e }) => (e(ps(t, { anchor: t.selection.main.anchor, head: 0 })), !0), FG = ({ state: t, dispatch: e }) => (e(ps(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), ict = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), act = ({ state: t, dispatch: e }) => {
  100039. let n = Fw(t).map(({ from: r, to: i }) => me.range(r, Math.min(i + 1, t.doc.length)));
  100040. return e(t.update({ selection: me.create(n), userEvent: "select" })), !0;
  100041. }, oct = ({ state: t, dispatch: e }) => {
  100042. let n = Vp(t.selection, (r) => {
  100043. var i;
  100044. let a = nr(t).resolveStack(r.from, 1);
  100045. for (let o = a; o; o = o.next) {
  100046. let { node: s } = o;
  100047. 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))
  100048. return me.range(s.to, s.from);
  100049. }
  100050. return r;
  100051. });
  100052. return e(ps(t, n)), !0;
  100053. }, sct = ({ state: t, dispatch: e }) => {
  100054. let n = t.selection, r = null;
  100055. return n.ranges.length > 1 ? r = me.create([n.main]) : n.main.empty || (r = me.create([me.cursor(n.main.head)])), r ? (e(ps(t, r)), !0) : !1;
  100056. };
  100057. function dy(t, e) {
  100058. if (t.state.readOnly)
  100059. return !1;
  100060. let n = "delete.selection", { state: r } = t, i = r.changeByRange((a) => {
  100061. let { from: o, to: s } = a;
  100062. if (o == s) {
  100063. let l = e(a);
  100064. l < o ? (n = "delete.backward", l = s_(t, l, !1)) : l > o && (n = "delete.forward", l = s_(t, l, !0)), o = Math.min(o, l), s = Math.max(s, l);
  100065. } else
  100066. o = s_(t, o, !1), s = s_(t, s, !0);
  100067. return o == s ? { range: a } : { changes: { from: o, to: s }, range: me.cursor(o, o < a.head ? -1 : 1) };
  100068. });
  100069. return i.changes.empty ? !1 : (t.dispatch(r.update(i, {
  100070. scrollIntoView: !0,
  100071. userEvent: n,
  100072. effects: n == "delete.selection" ? De.announce.of(r.phrase("Selection deleted")) : void 0
  100073. })), !0);
  100074. }
  100075. function s_(t, e, n) {
  100076. if (t instanceof De)
  100077. for (let r of t.state.facet(De.atomicRanges).map((i) => i(t)))
  100078. r.between(e, e, (i, a) => {
  100079. i < e && a > e && (e = n ? a : i);
  100080. });
  100081. return e;
  100082. }
  100083. const xse = (t, e, n) => dy(t, (r) => {
  100084. let i = r.from, { state: a } = t, o = a.doc.lineAt(i), s, l;
  100085. if (n && !e && i > o.from && i < o.from + 200 && !/[^ \t]/.test(s = o.text.slice(0, i - o.from))) {
  100086. if (s[s.length - 1] == " ")
  100087. return i - 1;
  100088. let u = zp(s, a.tabSize), c = u % hS(a) || hS(a);
  100089. for (let f = 0; f < c && s[s.length - 1 - f] == " "; f++)
  100090. i--;
  100091. l = i;
  100092. } else
  100093. l = _r(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 = _r(o.text, l - o.from, !1, !1) + o.from);
  100094. return l;
  100095. }), ZM = (t) => xse(t, !1, !0), wse = (t) => xse(t, !0, !1), Cse = (t, e) => dy(t, (n) => {
  100096. let r = n.head, { state: i } = t, a = i.doc.lineAt(r), o = i.charCategorizer(r);
  100097. for (let s = null; ; ) {
  100098. if (r == (e ? a.to : a.from)) {
  100099. r == n.head && a.number != (e ? i.doc.lines : 1) && (r += e ? 1 : -1);
  100100. break;
  100101. }
  100102. let l = _r(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);
  100103. if (s != null && c != s)
  100104. break;
  100105. (u != " " || r != n.head) && (s = c), r = l;
  100106. }
  100107. return r;
  100108. }), Tse = (t) => Cse(t, !1), lct = (t) => Cse(t, !0), uct = (t) => dy(t, (e) => {
  100109. let n = t.lineBlockAt(e.head).to;
  100110. return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
  100111. }), cct = (t) => dy(t, (e) => {
  100112. let n = t.moveToLineBoundary(e, !1).head;
  100113. return e.head > n ? n : Math.max(0, e.head - 1);
  100114. }), fct = (t) => dy(t, (e) => {
  100115. let n = t.moveToLineBoundary(e, !0).head;
  100116. return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
  100117. }), dct = ({ state: t, dispatch: e }) => {
  100118. if (t.readOnly)
  100119. return !1;
  100120. let n = t.changeByRange((r) => ({
  100121. changes: { from: r.from, to: r.to, insert: Ft.of(["", ""]) },
  100122. range: me.cursor(r.from)
  100123. }));
  100124. return e(t.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
  100125. }, hct = ({ state: t, dispatch: e }) => {
  100126. if (t.readOnly)
  100127. return !1;
  100128. let n = t.changeByRange((r) => {
  100129. if (!r.empty || r.from == 0 || r.from == t.doc.length)
  100130. return { range: r };
  100131. let i = r.from, a = t.doc.lineAt(i), o = i == a.from ? i - 1 : _r(a.text, i - a.from, !1) + a.from, s = i == a.to ? i + 1 : _r(a.text, i - a.from, !0) + a.from;
  100132. return {
  100133. changes: { from: o, to: s, insert: t.doc.slice(i, s).append(t.doc.slice(o, i)) },
  100134. range: me.cursor(s)
  100135. };
  100136. });
  100137. return n.changes.empty ? !1 : (e(t.update(n, { scrollIntoView: !0, userEvent: "move.character" })), !0);
  100138. };
  100139. function Fw(t) {
  100140. let e = [], n = -1;
  100141. for (let r of t.selection.ranges) {
  100142. let i = t.doc.lineAt(r.from), a = t.doc.lineAt(r.to);
  100143. if (!r.empty && r.to == a.from && (a = t.doc.lineAt(r.to - 1)), n >= i.number) {
  100144. let o = e[e.length - 1];
  100145. o.to = a.to, o.ranges.push(r);
  100146. } else
  100147. e.push({ from: i.from, to: a.to, ranges: [r] });
  100148. n = a.number + 1;
  100149. }
  100150. return e;
  100151. }
  100152. function Pse(t, e, n) {
  100153. if (t.readOnly)
  100154. return !1;
  100155. let r = [], i = [];
  100156. for (let a of Fw(t)) {
  100157. if (n ? a.to == t.doc.length : a.from == 0)
  100158. continue;
  100159. let o = t.doc.lineAt(n ? a.to + 1 : a.from - 1), s = o.length + 1;
  100160. if (n) {
  100161. r.push({ from: a.to, to: o.to }, { from: a.from, insert: o.text + t.lineBreak });
  100162. for (let l of a.ranges)
  100163. i.push(me.range(Math.min(t.doc.length, l.anchor + s), Math.min(t.doc.length, l.head + s)));
  100164. } else {
  100165. r.push({ from: o.from, to: a.from }, { from: a.to, insert: t.lineBreak + o.text });
  100166. for (let l of a.ranges)
  100167. i.push(me.range(l.anchor - s, l.head - s));
  100168. }
  100169. }
  100170. return r.length ? (e(t.update({
  100171. changes: r,
  100172. scrollIntoView: !0,
  100173. selection: me.create(i, t.selection.mainIndex),
  100174. userEvent: "move.line"
  100175. })), !0) : !1;
  100176. }
  100177. const pct = ({ state: t, dispatch: e }) => Pse(t, e, !1), vct = ({ state: t, dispatch: e }) => Pse(t, e, !0);
  100178. function $se(t, e, n) {
  100179. if (t.readOnly)
  100180. return !1;
  100181. let r = [];
  100182. for (let i of Fw(t))
  100183. 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) });
  100184. return e(t.update({ changes: r, scrollIntoView: !0, userEvent: "input.copyline" })), !0;
  100185. }
  100186. const gct = ({ state: t, dispatch: e }) => $se(t, e, !1), mct = ({ state: t, dispatch: e }) => $se(t, e, !0), yct = (t) => {
  100187. if (t.state.readOnly)
  100188. return !1;
  100189. let { state: e } = t, n = e.changes(Fw(e).map(({ from: i, to: a }) => (i > 0 ? i-- : a < e.doc.length && a++, { from: i, to: a }))), r = Vp(e.selection, (i) => {
  100190. let a;
  100191. if (t.lineWrapping) {
  100192. let o = t.lineBlockAt(i.head), s = t.coordsAtPos(i.head, i.assoc || 1);
  100193. s && (a = o.bottom + t.documentTop - s.bottom + t.defaultLineHeight / 2);
  100194. }
  100195. return t.moveVertically(i, !0, a);
  100196. }).map(n);
  100197. return t.dispatch({ changes: n, selection: r, scrollIntoView: !0, userEvent: "delete.line" }), !0;
  100198. };
  100199. function bct(t, e) {
  100200. if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
  100201. return { from: e, to: e };
  100202. let n = nr(t).resolveInner(e), r = n.childBefore(e), i = n.childAfter(e), a;
  100203. return r && i && r.to <= e && i.from >= e && (a = r.type.prop(Pt.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;
  100204. }
  100205. const _ct = /* @__PURE__ */ Ase(!1), Oct = /* @__PURE__ */ Ase(!0);
  100206. function Ase(t) {
  100207. return ({ state: e, dispatch: n }) => {
  100208. if (e.readOnly)
  100209. return !1;
  100210. let r = e.changeByRange((i) => {
  100211. let { from: a, to: o } = i, s = e.doc.lineAt(a), l = !t && a == o && bct(e, a);
  100212. t && (a = o = (o <= s.to ? s : e.doc.lineAt(o)).to);
  100213. let u = new Lw(e, { simulateBreak: a, simulateDoubleBreak: !!l }), c = m4(u, a);
  100214. for (c == null && (c = zp(/^\s*/.exec(e.doc.lineAt(a).text)[0], e.tabSize)); o < s.to && /\s/.test(s.text[o - s.from]); )
  100215. o++;
  100216. l ? { from: a, to: o } = l : a > s.from && a < s.from + 100 && !/\S/.test(s.text.slice(0, a)) && (a = s.from);
  100217. let f = ["", i0(e, c)];
  100218. return l && f.push(i0(e, u.lineIndent(s.from, -1))), {
  100219. changes: { from: a, to: o, insert: Ft.of(f) },
  100220. range: me.cursor(a + 1 + f[1].length)
  100221. };
  100222. });
  100223. return n(e.update(r, { scrollIntoView: !0, userEvent: "input" })), !0;
  100224. };
  100225. }
  100226. function x4(t, e) {
  100227. let n = -1;
  100228. return t.changeByRange((r) => {
  100229. let i = [];
  100230. for (let o = r.from; o <= r.to; ) {
  100231. let s = t.doc.lineAt(o);
  100232. s.number > n && (r.empty || r.to > s.from) && (e(s, i, r), n = s.number), o = s.to + 1;
  100233. }
  100234. let a = t.changes(i);
  100235. return {
  100236. changes: i,
  100237. range: me.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
  100238. };
  100239. });
  100240. }
  100241. const Sct = ({ state: t, dispatch: e }) => {
  100242. if (t.readOnly)
  100243. return !1;
  100244. let n = /* @__PURE__ */ Object.create(null), r = new Lw(t, { overrideIndentation: (a) => {
  100245. let o = n[a];
  100246. return o ?? -1;
  100247. } }), i = x4(t, (a, o, s) => {
  100248. let l = m4(r, a.from);
  100249. if (l == null)
  100250. return;
  100251. /\S/.test(a.text) || (l = 0);
  100252. let u = /^\s*/.exec(a.text)[0], c = i0(t, l);
  100253. (u != c || s.from < a.from + u.length) && (n[a.from] = l, o.push({ from: a.from, to: a.from + u.length, insert: c }));
  100254. });
  100255. return i.changes.empty || e(t.update(i, { userEvent: "indent" })), !0;
  100256. }, Ese = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(x4(t, (n, r) => {
  100257. r.push({ from: n.from, insert: t.facet(uy) });
  100258. }), { userEvent: "input.indent" })), !0), Mse = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(x4(t, (n, r) => {
  100259. let i = /^\s*/.exec(n.text)[0];
  100260. if (!i)
  100261. return;
  100262. let a = zp(i, t.tabSize), o = 0, s = i0(t, Math.max(0, a - hS(t)));
  100263. for (; o < i.length && o < s.length && i.charCodeAt(o) == s.charCodeAt(o); )
  100264. o++;
  100265. r.push({ from: n.from + o, to: n.from + i.length, insert: s.slice(o) });
  100266. }), { userEvent: "delete.dedent" })), !0), xct = (t) => (t.setTabFocusMode(), !0), wct = [
  100267. { key: "Ctrl-b", run: sse, shift: gse, preventDefault: !0 },
  100268. { key: "Ctrl-f", run: lse, shift: mse },
  100269. { key: "Ctrl-p", run: fse, shift: _se },
  100270. { key: "Ctrl-n", run: dse, shift: Ose },
  100271. { key: "Ctrl-a", run: Hut, shift: nct },
  100272. { key: "Ctrl-e", run: Gut, shift: rct },
  100273. { key: "Ctrl-d", run: wse },
  100274. { key: "Ctrl-h", run: ZM },
  100275. { key: "Ctrl-k", run: uct },
  100276. { key: "Ctrl-Alt-h", run: Tse },
  100277. { key: "Ctrl-o", run: dct },
  100278. { key: "Ctrl-t", run: hct },
  100279. { key: "Ctrl-v", run: jM }
  100280. ], Cct = /* @__PURE__ */ [
  100281. { key: "ArrowLeft", run: sse, shift: gse, preventDefault: !0 },
  100282. { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: kut, shift: Uut, preventDefault: !0 },
  100283. { mac: "Cmd-ArrowLeft", run: Wut, shift: ect, preventDefault: !0 },
  100284. { key: "ArrowRight", run: lse, shift: mse, preventDefault: !0 },
  100285. { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: Lut, shift: Xut, preventDefault: !0 },
  100286. { mac: "Cmd-ArrowRight", run: Qut, shift: tct, preventDefault: !0 },
  100287. { key: "ArrowUp", run: fse, shift: _se, preventDefault: !0 },
  100288. { mac: "Cmd-ArrowUp", run: BG, shift: VG },
  100289. { mac: "Ctrl-ArrowUp", run: kG, shift: LG },
  100290. { key: "ArrowDown", run: dse, shift: Ose, preventDefault: !0 },
  100291. { mac: "Cmd-ArrowDown", run: zG, shift: FG },
  100292. { mac: "Ctrl-ArrowDown", run: jM, shift: NG },
  100293. { key: "PageUp", run: kG, shift: LG },
  100294. { key: "PageDown", run: jM, shift: NG },
  100295. { key: "Home", run: Fut, shift: Jut, preventDefault: !0 },
  100296. { key: "Mod-Home", run: BG, shift: VG },
  100297. { key: "End", run: Vut, shift: Kut, preventDefault: !0 },
  100298. { key: "Mod-End", run: zG, shift: FG },
  100299. { key: "Enter", run: _ct },
  100300. { key: "Mod-a", run: ict },
  100301. { key: "Backspace", run: ZM, shift: ZM },
  100302. { key: "Delete", run: wse },
  100303. { key: "Mod-Backspace", mac: "Alt-Backspace", run: Tse },
  100304. { key: "Mod-Delete", mac: "Alt-Delete", run: lct },
  100305. { mac: "Mod-Backspace", run: cct },
  100306. { mac: "Mod-Delete", run: fct }
  100307. ].concat(/* @__PURE__ */ wct.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), Tct = /* @__PURE__ */ [
  100308. { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: But, shift: Yut },
  100309. { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: zut, shift: qut },
  100310. { key: "Alt-ArrowUp", run: pct },
  100311. { key: "Shift-Alt-ArrowUp", run: gct },
  100312. { key: "Alt-ArrowDown", run: vct },
  100313. { key: "Shift-Alt-ArrowDown", run: mct },
  100314. { key: "Escape", run: sct },
  100315. { key: "Mod-Enter", run: Oct },
  100316. { key: "Alt-l", mac: "Ctrl-l", run: act },
  100317. { key: "Mod-i", run: oct, preventDefault: !0 },
  100318. { key: "Mod-[", run: Mse },
  100319. { key: "Mod-]", run: Ese },
  100320. { key: "Mod-Alt-\\", run: Sct },
  100321. { key: "Shift-Mod-k", run: yct },
  100322. { key: "Shift-Mod-\\", run: Zut },
  100323. { key: "Mod-/", run: gut },
  100324. { key: "Alt-A", run: yut },
  100325. { key: "Ctrl-m", mac: "Shift-Alt-m", run: xct }
  100326. ].concat(Cct), Pct = { key: "Tab", run: Ese, shift: Mse };
  100327. function on() {
  100328. var t = arguments[0];
  100329. typeof t == "string" && (t = document.createElement(t));
  100330. var e = 1, n = arguments[1];
  100331. if (n && typeof n == "object" && n.nodeType == null && !Array.isArray(n)) {
  100332. for (var r in n) if (Object.prototype.hasOwnProperty.call(n, r)) {
  100333. var i = n[r];
  100334. typeof i == "string" ? t.setAttribute(r, i) : i != null && (t[r] = i);
  100335. }
  100336. e++;
  100337. }
  100338. for (; e < arguments.length; e++) Ise(t, arguments[e]);
  100339. return t;
  100340. }
  100341. function Ise(t, e) {
  100342. if (typeof e == "string")
  100343. t.appendChild(document.createTextNode(e));
  100344. else if (e != null) if (e.nodeType != null)
  100345. t.appendChild(e);
  100346. else if (Array.isArray(e))
  100347. for (var n = 0; n < e.length; n++) Ise(t, e[n]);
  100348. else
  100349. throw new RangeError("Unsupported child node: " + e);
  100350. }
  100351. const WG = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t;
  100352. class rp {
  100353. /**
  100354. Create a text cursor. The query is the search string, `from` to
  100355. `to` provides the region to search.
  100356. When `normalize` is given, it will be called, on both the query
  100357. string and the content it is matched against, before comparing.
  100358. You can, for example, create a case-insensitive search by
  100359. passing `s => s.toLowerCase()`.
  100360. Text is always normalized with
  100361. [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
  100362. (when supported).
  100363. */
  100364. constructor(e, n, r = 0, i = e.length, a, o) {
  100365. 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(WG(s)) : WG, this.query = this.normalize(n);
  100366. }
  100367. peek() {
  100368. if (this.bufferPos == this.buffer.length) {
  100369. if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
  100370. return -1;
  100371. this.bufferPos = 0, this.buffer = this.iter.value;
  100372. }
  100373. return gr(this.buffer, this.bufferPos);
  100374. }
  100375. /**
  100376. Look for the next match. Updates the iterator's
  100377. [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
  100378. [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
  100379. at least once before using the cursor.
  100380. */
  100381. next() {
  100382. for (; this.matches.length; )
  100383. this.matches.pop();
  100384. return this.nextOverlapping();
  100385. }
  100386. /**
  100387. The `next` method will ignore matches that partially overlap a
  100388. previous match. This method behaves like `next`, but includes
  100389. such matches.
  100390. */
  100391. nextOverlapping() {
  100392. for (; ; ) {
  100393. let e = this.peek();
  100394. if (e < 0)
  100395. return this.done = !0, this;
  100396. let n = JL(e), r = this.bufferStart + this.bufferPos;
  100397. this.bufferPos += ya(e);
  100398. let i = this.normalize(n);
  100399. for (let a = 0, o = r; ; a++) {
  100400. let s = i.charCodeAt(a), l = this.match(s, o, this.bufferPos + this.bufferStart);
  100401. if (a == i.length - 1) {
  100402. if (l)
  100403. return this.value = l, this;
  100404. break;
  100405. }
  100406. o == r && a < n.length && n.charCodeAt(a) == s && o++;
  100407. }
  100408. }
  100409. }
  100410. match(e, n, r) {
  100411. let i = null;
  100412. for (let a = 0; a < this.matches.length; a += 2) {
  100413. let o = this.matches[a], s = !1;
  100414. 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);
  100415. }
  100416. 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;
  100417. }
  100418. }
  100419. typeof Symbol < "u" && (rp.prototype[Symbol.iterator] = function() {
  100420. return this;
  100421. });
  100422. const Dse = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, w4 = "gm" + (/x/.unicode == null ? "" : "u");
  100423. class Rse {
  100424. /**
  100425. Create a cursor that will search the given range in the given
  100426. document. `query` should be the raw pattern (as you'd pass it to
  100427. `new RegExp`).
  100428. */
  100429. constructor(e, n, r, i = 0, a = e.length) {
  100430. if (this.text = e, this.to = a, this.curLine = "", this.done = !1, this.value = Dse, /\\[sWDnr]|\n|\r|\[\^/.test(n))
  100431. return new kse(e, n, r, i, a);
  100432. this.re = new RegExp(n, w4 + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.iter = e.iter();
  100433. let o = e.lineAt(i);
  100434. this.curLineStart = o.from, this.matchPos = mS(e, i), this.getLine(this.curLineStart);
  100435. }
  100436. getLine(e) {
  100437. 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());
  100438. }
  100439. nextLine() {
  100440. this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
  100441. }
  100442. /**
  100443. Move to the next match, if there is one.
  100444. */
  100445. next() {
  100446. for (let e = this.matchPos - this.curLineStart; ; ) {
  100447. this.re.lastIndex = e;
  100448. let n = this.matchPos <= this.to && this.re.exec(this.curLine);
  100449. if (n) {
  100450. let r = this.curLineStart + n.index, i = r + n[0].length;
  100451. if (this.matchPos = mS(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)))
  100452. return this.value = { from: r, to: i, match: n }, this;
  100453. e = this.matchPos - this.curLineStart;
  100454. } else if (this.curLineStart + this.curLine.length < this.to)
  100455. this.nextLine(), e = 0;
  100456. else
  100457. return this.done = !0, this;
  100458. }
  100459. }
  100460. }
  100461. const R$ = /* @__PURE__ */ new WeakMap();
  100462. class hh {
  100463. constructor(e, n) {
  100464. this.from = e, this.text = n;
  100465. }
  100466. get to() {
  100467. return this.from + this.text.length;
  100468. }
  100469. static get(e, n, r) {
  100470. let i = R$.get(e);
  100471. if (!i || i.from >= r || i.to <= n) {
  100472. let s = new hh(n, e.sliceString(n, r));
  100473. return R$.set(e, s), s;
  100474. }
  100475. if (i.from == n && i.to == r)
  100476. return i;
  100477. let { text: a, from: o } = i;
  100478. return o > n && (a = e.sliceString(n, o) + a, o = n), i.to < r && (a += e.sliceString(i.to, r)), R$.set(e, new hh(o, a)), new hh(n, a.slice(n - o, r - o));
  100479. }
  100480. }
  100481. class kse {
  100482. constructor(e, n, r, i, a) {
  100483. this.text = e, this.to = a, this.done = !1, this.value = Dse, this.matchPos = mS(e, i), this.re = new RegExp(n, w4 + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.flat = hh.get(e, i, this.chunkEnd(
  100484. i + 5e3
  100485. /* Chunk.Base */
  100486. ));
  100487. }
  100488. chunkEnd(e) {
  100489. return e >= this.to ? this.to : this.text.lineAt(e).to;
  100490. }
  100491. next() {
  100492. for (; ; ) {
  100493. let e = this.re.lastIndex = this.matchPos - this.flat.from, n = this.re.exec(this.flat.text);
  100494. if (n && !n[0] && n.index == e && (this.re.lastIndex = e + 1, n = this.re.exec(this.flat.text)), n) {
  100495. let r = this.flat.from + n.index, i = r + n[0].length;
  100496. if ((this.flat.to >= this.to || n.index + n[0].length <= this.flat.text.length - 10) && (!this.test || this.test(r, i, n)))
  100497. return this.value = { from: r, to: i, match: n }, this.matchPos = mS(this.text, i + (r == i ? 1 : 0)), this;
  100498. }
  100499. if (this.flat.to == this.to)
  100500. return this.done = !0, this;
  100501. this.flat = hh.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
  100502. }
  100503. }
  100504. }
  100505. typeof Symbol < "u" && (Rse.prototype[Symbol.iterator] = kse.prototype[Symbol.iterator] = function() {
  100506. return this;
  100507. });
  100508. function $ct(t) {
  100509. try {
  100510. return new RegExp(t, w4), !0;
  100511. } catch {
  100512. return !1;
  100513. }
  100514. }
  100515. function mS(t, e) {
  100516. if (e >= t.length)
  100517. return e;
  100518. let n = t.lineAt(e), r;
  100519. for (; e < n.to && (r = n.text.charCodeAt(e - n.from)) >= 56320 && r < 57344; )
  100520. e++;
  100521. return e;
  100522. }
  100523. function UM(t) {
  100524. let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), n = on("input", { class: "cm-textfield", name: "line", value: e }), r = on("form", {
  100525. class: "cm-gotoLine",
  100526. onkeydown: (a) => {
  100527. a.keyCode == 27 ? (a.preventDefault(), t.dispatch({ effects: yS.of(!1) }), t.focus()) : a.keyCode == 13 && (a.preventDefault(), i());
  100528. },
  100529. onsubmit: (a) => {
  100530. a.preventDefault(), i();
  100531. }
  100532. }, on("label", t.state.phrase("Go to line"), ": ", n), " ", on("button", { class: "cm-button", type: "submit" }, t.state.phrase("go")));
  100533. function i() {
  100534. let a = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);
  100535. if (!a)
  100536. return;
  100537. 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;
  100538. if (u && f) {
  100539. let g = h / 100;
  100540. l && (g = g * (l == "-" ? -1 : 1) + s.number / o.doc.lines), h = Math.round(o.doc.lines * g);
  100541. } else u && l && (h = h * (l == "-" ? -1 : 1) + s.number);
  100542. let p = o.doc.line(Math.max(1, Math.min(o.doc.lines, h))), v = me.cursor(p.from + Math.max(0, Math.min(d, p.length)));
  100543. t.dispatch({
  100544. effects: [yS.of(!1), De.scrollIntoView(v.from, { y: "center" })],
  100545. selection: v
  100546. }), t.focus();
  100547. }
  100548. return { dom: r };
  100549. }
  100550. const yS = /* @__PURE__ */ dt.define(), QG = /* @__PURE__ */ ur.define({
  100551. create() {
  100552. return !0;
  100553. },
  100554. update(t, e) {
  100555. for (let n of e.effects)
  100556. n.is(yS) && (t = n.value);
  100557. return t;
  100558. },
  100559. provide: (t) => t0.from(t, (e) => e ? UM : null)
  100560. }), Act = (t) => {
  100561. let e = e0(t, UM);
  100562. if (!e) {
  100563. let n = [yS.of(!0)];
  100564. t.state.field(QG, !1) == null && n.push(dt.appendConfig.of([QG, Ect])), t.dispatch({ effects: n }), e = e0(t, UM);
  100565. }
  100566. return e && e.dom.querySelector("input").select(), !0;
  100567. }, Ect = /* @__PURE__ */ De.baseTheme({
  100568. ".cm-panel.cm-gotoLine": {
  100569. padding: "2px 6px 4px",
  100570. "& label": { fontSize: "80%" }
  100571. }
  100572. }), Mct = {
  100573. highlightWordAroundCursor: !1,
  100574. minSelectionLength: 1,
  100575. maxMatches: 100,
  100576. wholeWords: !1
  100577. }, Ict = /* @__PURE__ */ Be.define({
  100578. combine(t) {
  100579. return ds(t, Mct, {
  100580. highlightWordAroundCursor: (e, n) => e || n,
  100581. minSelectionLength: Math.min,
  100582. maxMatches: Math.min
  100583. });
  100584. }
  100585. });
  100586. function Dct(t) {
  100587. return [Bct, Nct];
  100588. }
  100589. const Rct = /* @__PURE__ */ Ze.mark({ class: "cm-selectionMatch" }), kct = /* @__PURE__ */ Ze.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
  100590. function HG(t, e, n, r) {
  100591. return (n == 0 || t(e.sliceDoc(n - 1, n)) != yn.Word) && (r == e.doc.length || t(e.sliceDoc(r, r + 1)) != yn.Word);
  100592. }
  100593. function Lct(t, e, n, r) {
  100594. return t(e.sliceDoc(n, n + 1)) == yn.Word && t(e.sliceDoc(r - 1, r)) == yn.Word;
  100595. }
  100596. const Nct = /* @__PURE__ */ kn.fromClass(class {
  100597. constructor(t) {
  100598. this.decorations = this.getDeco(t);
  100599. }
  100600. update(t) {
  100601. (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view));
  100602. }
  100603. getDeco(t) {
  100604. let e = t.state.facet(Ict), { state: n } = t, r = n.selection;
  100605. if (r.ranges.length > 1)
  100606. return Ze.none;
  100607. let i = r.main, a, o = null;
  100608. if (i.empty) {
  100609. if (!e.highlightWordAroundCursor)
  100610. return Ze.none;
  100611. let l = n.wordAt(i.head);
  100612. if (!l)
  100613. return Ze.none;
  100614. o = n.charCategorizer(i.head), a = n.sliceDoc(l.from, l.to);
  100615. } else {
  100616. let l = i.to - i.from;
  100617. if (l < e.minSelectionLength || l > 200)
  100618. return Ze.none;
  100619. if (e.wholeWords) {
  100620. if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(HG(o, n, i.from, i.to) && Lct(o, n, i.from, i.to)))
  100621. return Ze.none;
  100622. } else if (a = n.sliceDoc(i.from, i.to), !a)
  100623. return Ze.none;
  100624. }
  100625. let s = [];
  100626. for (let l of t.visibleRanges) {
  100627. let u = new rp(n.doc, a, l.from, l.to);
  100628. for (; !u.next().done; ) {
  100629. let { from: c, to: f } = u.value;
  100630. if ((!o || HG(o, n, c, f)) && (i.empty && c <= i.from && f >= i.to ? s.push(kct.range(c, f)) : (c >= i.to || f <= i.from) && s.push(Rct.range(c, f)), s.length > e.maxMatches))
  100631. return Ze.none;
  100632. }
  100633. }
  100634. return Ze.set(s);
  100635. }
  100636. }, {
  100637. decorations: (t) => t.decorations
  100638. }), Bct = /* @__PURE__ */ De.baseTheme({
  100639. ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
  100640. ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
  100641. }), zct = ({ state: t, dispatch: e }) => {
  100642. let { selection: n } = t, r = me.create(n.ranges.map((i) => t.wordAt(i.head) || me.cursor(i.head)), n.mainIndex);
  100643. return r.eq(n) ? !1 : (e(t.update({ selection: r })), !0);
  100644. };
  100645. function Vct(t, e) {
  100646. let { main: n, ranges: r } = t.selection, i = t.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
  100647. for (let o = !1, s = new rp(t.doc, e, r[r.length - 1].to); ; )
  100648. if (s.next(), s.done) {
  100649. if (o)
  100650. return null;
  100651. s = new rp(t.doc, e, 0, Math.max(0, r[r.length - 1].from - 1)), o = !0;
  100652. } else {
  100653. if (o && r.some((l) => l.from == s.value.from))
  100654. continue;
  100655. if (a) {
  100656. let l = t.wordAt(s.value.from);
  100657. if (!l || l.from != s.value.from || l.to != s.value.to)
  100658. continue;
  100659. }
  100660. return s.value;
  100661. }
  100662. }
  100663. const Fct = ({ state: t, dispatch: e }) => {
  100664. let { ranges: n } = t.selection;
  100665. if (n.some((a) => a.from === a.to))
  100666. return zct({ state: t, dispatch: e });
  100667. let r = t.sliceDoc(n[0].from, n[0].to);
  100668. if (t.selection.ranges.some((a) => t.sliceDoc(a.from, a.to) != r))
  100669. return !1;
  100670. let i = Vct(t, r);
  100671. return i ? (e(t.update({
  100672. selection: t.selection.addRange(me.range(i.from, i.to), !1),
  100673. effects: De.scrollIntoView(i.to)
  100674. })), !0) : !1;
  100675. }, Fp = /* @__PURE__ */ Be.define({
  100676. combine(t) {
  100677. return ds(t, {
  100678. top: !1,
  100679. caseSensitive: !1,
  100680. literal: !1,
  100681. regexp: !1,
  100682. wholeWord: !1,
  100683. createPanel: (e) => new Jct(e),
  100684. scrollToMatch: (e) => De.scrollIntoView(e)
  100685. });
  100686. }
  100687. });
  100688. class Lse {
  100689. /**
  100690. Create a query object.
  100691. */
  100692. constructor(e) {
  100693. 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 || $ct(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord;
  100694. }
  100695. /**
  100696. @internal
  100697. */
  100698. unquote(e) {
  100699. return this.literal ? e : e.replace(/\\([nrt\\])/g, (n, r) => r == "n" ? `
  100700. ` : r == "r" ? "\r" : r == "t" ? " " : "\\");
  100701. }
  100702. /**
  100703. Compare this query to another query.
  100704. */
  100705. eq(e) {
  100706. return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
  100707. }
  100708. /**
  100709. @internal
  100710. */
  100711. create() {
  100712. return this.regexp ? new Gct(this) : new Qct(this);
  100713. }
  100714. /**
  100715. Get a search cursor for this query, searching through the given
  100716. range in the given state.
  100717. */
  100718. getCursor(e, n = 0, r) {
  100719. let i = e.doc ? e : At.create({ doc: e });
  100720. return r == null && (r = i.doc.length), this.regexp ? kd(this, i, n, r) : Rd(this, i, n, r);
  100721. }
  100722. }
  100723. class Nse {
  100724. constructor(e) {
  100725. this.spec = e;
  100726. }
  100727. }
  100728. function Rd(t, e, n, r) {
  100729. return new rp(e.doc, t.unquoted, n, r, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? Wct(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
  100730. }
  100731. function Wct(t, e) {
  100732. 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(bS(i, n - a)) != yn.Word || e(_S(i, n - a)) != yn.Word) && (e(_S(i, r - a)) != yn.Word || e(bS(i, r - a)) != yn.Word));
  100733. }
  100734. class Qct extends Nse {
  100735. constructor(e) {
  100736. super(e);
  100737. }
  100738. nextMatch(e, n, r) {
  100739. let i = Rd(this.spec, e, r, e.doc.length).nextOverlapping();
  100740. return i.done && (i = Rd(this.spec, e, 0, n).nextOverlapping()), i.done ? null : i.value;
  100741. }
  100742. // Searching in reverse is, rather than implementing an inverted search
  100743. // cursor, done by scanning chunk after chunk forward.
  100744. prevMatchInRange(e, n, r) {
  100745. for (let i = r; ; ) {
  100746. let a = Math.max(n, i - 1e4 - this.spec.unquoted.length), o = Rd(this.spec, e, a, i), s = null;
  100747. for (; !o.nextOverlapping().done; )
  100748. s = o.value;
  100749. if (s)
  100750. return s;
  100751. if (a == n)
  100752. return null;
  100753. i -= 1e4;
  100754. }
  100755. }
  100756. prevMatch(e, n, r) {
  100757. return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  100758. }
  100759. getReplacement(e) {
  100760. return this.spec.unquote(this.spec.replace);
  100761. }
  100762. matchAll(e, n) {
  100763. let r = Rd(this.spec, e, 0, e.doc.length), i = [];
  100764. for (; !r.next().done; ) {
  100765. if (i.length >= n)
  100766. return null;
  100767. i.push(r.value);
  100768. }
  100769. return i;
  100770. }
  100771. highlight(e, n, r, i) {
  100772. let a = Rd(this.spec, e, Math.max(0, n - this.spec.unquoted.length), Math.min(r + this.spec.unquoted.length, e.doc.length));
  100773. for (; !a.next().done; )
  100774. i(a.value.from, a.value.to);
  100775. }
  100776. }
  100777. function kd(t, e, n, r) {
  100778. return new Rse(e.doc, t.search, {
  100779. ignoreCase: !t.caseSensitive,
  100780. test: t.wholeWord ? Hct(e.charCategorizer(e.selection.main.head)) : void 0
  100781. }, n, r);
  100782. }
  100783. function bS(t, e) {
  100784. return t.slice(_r(t, e, !1), e);
  100785. }
  100786. function _S(t, e) {
  100787. return t.slice(e, _r(t, e));
  100788. }
  100789. function Hct(t) {
  100790. return (e, n, r) => !r[0].length || (t(bS(r.input, r.index)) != yn.Word || t(_S(r.input, r.index)) != yn.Word) && (t(_S(r.input, r.index + r[0].length)) != yn.Word || t(bS(r.input, r.index + r[0].length)) != yn.Word);
  100791. }
  100792. class Gct extends Nse {
  100793. nextMatch(e, n, r) {
  100794. let i = kd(this.spec, e, r, e.doc.length).next();
  100795. return i.done && (i = kd(this.spec, e, 0, n).next()), i.done ? null : i.value;
  100796. }
  100797. prevMatchInRange(e, n, r) {
  100798. for (let i = 1; ; i++) {
  100799. let a = Math.max(
  100800. n,
  100801. r - i * 1e4
  100802. /* FindPrev.ChunkSize */
  100803. ), o = kd(this.spec, e, a, r), s = null;
  100804. for (; !o.next().done; )
  100805. s = o.value;
  100806. if (s && (a == n || s.from > a + 10))
  100807. return s;
  100808. if (a == n)
  100809. return null;
  100810. }
  100811. }
  100812. prevMatch(e, n, r) {
  100813. return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  100814. }
  100815. getReplacement(e) {
  100816. 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);
  100817. }
  100818. matchAll(e, n) {
  100819. let r = kd(this.spec, e, 0, e.doc.length), i = [];
  100820. for (; !r.next().done; ) {
  100821. if (i.length >= n)
  100822. return null;
  100823. i.push(r.value);
  100824. }
  100825. return i;
  100826. }
  100827. highlight(e, n, r, i) {
  100828. let a = kd(this.spec, e, Math.max(
  100829. 0,
  100830. n - 250
  100831. /* RegExp.HighlightMargin */
  100832. ), Math.min(r + 250, e.doc.length));
  100833. for (; !a.next().done; )
  100834. i(a.value.from, a.value.to);
  100835. }
  100836. }
  100837. const a0 = /* @__PURE__ */ dt.define(), C4 = /* @__PURE__ */ dt.define(), eu = /* @__PURE__ */ ur.define({
  100838. create(t) {
  100839. return new k$(XM(t).create(), null);
  100840. },
  100841. update(t, e) {
  100842. for (let n of e.effects)
  100843. n.is(a0) ? t = new k$(n.value.create(), t.panel) : n.is(C4) && (t = new k$(t.query, n.value ? T4 : null));
  100844. return t;
  100845. },
  100846. provide: (t) => t0.from(t, (e) => e.panel)
  100847. });
  100848. class k$ {
  100849. constructor(e, n) {
  100850. this.query = e, this.panel = n;
  100851. }
  100852. }
  100853. const jct = /* @__PURE__ */ Ze.mark({ class: "cm-searchMatch" }), Zct = /* @__PURE__ */ Ze.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Uct = /* @__PURE__ */ kn.fromClass(class {
  100854. constructor(t) {
  100855. this.view = t, this.decorations = this.highlight(t.state.field(eu));
  100856. }
  100857. update(t) {
  100858. let e = t.state.field(eu);
  100859. (e != t.startState.field(eu) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
  100860. }
  100861. highlight({ query: t, panel: e }) {
  100862. if (!e || !t.spec.valid)
  100863. return Ze.none;
  100864. let { view: n } = this, r = new hu();
  100865. for (let i = 0, a = n.visibleRanges, o = a.length; i < o; i++) {
  100866. let { from: s, to: l } = a[i];
  100867. for (; i < o - 1 && l > a[i + 1].from - 2 * 250; )
  100868. l = a[++i].to;
  100869. t.highlight(n.state, s, l, (u, c) => {
  100870. let f = n.state.selection.ranges.some((d) => d.from == u && d.to == c);
  100871. r.add(u, c, f ? Zct : jct);
  100872. });
  100873. }
  100874. return r.finish();
  100875. }
  100876. }, {
  100877. decorations: (t) => t.decorations
  100878. });
  100879. function hy(t) {
  100880. return (e) => {
  100881. let n = e.state.field(eu, !1);
  100882. return n && n.query.spec.valid ? t(e, n) : Vse(e);
  100883. };
  100884. }
  100885. const OS = /* @__PURE__ */ hy((t, { query: e }) => {
  100886. let { to: n } = t.state.selection.main, r = e.nextMatch(t.state, n, n);
  100887. if (!r)
  100888. return !1;
  100889. let i = me.single(r.from, r.to), a = t.state.facet(Fp);
  100890. return t.dispatch({
  100891. selection: i,
  100892. effects: [P4(t, r), a.scrollToMatch(i.main, t)],
  100893. userEvent: "select.search"
  100894. }), zse(t), !0;
  100895. }), SS = /* @__PURE__ */ hy((t, { query: e }) => {
  100896. let { state: n } = t, { from: r } = n.selection.main, i = e.prevMatch(n, r, r);
  100897. if (!i)
  100898. return !1;
  100899. let a = me.single(i.from, i.to), o = t.state.facet(Fp);
  100900. return t.dispatch({
  100901. selection: a,
  100902. effects: [P4(t, i), o.scrollToMatch(a.main, t)],
  100903. userEvent: "select.search"
  100904. }), zse(t), !0;
  100905. }), Xct = /* @__PURE__ */ hy((t, { query: e }) => {
  100906. let n = e.matchAll(t.state, 1e3);
  100907. return !n || !n.length ? !1 : (t.dispatch({
  100908. selection: me.create(n.map((r) => me.range(r.from, r.to))),
  100909. userEvent: "select.search.matches"
  100910. }), !0);
  100911. }), Yct = ({ state: t, dispatch: e }) => {
  100912. let n = t.selection;
  100913. if (n.ranges.length > 1 || n.main.empty)
  100914. return !1;
  100915. let { from: r, to: i } = n.main, a = [], o = 0;
  100916. for (let s = new rp(t.doc, t.sliceDoc(r, i)); !s.next().done; ) {
  100917. if (a.length > 1e3)
  100918. return !1;
  100919. s.value.from == r && (o = a.length), a.push(me.range(s.value.from, s.value.to));
  100920. }
  100921. return e(t.update({
  100922. selection: me.create(a, o),
  100923. userEvent: "select.search.matches"
  100924. })), !0;
  100925. }, GG = /* @__PURE__ */ hy((t, { query: e }) => {
  100926. let { state: n } = t, { from: r, to: i } = n.selection.main;
  100927. if (n.readOnly)
  100928. return !1;
  100929. let a = e.nextMatch(n, r, r);
  100930. if (!a)
  100931. return !1;
  100932. let o = [], s, l, u = [];
  100933. 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(De.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))), a) {
  100934. let c = o.length == 0 || o[0].from >= a.to ? 0 : a.to - a.from - l.length;
  100935. s = me.single(a.from - c, a.to - c), u.push(P4(t, a)), u.push(n.facet(Fp).scrollToMatch(s.main, t));
  100936. }
  100937. return t.dispatch({
  100938. changes: o,
  100939. selection: s,
  100940. effects: u,
  100941. userEvent: "input.replace"
  100942. }), !0;
  100943. }), qct = /* @__PURE__ */ hy((t, { query: e }) => {
  100944. if (t.state.readOnly)
  100945. return !1;
  100946. let n = e.matchAll(t.state, 1e9).map((i) => {
  100947. let { from: a, to: o } = i;
  100948. return { from: a, to: o, insert: e.getReplacement(i) };
  100949. });
  100950. if (!n.length)
  100951. return !1;
  100952. let r = t.state.phrase("replaced $ matches", n.length) + ".";
  100953. return t.dispatch({
  100954. changes: n,
  100955. effects: De.announce.of(r),
  100956. userEvent: "input.replace.all"
  100957. }), !0;
  100958. });
  100959. function T4(t) {
  100960. return t.state.facet(Fp).createPanel(t);
  100961. }
  100962. function XM(t, e) {
  100963. var n, r, i, a, o;
  100964. let s = t.selection.main, l = s.empty || s.to > s.from + 100 ? "" : t.sliceDoc(s.from, s.to);
  100965. if (e && !l)
  100966. return e;
  100967. let u = t.facet(Fp);
  100968. return new Lse({
  100969. search: ((n = e == null ? void 0 : e.literal) !== null && n !== void 0 ? n : u.literal) ? l : l.replace(/\n/g, "\\n"),
  100970. caseSensitive: (r = e == null ? void 0 : e.caseSensitive) !== null && r !== void 0 ? r : u.caseSensitive,
  100971. literal: (i = e == null ? void 0 : e.literal) !== null && i !== void 0 ? i : u.literal,
  100972. regexp: (a = e == null ? void 0 : e.regexp) !== null && a !== void 0 ? a : u.regexp,
  100973. wholeWord: (o = e == null ? void 0 : e.wholeWord) !== null && o !== void 0 ? o : u.wholeWord
  100974. });
  100975. }
  100976. function Bse(t) {
  100977. let e = e0(t, T4);
  100978. return e && e.dom.querySelector("[main-field]");
  100979. }
  100980. function zse(t) {
  100981. let e = Bse(t);
  100982. e && e == t.root.activeElement && e.select();
  100983. }
  100984. const Vse = (t) => {
  100985. let e = t.state.field(eu, !1);
  100986. if (e && e.panel) {
  100987. let n = Bse(t);
  100988. if (n && n != t.root.activeElement) {
  100989. let r = XM(t.state, e.query.spec);
  100990. r.valid && t.dispatch({ effects: a0.of(r) }), n.focus(), n.select();
  100991. }
  100992. } else
  100993. t.dispatch({ effects: [
  100994. C4.of(!0),
  100995. e ? a0.of(XM(t.state, e.query.spec)) : dt.appendConfig.of(tft)
  100996. ] });
  100997. return !0;
  100998. }, Fse = (t) => {
  100999. let e = t.state.field(eu, !1);
  101000. if (!e || !e.panel)
  101001. return !1;
  101002. let n = e0(t, T4);
  101003. return n && n.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: C4.of(!1) }), !0;
  101004. }, Kct = [
  101005. { key: "Mod-f", run: Vse, scope: "editor search-panel" },
  101006. { key: "F3", run: OS, shift: SS, scope: "editor search-panel", preventDefault: !0 },
  101007. { key: "Mod-g", run: OS, shift: SS, scope: "editor search-panel", preventDefault: !0 },
  101008. { key: "Escape", run: Fse, scope: "editor search-panel" },
  101009. { key: "Mod-Shift-l", run: Yct },
  101010. { key: "Mod-Alt-g", run: Act },
  101011. { key: "Mod-d", run: Fct, preventDefault: !0 }
  101012. ];
  101013. class Jct {
  101014. constructor(e) {
  101015. this.view = e;
  101016. let n = this.query = e.state.field(eu).query.spec;
  101017. this.commit = this.commit.bind(this), this.searchField = on("input", {
  101018. value: n.search,
  101019. placeholder: Mi(e, "Find"),
  101020. "aria-label": Mi(e, "Find"),
  101021. class: "cm-textfield",
  101022. name: "search",
  101023. form: "",
  101024. "main-field": "true",
  101025. onchange: this.commit,
  101026. onkeyup: this.commit
  101027. }), this.replaceField = on("input", {
  101028. value: n.replace,
  101029. placeholder: Mi(e, "Replace"),
  101030. "aria-label": Mi(e, "Replace"),
  101031. class: "cm-textfield",
  101032. name: "replace",
  101033. form: "",
  101034. onchange: this.commit,
  101035. onkeyup: this.commit
  101036. }), this.caseField = on("input", {
  101037. type: "checkbox",
  101038. name: "case",
  101039. form: "",
  101040. checked: n.caseSensitive,
  101041. onchange: this.commit
  101042. }), this.reField = on("input", {
  101043. type: "checkbox",
  101044. name: "re",
  101045. form: "",
  101046. checked: n.regexp,
  101047. onchange: this.commit
  101048. }), this.wordField = on("input", {
  101049. type: "checkbox",
  101050. name: "word",
  101051. form: "",
  101052. checked: n.wholeWord,
  101053. onchange: this.commit
  101054. });
  101055. function r(i, a, o) {
  101056. return on("button", { class: "cm-button", name: i, onclick: a, type: "button" }, o);
  101057. }
  101058. this.dom = on("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [
  101059. this.searchField,
  101060. r("next", () => OS(e), [Mi(e, "next")]),
  101061. r("prev", () => SS(e), [Mi(e, "previous")]),
  101062. r("select", () => Xct(e), [Mi(e, "all")]),
  101063. on("label", null, [this.caseField, Mi(e, "match case")]),
  101064. on("label", null, [this.reField, Mi(e, "regexp")]),
  101065. on("label", null, [this.wordField, Mi(e, "by word")]),
  101066. ...e.state.readOnly ? [] : [
  101067. on("br"),
  101068. this.replaceField,
  101069. r("replace", () => GG(e), [Mi(e, "replace")]),
  101070. r("replaceAll", () => qct(e), [Mi(e, "replace all")])
  101071. ],
  101072. on("button", {
  101073. name: "close",
  101074. onclick: () => Fse(e),
  101075. "aria-label": Mi(e, "close"),
  101076. type: "button"
  101077. }, ["×"])
  101078. ]);
  101079. }
  101080. commit() {
  101081. let e = new Lse({
  101082. search: this.searchField.value,
  101083. caseSensitive: this.caseField.checked,
  101084. regexp: this.reField.checked,
  101085. wholeWord: this.wordField.checked,
  101086. replace: this.replaceField.value
  101087. });
  101088. e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: a0.of(e) }));
  101089. }
  101090. keydown(e) {
  101091. cst(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? SS : OS)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), GG(this.view));
  101092. }
  101093. update(e) {
  101094. for (let n of e.transactions)
  101095. for (let r of n.effects)
  101096. r.is(a0) && !r.value.eq(this.query) && this.setQuery(r.value);
  101097. }
  101098. setQuery(e) {
  101099. 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;
  101100. }
  101101. mount() {
  101102. this.searchField.select();
  101103. }
  101104. get pos() {
  101105. return 80;
  101106. }
  101107. get top() {
  101108. return this.view.state.facet(Fp).top;
  101109. }
  101110. }
  101111. function Mi(t, e) {
  101112. return t.state.phrase(e);
  101113. }
  101114. const l_ = 30, u_ = /[\s\.,:;?!]/;
  101115. function P4(t, { from: e, to: n }) {
  101116. let r = t.state.doc.lineAt(e), i = t.state.doc.lineAt(n).to, a = Math.max(r.from, e - l_), o = Math.min(i, n + l_), s = t.state.sliceDoc(a, o);
  101117. if (a != r.from) {
  101118. for (let l = 0; l < l_; l++)
  101119. if (!u_.test(s[l + 1]) && u_.test(s[l])) {
  101120. s = s.slice(l);
  101121. break;
  101122. }
  101123. }
  101124. if (o != i) {
  101125. for (let l = s.length - 1; l > s.length - l_; l--)
  101126. if (!u_.test(s[l - 1]) && u_.test(s[l])) {
  101127. s = s.slice(0, l);
  101128. break;
  101129. }
  101130. }
  101131. return De.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`);
  101132. }
  101133. const eft = /* @__PURE__ */ De.baseTheme({
  101134. ".cm-panel.cm-search": {
  101135. padding: "2px 6px 4px",
  101136. position: "relative",
  101137. "& [name=close]": {
  101138. position: "absolute",
  101139. top: "0",
  101140. right: "4px",
  101141. backgroundColor: "inherit",
  101142. border: "none",
  101143. font: "inherit",
  101144. padding: 0,
  101145. margin: 0
  101146. },
  101147. "& input, & button, & label": {
  101148. margin: ".2em .6em .2em 0"
  101149. },
  101150. "& input[type=checkbox]": {
  101151. marginRight: ".2em"
  101152. },
  101153. "& label": {
  101154. fontSize: "80%",
  101155. whiteSpace: "pre"
  101156. }
  101157. },
  101158. "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
  101159. "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
  101160. "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
  101161. "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
  101162. }), tft = [
  101163. eu,
  101164. /* @__PURE__ */ Eu.low(Uct),
  101165. eft
  101166. ];
  101167. class Wse {
  101168. /**
  101169. Create a new completion context. (Mostly useful for testing
  101170. completion sources—in the editor, the extension will create
  101171. these for you.)
  101172. */
  101173. constructor(e, n, r, i) {
  101174. this.state = e, this.pos = n, this.explicit = r, this.view = i, this.abortListeners = [];
  101175. }
  101176. /**
  101177. Get the extent, content, and (if there is a token) type of the
  101178. token before `this.pos`.
  101179. */
  101180. tokenBefore(e) {
  101181. let n = nr(this.state).resolveInner(this.pos, -1);
  101182. for (; n && e.indexOf(n.name) < 0; )
  101183. n = n.parent;
  101184. return n ? {
  101185. from: n.from,
  101186. to: this.pos,
  101187. text: this.state.sliceDoc(n.from, this.pos),
  101188. type: n.type
  101189. } : null;
  101190. }
  101191. /**
  101192. Get the match of the given expression directly before the
  101193. cursor.
  101194. */
  101195. matchBefore(e) {
  101196. 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(Hse(e, !1));
  101197. return a < 0 ? null : { from: r + a, to: this.pos, text: i.slice(a) };
  101198. }
  101199. /**
  101200. Yields true when the query has been aborted. Can be useful in
  101201. asynchronous queries to avoid doing work that will be ignored.
  101202. */
  101203. get aborted() {
  101204. return this.abortListeners == null;
  101205. }
  101206. /**
  101207. Allows you to register abort handlers, which will be called when
  101208. the query is
  101209. [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
  101210. */
  101211. addEventListener(e, n) {
  101212. e == "abort" && this.abortListeners && this.abortListeners.push(n);
  101213. }
  101214. }
  101215. function jG(t) {
  101216. let e = Object.keys(t).join(""), n = /\w/.test(e);
  101217. return n && (e = e.replace(/\w/g, "")), `[${n ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`;
  101218. }
  101219. function nft(t) {
  101220. let e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
  101221. for (let { label: i } of t) {
  101222. e[i[0]] = !0;
  101223. for (let a = 1; a < i.length; a++)
  101224. n[i[a]] = !0;
  101225. }
  101226. let r = jG(e) + jG(n) + "*$";
  101227. return [new RegExp("^" + r), new RegExp(r)];
  101228. }
  101229. function Qse(t) {
  101230. let e = t.map((i) => typeof i == "string" ? { label: i } : i), [n, r] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : nft(e);
  101231. return (i) => {
  101232. let a = i.matchBefore(r);
  101233. return a || i.explicit ? { from: a ? a.from : i.pos, options: e, validFor: n } : null;
  101234. };
  101235. }
  101236. function rft(t, e) {
  101237. return (n) => {
  101238. for (let r = nr(n.state).resolveInner(n.pos, -1); r; r = r.parent) {
  101239. if (t.indexOf(r.name) > -1)
  101240. return null;
  101241. if (r.type.isTop)
  101242. break;
  101243. }
  101244. return e(n);
  101245. };
  101246. }
  101247. class ZG {
  101248. constructor(e, n, r, i) {
  101249. this.completion = e, this.source = n, this.match = r, this.score = i;
  101250. }
  101251. }
  101252. function tu(t) {
  101253. return t.selection.main.from;
  101254. }
  101255. function Hse(t, e) {
  101256. var n;
  101257. let { source: r } = t, i = e && r[0] != "^", a = r[r.length - 1] != "$";
  101258. return !i && !a ? t : new RegExp(`${i ? "^" : ""}(?:${r})${a ? "$" : ""}`, (n = t.flags) !== null && n !== void 0 ? n : t.ignoreCase ? "i" : "");
  101259. }
  101260. const $4 = /* @__PURE__ */ cl.define();
  101261. function ift(t, e, n, r) {
  101262. let { main: i } = t.selection, a = n - i.from, o = r - i.from;
  101263. 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 } : {
  101264. changes: { from: s.from + a, to: r == i.from ? s.to : s.from + o, insert: e },
  101265. range: me.cursor(s.from + a + e.length)
  101266. })), { scrollIntoView: !0, userEvent: "input.complete" });
  101267. }
  101268. const UG = /* @__PURE__ */ new WeakMap();
  101269. function aft(t) {
  101270. if (!Array.isArray(t))
  101271. return t;
  101272. let e = UG.get(t);
  101273. return e || UG.set(t, e = Qse(t)), e;
  101274. }
  101275. const xS = /* @__PURE__ */ dt.define(), o0 = /* @__PURE__ */ dt.define();
  101276. class oft {
  101277. constructor(e) {
  101278. this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
  101279. for (let n = 0; n < e.length; ) {
  101280. let r = gr(e, n), i = ya(r);
  101281. this.chars.push(r);
  101282. let a = e.slice(n, n + i), o = a.toUpperCase();
  101283. this.folded.push(gr(o == a ? a.toLowerCase() : o, 0)), n += i;
  101284. }
  101285. this.astral = e.length != this.chars.length;
  101286. }
  101287. ret(e, n) {
  101288. return this.score = e, this.matched = n, this;
  101289. }
  101290. // Matches a given word (completion) against the pattern (input).
  101291. // Will return a boolean indicating whether there was a match and,
  101292. // on success, set `this.score` to the score, `this.matched` to an
  101293. // array of `from, to` pairs indicating the matched parts of `word`.
  101294. //
  101295. // The score is a number that is more negative the worse the match
  101296. // is. See `Penalty` above.
  101297. match(e) {
  101298. if (this.pattern.length == 0)
  101299. return this.ret(-100, []);
  101300. if (e.length < this.pattern.length)
  101301. return null;
  101302. let { chars: n, folded: r, any: i, precise: a, byWord: o } = this;
  101303. if (n.length == 1) {
  101304. let y = gr(e, 0), b = ya(y), _ = b == e.length ? 0 : -100;
  101305. if (y != n[0]) if (y == r[0])
  101306. _ += -200;
  101307. else
  101308. return null;
  101309. return this.ret(_, [0, b]);
  101310. }
  101311. let s = e.indexOf(this.pattern);
  101312. if (s == 0)
  101313. return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
  101314. let l = n.length, u = 0;
  101315. if (s < 0) {
  101316. for (let y = 0, b = Math.min(e.length, 200); y < b && u < l; ) {
  101317. let _ = gr(e, y);
  101318. (_ == n[u] || _ == r[u]) && (i[u++] = y), y += ya(_);
  101319. }
  101320. if (u < l)
  101321. return null;
  101322. }
  101323. let c = 0, f = 0, d = !1, h = 0, p = -1, v = -1, g = /[a-z]/.test(e), m = !0;
  101324. for (let y = 0, b = Math.min(e.length, 200), _ = 0; y < b && f < l; ) {
  101325. let O = gr(e, y);
  101326. s < 0 && (c < l && O == n[c] && (a[c++] = y), h < l && (O == n[h] || O == r[h] ? (h == 0 && (p = y), v = y + 1, h++) : h = 0));
  101327. let S, x = O < 255 ? O >= 48 && O <= 57 || O >= 97 && O <= 122 ? 2 : O >= 65 && O <= 90 ? 1 : 0 : (S = JL(O)) != S.toLowerCase() ? 1 : S != S.toUpperCase() ? 2 : 0;
  101328. (!y || x == 1 && g || _ == 0 && x != 0) && (n[f] == O || r[f] == O && (d = !0) ? o[f++] = y : o.length && (m = !1)), _ = x, y += ya(O);
  101329. }
  101330. 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);
  101331. }
  101332. result(e, n, r) {
  101333. let i = [], a = 0;
  101334. for (let o of n) {
  101335. let s = o + (this.astral ? ya(gr(r, o)) : 1);
  101336. a && i[a - 1] == o ? i[a - 1] = s : (i[a++] = o, i[a++] = s);
  101337. }
  101338. return this.ret(e - r.length, i);
  101339. }
  101340. }
  101341. class sft {
  101342. constructor(e) {
  101343. this.pattern = e, this.matched = [], this.score = 0, this.folded = e.toLowerCase();
  101344. }
  101345. match(e) {
  101346. if (e.length < this.pattern.length)
  101347. return null;
  101348. let n = e.slice(0, this.pattern.length), r = n == this.pattern ? 0 : n.toLowerCase() == this.folded ? -200 : null;
  101349. return r == null ? null : (this.matched = [0, n.length], this.score = r + (e.length == this.pattern.length ? 0 : -100), this);
  101350. }
  101351. }
  101352. const br = /* @__PURE__ */ Be.define({
  101353. combine(t) {
  101354. return ds(t, {
  101355. activateOnTyping: !0,
  101356. activateOnCompletion: () => !1,
  101357. activateOnTypingDelay: 100,
  101358. selectOnOpen: !0,
  101359. override: null,
  101360. closeOnBlur: !0,
  101361. maxRenderedOptions: 100,
  101362. defaultKeymap: !0,
  101363. tooltipClass: () => "",
  101364. optionClass: () => "",
  101365. aboveCursor: !1,
  101366. icons: !0,
  101367. addToOptions: [],
  101368. positionInfo: lft,
  101369. filterStrict: !1,
  101370. compareCompletions: (e, n) => e.label.localeCompare(n.label),
  101371. interactionDelay: 75,
  101372. updateSyncTime: 100
  101373. }, {
  101374. defaultKeymap: (e, n) => e && n,
  101375. closeOnBlur: (e, n) => e && n,
  101376. icons: (e, n) => e && n,
  101377. tooltipClass: (e, n) => (r) => XG(e(r), n(r)),
  101378. optionClass: (e, n) => (r) => XG(e(r), n(r)),
  101379. addToOptions: (e, n) => e.concat(n),
  101380. filterStrict: (e, n) => e || n
  101381. });
  101382. }
  101383. });
  101384. function XG(t, e) {
  101385. return t ? e ? t + " " + e : t : e;
  101386. }
  101387. function lft(t, e, n, r, i, a) {
  101388. let o = t.textDirection == pn.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;
  101389. if (s && d < Math.min(p, h) ? s = !1 : !s && h < Math.min(p, d) && (s = !0), p <= (s ? d : h))
  101390. c = Math.max(i.top, Math.min(n.top, i.bottom - v)) - e.top, f = Math.min(400, s ? d : h);
  101391. else {
  101392. l = !0, f = Math.min(
  101393. 400,
  101394. (o ? e.right : i.right - e.left) - 30
  101395. /* Info.Margin */
  101396. );
  101397. let y = i.bottom - e.bottom;
  101398. y >= v || y > e.top ? c = n.bottom - e.top : (u = "bottom", c = e.bottom - n.top);
  101399. }
  101400. let g = (e.bottom - e.top) / a.offsetHeight, m = (e.right - e.left) / a.offsetWidth;
  101401. return {
  101402. style: `${u}: ${c / g}px; max-width: ${f / m}px`,
  101403. class: "cm-completionInfo-" + (l ? o ? "left-narrow" : "right-narrow" : s ? "left" : "right")
  101404. };
  101405. }
  101406. function uft(t) {
  101407. let e = t.addToOptions.slice();
  101408. return t.icons && e.push({
  101409. render(n) {
  101410. let r = document.createElement("div");
  101411. 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;
  101412. },
  101413. position: 20
  101414. }), e.push({
  101415. render(n, r, i, a) {
  101416. let o = document.createElement("span");
  101417. o.className = "cm-completionLabel";
  101418. let s = n.displayLabel || n.label, l = 0;
  101419. for (let u = 0; u < a.length; ) {
  101420. let c = a[u++], f = a[u++];
  101421. c > l && o.appendChild(document.createTextNode(s.slice(l, c)));
  101422. let d = o.appendChild(document.createElement("span"));
  101423. d.appendChild(document.createTextNode(s.slice(c, f))), d.className = "cm-completionMatchedText", l = f;
  101424. }
  101425. return l < s.length && o.appendChild(document.createTextNode(s.slice(l))), o;
  101426. },
  101427. position: 50
  101428. }, {
  101429. render(n) {
  101430. if (!n.detail)
  101431. return null;
  101432. let r = document.createElement("span");
  101433. return r.className = "cm-completionDetail", r.textContent = n.detail, r;
  101434. },
  101435. position: 80
  101436. }), e.sort((n, r) => n.position - r.position).map((n) => n.render);
  101437. }
  101438. function L$(t, e, n) {
  101439. if (t <= n)
  101440. return { from: 0, to: t };
  101441. if (e < 0 && (e = 0), e <= t >> 1) {
  101442. let i = Math.floor(e / n);
  101443. return { from: i * n, to: (i + 1) * n };
  101444. }
  101445. let r = Math.floor((t - e) / n);
  101446. return { from: t - (r + 1) * n, to: t - r * n };
  101447. }
  101448. class cft {
  101449. constructor(e, n, r) {
  101450. this.view = e, this.stateField = n, this.applyCompletion = r, this.info = null, this.infoDestroy = null, this.placeInfoReq = {
  101451. read: () => this.measureInfo(),
  101452. write: (l) => this.placeInfo(l),
  101453. key: this
  101454. }, this.space = null, this.currentClass = "";
  101455. let i = e.state.field(n), { options: a, selected: o } = i.open, s = e.state.facet(br);
  101456. this.optionContent = uft(s), this.optionClass = s.optionClass, this.tooltipClass = s.tooltipClass, this.range = L$(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) => {
  101457. let { options: u } = e.state.field(n).open;
  101458. for (let c = l.target, f; c && c != this.dom; c = c.parentNode)
  101459. if (c.nodeName == "LI" && (f = /-(\d+)$/.exec(c.id)) && +f[1] < u.length) {
  101460. this.applyCompletion(e, u[+f[1]]), l.preventDefault();
  101461. return;
  101462. }
  101463. }), this.dom.addEventListener("focusout", (l) => {
  101464. let u = e.state.field(this.stateField, !1);
  101465. u && u.tooltip && e.state.facet(br).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: o0.of(null) });
  101466. }), this.showOptions(a, i.id);
  101467. }
  101468. mount() {
  101469. this.updateSel();
  101470. }
  101471. showOptions(e, n) {
  101472. this.list && this.list.remove(), this.list = this.dom.appendChild(this.createListBox(e, n, this.range)), this.list.addEventListener("scroll", () => {
  101473. this.info && this.view.requestMeasure(this.placeInfoReq);
  101474. });
  101475. }
  101476. update(e) {
  101477. var n;
  101478. let r = e.state.field(this.stateField), i = e.startState.field(this.stateField);
  101479. if (this.updateTooltipClass(e.state), r != i) {
  101480. let { options: a, selected: o, disabled: s } = r.open;
  101481. (!i.open || i.open.options != a) && (this.range = L$(a.length, o, e.state.facet(br).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);
  101482. }
  101483. }
  101484. updateTooltipClass(e) {
  101485. let n = this.tooltipClass(e);
  101486. if (n != this.currentClass) {
  101487. for (let r of this.currentClass.split(" "))
  101488. r && this.dom.classList.remove(r);
  101489. for (let r of n.split(" "))
  101490. r && this.dom.classList.add(r);
  101491. this.currentClass = n;
  101492. }
  101493. }
  101494. positioned(e) {
  101495. this.space = e, this.info && this.view.requestMeasure(this.placeInfoReq);
  101496. }
  101497. updateSel() {
  101498. let e = this.view.state.field(this.stateField), n = e.open;
  101499. if ((n.selected > -1 && n.selected < this.range.from || n.selected >= this.range.to) && (this.range = L$(n.options.length, n.selected, this.view.state.facet(br).maxRenderedOptions), this.showOptions(n.options, e.id)), this.updateSelectedOption(n.selected)) {
  101500. this.destroyInfo();
  101501. let { completion: r } = n.options[n.selected], { info: i } = r;
  101502. if (!i)
  101503. return;
  101504. let a = typeof i == "string" ? document.createTextNode(i) : i(r);
  101505. if (!a)
  101506. return;
  101507. "then" in a ? a.then((o) => {
  101508. o && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(o, r);
  101509. }).catch((o) => bi(this.view.state, o, "completion info")) : this.addInfoPane(a, r);
  101510. }
  101511. }
  101512. addInfoPane(e, n) {
  101513. this.destroyInfo();
  101514. let r = this.info = document.createElement("div");
  101515. if (r.className = "cm-tooltip cm-completionInfo", e.nodeType != null)
  101516. r.appendChild(e), this.infoDestroy = null;
  101517. else {
  101518. let { dom: i, destroy: a } = e;
  101519. r.appendChild(i), this.infoDestroy = a || null;
  101520. }
  101521. this.dom.appendChild(r), this.view.requestMeasure(this.placeInfoReq);
  101522. }
  101523. updateSelectedOption(e) {
  101524. let n = null;
  101525. for (let r = this.list.firstChild, i = this.range.from; r; r = r.nextSibling, i++)
  101526. 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");
  101527. return n && dft(this.list, n), n;
  101528. }
  101529. measureInfo() {
  101530. let e = this.dom.querySelector("[aria-selected]");
  101531. if (!e || !this.info)
  101532. return null;
  101533. let n = this.dom.getBoundingClientRect(), r = this.info.getBoundingClientRect(), i = e.getBoundingClientRect(), a = this.space;
  101534. if (!a) {
  101535. let o = this.dom.ownerDocument.defaultView || window;
  101536. a = { left: 0, top: 0, right: o.innerWidth, bottom: o.innerHeight };
  101537. }
  101538. return i.top > Math.min(a.bottom, n.bottom) - 10 || i.bottom < Math.max(a.top, n.top) + 10 ? null : this.view.state.facet(br).positionInfo(this.view, n, i, r, a, this.dom);
  101539. }
  101540. placeInfo(e) {
  101541. 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");
  101542. }
  101543. createListBox(e, n, r) {
  101544. const i = document.createElement("ul");
  101545. i.id = n, i.setAttribute("role", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-label", this.view.state.phrase("Completions"));
  101546. let a = null;
  101547. for (let o = r.from; o < r.to; o++) {
  101548. let { completion: s, match: l } = e[o], { section: u } = s;
  101549. if (u) {
  101550. let d = typeof u == "string" ? u : u.name;
  101551. if (d != a && (o > r.from || r.from == 0))
  101552. if (a = d, typeof u != "string" && u.header)
  101553. i.appendChild(u.header(u));
  101554. else {
  101555. let h = i.appendChild(document.createElement("completion-section"));
  101556. h.textContent = d;
  101557. }
  101558. }
  101559. const c = i.appendChild(document.createElement("li"));
  101560. c.id = n + "-" + o, c.setAttribute("role", "option");
  101561. let f = this.optionClass(s);
  101562. f && (c.className = f);
  101563. for (let d of this.optionContent) {
  101564. let h = d(s, this.view.state, this.view, l);
  101565. h && c.appendChild(h);
  101566. }
  101567. }
  101568. return r.from && i.classList.add("cm-completionListIncompleteTop"), r.to < e.length && i.classList.add("cm-completionListIncompleteBottom"), i;
  101569. }
  101570. destroyInfo() {
  101571. this.info && (this.infoDestroy && this.infoDestroy(), this.info.remove(), this.info = null);
  101572. }
  101573. destroy() {
  101574. this.destroyInfo();
  101575. }
  101576. }
  101577. function fft(t, e) {
  101578. return (n) => new cft(n, t, e);
  101579. }
  101580. function dft(t, e) {
  101581. let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = n.height / t.offsetHeight;
  101582. r.top < n.top ? t.scrollTop -= (n.top - r.top) / i : r.bottom > n.bottom && (t.scrollTop += (r.bottom - n.bottom) / i);
  101583. }
  101584. function YG(t) {
  101585. return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0);
  101586. }
  101587. function hft(t, e) {
  101588. let n = [], r = null, i = (u) => {
  101589. n.push(u);
  101590. let { section: c } = u.completion;
  101591. if (c) {
  101592. r || (r = []);
  101593. let f = typeof c == "string" ? c : c.name;
  101594. r.some((d) => d.name == f) || r.push(typeof c == "string" ? { name: f } : c);
  101595. }
  101596. }, a = e.facet(br);
  101597. for (let u of t)
  101598. if (u.hasResult()) {
  101599. let c = u.result.getMatch;
  101600. if (u.result.filter === !1)
  101601. for (let f of u.result.options)
  101602. i(new ZG(f, u.source, c ? c(f) : [], 1e9 - n.length));
  101603. else {
  101604. let f = e.sliceDoc(u.from, u.to), d, h = a.filterStrict ? new sft(f) : new oft(f);
  101605. for (let p of u.result.options)
  101606. if (d = h.match(p.label)) {
  101607. let v = p.displayLabel ? c ? c(p, d.matched) : [] : d.matched;
  101608. i(new ZG(p, u.source, v, d.score + (p.boost || 0)));
  101609. }
  101610. }
  101611. }
  101612. if (r) {
  101613. let u = /* @__PURE__ */ Object.create(null), c = 0, f = (d, h) => {
  101614. var p, v;
  101615. 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);
  101616. };
  101617. for (let d of r.sort(f))
  101618. c -= 1e5, u[d.name] = c;
  101619. for (let d of n) {
  101620. let { section: h } = d.completion;
  101621. h && (d.score += u[typeof h == "string" ? h : h.name]);
  101622. }
  101623. }
  101624. let o = [], s = null, l = a.compareCompletions;
  101625. for (let u of n.sort((c, f) => f.score - c.score || l(c.completion, f.completion))) {
  101626. let c = u.completion;
  101627. !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) : YG(u.completion) > YG(s) && (o[o.length - 1] = u), s = u.completion;
  101628. }
  101629. return o;
  101630. }
  101631. class jd {
  101632. constructor(e, n, r, i, a, o) {
  101633. this.options = e, this.attrs = n, this.tooltip = r, this.timestamp = i, this.selected = a, this.disabled = o;
  101634. }
  101635. setSelected(e, n) {
  101636. return e == this.selected || e >= this.options.length ? this : new jd(this.options, qG(n, e), this.tooltip, this.timestamp, e, this.disabled);
  101637. }
  101638. static build(e, n, r, i, a) {
  101639. let o = hft(e, n);
  101640. if (!o.length)
  101641. return i && e.some(
  101642. (l) => l.state == 1
  101643. /* State.Pending */
  101644. ) ? new jd(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null;
  101645. let s = n.facet(br).selectOnOpen ? 0 : -1;
  101646. if (i && i.selected != s && i.selected != -1) {
  101647. let l = i.options[i.selected].completion;
  101648. for (let u = 0; u < o.length; u++)
  101649. if (o[u].completion == l) {
  101650. s = u;
  101651. break;
  101652. }
  101653. }
  101654. return new jd(o, qG(r, s), {
  101655. pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8),
  101656. create: bft,
  101657. above: a.aboveCursor
  101658. }, i ? i.timestamp : Date.now(), s, !1);
  101659. }
  101660. map(e) {
  101661. return new jd(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled);
  101662. }
  101663. }
  101664. class wS {
  101665. constructor(e, n, r) {
  101666. this.active = e, this.id = n, this.open = r;
  101667. }
  101668. static start() {
  101669. return new wS(mft, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
  101670. }
  101671. update(e) {
  101672. let { state: n } = e, r = n.facet(br), a = (r.override || n.languageDataAt("autocomplete", tu(n)).map(aft)).map((s) => (this.active.find((u) => u.source == s) || new zi(
  101673. s,
  101674. this.active.some(
  101675. (u) => u.state != 0
  101676. /* State.Inactive */
  101677. ) ? 1 : 0
  101678. /* State.Inactive */
  101679. )).update(e, r));
  101680. a.length == this.active.length && a.every((s, l) => s == this.active[l]) && (a = this.active);
  101681. let o = this.open;
  101682. o && e.docChanged && (o = o.map(e.changes)), e.selection || a.some((s) => s.hasResult() && e.changes.touchesRange(s.from, s.to)) || !pft(a, this.active) ? o = jd.build(a, n, this.id, o, r) : o && o.disabled && !a.some(
  101683. (s) => s.state == 1
  101684. /* State.Pending */
  101685. ) && (o = null), !o && a.every(
  101686. (s) => s.state != 1
  101687. /* State.Pending */
  101688. ) && a.some((s) => s.hasResult()) && (a = a.map((s) => s.hasResult() ? new zi(
  101689. s.source,
  101690. 0
  101691. /* State.Inactive */
  101692. ) : s));
  101693. for (let s of e.effects)
  101694. s.is(Zse) && (o = o && o.setSelected(s.value, this.id));
  101695. return a == this.active && o == this.open ? this : new wS(a, this.id, o);
  101696. }
  101697. get tooltip() {
  101698. return this.open ? this.open.tooltip : null;
  101699. }
  101700. get attrs() {
  101701. return this.open ? this.open.attrs : this.active.length ? vft : gft;
  101702. }
  101703. }
  101704. function pft(t, e) {
  101705. if (t == e)
  101706. return !0;
  101707. for (let n = 0, r = 0; ; ) {
  101708. for (; n < t.length && !t[n].hasResult; )
  101709. n++;
  101710. for (; r < e.length && !e[r].hasResult; )
  101711. r++;
  101712. let i = n == t.length, a = r == e.length;
  101713. if (i || a)
  101714. return i == a;
  101715. if (t[n++].result != e[r++].result)
  101716. return !1;
  101717. }
  101718. }
  101719. const vft = {
  101720. "aria-autocomplete": "list"
  101721. }, gft = {};
  101722. function qG(t, e) {
  101723. let n = {
  101724. "aria-autocomplete": "list",
  101725. "aria-haspopup": "listbox",
  101726. "aria-controls": t
  101727. };
  101728. return e > -1 && (n["aria-activedescendant"] = t + "-" + e), n;
  101729. }
  101730. const mft = [];
  101731. function Gse(t, e) {
  101732. if (t.isUserEvent("input.complete")) {
  101733. let r = t.annotation($4);
  101734. if (r && e.activateOnCompletion(r))
  101735. return 12;
  101736. }
  101737. let n = t.isUserEvent("input.type");
  101738. return n && e.activateOnTyping ? 5 : n ? 1 : t.isUserEvent("delete.backward") ? 2 : t.selection ? 8 : t.docChanged ? 16 : 0;
  101739. }
  101740. class zi {
  101741. constructor(e, n, r = -1) {
  101742. this.source = e, this.state = n, this.explicitPos = r;
  101743. }
  101744. hasResult() {
  101745. return !1;
  101746. }
  101747. update(e, n) {
  101748. let r = Gse(e, n), i = this;
  101749. (r & 8 || r & 16 && this.touches(e)) && (i = new zi(
  101750. i.source,
  101751. 0
  101752. /* State.Inactive */
  101753. )), r & 4 && i.state == 0 && (i = new zi(
  101754. this.source,
  101755. 1
  101756. /* State.Pending */
  101757. )), i = i.updateFor(e, r);
  101758. for (let a of e.effects)
  101759. if (a.is(xS))
  101760. i = new zi(i.source, 1, a.value ? tu(e.state) : -1);
  101761. else if (a.is(o0))
  101762. i = new zi(
  101763. i.source,
  101764. 0
  101765. /* State.Inactive */
  101766. );
  101767. else if (a.is(jse))
  101768. for (let o of a.value)
  101769. o.source == i.source && (i = o);
  101770. return i;
  101771. }
  101772. updateFor(e, n) {
  101773. return this.map(e.changes);
  101774. }
  101775. map(e) {
  101776. return e.empty || this.explicitPos < 0 ? this : new zi(this.source, this.state, e.mapPos(this.explicitPos));
  101777. }
  101778. touches(e) {
  101779. return e.changes.touchesRange(tu(e.state));
  101780. }
  101781. }
  101782. class ph extends zi {
  101783. constructor(e, n, r, i, a) {
  101784. super(e, 2, n), this.result = r, this.from = i, this.to = a;
  101785. }
  101786. hasResult() {
  101787. return !0;
  101788. }
  101789. updateFor(e, n) {
  101790. var r;
  101791. if (!(n & 3))
  101792. return this.map(e.changes);
  101793. let i = this.result;
  101794. i.map && !e.changes.empty && (i = i.map(i, e.changes));
  101795. let a = e.changes.mapPos(this.from), o = e.changes.mapPos(this.to, 1), s = tu(e.state);
  101796. if ((this.explicitPos < 0 ? s <= a : s < this.from) || s > o || !i || n & 2 && tu(e.startState) == this.from)
  101797. return new zi(
  101798. this.source,
  101799. n & 4 ? 1 : 0
  101800. /* State.Inactive */
  101801. );
  101802. let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos);
  101803. return yft(i.validFor, e.state, a, o) ? new ph(this.source, l, i, a, o) : i.update && (i = i.update(i, a, o, new Wse(e.state, s, l >= 0))) ? new ph(this.source, l, i, i.from, (r = i.to) !== null && r !== void 0 ? r : tu(e.state)) : new zi(this.source, 1, l);
  101804. }
  101805. map(e) {
  101806. return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new ph(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new zi(
  101807. this.source,
  101808. 0
  101809. /* State.Inactive */
  101810. );
  101811. }
  101812. touches(e) {
  101813. return e.changes.touchesRange(this.from, this.to);
  101814. }
  101815. }
  101816. function yft(t, e, n, r) {
  101817. if (!t)
  101818. return !1;
  101819. let i = e.sliceDoc(n, r);
  101820. return typeof t == "function" ? t(i, n, r, e) : Hse(t, !0).test(i);
  101821. }
  101822. const jse = /* @__PURE__ */ dt.define({
  101823. map(t, e) {
  101824. return t.map((n) => n.map(e));
  101825. }
  101826. }), Zse = /* @__PURE__ */ dt.define(), mi = /* @__PURE__ */ ur.define({
  101827. create() {
  101828. return wS.start();
  101829. },
  101830. update(t, e) {
  101831. return t.update(e);
  101832. },
  101833. provide: (t) => [
  101834. c4.from(t, (e) => e.tooltip),
  101835. De.contentAttributes.from(t, (e) => e.attrs)
  101836. ]
  101837. });
  101838. function A4(t, e) {
  101839. const n = e.completion.apply || e.completion.label;
  101840. let r = t.state.field(mi).active.find((i) => i.source == e.source);
  101841. return r instanceof ph ? (typeof n == "string" ? t.dispatch(Object.assign(Object.assign({}, ift(t.state, n, r.from, r.to)), { annotations: $4.of(e.completion) })) : n(t, e.completion, r.from, r.to), !0) : !1;
  101842. }
  101843. const bft = /* @__PURE__ */ fft(mi, A4);
  101844. function c_(t, e = "option") {
  101845. return (n) => {
  101846. let r = n.state.field(mi, !1);
  101847. if (!r || !r.open || r.open.disabled || Date.now() - r.open.timestamp < n.state.facet(br).interactionDelay)
  101848. return !1;
  101849. let i = 1, a;
  101850. e == "page" && (a = Coe(n, r.open.tooltip)) && (i = Math.max(2, Math.floor(a.dom.offsetHeight / a.dom.querySelector("li").offsetHeight) - 1));
  101851. let { length: o } = r.open.options, s = r.open.selected > -1 ? r.open.selected + i * (t ? 1 : -1) : t ? 0 : o - 1;
  101852. return s < 0 ? s = e == "page" ? 0 : o - 1 : s >= o && (s = e == "page" ? o - 1 : 0), n.dispatch({ effects: Zse.of(s) }), !0;
  101853. };
  101854. }
  101855. const _ft = (t) => {
  101856. let e = t.state.field(mi, !1);
  101857. return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(br).interactionDelay ? !1 : A4(t, e.open.options[e.open.selected]);
  101858. }, Oft = (t) => t.state.field(mi, !1) ? (t.dispatch({ effects: xS.of(!0) }), !0) : !1, Sft = (t) => {
  101859. let e = t.state.field(mi, !1);
  101860. return !e || !e.active.some(
  101861. (n) => n.state != 0
  101862. /* State.Inactive */
  101863. ) ? !1 : (t.dispatch({ effects: o0.of(null) }), !0);
  101864. };
  101865. class xft {
  101866. constructor(e, n) {
  101867. this.active = e, this.context = n, this.time = Date.now(), this.updates = [], this.done = void 0;
  101868. }
  101869. }
  101870. const wft = 50, Cft = 1e3, Tft = /* @__PURE__ */ kn.fromClass(class {
  101871. constructor(t) {
  101872. this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0;
  101873. for (let e of t.state.field(mi).active)
  101874. e.state == 1 && this.startQuery(e);
  101875. }
  101876. update(t) {
  101877. let e = t.state.field(mi), n = t.state.facet(br);
  101878. if (!t.selectionSet && !t.docChanged && t.startState.field(mi) == e)
  101879. return;
  101880. let r = t.transactions.some((a) => {
  101881. let o = Gse(a, n);
  101882. return o & 8 || (a.selection || a.docChanged) && !(o & 3);
  101883. });
  101884. for (let a = 0; a < this.running.length; a++) {
  101885. let o = this.running[a];
  101886. if (r || o.updates.length + t.transactions.length > wft && Date.now() - o.time > Cft) {
  101887. for (let s of o.context.abortListeners)
  101888. try {
  101889. s();
  101890. } catch (l) {
  101891. bi(this.view.state, l);
  101892. }
  101893. o.context.abortListeners = null, this.running.splice(a--, 1);
  101894. } else
  101895. o.updates.push(...t.transactions);
  101896. }
  101897. this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((a) => a.effects.some((o) => o.is(xS))) && (this.pendingStart = !0);
  101898. let i = this.pendingStart ? 50 : n.activateOnTypingDelay;
  101899. 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)
  101900. for (let a of t.transactions)
  101901. a.isUserEvent("input.type") ? this.composing = 2 : this.composing == 2 && a.selection && (this.composing = 3);
  101902. }
  101903. startUpdate() {
  101904. this.debounceUpdate = -1, this.pendingStart = !1;
  101905. let { state: t } = this.view, e = t.field(mi);
  101906. for (let n of e.active)
  101907. n.state == 1 && !this.running.some((r) => r.active.source == n.source) && this.startQuery(n);
  101908. }
  101909. startQuery(t) {
  101910. let { state: e } = this.view, n = tu(e), r = new Wse(e, n, t.explicitPos == n, this.view), i = new xft(t, r);
  101911. this.running.push(i), Promise.resolve(t.source(r)).then((a) => {
  101912. i.context.aborted || (i.done = a || null, this.scheduleAccept());
  101913. }, (a) => {
  101914. this.view.dispatch({ effects: o0.of(null) }), bi(this.view.state, a);
  101915. });
  101916. }
  101917. scheduleAccept() {
  101918. this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(br).updateSyncTime));
  101919. }
  101920. // For each finished query in this.running, try to create a result
  101921. // or, if appropriate, restart the query.
  101922. accept() {
  101923. var t;
  101924. this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1;
  101925. let e = [], n = this.view.state.facet(br);
  101926. for (let r = 0; r < this.running.length; r++) {
  101927. let i = this.running[r];
  101928. if (i.done === void 0)
  101929. continue;
  101930. if (this.running.splice(r--, 1), i.done) {
  101931. let o = new ph(i.active.source, i.active.explicitPos, i.done, i.done.from, (t = i.done.to) !== null && t !== void 0 ? t : tu(i.updates.length ? i.updates[0].startState : this.view.state));
  101932. for (let s of i.updates)
  101933. o = o.update(s, n);
  101934. if (o.hasResult()) {
  101935. e.push(o);
  101936. continue;
  101937. }
  101938. }
  101939. let a = this.view.state.field(mi).active.find((o) => o.source == i.active.source);
  101940. if (a && a.state == 1)
  101941. if (i.done == null) {
  101942. let o = new zi(
  101943. i.active.source,
  101944. 0
  101945. /* State.Inactive */
  101946. );
  101947. for (let s of i.updates)
  101948. o = o.update(s, n);
  101949. o.state != 1 && e.push(o);
  101950. } else
  101951. this.startQuery(a);
  101952. }
  101953. e.length && this.view.dispatch({ effects: jse.of(e) });
  101954. }
  101955. }, {
  101956. eventHandlers: {
  101957. blur(t) {
  101958. let e = this.view.state.field(mi, !1);
  101959. if (e && e.tooltip && this.view.state.facet(br).closeOnBlur) {
  101960. let n = e.open && Coe(this.view, e.open.tooltip);
  101961. (!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: o0.of(null) }), 10);
  101962. }
  101963. },
  101964. compositionstart() {
  101965. this.composing = 1;
  101966. },
  101967. compositionend() {
  101968. this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: xS.of(!1) }), 20), this.composing = 0;
  101969. }
  101970. }
  101971. }), Pft = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform), $ft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ De.domEventHandlers({
  101972. keydown(t, e) {
  101973. let n = e.state.field(mi, !1);
  101974. if (!n || !n.open || n.open.disabled || n.open.selected < 0 || t.key.length > 1 || t.ctrlKey && !(Pft && t.altKey) || t.metaKey)
  101975. return !1;
  101976. let r = n.open.options[n.open.selected], i = n.active.find((o) => o.source == r.source), a = r.completion.commitCharacters || i.result.commitCharacters;
  101977. return a && a.indexOf(t.key) > -1 && A4(e, r), !1;
  101978. }
  101979. })), Use = /* @__PURE__ */ De.baseTheme({
  101980. ".cm-tooltip.cm-tooltip-autocomplete": {
  101981. "& > ul": {
  101982. fontFamily: "monospace",
  101983. whiteSpace: "nowrap",
  101984. overflow: "hidden auto",
  101985. maxWidth_fallback: "700px",
  101986. maxWidth: "min(700px, 95vw)",
  101987. minWidth: "250px",
  101988. maxHeight: "10em",
  101989. height: "100%",
  101990. listStyle: "none",
  101991. margin: 0,
  101992. padding: 0,
  101993. "& > li, & > completion-section": {
  101994. padding: "1px 3px",
  101995. lineHeight: 1.2
  101996. },
  101997. "& > li": {
  101998. overflowX: "hidden",
  101999. textOverflow: "ellipsis",
  102000. cursor: "pointer"
  102001. },
  102002. "& > completion-section": {
  102003. display: "list-item",
  102004. borderBottom: "1px solid silver",
  102005. paddingLeft: "0.5em",
  102006. opacity: 0.7
  102007. }
  102008. }
  102009. },
  102010. "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
  102011. background: "#17c",
  102012. color: "white"
  102013. },
  102014. "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
  102015. background: "#777"
  102016. },
  102017. "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
  102018. background: "#347",
  102019. color: "white"
  102020. },
  102021. "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
  102022. background: "#444"
  102023. },
  102024. ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
  102025. content: '"···"',
  102026. opacity: 0.5,
  102027. display: "block",
  102028. textAlign: "center"
  102029. },
  102030. ".cm-tooltip.cm-completionInfo": {
  102031. position: "absolute",
  102032. padding: "3px 9px",
  102033. width: "max-content",
  102034. maxWidth: "400px",
  102035. boxSizing: "border-box"
  102036. },
  102037. ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
  102038. ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
  102039. ".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
  102040. ".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
  102041. "&light .cm-snippetField": { backgroundColor: "#00000022" },
  102042. "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
  102043. ".cm-snippetFieldPosition": {
  102044. verticalAlign: "text-top",
  102045. width: 0,
  102046. height: "1.15em",
  102047. display: "inline-block",
  102048. margin: "0 -0.7px -.7em",
  102049. borderLeft: "1.4px dotted #888"
  102050. },
  102051. ".cm-completionMatchedText": {
  102052. textDecoration: "underline"
  102053. },
  102054. ".cm-completionDetail": {
  102055. marginLeft: "0.5em",
  102056. fontStyle: "italic"
  102057. },
  102058. ".cm-completionIcon": {
  102059. fontSize: "90%",
  102060. width: ".8em",
  102061. display: "inline-block",
  102062. textAlign: "center",
  102063. paddingRight: ".6em",
  102064. opacity: "0.6",
  102065. boxSizing: "content-box"
  102066. },
  102067. ".cm-completionIcon-function, .cm-completionIcon-method": {
  102068. "&:after": { content: "'ƒ'" }
  102069. },
  102070. ".cm-completionIcon-class": {
  102071. "&:after": { content: "'○'" }
  102072. },
  102073. ".cm-completionIcon-interface": {
  102074. "&:after": { content: "'◌'" }
  102075. },
  102076. ".cm-completionIcon-variable": {
  102077. "&:after": { content: "'𝑥'" }
  102078. },
  102079. ".cm-completionIcon-constant": {
  102080. "&:after": { content: "'𝐶'" }
  102081. },
  102082. ".cm-completionIcon-type": {
  102083. "&:after": { content: "'𝑡'" }
  102084. },
  102085. ".cm-completionIcon-enum": {
  102086. "&:after": { content: "'∪'" }
  102087. },
  102088. ".cm-completionIcon-property": {
  102089. "&:after": { content: "'□'" }
  102090. },
  102091. ".cm-completionIcon-keyword": {
  102092. "&:after": { content: "'🔑︎'" }
  102093. // Disable emoji rendering
  102094. },
  102095. ".cm-completionIcon-namespace": {
  102096. "&:after": { content: "'▢'" }
  102097. },
  102098. ".cm-completionIcon-text": {
  102099. "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
  102100. }
  102101. });
  102102. class Aft {
  102103. constructor(e, n, r, i) {
  102104. this.field = e, this.line = n, this.from = r, this.to = i;
  102105. }
  102106. }
  102107. class E4 {
  102108. constructor(e, n, r) {
  102109. this.field = e, this.from = n, this.to = r;
  102110. }
  102111. map(e) {
  102112. let n = e.mapPos(this.from, -1, yr.TrackDel), r = e.mapPos(this.to, 1, yr.TrackDel);
  102113. return n == null || r == null ? null : new E4(this.field, n, r);
  102114. }
  102115. }
  102116. class M4 {
  102117. constructor(e, n) {
  102118. this.lines = e, this.fieldPositions = n;
  102119. }
  102120. instantiate(e, n) {
  102121. let r = [], i = [n], a = e.doc.lineAt(n), o = /^\s*/.exec(a.text)[0];
  102122. for (let l of this.lines) {
  102123. if (r.length) {
  102124. let u = o, c = /^\t*/.exec(l)[0].length;
  102125. for (let f = 0; f < c; f++)
  102126. u += e.facet(uy);
  102127. i.push(n + u.length - c), l = u + l.slice(c);
  102128. }
  102129. r.push(l), n += l.length + 1;
  102130. }
  102131. let s = this.fieldPositions.map((l) => new E4(l.field, i[l.line] + l.from, i[l.line] + l.to));
  102132. return { text: r, ranges: s };
  102133. }
  102134. static parse(e) {
  102135. let n = [], r = [], i = [], a;
  102136. for (let o of e.split(/\r\n?|\n/)) {
  102137. for (; a = /[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o); ) {
  102138. let s = a[1] ? +a[1] : null, l = a[2] || a[3] || "", u = -1, c = l.replace(/\\[{}]/g, (f) => f[1]);
  102139. for (let f = 0; f < n.length; f++)
  102140. (s != null ? n[f].seq == s : c && n[f].name == c) && (u = f);
  102141. if (u < 0) {
  102142. let f = 0;
  102143. for (; f < n.length && (s == null || n[f].seq != null && n[f].seq < s); )
  102144. f++;
  102145. n.splice(f, 0, { seq: s, name: c }), u = f;
  102146. for (let d of i)
  102147. d.field >= u && d.field++;
  102148. }
  102149. i.push(new Aft(u, r.length, a.index, a.index + c.length)), o = o.slice(0, a.index) + l + o.slice(a.index + a[0].length);
  102150. }
  102151. o = o.replace(/\\([{}])/g, (s, l, u) => {
  102152. for (let c of i)
  102153. c.line == r.length && c.from > u && (c.from--, c.to--);
  102154. return l;
  102155. }), r.push(o);
  102156. }
  102157. return new M4(r, i);
  102158. }
  102159. }
  102160. let Eft = /* @__PURE__ */ Ze.widget({ widget: /* @__PURE__ */ new class extends hs {
  102161. toDOM() {
  102162. let t = document.createElement("span");
  102163. return t.className = "cm-snippetFieldPosition", t;
  102164. }
  102165. ignoreEvent() {
  102166. return !1;
  102167. }
  102168. }() }), Mft = /* @__PURE__ */ Ze.mark({ class: "cm-snippetField" });
  102169. class Wp {
  102170. constructor(e, n) {
  102171. this.ranges = e, this.active = n, this.deco = Ze.set(e.map((r) => (r.from == r.to ? Eft : Mft).range(r.from, r.to)));
  102172. }
  102173. map(e) {
  102174. let n = [];
  102175. for (let r of this.ranges) {
  102176. let i = r.map(e);
  102177. if (!i)
  102178. return null;
  102179. n.push(i);
  102180. }
  102181. return new Wp(n, this.active);
  102182. }
  102183. selectionInsideField(e) {
  102184. return e.ranges.every((n) => this.ranges.some((r) => r.field == this.active && r.from <= n.from && r.to >= n.to));
  102185. }
  102186. }
  102187. const py = /* @__PURE__ */ dt.define({
  102188. map(t, e) {
  102189. return t && t.map(e);
  102190. }
  102191. }), Ift = /* @__PURE__ */ dt.define(), s0 = /* @__PURE__ */ ur.define({
  102192. create() {
  102193. return null;
  102194. },
  102195. update(t, e) {
  102196. for (let n of e.effects) {
  102197. if (n.is(py))
  102198. return n.value;
  102199. if (n.is(Ift) && t)
  102200. return new Wp(t.ranges, n.value);
  102201. }
  102202. return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t;
  102203. },
  102204. provide: (t) => De.decorations.from(t, (e) => e ? e.deco : Ze.none)
  102205. });
  102206. function I4(t, e) {
  102207. return me.create(t.filter((n) => n.field == e).map((n) => me.range(n.from, n.to)));
  102208. }
  102209. function Dft(t) {
  102210. let e = M4.parse(t);
  102211. return (n, r, i, a) => {
  102212. let { text: o, ranges: s } = e.instantiate(n.state, i), l = {
  102213. changes: { from: i, to: a, insert: Ft.of(o) },
  102214. scrollIntoView: !0,
  102215. annotations: r ? [$4.of(r), Fn.userEvent.of("input.complete")] : void 0
  102216. };
  102217. if (s.length && (l.selection = I4(s, 0)), s.some((u) => u.field > 0)) {
  102218. let u = new Wp(s, 0), c = l.effects = [py.of(u)];
  102219. n.state.field(s0, !1) === void 0 && c.push(dt.appendConfig.of([s0, Bft, zft, Use]));
  102220. }
  102221. n.dispatch(n.state.update(l));
  102222. };
  102223. }
  102224. function Xse(t) {
  102225. return ({ state: e, dispatch: n }) => {
  102226. let r = e.field(s0, !1);
  102227. if (!r || t < 0 && r.active == 0)
  102228. return !1;
  102229. let i = r.active + t, a = t > 0 && !r.ranges.some((o) => o.field == i + t);
  102230. return n(e.update({
  102231. selection: I4(r.ranges, i),
  102232. effects: py.of(a ? null : new Wp(r.ranges, i)),
  102233. scrollIntoView: !0
  102234. })), !0;
  102235. };
  102236. }
  102237. const Rft = ({ state: t, dispatch: e }) => t.field(s0, !1) ? (e(t.update({ effects: py.of(null) })), !0) : !1, kft = /* @__PURE__ */ Xse(1), Lft = /* @__PURE__ */ Xse(-1), Nft = [
  102238. { key: "Tab", run: kft, shift: Lft },
  102239. { key: "Escape", run: Rft }
  102240. ], KG = /* @__PURE__ */ Be.define({
  102241. combine(t) {
  102242. return t.length ? t[0] : Nft;
  102243. }
  102244. }), Bft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ sy.compute([KG], (t) => t.facet(KG)));
  102245. function ci(t, e) {
  102246. return Object.assign(Object.assign({}, e), { apply: Dft(t) });
  102247. }
  102248. const zft = /* @__PURE__ */ De.domEventHandlers({
  102249. mousedown(t, e) {
  102250. let n = e.state.field(s0, !1), r;
  102251. if (!n || (r = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null)
  102252. return !1;
  102253. let i = n.ranges.find((a) => a.from <= r && a.to >= r);
  102254. return !i || i.field == n.active ? !1 : (e.dispatch({
  102255. selection: I4(n.ranges, i.field),
  102256. effects: py.of(n.ranges.some((a) => a.field > i.field) ? new Wp(n.ranges, i.field) : null),
  102257. scrollIntoView: !0
  102258. }), !0);
  102259. }
  102260. }), l0 = {
  102261. brackets: ["(", "[", "{", "'", '"'],
  102262. before: ")]}:;>",
  102263. stringPrefixes: []
  102264. }, Qc = /* @__PURE__ */ dt.define({
  102265. map(t, e) {
  102266. let n = e.mapPos(t, -1, yr.TrackAfter);
  102267. return n ?? void 0;
  102268. }
  102269. }), D4 = /* @__PURE__ */ new class extends Cf {
  102270. }();
  102271. D4.startSide = 1;
  102272. D4.endSide = -1;
  102273. const Yse = /* @__PURE__ */ ur.define({
  102274. create() {
  102275. return Vt.empty;
  102276. },
  102277. update(t, e) {
  102278. if (t = t.map(e.changes), e.selection) {
  102279. let n = e.state.doc.lineAt(e.selection.main.head);
  102280. t = t.update({ filter: (r) => r >= n.from && r <= n.to });
  102281. }
  102282. for (let n of e.effects)
  102283. n.is(Qc) && (t = t.update({ add: [D4.range(n.value, n.value + 1)] }));
  102284. return t;
  102285. }
  102286. });
  102287. function Vft() {
  102288. return [Wft, Yse];
  102289. }
  102290. const N$ = "()[]{}<>";
  102291. function qse(t) {
  102292. for (let e = 0; e < N$.length; e += 2)
  102293. if (N$.charCodeAt(e) == t)
  102294. return N$.charAt(e + 1);
  102295. return JL(t < 128 ? t : t + 1);
  102296. }
  102297. function Kse(t, e) {
  102298. return t.languageDataAt("closeBrackets", e)[0] || l0;
  102299. }
  102300. const Fft = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), Wft = /* @__PURE__ */ De.inputHandler.of((t, e, n, r) => {
  102301. if ((Fft ? t.composing : t.compositionStarted) || t.state.readOnly)
  102302. return !1;
  102303. let i = t.state.selection.main;
  102304. if (r.length > 2 || r.length == 2 && ya(gr(r, 0)) == 1 || e != i.from || n != i.to)
  102305. return !1;
  102306. let a = Gft(t.state, r);
  102307. return a ? (t.dispatch(a), !0) : !1;
  102308. }), Qft = ({ state: t, dispatch: e }) => {
  102309. if (t.readOnly)
  102310. return !1;
  102311. let r = Kse(t, t.selection.main.head).brackets || l0.brackets, i = null, a = t.changeByRange((o) => {
  102312. if (o.empty) {
  102313. let s = jft(t.doc, o.head);
  102314. for (let l of r)
  102315. if (l == s && Ww(t.doc, o.head) == qse(gr(l, 0)))
  102316. return {
  102317. changes: { from: o.head - l.length, to: o.head + l.length },
  102318. range: me.cursor(o.head - l.length)
  102319. };
  102320. }
  102321. return { range: i = o };
  102322. });
  102323. return i || e(t.update(a, { scrollIntoView: !0, userEvent: "delete.backward" })), !i;
  102324. }, Hft = [
  102325. { key: "Backspace", run: Qft }
  102326. ];
  102327. function Gft(t, e) {
  102328. let n = Kse(t, t.selection.main.head), r = n.brackets || l0.brackets;
  102329. for (let i of r) {
  102330. let a = qse(gr(i, 0));
  102331. if (e == i)
  102332. return a == i ? Xft(t, i, r.indexOf(i + i + i) > -1, n) : Zft(t, i, a, n.before || l0.before);
  102333. if (e == a && Jse(t, t.selection.main.from))
  102334. return Uft(t, i, a);
  102335. }
  102336. return null;
  102337. }
  102338. function Jse(t, e) {
  102339. let n = !1;
  102340. return t.field(Yse).between(0, t.doc.length, (r) => {
  102341. r == e && (n = !0);
  102342. }), n;
  102343. }
  102344. function Ww(t, e) {
  102345. let n = t.sliceString(e, e + 2);
  102346. return n.slice(0, ya(gr(n, 0)));
  102347. }
  102348. function jft(t, e) {
  102349. let n = t.sliceString(e - 2, e);
  102350. return ya(gr(n, 0)) == n.length ? n : n.slice(1);
  102351. }
  102352. function Zft(t, e, n, r) {
  102353. let i = null, a = t.changeByRange((o) => {
  102354. if (!o.empty)
  102355. return {
  102356. changes: [{ insert: e, from: o.from }, { insert: n, from: o.to }],
  102357. effects: Qc.of(o.to + e.length),
  102358. range: me.range(o.anchor + e.length, o.head + e.length)
  102359. };
  102360. let s = Ww(t.doc, o.head);
  102361. return !s || /\s/.test(s) || r.indexOf(s) > -1 ? {
  102362. changes: { insert: e + n, from: o.head },
  102363. effects: Qc.of(o.head + e.length),
  102364. range: me.cursor(o.head + e.length)
  102365. } : { range: i = o };
  102366. });
  102367. return i ? null : t.update(a, {
  102368. scrollIntoView: !0,
  102369. userEvent: "input.type"
  102370. });
  102371. }
  102372. function Uft(t, e, n) {
  102373. let r = null, i = t.changeByRange((a) => a.empty && Ww(t.doc, a.head) == n ? {
  102374. changes: { from: a.head, to: a.head + n.length, insert: n },
  102375. range: me.cursor(a.head + n.length)
  102376. } : r = { range: a });
  102377. return r ? null : t.update(i, {
  102378. scrollIntoView: !0,
  102379. userEvent: "input.type"
  102380. });
  102381. }
  102382. function Xft(t, e, n, r) {
  102383. let i = r.stringPrefixes || l0.stringPrefixes, a = null, o = t.changeByRange((s) => {
  102384. if (!s.empty)
  102385. return {
  102386. changes: [{ insert: e, from: s.from }, { insert: e, from: s.to }],
  102387. effects: Qc.of(s.to + e.length),
  102388. range: me.range(s.anchor + e.length, s.head + e.length)
  102389. };
  102390. let l = s.head, u = Ww(t.doc, l), c;
  102391. if (u == e) {
  102392. if (JG(t, l))
  102393. return {
  102394. changes: { insert: e + e, from: l },
  102395. effects: Qc.of(l + e.length),
  102396. range: me.cursor(l + e.length)
  102397. };
  102398. if (Jse(t, l)) {
  102399. let d = n && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e;
  102400. return {
  102401. changes: { from: l, to: l + d.length, insert: d },
  102402. range: me.cursor(l + d.length)
  102403. };
  102404. }
  102405. } else {
  102406. if (n && t.sliceDoc(l - 2 * e.length, l) == e + e && (c = e9(t, l - 2 * e.length, i)) > -1 && JG(t, c))
  102407. return {
  102408. changes: { insert: e + e + e + e, from: l },
  102409. effects: Qc.of(l + e.length),
  102410. range: me.cursor(l + e.length)
  102411. };
  102412. if (t.charCategorizer(l)(u) != yn.Word && e9(t, l, i) > -1 && !Yft(t, l, e, i))
  102413. return {
  102414. changes: { insert: e + e, from: l },
  102415. effects: Qc.of(l + e.length),
  102416. range: me.cursor(l + e.length)
  102417. };
  102418. }
  102419. return { range: a = s };
  102420. });
  102421. return a ? null : t.update(o, {
  102422. scrollIntoView: !0,
  102423. userEvent: "input.type"
  102424. });
  102425. }
  102426. function JG(t, e) {
  102427. let n = nr(t).resolveInner(e + 1);
  102428. return n.parent && n.from == e;
  102429. }
  102430. function Yft(t, e, n, r) {
  102431. let i = nr(t).resolveInner(e, -1), a = r.reduce((o, s) => Math.max(o, s.length), 0);
  102432. for (let o = 0; o < 5; o++) {
  102433. let s = t.sliceDoc(i.from, Math.min(i.to, i.from + n.length + a)), l = s.indexOf(n);
  102434. if (!l || l > -1 && r.indexOf(s.slice(0, l)) > -1) {
  102435. let c = i.firstChild;
  102436. for (; c && c.from == i.from && c.to - c.from > n.length + l; ) {
  102437. if (t.sliceDoc(c.to - n.length, c.to) == n)
  102438. return !1;
  102439. c = c.firstChild;
  102440. }
  102441. return !0;
  102442. }
  102443. let u = i.to == e && i.parent;
  102444. if (!u)
  102445. break;
  102446. i = u;
  102447. }
  102448. return !1;
  102449. }
  102450. function e9(t, e, n) {
  102451. let r = t.charCategorizer(e);
  102452. if (r(t.sliceDoc(e - 1, e)) != yn.Word)
  102453. return e;
  102454. for (let i of n) {
  102455. let a = e - i.length;
  102456. if (t.sliceDoc(a, e) == i && r(t.sliceDoc(a - 1, a)) != yn.Word)
  102457. return a;
  102458. }
  102459. return -1;
  102460. }
  102461. function qft(t = {}) {
  102462. return [
  102463. $ft,
  102464. mi,
  102465. br.of(t),
  102466. Tft,
  102467. Kft,
  102468. Use
  102469. ];
  102470. }
  102471. const ele = [
  102472. { key: "Ctrl-Space", run: Oft },
  102473. { key: "Escape", run: Sft },
  102474. { key: "ArrowDown", run: /* @__PURE__ */ c_(!0) },
  102475. { key: "ArrowUp", run: /* @__PURE__ */ c_(!1) },
  102476. { key: "PageDown", run: /* @__PURE__ */ c_(!0, "page") },
  102477. { key: "PageUp", run: /* @__PURE__ */ c_(!1, "page") },
  102478. { key: "Enter", run: _ft }
  102479. ], Kft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ sy.computeN([br], (t) => t.facet(br).defaultKeymap ? [ele] : []));
  102480. class Jft {
  102481. constructor(e, n, r) {
  102482. this.from = e, this.to = n, this.diagnostic = r;
  102483. }
  102484. }
  102485. class $c {
  102486. constructor(e, n, r) {
  102487. this.diagnostics = e, this.panel = n, this.selected = r;
  102488. }
  102489. static init(e, n, r) {
  102490. let i = e, a = r.facet(u0).markerFilter;
  102491. a && (i = a(i, r));
  102492. let o = Ze.set(i.map((s) => s.from == s.to || s.from == s.to - 1 && r.doc.lineAt(s.from).to == s.from ? Ze.widget({
  102493. widget: new ldt(s),
  102494. diagnostic: s
  102495. }).range(s.from) : Ze.mark({
  102496. attributes: { class: "cm-lintRange cm-lintRange-" + s.severity + (s.markClass ? " " + s.markClass : "") },
  102497. diagnostic: s
  102498. }).range(s.from, s.to)), !0);
  102499. return new $c(o, n, ip(o));
  102500. }
  102501. }
  102502. function ip(t, e = null, n = 0) {
  102503. let r = null;
  102504. return t.between(n, 1e9, (i, a, { spec: o }) => {
  102505. if (!(e && o.diagnostic != e))
  102506. return r = new Jft(i, a, o.diagnostic), !1;
  102507. }), r;
  102508. }
  102509. function edt(t, e) {
  102510. let n = e.pos, r = e.end || n, i = t.state.facet(u0).hideOn(t, n, r);
  102511. if (i != null)
  102512. return i;
  102513. let a = t.startState.doc.lineAt(e.pos);
  102514. return !!(t.effects.some((o) => o.is(tle)) || t.changes.touchesRange(a.from, Math.max(a.to, r)));
  102515. }
  102516. function tdt(t, e) {
  102517. return t.field(Hi, !1) ? e : e.concat(dt.appendConfig.of(fdt));
  102518. }
  102519. const tle = /* @__PURE__ */ dt.define(), R4 = /* @__PURE__ */ dt.define(), nle = /* @__PURE__ */ dt.define(), Hi = /* @__PURE__ */ ur.define({
  102520. create() {
  102521. return new $c(Ze.none, null, null);
  102522. },
  102523. update(t, e) {
  102524. if (e.docChanged && t.diagnostics.size) {
  102525. let n = t.diagnostics.map(e.changes), r = null, i = t.panel;
  102526. if (t.selected) {
  102527. let a = e.changes.mapPos(t.selected.from, 1);
  102528. r = ip(n, t.selected.diagnostic, a) || ip(n, null, a);
  102529. }
  102530. !n.size && i && e.state.facet(u0).autoPanel && (i = null), t = new $c(n, i, r);
  102531. }
  102532. for (let n of e.effects)
  102533. if (n.is(tle)) {
  102534. let r = e.state.facet(u0).autoPanel ? n.value.length ? c0.open : null : t.panel;
  102535. t = $c.init(n.value, r, e.state);
  102536. } else n.is(R4) ? t = new $c(t.diagnostics, n.value ? c0.open : null, t.selected) : n.is(nle) && (t = new $c(t.diagnostics, t.panel, n.value));
  102537. return t;
  102538. },
  102539. provide: (t) => [
  102540. t0.from(t, (e) => e.panel),
  102541. De.decorations.from(t, (e) => e.diagnostics)
  102542. ]
  102543. }), ndt = /* @__PURE__ */ Ze.mark({ class: "cm-lintRange cm-lintRange-active" });
  102544. function rdt(t, e, n) {
  102545. let { diagnostics: r } = t.state.field(Hi), i = [], a = 2e8, o = 0;
  102546. r.between(e - (n < 0 ? 1 : 0), e + (n > 0 ? 1 : 0), (l, u, { spec: c }) => {
  102547. 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));
  102548. });
  102549. let s = t.state.facet(u0).tooltipFilter;
  102550. return s && (i = s(i, t.state)), i.length ? {
  102551. pos: a,
  102552. end: o,
  102553. above: t.state.doc.lineAt(a).to < o,
  102554. create() {
  102555. return { dom: idt(t, i) };
  102556. }
  102557. } : null;
  102558. }
  102559. function idt(t, e) {
  102560. return on("ul", { class: "cm-tooltip-lint" }, e.map((n) => ile(t, n, !1)));
  102561. }
  102562. const adt = (t) => {
  102563. let e = t.state.field(Hi, !1);
  102564. (!e || !e.panel) && t.dispatch({ effects: tdt(t.state, [R4.of(!0)]) });
  102565. let n = e0(t, c0.open);
  102566. return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
  102567. }, t9 = (t) => {
  102568. let e = t.state.field(Hi, !1);
  102569. return !e || !e.panel ? !1 : (t.dispatch({ effects: R4.of(!1) }), !0);
  102570. }, odt = (t) => {
  102571. let e = t.state.field(Hi, !1);
  102572. if (!e)
  102573. return !1;
  102574. let n = t.state.selection.main, r = e.diagnostics.iter(n.to + 1);
  102575. 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);
  102576. }, sdt = [
  102577. { key: "Mod-Shift-m", run: adt, preventDefault: !0 },
  102578. { key: "F8", run: odt }
  102579. ], u0 = /* @__PURE__ */ Be.define({
  102580. combine(t) {
  102581. return Object.assign({ sources: t.map((e) => e.source).filter((e) => e != null) }, ds(t.map((e) => e.config), {
  102582. delay: 750,
  102583. markerFilter: null,
  102584. tooltipFilter: null,
  102585. needsRefresh: null,
  102586. hideOn: () => null
  102587. }, {
  102588. needsRefresh: (e, n) => e ? n ? (r) => e(r) || n(r) : e : n
  102589. }));
  102590. }
  102591. });
  102592. function rle(t) {
  102593. let e = [];
  102594. if (t)
  102595. e: for (let { name: n } of t) {
  102596. for (let r = 0; r < n.length; r++) {
  102597. let i = n[r];
  102598. if (/[a-zA-Z]/.test(i) && !e.some((a) => a.toLowerCase() == i.toLowerCase())) {
  102599. e.push(i);
  102600. continue e;
  102601. }
  102602. }
  102603. e.push("");
  102604. }
  102605. return e;
  102606. }
  102607. function ile(t, e, n) {
  102608. var r;
  102609. let i = n ? rle(e.actions) : [];
  102610. return on("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, on("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(t) : e.message), (r = e.actions) === null || r === void 0 ? void 0 : r.map((a, o) => {
  102611. let s = !1, l = (d) => {
  102612. if (d.preventDefault(), s)
  102613. return;
  102614. s = !0;
  102615. let h = ip(t.state.field(Hi).diagnostics, e);
  102616. h && a.apply(t, h.from, h.to);
  102617. }, { name: u } = a, c = i[o] ? u.indexOf(i[o]) : -1, f = c < 0 ? u : [
  102618. u.slice(0, c),
  102619. on("u", u.slice(c, c + 1)),
  102620. u.slice(c + 1)
  102621. ];
  102622. return on("button", {
  102623. type: "button",
  102624. class: "cm-diagnosticAction",
  102625. onclick: l,
  102626. onmousedown: l,
  102627. "aria-label": ` Action: ${u}${c < 0 ? "" : ` (access key "${i[o]})"`}.`
  102628. }, f);
  102629. }), e.source && on("div", { class: "cm-diagnosticSource" }, e.source));
  102630. }
  102631. class ldt extends hs {
  102632. constructor(e) {
  102633. super(), this.diagnostic = e;
  102634. }
  102635. eq(e) {
  102636. return e.diagnostic == this.diagnostic;
  102637. }
  102638. toDOM() {
  102639. return on("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity });
  102640. }
  102641. }
  102642. class n9 {
  102643. constructor(e, n) {
  102644. this.diagnostic = n, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = ile(e, n, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
  102645. }
  102646. }
  102647. class c0 {
  102648. constructor(e) {
  102649. this.view = e, this.items = [];
  102650. let n = (i) => {
  102651. if (i.keyCode == 27)
  102652. t9(this.view), this.view.focus();
  102653. else if (i.keyCode == 38 || i.keyCode == 33)
  102654. this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
  102655. else if (i.keyCode == 40 || i.keyCode == 34)
  102656. this.moveSelection((this.selectedIndex + 1) % this.items.length);
  102657. else if (i.keyCode == 36)
  102658. this.moveSelection(0);
  102659. else if (i.keyCode == 35)
  102660. this.moveSelection(this.items.length - 1);
  102661. else if (i.keyCode == 13)
  102662. this.view.focus();
  102663. else if (i.keyCode >= 65 && i.keyCode <= 90 && this.selectedIndex >= 0) {
  102664. let { diagnostic: a } = this.items[this.selectedIndex], o = rle(a.actions);
  102665. for (let s = 0; s < o.length; s++)
  102666. if (o[s].toUpperCase().charCodeAt(0) == i.keyCode) {
  102667. let l = ip(this.view.state.field(Hi).diagnostics, a);
  102668. l && a.actions[s].apply(e, l.from, l.to);
  102669. }
  102670. } else
  102671. return;
  102672. i.preventDefault();
  102673. }, r = (i) => {
  102674. for (let a = 0; a < this.items.length; a++)
  102675. this.items[a].dom.contains(i.target) && this.moveSelection(a);
  102676. };
  102677. this.list = on("ul", {
  102678. tabIndex: 0,
  102679. role: "listbox",
  102680. "aria-label": this.view.state.phrase("Diagnostics"),
  102681. onkeydown: n,
  102682. onclick: r
  102683. }), this.dom = on("div", { class: "cm-panel-lint" }, this.list, on("button", {
  102684. type: "button",
  102685. name: "close",
  102686. "aria-label": this.view.state.phrase("close"),
  102687. onclick: () => t9(this.view)
  102688. }, "×")), this.update();
  102689. }
  102690. get selectedIndex() {
  102691. let e = this.view.state.field(Hi).selected;
  102692. if (!e)
  102693. return -1;
  102694. for (let n = 0; n < this.items.length; n++)
  102695. if (this.items[n].diagnostic == e.diagnostic)
  102696. return n;
  102697. return -1;
  102698. }
  102699. update() {
  102700. let { diagnostics: e, selected: n } = this.view.state.field(Hi), r = 0, i = !1, a = null;
  102701. for (e.between(0, this.view.state.doc.length, (o, s, { spec: l }) => {
  102702. let u = -1, c;
  102703. for (let f = r; f < this.items.length; f++)
  102704. if (this.items[f].diagnostic == l.diagnostic) {
  102705. u = f;
  102706. break;
  102707. }
  102708. u < 0 ? (c = new n9(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++;
  102709. }); r < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
  102710. i = !0, this.items.pop();
  102711. this.items.length == 0 && (this.items.push(new n9(this.view, {
  102712. from: -1,
  102713. to: -1,
  102714. severity: "info",
  102715. message: this.view.state.phrase("No diagnostics")
  102716. })), i = !0), a ? (this.list.setAttribute("aria-activedescendant", a.id), this.view.requestMeasure({
  102717. key: this,
  102718. read: () => ({ sel: a.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
  102719. write: ({ sel: o, panel: s }) => {
  102720. let l = s.height / this.list.offsetHeight;
  102721. o.top < s.top ? this.list.scrollTop -= (s.top - o.top) / l : o.bottom > s.bottom && (this.list.scrollTop += (o.bottom - s.bottom) / l);
  102722. }
  102723. })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), i && this.sync();
  102724. }
  102725. sync() {
  102726. let e = this.list.firstChild;
  102727. function n() {
  102728. let r = e;
  102729. e = r.nextSibling, r.remove();
  102730. }
  102731. for (let r of this.items)
  102732. if (r.dom.parentNode == this.list) {
  102733. for (; e != r.dom; )
  102734. n();
  102735. e = r.dom.nextSibling;
  102736. } else
  102737. this.list.insertBefore(r.dom, e);
  102738. for (; e; )
  102739. n();
  102740. }
  102741. moveSelection(e) {
  102742. if (this.selectedIndex < 0)
  102743. return;
  102744. let n = this.view.state.field(Hi), r = ip(n.diagnostics, this.items[e].diagnostic);
  102745. r && this.view.dispatch({
  102746. selection: { anchor: r.from, head: r.to },
  102747. scrollIntoView: !0,
  102748. effects: nle.of(r)
  102749. });
  102750. }
  102751. static open(e) {
  102752. return new c0(e);
  102753. }
  102754. }
  102755. function udt(t, e = 'viewBox="0 0 40 40"') {
  102756. return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
  102757. }
  102758. function f_(t) {
  102759. return udt(`<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"');
  102760. }
  102761. const cdt = /* @__PURE__ */ De.baseTheme({
  102762. ".cm-diagnostic": {
  102763. padding: "3px 6px 3px 8px",
  102764. marginLeft: "-1px",
  102765. display: "block",
  102766. whiteSpace: "pre-wrap"
  102767. },
  102768. ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
  102769. ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
  102770. ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
  102771. ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
  102772. ".cm-diagnosticAction": {
  102773. font: "inherit",
  102774. border: "none",
  102775. padding: "2px 4px",
  102776. backgroundColor: "#444",
  102777. color: "white",
  102778. borderRadius: "3px",
  102779. marginLeft: "8px",
  102780. cursor: "pointer"
  102781. },
  102782. ".cm-diagnosticSource": {
  102783. fontSize: "70%",
  102784. opacity: 0.7
  102785. },
  102786. ".cm-lintRange": {
  102787. backgroundPosition: "left bottom",
  102788. backgroundRepeat: "repeat-x",
  102789. paddingBottom: "0.7px"
  102790. },
  102791. ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ f_("#d11") },
  102792. ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ f_("orange") },
  102793. ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ f_("#999") },
  102794. ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ f_("#66d") },
  102795. ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
  102796. ".cm-tooltip-lint": {
  102797. padding: 0,
  102798. margin: 0
  102799. },
  102800. ".cm-lintPoint": {
  102801. position: "relative",
  102802. "&:after": {
  102803. content: '""',
  102804. position: "absolute",
  102805. bottom: 0,
  102806. left: "-2px",
  102807. borderLeft: "3px solid transparent",
  102808. borderRight: "3px solid transparent",
  102809. borderBottom: "4px solid #d11"
  102810. }
  102811. },
  102812. ".cm-lintPoint-warning": {
  102813. "&:after": { borderBottomColor: "orange" }
  102814. },
  102815. ".cm-lintPoint-info": {
  102816. "&:after": { borderBottomColor: "#999" }
  102817. },
  102818. ".cm-lintPoint-hint": {
  102819. "&:after": { borderBottomColor: "#66d" }
  102820. },
  102821. ".cm-panel.cm-panel-lint": {
  102822. position: "relative",
  102823. "& ul": {
  102824. maxHeight: "100px",
  102825. overflowY: "auto",
  102826. "& [aria-selected]": {
  102827. backgroundColor: "#ddd",
  102828. "& u": { textDecoration: "underline" }
  102829. },
  102830. "&:focus [aria-selected]": {
  102831. background_fallback: "#bdf",
  102832. backgroundColor: "Highlight",
  102833. color_fallback: "white",
  102834. color: "HighlightText"
  102835. },
  102836. "& u": { textDecoration: "none" },
  102837. padding: 0,
  102838. margin: 0
  102839. },
  102840. "& [name=close]": {
  102841. position: "absolute",
  102842. top: "0",
  102843. right: "2px",
  102844. background: "inherit",
  102845. border: "none",
  102846. font: "inherit",
  102847. padding: 0,
  102848. margin: 0
  102849. }
  102850. }
  102851. }), fdt = [
  102852. Hi,
  102853. /* @__PURE__ */ De.decorations.compute([Hi], (t) => {
  102854. let { selected: e, panel: n } = t.field(Hi);
  102855. return !e || !n || e.from == e.to ? Ze.none : Ze.set([
  102856. ndt.range(e.from, e.to)
  102857. ]);
  102858. }),
  102859. /* @__PURE__ */ Kst(rdt, { hideOn: edt }),
  102860. cdt
  102861. ], ddt = [
  102862. slt(),
  102863. clt(),
  102864. Pst(),
  102865. Cut(),
  102866. Klt(),
  102867. gst(),
  102868. Ost(),
  102869. At.allowMultipleSelections.of(!0),
  102870. zlt(),
  102871. Yoe(nut, { fallback: !0 }),
  102872. uut(),
  102873. Vft(),
  102874. qft(),
  102875. Fst(),
  102876. Hst(),
  102877. Dst(),
  102878. Dct(),
  102879. sy.of([
  102880. ...Hft,
  102881. ...Tct,
  102882. ...Kct,
  102883. ...Rut,
  102884. ...Ult,
  102885. ...ele,
  102886. ...sdt
  102887. ])
  102888. ];
  102889. /*!
  102890. * VueCodemirror v6.1.1
  102891. * Copyright (c) Surmon. All rights reserved.
  102892. * Released under the MIT License.
  102893. * Surmon
  102894. */
  102895. var hdt = Object.freeze({ autofocus: !1, disabled: !1, indentWithTab: !0, tabSize: 2, placeholder: "", autoDestroy: !0, extensions: [ddt] }), pdt = Symbol("vue-codemirror-global-config"), Zr, vdt = function(t) {
  102896. var e = t.onUpdate, n = t.onChange, r = t.onFocus, i = t.onBlur, a = function(o, s) {
  102897. var l = {};
  102898. for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && s.indexOf(u) < 0 && (l[u] = o[u]);
  102899. if (o != null && typeof Object.getOwnPropertySymbols == "function") {
  102900. var c = 0;
  102901. 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]]);
  102902. }
  102903. return l;
  102904. }(t, ["onUpdate", "onChange", "onFocus", "onBlur"]);
  102905. return At.create({ doc: a.doc, selection: a.selection, extensions: (Array.isArray(a.extensions) ? a.extensions : [a.extensions]).concat([De.updateListener.of(function(o) {
  102906. e(o), o.docChanged && n(o.state.doc.toString(), o), o.focusChanged && (o.view.hasFocus ? r(o) : i(o));
  102907. })]) });
  102908. }, Ld = function(t) {
  102909. var e = new iy();
  102910. return { compartment: e, run: function(n) {
  102911. e.get(t.state) ? t.dispatch({ effects: e.reconfigure(n) }) : t.dispatch({ effects: dt.appendConfig.of(e.of(n)) });
  102912. } };
  102913. }, r9 = function(t, e) {
  102914. var n = Ld(t), r = n.compartment, i = n.run;
  102915. return function(a) {
  102916. var o = r.get(t.state);
  102917. i(a ?? o !== e ? e : []);
  102918. };
  102919. }, d_ = { type: Boolean, default: void 0 }, gdt = { autofocus: d_, disabled: d_, indentWithTab: d_, tabSize: Number, placeholder: String, style: Object, autoDestroy: d_, phrases: Object, root: Object, extensions: Array, selection: Object }, mdt = { modelValue: { type: String, default: "" } }, ydt = Object.assign(Object.assign({}, gdt), mdt);
  102920. (function(t) {
  102921. t.Change = "change", t.Update = "update", t.Focus = "focus", t.Blur = "blur", t.Ready = "ready", t.ModelUpdate = "update:modelValue";
  102922. })(Zr || (Zr = {}));
  102923. var Ac = {};
  102924. Ac[Zr.Change] = function(t, e) {
  102925. return !0;
  102926. }, Ac[Zr.Update] = function(t) {
  102927. return !0;
  102928. }, Ac[Zr.Focus] = function(t) {
  102929. return !0;
  102930. }, Ac[Zr.Blur] = function(t) {
  102931. return !0;
  102932. }, Ac[Zr.Ready] = function(t) {
  102933. return !0;
  102934. };
  102935. var ale = {};
  102936. ale[Zr.ModelUpdate] = Ac[Zr.Change];
  102937. var bdt = Object.assign(Object.assign({}, Ac), ale), _dt = te({ name: "VueCodemirror", props: Object.assign({}, ydt), emits: Object.assign({}, bdt), setup: function(t, e) {
  102938. var n = ae(), r = ae(), i = ae(), a = Object.assign(Object.assign({}, hdt), Ge(pdt, {})), o = L(function() {
  102939. var s = {};
  102940. return Object.keys(Ko(t)).forEach(function(l) {
  102941. var u;
  102942. l !== "modelValue" && (s[l] = (u = t[l]) !== null && u !== void 0 ? u : a[l]);
  102943. }), s;
  102944. });
  102945. return it(function() {
  102946. var s;
  102947. r.value = vdt({ doc: t.modelValue, selection: o.value.selection, extensions: (s = a.extensions) !== null && s !== void 0 ? s : [], onFocus: function(u) {
  102948. return e.emit(Zr.Focus, u);
  102949. }, onBlur: function(u) {
  102950. return e.emit(Zr.Blur, u);
  102951. }, onUpdate: function(u) {
  102952. return e.emit(Zr.Update, u);
  102953. }, onChange: function(u, c) {
  102954. u !== t.modelValue && (e.emit(Zr.Change, u, c), e.emit(Zr.ModelUpdate, u, c));
  102955. } }), i.value = function(u) {
  102956. return new De(Object.assign({}, u));
  102957. }({ state: r.value, parent: n.value, root: o.value.root });
  102958. var l = function(u) {
  102959. var c = function() {
  102960. return u.state.doc.toString();
  102961. }, f = Ld(u).run, d = r9(u, [De.editable.of(!1), At.readOnly.of(!0)]), h = r9(u, sy.of([Pct])), p = Ld(u).run, v = Ld(u).run, g = Ld(u).run, m = Ld(u).run;
  102962. return { focus: function() {
  102963. return u.focus();
  102964. }, getDoc: c, setDoc: function(y) {
  102965. y !== c() && u.dispatch({ changes: { from: 0, to: u.state.doc.length, insert: y } });
  102966. }, reExtensions: f, toggleDisabled: d, toggleIndentWithTab: h, setTabSize: function(y) {
  102967. p([At.tabSize.of(y), uy.of(" ".repeat(y))]);
  102968. }, setPhrases: function(y) {
  102969. v([At.phrases.of(y)]);
  102970. }, setPlaceholder: function(y) {
  102971. g(Nst(y));
  102972. }, setStyle: function(y) {
  102973. y === void 0 && (y = {}), m(De.theme({ "&": Object.assign({}, y) }));
  102974. } };
  102975. }(i.value);
  102976. se(function() {
  102977. return t.modelValue;
  102978. }, function(u) {
  102979. u !== l.getDoc() && l.setDoc(u);
  102980. }), se(function() {
  102981. return t.extensions;
  102982. }, function(u) {
  102983. return l.reExtensions(u || []);
  102984. }, { immediate: !0 }), se(function() {
  102985. return o.value.disabled;
  102986. }, function(u) {
  102987. return l.toggleDisabled(u);
  102988. }, { immediate: !0 }), se(function() {
  102989. return o.value.indentWithTab;
  102990. }, function(u) {
  102991. return l.toggleIndentWithTab(u);
  102992. }, { immediate: !0 }), se(function() {
  102993. return o.value.tabSize;
  102994. }, function(u) {
  102995. return l.setTabSize(u);
  102996. }, { immediate: !0 }), se(function() {
  102997. return o.value.phrases;
  102998. }, function(u) {
  102999. return l.setPhrases(u || {});
  103000. }, { immediate: !0 }), se(function() {
  103001. return o.value.placeholder;
  103002. }, function(u) {
  103003. return l.setPlaceholder(u);
  103004. }, { immediate: !0 }), se(function() {
  103005. return o.value.style;
  103006. }, function(u) {
  103007. return l.setStyle(u);
  103008. }, { immediate: !0 }), o.value.autofocus && l.focus(), e.emit(Zr.Ready, { state: r.value, view: i.value, container: n.value });
  103009. }), yt(function() {
  103010. o.value.autoDestroy && i.value && function(s) {
  103011. s.destroy();
  103012. }(i.value);
  103013. }), function() {
  103014. return qg("div", { class: "v-codemirror", style: { display: "contents" }, ref: n });
  103015. };
  103016. } }), Odt = _dt;
  103017. const Sdt = "#e5c07b", i9 = "#e06c75", xdt = "#56b6c2", wdt = "#ffffff", d1 = "#abb2bf", YM = "#7d8799", Cdt = "#61afef", Tdt = "#98c379", a9 = "#d19a66", Pdt = "#c678dd", $dt = "#21252b", o9 = "#2c313a", s9 = "#282c34", B$ = "#353a42", Adt = "#3E4451", l9 = "#528bff", Edt = /* @__PURE__ */ De.theme({
  103018. "&": {
  103019. color: d1,
  103020. backgroundColor: s9
  103021. },
  103022. ".cm-content": {
  103023. caretColor: l9
  103024. },
  103025. ".cm-cursor, .cm-dropCursor": { borderLeftColor: l9 },
  103026. "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Adt },
  103027. ".cm-panels": { backgroundColor: $dt, color: d1 },
  103028. ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
  103029. ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
  103030. ".cm-searchMatch": {
  103031. backgroundColor: "#72a1ff59",
  103032. outline: "1px solid #457dff"
  103033. },
  103034. ".cm-searchMatch.cm-searchMatch-selected": {
  103035. backgroundColor: "#6199ff2f"
  103036. },
  103037. ".cm-activeLine": { backgroundColor: "#6699ff0b" },
  103038. ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
  103039. "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
  103040. backgroundColor: "#bad0f847"
  103041. },
  103042. ".cm-gutters": {
  103043. backgroundColor: s9,
  103044. color: YM,
  103045. border: "none"
  103046. },
  103047. ".cm-activeLineGutter": {
  103048. backgroundColor: o9
  103049. },
  103050. ".cm-foldPlaceholder": {
  103051. backgroundColor: "transparent",
  103052. border: "none",
  103053. color: "#ddd"
  103054. },
  103055. ".cm-tooltip": {
  103056. border: "none",
  103057. backgroundColor: B$
  103058. },
  103059. ".cm-tooltip .cm-tooltip-arrow:before": {
  103060. borderTopColor: "transparent",
  103061. borderBottomColor: "transparent"
  103062. },
  103063. ".cm-tooltip .cm-tooltip-arrow:after": {
  103064. borderTopColor: B$,
  103065. borderBottomColor: B$
  103066. },
  103067. ".cm-tooltip-autocomplete": {
  103068. "& > ul > li[aria-selected]": {
  103069. backgroundColor: o9,
  103070. color: d1
  103071. }
  103072. }
  103073. }, { dark: !0 }), Mdt = /* @__PURE__ */ fy.define([
  103074. {
  103075. tag: J.keyword,
  103076. color: Pdt
  103077. },
  103078. {
  103079. tag: [J.name, J.deleted, J.character, J.propertyName, J.macroName],
  103080. color: i9
  103081. },
  103082. {
  103083. tag: [/* @__PURE__ */ J.function(J.variableName), J.labelName],
  103084. color: Cdt
  103085. },
  103086. {
  103087. tag: [J.color, /* @__PURE__ */ J.constant(J.name), /* @__PURE__ */ J.standard(J.name)],
  103088. color: a9
  103089. },
  103090. {
  103091. tag: [/* @__PURE__ */ J.definition(J.name), J.separator],
  103092. color: d1
  103093. },
  103094. {
  103095. tag: [J.typeName, J.className, J.number, J.changed, J.annotation, J.modifier, J.self, J.namespace],
  103096. color: Sdt
  103097. },
  103098. {
  103099. tag: [J.operator, J.operatorKeyword, J.url, J.escape, J.regexp, J.link, /* @__PURE__ */ J.special(J.string)],
  103100. color: xdt
  103101. },
  103102. {
  103103. tag: [J.meta, J.comment],
  103104. color: YM
  103105. },
  103106. {
  103107. tag: J.strong,
  103108. fontWeight: "bold"
  103109. },
  103110. {
  103111. tag: J.emphasis,
  103112. fontStyle: "italic"
  103113. },
  103114. {
  103115. tag: J.strikethrough,
  103116. textDecoration: "line-through"
  103117. },
  103118. {
  103119. tag: J.link,
  103120. color: YM,
  103121. textDecoration: "underline"
  103122. },
  103123. {
  103124. tag: J.heading,
  103125. fontWeight: "bold",
  103126. color: i9
  103127. },
  103128. {
  103129. tag: [J.atom, J.bool, /* @__PURE__ */ J.special(J.variableName)],
  103130. color: a9
  103131. },
  103132. {
  103133. tag: [J.processingInstruction, J.string, J.inserted],
  103134. color: Tdt
  103135. },
  103136. {
  103137. tag: J.invalid,
  103138. color: wdt
  103139. }
  103140. ]), Idt = [Edt, /* @__PURE__ */ Yoe(Mdt)];
  103141. class CS {
  103142. /**
  103143. @internal
  103144. */
  103145. constructor(e, n, r, i, a, o, s, l, u, c = 0, f) {
  103146. 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;
  103147. }
  103148. /**
  103149. @internal
  103150. */
  103151. toString() {
  103152. return `[${this.stack.filter((e, n) => n % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
  103153. }
  103154. // Start an empty stack
  103155. /**
  103156. @internal
  103157. */
  103158. static start(e, n, r = 0) {
  103159. let i = e.parser.context;
  103160. return new CS(e, [], n, r, r, 0, [], 0, i ? new u9(i, i.start) : null, 0, null);
  103161. }
  103162. /**
  103163. The stack's current [context](#lr.ContextTracker) value, if
  103164. any. Its type will depend on the context tracker's type
  103165. parameter, or it will be `null` if there is no context
  103166. tracker.
  103167. */
  103168. get context() {
  103169. return this.curContext ? this.curContext.context : null;
  103170. }
  103171. // Push a state onto the stack, tracking its start position as well
  103172. // as the buffer base at that point.
  103173. /**
  103174. @internal
  103175. */
  103176. pushState(e, n) {
  103177. this.stack.push(this.state, n, this.bufferBase + this.buffer.length), this.state = e;
  103178. }
  103179. // Apply a reduce action
  103180. /**
  103181. @internal
  103182. */
  103183. reduce(e) {
  103184. var n;
  103185. let r = e >> 19, i = e & 65535, { parser: a } = this.p;
  103186. this.reducePos < this.pos - 25 && this.setLookAhead(this.pos);
  103187. let o = a.dynamicPrecedence(i);
  103188. if (o && (this.score += o), r == 0) {
  103189. 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);
  103190. return;
  103191. }
  103192. 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;
  103193. 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));
  103194. let c = s ? this.stack[s - 1] : 0, f = this.bufferBase + this.buffer.length - c;
  103195. if (i < a.minRepeatTerm || e & 131072) {
  103196. let d = a.stateFlag(
  103197. this.state,
  103198. 1
  103199. /* StateFlag.Skipped */
  103200. ) ? this.pos : this.reducePos;
  103201. this.storeNode(i, l, d, f + 4, !0);
  103202. }
  103203. if (e & 262144)
  103204. this.state = this.stack[s];
  103205. else {
  103206. let d = this.stack[s - 3];
  103207. this.state = a.getGoto(d, i, !0);
  103208. }
  103209. for (; this.stack.length > s; )
  103210. this.stack.pop();
  103211. this.reduceContext(i, l);
  103212. }
  103213. // Shift a value into the buffer
  103214. /**
  103215. @internal
  103216. */
  103217. storeNode(e, n, r, i = 4, a = !1) {
  103218. if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
  103219. let o = this, s = this.buffer.length;
  103220. 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) {
  103221. if (n == r)
  103222. return;
  103223. if (o.buffer[s - 2] >= n) {
  103224. o.buffer[s - 2] = r;
  103225. return;
  103226. }
  103227. }
  103228. }
  103229. if (!a || this.pos == r)
  103230. this.buffer.push(e, n, r, i);
  103231. else {
  103232. let o = this.buffer.length;
  103233. if (o > 0 && this.buffer[o - 4] != 0)
  103234. for (; o > 0 && this.buffer[o - 2] > r; )
  103235. 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);
  103236. this.buffer[o] = e, this.buffer[o + 1] = n, this.buffer[o + 2] = r, this.buffer[o + 3] = i;
  103237. }
  103238. }
  103239. // Apply a shift action
  103240. /**
  103241. @internal
  103242. */
  103243. shift(e, n, r, i) {
  103244. if (e & 131072)
  103245. this.pushState(e & 65535, this.pos);
  103246. else if (e & 262144)
  103247. this.pos = i, this.shiftContext(n, r), n <= this.p.parser.maxNode && this.buffer.push(n, r, i, 4);
  103248. else {
  103249. let a = e, { parser: o } = this.p;
  103250. (i > this.pos || n <= o.maxNode) && (this.pos = i, o.stateFlag(
  103251. a,
  103252. 1
  103253. /* StateFlag.Skipped */
  103254. ) || (this.reducePos = i)), this.pushState(a, r), this.shiftContext(n, r), n <= o.maxNode && this.buffer.push(n, r, i, 4);
  103255. }
  103256. }
  103257. // Apply an action
  103258. /**
  103259. @internal
  103260. */
  103261. apply(e, n, r, i) {
  103262. e & 65536 ? this.reduce(e) : this.shift(e, n, r, i);
  103263. }
  103264. // Add a prebuilt (reused) node into the buffer.
  103265. /**
  103266. @internal
  103267. */
  103268. useNode(e, n) {
  103269. let r = this.p.reused.length - 1;
  103270. (r < 0 || this.p.reused[r] != e) && (this.p.reused.push(e), r++);
  103271. let i = this.pos;
  103272. this.reducePos = this.pos = i + e.length, this.pushState(n, i), this.buffer.push(
  103273. r,
  103274. i,
  103275. this.reducePos,
  103276. -1
  103277. /* size == -1 means this is a reused value */
  103278. ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length)));
  103279. }
  103280. // Split the stack. Due to the buffer sharing and the fact
  103281. // that `this.stack` tends to stay quite shallow, this isn't very
  103282. // expensive.
  103283. /**
  103284. @internal
  103285. */
  103286. split() {
  103287. let e = this, n = e.buffer.length;
  103288. for (; n > 0 && e.buffer[n - 2] > e.reducePos; )
  103289. n -= 4;
  103290. let r = e.buffer.slice(n), i = e.bufferBase + n;
  103291. for (; e && i == e.bufferBase; )
  103292. e = e.parent;
  103293. return new CS(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, r, i, this.curContext, this.lookAhead, e);
  103294. }
  103295. // Try to recover from an error by 'deleting' (ignoring) one token.
  103296. /**
  103297. @internal
  103298. */
  103299. recoverByDelete(e, n) {
  103300. let r = e <= this.p.parser.maxNode;
  103301. 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;
  103302. }
  103303. /**
  103304. Check if the given term would be able to be shifted (optionally
  103305. after some reductions) on this stack. This can be useful for
  103306. external tokenizers that want to make sure they only provide a
  103307. given token when it applies.
  103308. */
  103309. canShift(e) {
  103310. for (let n = new Ddt(this); ; ) {
  103311. let r = this.p.parser.stateSlot(
  103312. n.state,
  103313. 4
  103314. /* ParseState.DefaultReduce */
  103315. ) || this.p.parser.hasAction(n.state, e);
  103316. if (r == 0)
  103317. return !1;
  103318. if (!(r & 65536))
  103319. return !0;
  103320. n.reduce(r);
  103321. }
  103322. }
  103323. // Apply up to Recover.MaxNext recovery actions that conceptually
  103324. // inserts some missing token or rule.
  103325. /**
  103326. @internal
  103327. */
  103328. recoverByInsert(e) {
  103329. if (this.stack.length >= 300)
  103330. return [];
  103331. let n = this.p.parser.nextStates(this.state);
  103332. if (n.length > 8 || this.stack.length >= 120) {
  103333. let i = [];
  103334. for (let a = 0, o; a < n.length; a += 2)
  103335. (o = n[a + 1]) != this.state && this.p.parser.hasAction(o, e) && i.push(n[a], o);
  103336. if (this.stack.length < 120)
  103337. for (let a = 0; i.length < 8 && a < n.length; a += 2) {
  103338. let o = n[a + 1];
  103339. i.some((s, l) => l & 1 && s == o) || i.push(n[a], o);
  103340. }
  103341. n = i;
  103342. }
  103343. let r = [];
  103344. for (let i = 0; i < n.length && r.length < 4; i += 2) {
  103345. let a = n[i + 1];
  103346. if (a == this.state)
  103347. continue;
  103348. let o = this.split();
  103349. 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);
  103350. }
  103351. return r;
  103352. }
  103353. // Force a reduce, if possible. Return false if that can't
  103354. // be done.
  103355. /**
  103356. @internal
  103357. */
  103358. forceReduce() {
  103359. let { parser: e } = this.p, n = e.stateSlot(
  103360. this.state,
  103361. 5
  103362. /* ParseState.ForcedReduce */
  103363. );
  103364. if (!(n & 65536))
  103365. return !1;
  103366. if (!e.validAction(this.state, n)) {
  103367. let r = n >> 19, i = n & 65535, a = this.stack.length - r * 3;
  103368. if (a < 0 || e.getGoto(this.stack[a], i, !1) < 0) {
  103369. let o = this.findForcedReduction();
  103370. if (o == null)
  103371. return !1;
  103372. n = o;
  103373. }
  103374. this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
  103375. }
  103376. return this.reducePos = this.pos, this.reduce(n), !0;
  103377. }
  103378. /**
  103379. Try to scan through the automaton to find some kind of reduction
  103380. that can be applied. Used when the regular ForcedReduce field
  103381. isn't a valid action. @internal
  103382. */
  103383. findForcedReduction() {
  103384. let { parser: e } = this.p, n = [], r = (i, a) => {
  103385. if (!n.includes(i))
  103386. return n.push(i), e.allActions(i, (o) => {
  103387. if (!(o & 393216)) if (o & 65536) {
  103388. let s = (o >> 19) - a;
  103389. if (s > 1) {
  103390. let l = o & 65535, u = this.stack.length - s * 3;
  103391. if (u >= 0 && e.getGoto(this.stack[u], l, !1) >= 0)
  103392. return s << 19 | 65536 | l;
  103393. }
  103394. } else {
  103395. let s = r(o, a + 1);
  103396. if (s != null)
  103397. return s;
  103398. }
  103399. });
  103400. };
  103401. return r(this.state, 0);
  103402. }
  103403. /**
  103404. @internal
  103405. */
  103406. forceAll() {
  103407. for (; !this.p.parser.stateFlag(
  103408. this.state,
  103409. 2
  103410. /* StateFlag.Accepting */
  103411. ); )
  103412. if (!this.forceReduce()) {
  103413. this.storeNode(0, this.pos, this.pos, 4, !0);
  103414. break;
  103415. }
  103416. return this;
  103417. }
  103418. /**
  103419. Check whether this state has no further actions (assumed to be a direct descendant of the
  103420. top state, since any other states must be able to continue
  103421. somehow). @internal
  103422. */
  103423. get deadEnd() {
  103424. if (this.stack.length != 3)
  103425. return !1;
  103426. let { parser: e } = this.p;
  103427. return e.data[e.stateSlot(
  103428. this.state,
  103429. 1
  103430. /* ParseState.Actions */
  103431. )] == 65535 && !e.stateSlot(
  103432. this.state,
  103433. 4
  103434. /* ParseState.DefaultReduce */
  103435. );
  103436. }
  103437. /**
  103438. Restart the stack (put it back in its start state). Only safe
  103439. when this.stack.length == 3 (state is directly below the top
  103440. state). @internal
  103441. */
  103442. restart() {
  103443. this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
  103444. }
  103445. /**
  103446. @internal
  103447. */
  103448. sameState(e) {
  103449. if (this.state != e.state || this.stack.length != e.stack.length)
  103450. return !1;
  103451. for (let n = 0; n < this.stack.length; n += 3)
  103452. if (this.stack[n] != e.stack[n])
  103453. return !1;
  103454. return !0;
  103455. }
  103456. /**
  103457. Get the parser used by this stack.
  103458. */
  103459. get parser() {
  103460. return this.p.parser;
  103461. }
  103462. /**
  103463. Test whether a given dialect (by numeric ID, as exported from
  103464. the terms file) is enabled.
  103465. */
  103466. dialectEnabled(e) {
  103467. return this.p.parser.dialect.flags[e];
  103468. }
  103469. shiftContext(e, n) {
  103470. this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e, this, this.p.stream.reset(n)));
  103471. }
  103472. reduceContext(e, n) {
  103473. this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e, this, this.p.stream.reset(n)));
  103474. }
  103475. /**
  103476. @internal
  103477. */
  103478. emitContext() {
  103479. let e = this.buffer.length - 1;
  103480. (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
  103481. }
  103482. /**
  103483. @internal
  103484. */
  103485. emitLookAhead() {
  103486. let e = this.buffer.length - 1;
  103487. (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
  103488. }
  103489. updateContext(e) {
  103490. if (e != this.curContext.context) {
  103491. let n = new u9(this.curContext.tracker, e);
  103492. n.hash != this.curContext.hash && this.emitContext(), this.curContext = n;
  103493. }
  103494. }
  103495. /**
  103496. @internal
  103497. */
  103498. setLookAhead(e) {
  103499. e > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e);
  103500. }
  103501. /**
  103502. @internal
  103503. */
  103504. close() {
  103505. this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
  103506. }
  103507. }
  103508. class u9 {
  103509. constructor(e, n) {
  103510. this.tracker = e, this.context = n, this.hash = e.strict ? e.hash(n) : 0;
  103511. }
  103512. }
  103513. class Ddt {
  103514. constructor(e) {
  103515. this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length;
  103516. }
  103517. reduce(e) {
  103518. let n = e & 65535, r = e >> 19;
  103519. 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;
  103520. let i = this.start.p.parser.getGoto(this.stack[this.base - 3], n, !0);
  103521. this.state = i;
  103522. }
  103523. }
  103524. class TS {
  103525. constructor(e, n, r) {
  103526. this.stack = e, this.pos = n, this.index = r, this.buffer = e.buffer, this.index == 0 && this.maybeNext();
  103527. }
  103528. static create(e, n = e.bufferBase + e.buffer.length) {
  103529. return new TS(e, n, n - e.bufferBase);
  103530. }
  103531. maybeNext() {
  103532. let e = this.stack.parent;
  103533. e != null && (this.index = this.stack.bufferBase - e.bufferBase, this.stack = e, this.buffer = e.buffer);
  103534. }
  103535. get id() {
  103536. return this.buffer[this.index - 4];
  103537. }
  103538. get start() {
  103539. return this.buffer[this.index - 3];
  103540. }
  103541. get end() {
  103542. return this.buffer[this.index - 2];
  103543. }
  103544. get size() {
  103545. return this.buffer[this.index - 1];
  103546. }
  103547. next() {
  103548. this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
  103549. }
  103550. fork() {
  103551. return new TS(this.stack, this.pos, this.index);
  103552. }
  103553. }
  103554. function ug(t, e = Uint16Array) {
  103555. if (typeof t != "string")
  103556. return t;
  103557. let n = null;
  103558. for (let r = 0, i = 0; r < t.length; ) {
  103559. let a = 0;
  103560. for (; ; ) {
  103561. let o = t.charCodeAt(r++), s = !1;
  103562. if (o == 126) {
  103563. a = 65535;
  103564. break;
  103565. }
  103566. o >= 92 && o--, o >= 34 && o--;
  103567. let l = o - 32;
  103568. if (l >= 46 && (l -= 46, s = !0), a += l, s)
  103569. break;
  103570. a *= 46;
  103571. }
  103572. n ? n[i++] = a : n = new e(a);
  103573. }
  103574. return n;
  103575. }
  103576. class h1 {
  103577. constructor() {
  103578. this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
  103579. }
  103580. }
  103581. const c9 = new h1();
  103582. class Rdt {
  103583. /**
  103584. @internal
  103585. */
  103586. constructor(e, n) {
  103587. this.input = e, this.ranges = n, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = c9, this.rangeIndex = 0, this.pos = this.chunkPos = n[0].from, this.range = n[0], this.end = n[n.length - 1].to, this.readNext();
  103588. }
  103589. /**
  103590. @internal
  103591. */
  103592. resolveOffset(e, n) {
  103593. let r = this.range, i = this.rangeIndex, a = this.pos + e;
  103594. for (; a < r.from; ) {
  103595. if (!i)
  103596. return null;
  103597. let o = this.ranges[--i];
  103598. a -= r.from - o.to, r = o;
  103599. }
  103600. for (; n < 0 ? a > r.to : a >= r.to; ) {
  103601. if (i == this.ranges.length - 1)
  103602. return null;
  103603. let o = this.ranges[++i];
  103604. a += o.from - r.to, r = o;
  103605. }
  103606. return a;
  103607. }
  103608. /**
  103609. @internal
  103610. */
  103611. clipPos(e) {
  103612. if (e >= this.range.from && e < this.range.to)
  103613. return e;
  103614. for (let n of this.ranges)
  103615. if (n.to > e)
  103616. return Math.max(e, n.from);
  103617. return this.end;
  103618. }
  103619. /**
  103620. Look at a code unit near the stream position. `.peek(0)` equals
  103621. `.next`, `.peek(-1)` gives you the previous character, and so
  103622. on.
  103623. Note that looking around during tokenizing creates dependencies
  103624. on potentially far-away content, which may reduce the
  103625. effectiveness incremental parsing—when looking forward—or even
  103626. cause invalid reparses when looking backward more than 25 code
  103627. units, since the library does not track lookbehind.
  103628. */
  103629. peek(e) {
  103630. let n = this.chunkOff + e, r, i;
  103631. if (n >= 0 && n < this.chunk.length)
  103632. r = this.pos + e, i = this.chunk.charCodeAt(n);
  103633. else {
  103634. let a = this.resolveOffset(e, 1);
  103635. if (a == null)
  103636. return -1;
  103637. if (r = a, r >= this.chunk2Pos && r < this.chunk2Pos + this.chunk2.length)
  103638. i = this.chunk2.charCodeAt(r - this.chunk2Pos);
  103639. else {
  103640. let o = this.rangeIndex, s = this.range;
  103641. for (; s.to <= r; )
  103642. s = this.ranges[++o];
  103643. 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);
  103644. }
  103645. }
  103646. return r >= this.token.lookAhead && (this.token.lookAhead = r + 1), i;
  103647. }
  103648. /**
  103649. Accept a token. By default, the end of the token is set to the
  103650. current stream position, but you can pass an offset (relative to
  103651. the stream position) to change that.
  103652. */
  103653. acceptToken(e, n = 0) {
  103654. let r = n ? this.resolveOffset(n, -1) : this.pos;
  103655. if (r == null || r < this.token.start)
  103656. throw new RangeError("Token end out of bounds");
  103657. this.token.value = e, this.token.end = r;
  103658. }
  103659. /**
  103660. Accept a token ending at a specific given position.
  103661. */
  103662. acceptTokenTo(e, n) {
  103663. this.token.value = e, this.token.end = n;
  103664. }
  103665. getChunk() {
  103666. if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
  103667. let { chunk: e, chunkPos: n } = this;
  103668. this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e, this.chunk2Pos = n, this.chunkOff = this.pos - this.chunkPos;
  103669. } else {
  103670. this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
  103671. let e = this.input.chunk(this.pos), n = this.pos + e.length;
  103672. this.chunk = n > this.range.to ? e.slice(0, this.range.to - this.pos) : e, this.chunkPos = this.pos, this.chunkOff = 0;
  103673. }
  103674. }
  103675. readNext() {
  103676. return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
  103677. }
  103678. /**
  103679. Move the stream forward N (defaults to 1) code units. Returns
  103680. the new value of [`next`](#lr.InputStream.next).
  103681. */
  103682. advance(e = 1) {
  103683. for (this.chunkOff += e; this.pos + e >= this.range.to; ) {
  103684. if (this.rangeIndex == this.ranges.length - 1)
  103685. return this.setDone();
  103686. e -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
  103687. }
  103688. return this.pos += e, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
  103689. }
  103690. setDone() {
  103691. return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
  103692. }
  103693. /**
  103694. @internal
  103695. */
  103696. reset(e, n) {
  103697. if (n ? (this.token = n, n.start = e, n.lookAhead = e + 1, n.value = n.extended = -1) : this.token = c9, this.pos != e) {
  103698. if (this.pos = e, e == this.end)
  103699. return this.setDone(), this;
  103700. for (; e < this.range.from; )
  103701. this.range = this.ranges[--this.rangeIndex];
  103702. for (; e >= this.range.to; )
  103703. this.range = this.ranges[++this.rangeIndex];
  103704. e >= this.chunkPos && e < this.chunkPos + this.chunk.length ? this.chunkOff = e - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
  103705. }
  103706. return this;
  103707. }
  103708. /**
  103709. @internal
  103710. */
  103711. read(e, n) {
  103712. if (e >= this.chunkPos && n <= this.chunkPos + this.chunk.length)
  103713. return this.chunk.slice(e - this.chunkPos, n - this.chunkPos);
  103714. if (e >= this.chunk2Pos && n <= this.chunk2Pos + this.chunk2.length)
  103715. return this.chunk2.slice(e - this.chunk2Pos, n - this.chunk2Pos);
  103716. if (e >= this.range.from && n <= this.range.to)
  103717. return this.input.read(e, n);
  103718. let r = "";
  103719. for (let i of this.ranges) {
  103720. if (i.from >= n)
  103721. break;
  103722. i.to > e && (r += this.input.read(Math.max(i.from, e), Math.min(i.to, n)));
  103723. }
  103724. return r;
  103725. }
  103726. }
  103727. class vh {
  103728. constructor(e, n) {
  103729. this.data = e, this.id = n;
  103730. }
  103731. token(e, n) {
  103732. let { parser: r } = n.p;
  103733. ole(this.data, e, n, this.id, r.data, r.tokenPrecTable);
  103734. }
  103735. }
  103736. vh.prototype.contextual = vh.prototype.fallback = vh.prototype.extend = !1;
  103737. class qM {
  103738. constructor(e, n, r) {
  103739. this.precTable = n, this.elseToken = r, this.data = typeof e == "string" ? ug(e) : e;
  103740. }
  103741. token(e, n) {
  103742. let r = e.pos, i = 0;
  103743. for (; ; ) {
  103744. let a = e.next < 0, o = e.resolveOffset(1, 1);
  103745. if (ole(this.data, e, n, 0, this.data, this.precTable), e.token.value > -1)
  103746. break;
  103747. if (this.elseToken == null)
  103748. return;
  103749. if (a || i++, o == null)
  103750. break;
  103751. e.reset(o, e.token);
  103752. }
  103753. i && (e.reset(r, e.token), e.acceptToken(this.elseToken, i));
  103754. }
  103755. }
  103756. qM.prototype.contextual = vh.prototype.fallback = vh.prototype.extend = !1;
  103757. class Qw {
  103758. /**
  103759. Create a tokenizer. The first argument is the function that,
  103760. given an input stream, scans for the types of tokens it
  103761. recognizes at the stream's position, and calls
  103762. [`acceptToken`](#lr.InputStream.acceptToken) when it finds
  103763. one.
  103764. */
  103765. constructor(e, n = {}) {
  103766. this.token = e, this.contextual = !!n.contextual, this.fallback = !!n.fallback, this.extend = !!n.extend;
  103767. }
  103768. }
  103769. function ole(t, e, n, r, i, a) {
  103770. let o = 0, s = 1 << r, { dialect: l } = n.p.parser;
  103771. e: for (; s & t[o]; ) {
  103772. let u = t[o + 1];
  103773. for (let h = o + 3; h < u; h += 2)
  103774. if ((t[h + 1] & s) > 0) {
  103775. let p = t[h];
  103776. if (l.allows(p) && (e.token.value == -1 || e.token.value == p || kdt(p, e.token.value, i, a))) {
  103777. e.acceptToken(p);
  103778. break;
  103779. }
  103780. }
  103781. let c = e.next, f = 0, d = t[o + 2];
  103782. if (e.next < 0 && d > f && t[u + d * 3 - 3] == 65535) {
  103783. o = t[u + d * 3 - 1];
  103784. continue e;
  103785. }
  103786. for (; f < d; ) {
  103787. let h = f + d >> 1, p = u + h + (h << 1), v = t[p], g = t[p + 1] || 65536;
  103788. if (c < v)
  103789. d = h;
  103790. else if (c >= g)
  103791. f = h + 1;
  103792. else {
  103793. o = t[p + 2], e.advance();
  103794. continue e;
  103795. }
  103796. }
  103797. break;
  103798. }
  103799. }
  103800. function f9(t, e, n) {
  103801. for (let r = e, i; (i = t[r]) != 65535; r++)
  103802. if (i == n)
  103803. return r - e;
  103804. return -1;
  103805. }
  103806. function kdt(t, e, n, r) {
  103807. let i = f9(n, r, e);
  103808. return i < 0 || f9(n, r, t) < i;
  103809. }
  103810. const Ii = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
  103811. let z$ = null;
  103812. function d9(t, e, n) {
  103813. let r = t.cursor(Zn.IncludeAnonymous);
  103814. for (r.moveTo(e); ; )
  103815. if (!(n < 0 ? r.childBefore(e) : r.childAfter(e)))
  103816. for (; ; ) {
  103817. if ((n < 0 ? r.to < e : r.from > e) && !r.type.isError)
  103818. return n < 0 ? Math.max(0, Math.min(
  103819. r.to - 1,
  103820. e - 25
  103821. /* Lookahead.Margin */
  103822. )) : Math.min(t.length, Math.max(
  103823. r.from + 1,
  103824. e + 25
  103825. /* Lookahead.Margin */
  103826. ));
  103827. if (n < 0 ? r.prevSibling() : r.nextSibling())
  103828. break;
  103829. if (!r.parent())
  103830. return n < 0 ? 0 : t.length;
  103831. }
  103832. }
  103833. class Ldt {
  103834. constructor(e, n) {
  103835. 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();
  103836. }
  103837. nextFragment() {
  103838. let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
  103839. if (e) {
  103840. for (this.safeFrom = e.openStart ? d9(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? d9(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; )
  103841. this.trees.pop(), this.start.pop(), this.index.pop();
  103842. this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom;
  103843. } else
  103844. this.nextStart = 1e9;
  103845. }
  103846. // `pos` must be >= any previously given `pos` for this cursor
  103847. nodeAt(e) {
  103848. if (e < this.nextStart)
  103849. return null;
  103850. for (; this.fragment && this.safeTo <= e; )
  103851. this.nextFragment();
  103852. if (!this.fragment)
  103853. return null;
  103854. for (; ; ) {
  103855. let n = this.trees.length - 1;
  103856. if (n < 0)
  103857. return this.nextFragment(), null;
  103858. let r = this.trees[n], i = this.index[n];
  103859. if (i == r.children.length) {
  103860. this.trees.pop(), this.start.pop(), this.index.pop();
  103861. continue;
  103862. }
  103863. let a = r.children[i], o = this.start[n] + r.positions[i];
  103864. if (o > e)
  103865. return this.nextStart = o, null;
  103866. if (a instanceof Wn) {
  103867. if (o == e) {
  103868. if (o < this.safeFrom)
  103869. return null;
  103870. let s = o + a.length;
  103871. if (s <= this.safeTo) {
  103872. let l = a.prop(Pt.lookAhead);
  103873. if (!l || s + l < this.fragment.to)
  103874. return a;
  103875. }
  103876. }
  103877. this.index[n]++, o + a.length >= Math.max(this.safeFrom, e) && (this.trees.push(a), this.start.push(o), this.index.push(0));
  103878. } else
  103879. this.index[n]++, this.nextStart = o + a.length;
  103880. }
  103881. }
  103882. }
  103883. class Ndt {
  103884. constructor(e, n) {
  103885. this.stream = n, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((r) => new h1());
  103886. }
  103887. getActions(e) {
  103888. let n = 0, r = null, { parser: i } = e.p, { tokenizers: a } = i, o = i.stateSlot(
  103889. e.state,
  103890. 3
  103891. /* ParseState.TokenizerMask */
  103892. ), s = e.curContext ? e.curContext.hash : 0, l = 0;
  103893. for (let u = 0; u < a.length; u++) {
  103894. if (!(1 << u & o))
  103895. continue;
  103896. let c = a[u], f = this.tokens[u];
  103897. 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)) {
  103898. let d = n;
  103899. 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))
  103900. break;
  103901. }
  103902. }
  103903. for (; this.actions.length > n; )
  103904. this.actions.pop();
  103905. return l && e.setLookAhead(l), !r && e.pos == this.stream.end && (r = new h1(), 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;
  103906. }
  103907. getMainToken(e) {
  103908. if (this.mainToken)
  103909. return this.mainToken;
  103910. let n = new h1(), { pos: r, p: i } = e;
  103911. return n.start = r, n.end = Math.min(r + 1, i.stream.end), n.value = r == i.stream.end ? i.parser.eofTerm : 0, n;
  103912. }
  103913. updateCachedToken(e, n, r) {
  103914. let i = this.stream.clipPos(r.pos);
  103915. if (n.token(this.stream.reset(i, e), r), e.value > -1) {
  103916. let { parser: a } = r.p;
  103917. for (let o = 0; o < a.specialized.length; o++)
  103918. if (a.specialized[o] == e.value) {
  103919. let s = a.specializers[o](this.stream.read(e.start, e.end), r);
  103920. if (s >= 0 && r.p.parser.dialect.allows(s >> 1)) {
  103921. s & 1 ? e.extended = s >> 1 : e.value = s >> 1;
  103922. break;
  103923. }
  103924. }
  103925. } else
  103926. e.value = 0, e.end = this.stream.clipPos(i + 1);
  103927. }
  103928. putAction(e, n, r, i) {
  103929. for (let a = 0; a < i; a += 3)
  103930. if (this.actions[a] == e)
  103931. return i;
  103932. return this.actions[i++] = e, this.actions[i++] = n, this.actions[i++] = r, i;
  103933. }
  103934. addActions(e, n, r, i) {
  103935. let { state: a } = e, { parser: o } = e.p, { data: s } = o;
  103936. for (let l = 0; l < 2; l++)
  103937. for (let u = o.stateSlot(
  103938. a,
  103939. l ? 2 : 1
  103940. /* ParseState.Actions */
  103941. ); ; u += 3) {
  103942. if (s[u] == 65535)
  103943. if (s[u + 1] == 1)
  103944. u = ws(s, u + 2);
  103945. else {
  103946. i == 0 && s[u + 1] == 2 && (i = this.putAction(ws(s, u + 2), n, r, i));
  103947. break;
  103948. }
  103949. s[u] == n && (i = this.putAction(ws(s, u + 1), n, r, i));
  103950. }
  103951. return i;
  103952. }
  103953. }
  103954. class Bdt {
  103955. constructor(e, n, r, i) {
  103956. 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 Rdt(n, i), this.tokens = new Ndt(e, this.stream), this.topTerm = e.top[1];
  103957. let { from: a } = i[0];
  103958. this.stacks = [CS.start(this, e.top[0], a)], this.fragments = r.length && this.stream.end - a > e.bufferLength * 4 ? new Ldt(r, e.nodeSet) : null;
  103959. }
  103960. get parsedPos() {
  103961. return this.minStackPos;
  103962. }
  103963. // Move the parser forward. This will process all parse stacks at
  103964. // `this.pos` and try to advance them to a further position. If no
  103965. // stack for such a position is found, it'll start error-recovery.
  103966. //
  103967. // When the parse is finished, this will return a syntax tree. When
  103968. // not, it returns `null`.
  103969. advance() {
  103970. let e = this.stacks, n = this.minStackPos, r = this.stacks = [], i, a;
  103971. if (this.bigReductionCount > 300 && e.length == 1) {
  103972. let [o] = e;
  103973. for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; )
  103974. ;
  103975. this.bigReductionCount = this.lastBigReductionSize = 0;
  103976. }
  103977. for (let o = 0; o < e.length; o++) {
  103978. let s = e[o];
  103979. for (; ; ) {
  103980. if (this.tokens.mainToken = null, s.pos > n)
  103981. r.push(s);
  103982. else {
  103983. if (this.advanceStack(s, r, e))
  103984. continue;
  103985. {
  103986. i || (i = [], a = []), i.push(s);
  103987. let l = this.tokens.getMainToken(s);
  103988. a.push(l.value, l.end);
  103989. }
  103990. }
  103991. break;
  103992. }
  103993. }
  103994. if (!r.length) {
  103995. let o = i && Fdt(i);
  103996. if (o)
  103997. return Ii && console.log("Finish with " + this.stackID(o)), this.stackToTree(o);
  103998. if (this.parser.strict)
  103999. throw Ii && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + n);
  104000. this.recovering || (this.recovering = 5);
  104001. }
  104002. if (this.recovering && i) {
  104003. let o = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, a, r);
  104004. if (o)
  104005. return Ii && console.log("Force-finish " + this.stackID(o)), this.stackToTree(o.forceAll());
  104006. }
  104007. if (this.recovering) {
  104008. let o = this.recovering == 1 ? 1 : this.recovering * 3;
  104009. if (r.length > o)
  104010. for (r.sort((s, l) => l.score - s.score); r.length > o; )
  104011. r.pop();
  104012. r.some((s) => s.reducePos > n) && this.recovering--;
  104013. } else if (r.length > 1) {
  104014. e: for (let o = 0; o < r.length - 1; o++) {
  104015. let s = r[o];
  104016. for (let l = o + 1; l < r.length; l++) {
  104017. let u = r[l];
  104018. if (s.sameState(u) || s.buffer.length > 500 && u.buffer.length > 500)
  104019. if ((s.score - u.score || s.buffer.length - u.buffer.length) > 0)
  104020. r.splice(l--, 1);
  104021. else {
  104022. r.splice(o--, 1);
  104023. continue e;
  104024. }
  104025. }
  104026. }
  104027. r.length > 12 && r.splice(
  104028. 12,
  104029. r.length - 12
  104030. /* Rec.MaxStackCount */
  104031. );
  104032. }
  104033. this.minStackPos = r[0].pos;
  104034. for (let o = 1; o < r.length; o++)
  104035. r[o].pos < this.minStackPos && (this.minStackPos = r[o].pos);
  104036. return null;
  104037. }
  104038. stopAt(e) {
  104039. if (this.stoppedAt != null && this.stoppedAt < e)
  104040. throw new RangeError("Can't move stoppedAt forward");
  104041. this.stoppedAt = e;
  104042. }
  104043. // Returns an updated version of the given stack, or null if the
  104044. // stack can't advance normally. When `split` and `stacks` are
  104045. // given, stacks split off by ambiguous operations will be pushed to
  104046. // `split`, or added to `stacks` if they move `pos` forward.
  104047. advanceStack(e, n, r) {
  104048. let i = e.pos, { parser: a } = this, o = Ii ? this.stackID(e) + " -> " : "";
  104049. if (this.stoppedAt != null && i > this.stoppedAt)
  104050. return e.forceReduce() ? e : null;
  104051. if (this.fragments) {
  104052. let u = e.curContext && e.curContext.tracker.strict, c = u ? e.curContext.hash : 0;
  104053. for (let f = this.fragments.nodeAt(i); f; ) {
  104054. let d = this.parser.nodeSet.types[f.type.id] == f.type ? a.getGoto(e.state, f.type.id) : -1;
  104055. if (d > -1 && f.length && (!u || (f.prop(Pt.contextHash) || 0) == c))
  104056. return e.useNode(f, d), Ii && console.log(o + this.stackID(e) + ` (via reuse of ${a.getName(f.type.id)})`), !0;
  104057. if (!(f instanceof Wn) || f.children.length == 0 || f.positions[0] > 0)
  104058. break;
  104059. let h = f.children[0];
  104060. if (h instanceof Wn && f.positions[0] == 0)
  104061. f = h;
  104062. else
  104063. break;
  104064. }
  104065. }
  104066. let s = a.stateSlot(
  104067. e.state,
  104068. 4
  104069. /* ParseState.DefaultReduce */
  104070. );
  104071. if (s > 0)
  104072. return e.reduce(s), Ii && console.log(o + this.stackID(e) + ` (via always-reduce ${a.getName(
  104073. s & 65535
  104074. /* Action.ValueMask */
  104075. )})`), !0;
  104076. if (e.stack.length >= 8400)
  104077. for (; e.stack.length > 6e3 && e.forceReduce(); )
  104078. ;
  104079. let l = this.tokens.getActions(e);
  104080. for (let u = 0; u < l.length; ) {
  104081. let c = l[u++], f = l[u++], d = l[u++], h = u == l.length || !r, p = h ? e : e.split(), v = this.tokens.mainToken;
  104082. if (p.apply(c, f, v ? v.start : p.pos, d), Ii && console.log(o + this.stackID(p) + ` (via ${c & 65536 ? `reduce of ${a.getName(
  104083. c & 65535
  104084. /* Action.ValueMask */
  104085. )}` : "shift"} for ${a.getName(f)} @ ${i}${p == e ? "" : ", split"})`), h)
  104086. return !0;
  104087. p.pos > i ? n.push(p) : r.push(p);
  104088. }
  104089. return !1;
  104090. }
  104091. // Advance a given stack forward as far as it will go. Returns the
  104092. // (possibly updated) stack if it got stuck, or null if it moved
  104093. // forward and was given to `pushStackDedup`.
  104094. advanceFully(e, n) {
  104095. let r = e.pos;
  104096. for (; ; ) {
  104097. if (!this.advanceStack(e, null, null))
  104098. return !1;
  104099. if (e.pos > r)
  104100. return h9(e, n), !0;
  104101. }
  104102. }
  104103. runRecovery(e, n, r) {
  104104. let i = null, a = !1;
  104105. for (let o = 0; o < e.length; o++) {
  104106. let s = e[o], l = n[o << 1], u = n[(o << 1) + 1], c = Ii ? this.stackID(s) + " -> " : "";
  104107. if (s.deadEnd && (a || (a = !0, s.restart(), Ii && console.log(c + this.stackID(s) + " (restarted)"), this.advanceFully(s, r))))
  104108. continue;
  104109. let f = s.split(), d = c;
  104110. for (let h = 0; f.forceReduce() && h < 10 && (Ii && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, r)); h++)
  104111. Ii && (d = this.stackID(f) + " -> ");
  104112. for (let h of s.recoverByInsert(l))
  104113. Ii && console.log(c + this.stackID(h) + " (via recover-insert)"), this.advanceFully(h, r);
  104114. this.stream.end > s.pos ? (u == s.pos && (u++, l = 0), s.recoverByDelete(l, u), Ii && console.log(c + this.stackID(s) + ` (via recover-delete ${this.parser.getName(l)})`), h9(s, r)) : (!i || i.score < s.score) && (i = s);
  104115. }
  104116. return i;
  104117. }
  104118. // Convert the stack's buffer to a syntax tree.
  104119. stackToTree(e) {
  104120. return e.close(), Wn.build({
  104121. buffer: TS.create(e),
  104122. nodeSet: this.parser.nodeSet,
  104123. topID: this.topTerm,
  104124. maxBufferLength: this.parser.bufferLength,
  104125. reused: this.reused,
  104126. start: this.ranges[0].from,
  104127. length: e.pos - this.ranges[0].from,
  104128. minRepeatType: this.parser.minRepeatTerm
  104129. });
  104130. }
  104131. stackID(e) {
  104132. let n = (z$ || (z$ = /* @__PURE__ */ new WeakMap())).get(e);
  104133. return n || z$.set(e, n = String.fromCodePoint(this.nextStackID++)), n + e;
  104134. }
  104135. }
  104136. function h9(t, e) {
  104137. for (let n = 0; n < e.length; n++) {
  104138. let r = e[n];
  104139. if (r.pos == t.pos && r.sameState(t)) {
  104140. e[n].score < t.score && (e[n] = t);
  104141. return;
  104142. }
  104143. }
  104144. e.push(t);
  104145. }
  104146. class zdt {
  104147. constructor(e, n, r) {
  104148. this.source = e, this.flags = n, this.disabled = r;
  104149. }
  104150. allows(e) {
  104151. return !this.disabled || this.disabled[e] == 0;
  104152. }
  104153. }
  104154. const V$ = (t) => t;
  104155. class Vdt {
  104156. /**
  104157. Define a context tracker.
  104158. */
  104159. constructor(e) {
  104160. this.start = e.start, this.shift = e.shift || V$, this.reduce = e.reduce || V$, this.reuse = e.reuse || V$, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
  104161. }
  104162. }
  104163. class f0 extends Doe {
  104164. /**
  104165. @internal
  104166. */
  104167. constructor(e) {
  104168. if (super(), this.wrappers = [], e.version != 14)
  104169. throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);
  104170. let n = e.nodeNames.split(" ");
  104171. this.minRepeatTerm = n.length;
  104172. for (let s = 0; s < e.repeatNodeCount; s++)
  104173. n.push("");
  104174. let r = Object.keys(e.topRules).map((s) => e.topRules[s][1]), i = [];
  104175. for (let s = 0; s < n.length; s++)
  104176. i.push([]);
  104177. function a(s, l, u) {
  104178. i[s].push([l, l.deserialize(String(u))]);
  104179. }
  104180. if (e.nodeProps)
  104181. for (let s of e.nodeProps) {
  104182. let l = s[0];
  104183. typeof l == "string" && (l = Pt[l]);
  104184. for (let u = 1; u < s.length; ) {
  104185. let c = s[u++];
  104186. if (c >= 0)
  104187. a(c, l, s[u++]);
  104188. else {
  104189. let f = s[u + -c];
  104190. for (let d = -c; d > 0; d--)
  104191. a(s[u++], l, f);
  104192. u++;
  104193. }
  104194. }
  104195. }
  104196. this.nodeSet = new f4(n.map((s, l) => Pi.define({
  104197. name: l >= this.minRepeatTerm ? void 0 : s,
  104198. id: l,
  104199. props: i[l],
  104200. top: r.indexOf(l) > -1,
  104201. error: l == 0,
  104202. skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1
  104203. }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = Aoe;
  104204. let o = ug(e.tokenData);
  104205. this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
  104206. for (let s = 0; s < this.specializerSpecs.length; s++)
  104207. this.specialized[s] = this.specializerSpecs[s].term;
  104208. this.specializers = this.specializerSpecs.map(p9), this.states = ug(e.states, Uint32Array), this.data = ug(e.stateData), this.goto = ug(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((s) => typeof s == "number" ? new vh(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]];
  104209. }
  104210. createParse(e, n, r) {
  104211. let i = new Bdt(this, e, n, r);
  104212. for (let a of this.wrappers)
  104213. i = a(i, e, n, r);
  104214. return i;
  104215. }
  104216. /**
  104217. Get a goto table entry @internal
  104218. */
  104219. getGoto(e, n, r = !1) {
  104220. let i = this.goto;
  104221. if (n >= i[0])
  104222. return -1;
  104223. for (let a = i[n + 1]; ; ) {
  104224. let o = i[a++], s = o & 1, l = i[a++];
  104225. if (s && r)
  104226. return l;
  104227. for (let u = a + (o >> 1); a < u; a++)
  104228. if (i[a] == e)
  104229. return l;
  104230. if (s)
  104231. return -1;
  104232. }
  104233. }
  104234. /**
  104235. Check if this state has an action for a given terminal @internal
  104236. */
  104237. hasAction(e, n) {
  104238. let r = this.data;
  104239. for (let i = 0; i < 2; i++)
  104240. for (let a = this.stateSlot(
  104241. e,
  104242. i ? 2 : 1
  104243. /* ParseState.Actions */
  104244. ), o; ; a += 3) {
  104245. if ((o = r[a]) == 65535)
  104246. if (r[a + 1] == 1)
  104247. o = r[a = ws(r, a + 2)];
  104248. else {
  104249. if (r[a + 1] == 2)
  104250. return ws(r, a + 2);
  104251. break;
  104252. }
  104253. if (o == n || o == 0)
  104254. return ws(r, a + 1);
  104255. }
  104256. return 0;
  104257. }
  104258. /**
  104259. @internal
  104260. */
  104261. stateSlot(e, n) {
  104262. return this.states[e * 6 + n];
  104263. }
  104264. /**
  104265. @internal
  104266. */
  104267. stateFlag(e, n) {
  104268. return (this.stateSlot(
  104269. e,
  104270. 0
  104271. /* ParseState.Flags */
  104272. ) & n) > 0;
  104273. }
  104274. /**
  104275. @internal
  104276. */
  104277. validAction(e, n) {
  104278. return !!this.allActions(e, (r) => r == n ? !0 : null);
  104279. }
  104280. /**
  104281. @internal
  104282. */
  104283. allActions(e, n) {
  104284. let r = this.stateSlot(
  104285. e,
  104286. 4
  104287. /* ParseState.DefaultReduce */
  104288. ), i = r ? n(r) : void 0;
  104289. for (let a = this.stateSlot(
  104290. e,
  104291. 1
  104292. /* ParseState.Actions */
  104293. ); i == null; a += 3) {
  104294. if (this.data[a] == 65535)
  104295. if (this.data[a + 1] == 1)
  104296. a = ws(this.data, a + 2);
  104297. else
  104298. break;
  104299. i = n(ws(this.data, a + 1));
  104300. }
  104301. return i;
  104302. }
  104303. /**
  104304. Get the states that can follow this one through shift actions or
  104305. goto jumps. @internal
  104306. */
  104307. nextStates(e) {
  104308. let n = [];
  104309. for (let r = this.stateSlot(
  104310. e,
  104311. 1
  104312. /* ParseState.Actions */
  104313. ); ; r += 3) {
  104314. if (this.data[r] == 65535)
  104315. if (this.data[r + 1] == 1)
  104316. r = ws(this.data, r + 2);
  104317. else
  104318. break;
  104319. if (!(this.data[r + 2] & 1)) {
  104320. let i = this.data[r + 1];
  104321. n.some((a, o) => o & 1 && a == i) || n.push(this.data[r], i);
  104322. }
  104323. }
  104324. return n;
  104325. }
  104326. /**
  104327. Configure the parser. Returns a new parser instance that has the
  104328. given settings modified. Settings not provided in `config` are
  104329. kept from the original parser.
  104330. */
  104331. configure(e) {
  104332. let n = Object.assign(Object.create(f0.prototype), this);
  104333. if (e.props && (n.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
  104334. let r = this.topRules[e.top];
  104335. if (!r)
  104336. throw new RangeError(`Invalid top rule name ${e.top}`);
  104337. n.top = r;
  104338. }
  104339. return e.tokenizers && (n.tokenizers = this.tokenizers.map((r) => {
  104340. let i = e.tokenizers.find((a) => a.from == r);
  104341. return i ? i.to : r;
  104342. })), e.specializers && (n.specializers = this.specializers.slice(), n.specializerSpecs = this.specializerSpecs.map((r, i) => {
  104343. let a = e.specializers.find((s) => s.from == r.external);
  104344. if (!a)
  104345. return r;
  104346. let o = Object.assign(Object.assign({}, r), { external: a.to });
  104347. return n.specializers[i] = p9(o), o;
  104348. })), 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;
  104349. }
  104350. /**
  104351. Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
  104352. are registered for this parser.
  104353. */
  104354. hasWrappers() {
  104355. return this.wrappers.length > 0;
  104356. }
  104357. /**
  104358. Returns the name associated with a given term. This will only
  104359. work for all terms when the parser was generated with the
  104360. `--names` option. By default, only the names of tagged terms are
  104361. stored.
  104362. */
  104363. getName(e) {
  104364. return this.termNames ? this.termNames[e] : String(e <= this.maxNode && this.nodeSet.types[e].name || e);
  104365. }
  104366. /**
  104367. The eof term id is always allocated directly after the node
  104368. types. @internal
  104369. */
  104370. get eofTerm() {
  104371. return this.maxNode + 1;
  104372. }
  104373. /**
  104374. The type of top node produced by the parser.
  104375. */
  104376. get topNode() {
  104377. return this.nodeSet.types[this.top[1]];
  104378. }
  104379. /**
  104380. @internal
  104381. */
  104382. dynamicPrecedence(e) {
  104383. let n = this.dynamicPrecedences;
  104384. return n == null ? 0 : n[e] || 0;
  104385. }
  104386. /**
  104387. @internal
  104388. */
  104389. parseDialect(e) {
  104390. let n = Object.keys(this.dialects), r = n.map(() => !1);
  104391. if (e)
  104392. for (let a of e.split(" ")) {
  104393. let o = n.indexOf(a);
  104394. o >= 0 && (r[o] = !0);
  104395. }
  104396. let i = null;
  104397. for (let a = 0; a < n.length; a++)
  104398. if (!r[a])
  104399. for (let o = this.dialects[n[a]], s; (s = this.data[o++]) != 65535; )
  104400. (i || (i = new Uint8Array(this.maxTerm + 1)))[s] = 1;
  104401. return new zdt(e, r, i);
  104402. }
  104403. /**
  104404. Used by the output of the parser generator. Not available to
  104405. user code. @hide
  104406. */
  104407. static deserialize(e) {
  104408. return new f0(e);
  104409. }
  104410. }
  104411. function ws(t, e) {
  104412. return t[e] | t[e + 1] << 16;
  104413. }
  104414. function Fdt(t) {
  104415. let e = null;
  104416. for (let n of t) {
  104417. let r = n.p.stoppedAt;
  104418. (n.pos == n.p.stream.end || r != null && n.pos > r) && n.p.parser.stateFlag(
  104419. n.state,
  104420. 2
  104421. /* StateFlag.Accepting */
  104422. ) && (!e || e.score < n.score) && (e = n);
  104423. }
  104424. return e;
  104425. }
  104426. function p9(t) {
  104427. if (t.external) {
  104428. let e = t.extend ? 1 : 0;
  104429. return (n, r) => t.external(n, r) << 1 | e;
  104430. }
  104431. return t.get;
  104432. }
  104433. const Wdt = 312, v9 = 1, Qdt = 2, Hdt = 3, Gdt = 4, jdt = 313, Zdt = 315, Udt = 316, Xdt = 5, Ydt = 6, qdt = 0, KM = [
  104434. 9,
  104435. 10,
  104436. 11,
  104437. 12,
  104438. 13,
  104439. 32,
  104440. 133,
  104441. 160,
  104442. 5760,
  104443. 8192,
  104444. 8193,
  104445. 8194,
  104446. 8195,
  104447. 8196,
  104448. 8197,
  104449. 8198,
  104450. 8199,
  104451. 8200,
  104452. 8201,
  104453. 8202,
  104454. 8232,
  104455. 8233,
  104456. 8239,
  104457. 8287,
  104458. 12288
  104459. ], sle = 125, Kdt = 59, JM = 47, Jdt = 42, eht = 43, tht = 45, nht = 60, rht = 44, iht = 63, aht = 46, oht = new Vdt({
  104460. start: !1,
  104461. shift(t, e) {
  104462. return e == Xdt || e == Ydt || e == Zdt ? t : e == Udt;
  104463. },
  104464. strict: !1
  104465. }), sht = new Qw((t, e) => {
  104466. let { next: n } = t;
  104467. (n == sle || n == -1 || e.context) && t.acceptToken(jdt);
  104468. }, { contextual: !0, fallback: !0 }), lht = new Qw((t, e) => {
  104469. let { next: n } = t, r;
  104470. KM.indexOf(n) > -1 || n == JM && ((r = t.peek(1)) == JM || r == Jdt) || n != sle && n != Kdt && n != -1 && !e.context && t.acceptToken(Wdt);
  104471. }, { contextual: !0 }), uht = new Qw((t, e) => {
  104472. let { next: n } = t;
  104473. if (n == eht || n == tht) {
  104474. if (t.advance(), n == t.next) {
  104475. t.advance();
  104476. let r = !e.context && e.canShift(v9);
  104477. t.acceptToken(r ? v9 : Qdt);
  104478. }
  104479. } else n == iht && t.peek(1) == aht && (t.advance(), t.advance(), (t.next < 48 || t.next > 57) && t.acceptToken(Hdt));
  104480. }, { contextual: !0 });
  104481. function F$(t, e) {
  104482. return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t == 95 || t >= 192 || !e && t >= 48 && t <= 57;
  104483. }
  104484. const cht = new Qw((t, e) => {
  104485. if (t.next != nht || !e.dialectEnabled(qdt) || (t.advance(), t.next == JM)) return;
  104486. let n = 0;
  104487. for (; KM.indexOf(t.next) > -1; )
  104488. t.advance(), n++;
  104489. if (F$(t.next, !0)) {
  104490. for (t.advance(), n++; F$(t.next, !1); )
  104491. t.advance(), n++;
  104492. for (; KM.indexOf(t.next) > -1; )
  104493. t.advance(), n++;
  104494. if (t.next == rht) return;
  104495. for (let r = 0; ; r++) {
  104496. if (r == 7) {
  104497. if (!F$(t.next, !0)) return;
  104498. break;
  104499. }
  104500. if (t.next != "extends".charCodeAt(r)) break;
  104501. t.advance(), n++;
  104502. }
  104503. }
  104504. t.acceptToken(Gdt, -n);
  104505. }), fht = v4({
  104506. "get set async static": J.modifier,
  104507. "for while do if else switch try catch finally return throw break continue default case": J.controlKeyword,
  104508. "in of await yield void typeof delete instanceof": J.operatorKeyword,
  104509. "let var const using function class extends": J.definitionKeyword,
  104510. "import export from": J.moduleKeyword,
  104511. "with debugger as new": J.keyword,
  104512. TemplateString: J.special(J.string),
  104513. super: J.atom,
  104514. BooleanLiteral: J.bool,
  104515. this: J.self,
  104516. null: J.null,
  104517. Star: J.modifier,
  104518. VariableName: J.variableName,
  104519. "CallExpression/VariableName TaggedTemplateExpression/VariableName": J.function(J.variableName),
  104520. VariableDefinition: J.definition(J.variableName),
  104521. Label: J.labelName,
  104522. PropertyName: J.propertyName,
  104523. PrivatePropertyName: J.special(J.propertyName),
  104524. "CallExpression/MemberExpression/PropertyName": J.function(J.propertyName),
  104525. "FunctionDeclaration/VariableDefinition": J.function(J.definition(J.variableName)),
  104526. "ClassDeclaration/VariableDefinition": J.definition(J.className),
  104527. PropertyDefinition: J.definition(J.propertyName),
  104528. PrivatePropertyDefinition: J.definition(J.special(J.propertyName)),
  104529. UpdateOp: J.updateOperator,
  104530. "LineComment Hashbang": J.lineComment,
  104531. BlockComment: J.blockComment,
  104532. Number: J.number,
  104533. String: J.string,
  104534. Escape: J.escape,
  104535. ArithOp: J.arithmeticOperator,
  104536. LogicOp: J.logicOperator,
  104537. BitOp: J.bitwiseOperator,
  104538. CompareOp: J.compareOperator,
  104539. RegExp: J.regexp,
  104540. Equals: J.definitionOperator,
  104541. Arrow: J.function(J.punctuation),
  104542. ": Spread": J.punctuation,
  104543. "( )": J.paren,
  104544. "[ ]": J.squareBracket,
  104545. "{ }": J.brace,
  104546. "InterpolationStart InterpolationEnd": J.special(J.brace),
  104547. ".": J.derefOperator,
  104548. ", ;": J.separator,
  104549. "@": J.meta,
  104550. TypeName: J.typeName,
  104551. TypeDefinition: J.definition(J.typeName),
  104552. "type enum interface implements namespace module declare": J.definitionKeyword,
  104553. "abstract global Privacy readonly override": J.modifier,
  104554. "is keyof unique infer": J.operatorKeyword,
  104555. JSXAttributeValue: J.attributeValue,
  104556. JSXText: J.content,
  104557. "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": J.angleBracket,
  104558. "JSXIdentifier JSXNameSpacedName": J.tagName,
  104559. "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": J.attributeName,
  104560. "JSXBuiltin/JSXIdentifier": J.standard(J.tagName)
  104561. }), dht = { __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 }, hht = { __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 }, pht = { __proto__: null, "<": 187 }, vht = f0.deserialize({
  104562. version: 14,
  104563. 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",
  104564. 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!ka![!ka%f!ka!d!ka~PKPO!h(_O~O!d#vO#](`O(m'mO!Y(oXa(oX'u(oX~O!h(oX~PMlO!P%fO![%gO!y]O#f(eO#g(dO(O%eO~O!Y(fO!h(nX~O!h(hO~O!P%fO![%gO#g(dO(O%eO~OP(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~O!d#vO!h(bX~P! YOR(jO}(iO!i#xO#P$dO!y!xa!P!xa~O!u!xa%e!xa![!xa#f!xa#g!xa(O!xa~P!#ZO!u(nO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~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(rO(QTO(TUO([$uO(t$}O(u%PO~O#h(tO~O!X(vO!h(fP~P%[O(`(xO(j[O~O!P(zO!i#xO(`(xO(j[O~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(O)XO(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$^(`~",
  104565. 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",
  104566. 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",
  104567. maxTerm: 376,
  104568. context: oht,
  104569. nodeProps: [
  104570. ["isolate", -8, 5, 6, 14, 34, 36, 48, 50, 52, ""],
  104571. ["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"],
  104572. ["openedBy", 23, "<", 35, "InterpolationStart", 53, "[", 57, "{", 70, "(", 159, "JSXStartCloseTag"],
  104573. ["closedBy", 24, ">", 37, "InterpolationEnd", 47, "]", 58, "}", 71, ")", 164, "JSXEndTag"]
  104574. ],
  104575. propSources: [fht],
  104576. skippedNodes: [0, 5, 6, 274],
  104577. repeatNodeCount: 37,
  104578. 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",
  104579. tokenizers: [lht, uht, cht, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, sht, new qM("$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 qM("j~RQYZXz{^~^O'{~~aP!P!Qd~iO'|~~", 25, 318)],
  104580. topRules: { Script: [0, 7], SingleExpression: [1, 272], SingleClassItem: [2, 273] },
  104581. dialects: { jsx: 0, ts: 14725 },
  104582. dynamicPrecedences: { 77: 1, 79: 1, 91: 1, 167: 1, 196: 1 },
  104583. specialized: [{ term: 322, get: (t) => dht[t] || -1 }, { term: 338, get: (t) => hht[t] || -1 }, { term: 92, get: (t) => pht[t] || -1 }],
  104584. tokenPrec: 14749
  104585. }), lle = [
  104586. /* @__PURE__ */ ci("function ${name}(${params}) {\n ${}\n}", {
  104587. label: "function",
  104588. detail: "definition",
  104589. type: "keyword"
  104590. }),
  104591. /* @__PURE__ */ ci("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}", {
  104592. label: "for",
  104593. detail: "loop",
  104594. type: "keyword"
  104595. }),
  104596. /* @__PURE__ */ ci("for (let ${name} of ${collection}) {\n ${}\n}", {
  104597. label: "for",
  104598. detail: "of loop",
  104599. type: "keyword"
  104600. }),
  104601. /* @__PURE__ */ ci("do {\n ${}\n} while (${})", {
  104602. label: "do",
  104603. detail: "loop",
  104604. type: "keyword"
  104605. }),
  104606. /* @__PURE__ */ ci("while (${}) {\n ${}\n}", {
  104607. label: "while",
  104608. detail: "loop",
  104609. type: "keyword"
  104610. }),
  104611. /* @__PURE__ */ ci(`try {
  104612. \${}
  104613. } catch (\${error}) {
  104614. \${}
  104615. }`, {
  104616. label: "try",
  104617. detail: "/ catch block",
  104618. type: "keyword"
  104619. }),
  104620. /* @__PURE__ */ ci("if (${}) {\n ${}\n}", {
  104621. label: "if",
  104622. detail: "block",
  104623. type: "keyword"
  104624. }),
  104625. /* @__PURE__ */ ci(`if (\${}) {
  104626. \${}
  104627. } else {
  104628. \${}
  104629. }`, {
  104630. label: "if",
  104631. detail: "/ else block",
  104632. type: "keyword"
  104633. }),
  104634. /* @__PURE__ */ ci(`class \${name} {
  104635. constructor(\${params}) {
  104636. \${}
  104637. }
  104638. }`, {
  104639. label: "class",
  104640. detail: "definition",
  104641. type: "keyword"
  104642. }),
  104643. /* @__PURE__ */ ci('import {${names}} from "${module}"\n${}', {
  104644. label: "import",
  104645. detail: "named",
  104646. type: "keyword"
  104647. }),
  104648. /* @__PURE__ */ ci('import ${name} from "${module}"\n${}', {
  104649. label: "import",
  104650. detail: "default",
  104651. type: "keyword"
  104652. })
  104653. ], ght = /* @__PURE__ */ lle.concat([
  104654. /* @__PURE__ */ ci("interface ${name} {\n ${}\n}", {
  104655. label: "interface",
  104656. detail: "definition",
  104657. type: "keyword"
  104658. }),
  104659. /* @__PURE__ */ ci("type ${name} = ${type}", {
  104660. label: "type",
  104661. detail: "definition",
  104662. type: "keyword"
  104663. }),
  104664. /* @__PURE__ */ ci("enum ${name} {\n ${}\n}", {
  104665. label: "enum",
  104666. detail: "definition",
  104667. type: "keyword"
  104668. })
  104669. ]), g9 = /* @__PURE__ */ new mlt(), ule = /* @__PURE__ */ new Set([
  104670. "Script",
  104671. "Block",
  104672. "FunctionExpression",
  104673. "FunctionDeclaration",
  104674. "ArrowFunction",
  104675. "MethodDeclaration",
  104676. "ForStatement"
  104677. ]);
  104678. function Bv(t) {
  104679. return (e, n) => {
  104680. let r = e.node.getChild("VariableDefinition");
  104681. return r && n(r, t), !0;
  104682. };
  104683. }
  104684. const mht = ["FunctionDeclaration"], yht = {
  104685. FunctionDeclaration: /* @__PURE__ */ Bv("function"),
  104686. ClassDeclaration: /* @__PURE__ */ Bv("class"),
  104687. ClassExpression: () => !0,
  104688. EnumDeclaration: /* @__PURE__ */ Bv("constant"),
  104689. TypeAliasDeclaration: /* @__PURE__ */ Bv("type"),
  104690. NamespaceDeclaration: /* @__PURE__ */ Bv("namespace"),
  104691. VariableDefinition(t, e) {
  104692. t.matchContext(mht) || e(t, "variable");
  104693. },
  104694. TypeDefinition(t, e) {
  104695. e(t, "type");
  104696. },
  104697. __proto__: null
  104698. };
  104699. function cle(t, e) {
  104700. let n = g9.get(e);
  104701. if (n)
  104702. return n;
  104703. let r = [], i = !0;
  104704. function a(o, s) {
  104705. let l = t.sliceString(o.from, o.to);
  104706. r.push({ label: l, type: s });
  104707. }
  104708. return e.cursor(Zn.IncludeAnonymous).iterate((o) => {
  104709. if (i)
  104710. i = !1;
  104711. else if (o.name) {
  104712. let s = yht[o.name];
  104713. if (s && s(o, a) || ule.has(o.name))
  104714. return !1;
  104715. } else if (o.to - o.from > 8192) {
  104716. for (let s of cle(t, o.node))
  104717. r.push(s);
  104718. return !1;
  104719. }
  104720. }), g9.set(e, r), r;
  104721. }
  104722. const m9 = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, fle = [
  104723. "TemplateString",
  104724. "String",
  104725. "RegExp",
  104726. "LineComment",
  104727. "BlockComment",
  104728. "VariableDefinition",
  104729. "TypeDefinition",
  104730. "Label",
  104731. "PropertyDefinition",
  104732. "PropertyName",
  104733. "PrivatePropertyDefinition",
  104734. "PrivatePropertyName",
  104735. ".",
  104736. "?."
  104737. ];
  104738. function bht(t) {
  104739. let e = nr(t.state).resolveInner(t.pos, -1);
  104740. if (fle.indexOf(e.name) > -1)
  104741. return null;
  104742. let n = e.name == "VariableName" || e.to - e.from < 20 && m9.test(t.state.sliceDoc(e.from, e.to));
  104743. if (!n && !t.explicit)
  104744. return null;
  104745. let r = [];
  104746. for (let i = e; i; i = i.parent)
  104747. ule.has(i.name) && (r = r.concat(cle(t.state.doc, i)));
  104748. return {
  104749. options: r,
  104750. from: n ? e.from : t.pos,
  104751. validFor: m9
  104752. };
  104753. }
  104754. const sf = /* @__PURE__ */ r0.define({
  104755. name: "javascript",
  104756. parser: /* @__PURE__ */ vht.configure({
  104757. props: [
  104758. /* @__PURE__ */ y4.add({
  104759. IfStatement: /* @__PURE__ */ Yg({ except: /^\s*({|else\b)/ }),
  104760. TryStatement: /* @__PURE__ */ Yg({ except: /^\s*({|catch\b|finally\b)/ }),
  104761. LabeledStatement: Nlt,
  104762. SwitchBody: (t) => {
  104763. let e = t.textAfter, n = /^\s*\}/.test(e), r = /^\s*(case|default)\b/.test(e);
  104764. return t.baseIndent + (n ? 0 : r ? 1 : 2) * t.unit;
  104765. },
  104766. Block: /* @__PURE__ */ Llt({ closing: "}" }),
  104767. ArrowFunction: (t) => t.baseIndent + t.unit,
  104768. "TemplateString BlockComment": () => null,
  104769. "Statement Property": /* @__PURE__ */ Yg({ except: /^{/ }),
  104770. JSXElement(t) {
  104771. let e = /^\s*<\//.test(t.textAfter);
  104772. return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
  104773. },
  104774. JSXEscape(t) {
  104775. let e = /\s*\}/.test(t.textAfter);
  104776. return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
  104777. },
  104778. "JSXOpenTag JSXSelfClosingTag"(t) {
  104779. return t.column(t.node.from) + t.unit;
  104780. }
  104781. }),
  104782. /* @__PURE__ */ _4.add({
  104783. "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": Foe,
  104784. BlockComment(t) {
  104785. return { from: t.from + 2, to: t.to - 2 };
  104786. }
  104787. })
  104788. ]
  104789. }),
  104790. languageData: {
  104791. closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
  104792. commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
  104793. indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
  104794. wordChars: "$"
  104795. }
  104796. }), dle = {
  104797. test: (t) => /^JSX/.test(t.name),
  104798. facet: /* @__PURE__ */ Loe({ commentTokens: { block: { open: "{/*", close: "*/}" } } })
  104799. }, _ht = /* @__PURE__ */ sf.configure({ dialect: "ts" }, "typescript"), Oht = /* @__PURE__ */ sf.configure({
  104800. dialect: "jsx",
  104801. props: [/* @__PURE__ */ g4.add((t) => t.isTop ? [dle] : void 0)]
  104802. }), Sht = /* @__PURE__ */ sf.configure({
  104803. dialect: "jsx ts",
  104804. props: [/* @__PURE__ */ g4.add((t) => t.isTop ? [dle] : void 0)]
  104805. }, "typescript");
  104806. let hle = (t) => ({ label: t, type: "keyword" });
  104807. const ple = /* @__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(hle), xht = /* @__PURE__ */ ple.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(hle));
  104808. function wht(t = {}) {
  104809. let e = t.jsx ? t.typescript ? Sht : Oht : t.typescript ? _ht : sf, n = t.typescript ? ght.concat(xht) : lle.concat(ple);
  104810. return new Boe(e, [
  104811. sf.data.of({
  104812. autocomplete: rft(fle, Qse(n))
  104813. }),
  104814. sf.data.of({
  104815. autocomplete: bht
  104816. }),
  104817. t.jsx ? Pht : []
  104818. ]);
  104819. }
  104820. function Cht(t) {
  104821. for (; ; ) {
  104822. if (t.name == "JSXOpenTag" || t.name == "JSXSelfClosingTag" || t.name == "JSXFragmentTag")
  104823. return t;
  104824. if (t.name == "JSXEscape" || !t.parent)
  104825. return null;
  104826. t = t.parent;
  104827. }
  104828. }
  104829. function y9(t, e, n = t.length) {
  104830. for (let r = e == null ? void 0 : e.firstChild; r; r = r.nextSibling)
  104831. if (r.name == "JSXIdentifier" || r.name == "JSXBuiltin" || r.name == "JSXNamespacedName" || r.name == "JSXMemberExpression")
  104832. return t.sliceString(r.from, Math.min(r.to, n));
  104833. return "";
  104834. }
  104835. const Tht = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), Pht = /* @__PURE__ */ De.inputHandler.of((t, e, n, r, i) => {
  104836. if ((Tht ? t.composing : t.compositionStarted) || t.state.readOnly || e != n || r != ">" && r != "/" || !sf.isActiveAt(t.state, e, -1))
  104837. return !1;
  104838. let a = i(), { state: o } = a, s = o.changeByRange((l) => {
  104839. var u;
  104840. let { head: c } = l, f = nr(o).resolveInner(c - 1, -1), d;
  104841. if (f.name == "JSXStartTag" && (f = f.parent), !(o.doc.sliceString(c - 1, c) != r || f.name == "JSXAttributeValue" && f.to > c)) {
  104842. if (r == ">" && f.name == "JSXFragmentTag")
  104843. return { range: l, changes: { from: c, insert: "</>" } };
  104844. if (r == "/" && f.name == "JSXStartCloseTag") {
  104845. let h = f.parent, p = h.parent;
  104846. if (p && h.from == c - 2 && ((d = y9(o.doc, p.firstChild, c)) || ((u = p.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) {
  104847. let v = `${d}>`;
  104848. return { range: me.cursor(c + v.length, -1), changes: { from: c, insert: v } };
  104849. }
  104850. } else if (r == ">") {
  104851. let h = Cht(f);
  104852. if (h && h.name == "JSXOpenTag" && !/^\/?>|^<\//.test(o.doc.sliceString(c, c + 2)) && (d = y9(o.doc, h, c)))
  104853. return { range: l, changes: { from: c, insert: `</${d}>` } };
  104854. }
  104855. }
  104856. return { range: l };
  104857. });
  104858. return s.changes.empty ? !1 : (t.dispatch([
  104859. a,
  104860. o.update(s, { userEvent: "input.complete", scrollIntoView: !0 })
  104861. ]), !0);
  104862. }), $ht = v4({
  104863. String: J.string,
  104864. Number: J.number,
  104865. "True False": J.bool,
  104866. PropertyName: J.propertyName,
  104867. Null: J.null,
  104868. ",": J.separator,
  104869. "[ ]": J.squareBracket,
  104870. "{ }": J.brace
  104871. }), Aht = f0.deserialize({
  104872. version: 14,
  104873. 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",
  104874. stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",
  104875. goto: "!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
  104876. nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",
  104877. maxTerm: 25,
  104878. nodeProps: [
  104879. ["isolate", -2, 6, 11, ""],
  104880. ["openedBy", 7, "{", 12, "["],
  104881. ["closedBy", 8, "}", 13, "]"]
  104882. ],
  104883. propSources: [$ht],
  104884. skippedNodes: [0],
  104885. repeatNodeCount: 2,
  104886. 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~",
  104887. tokenizers: [0],
  104888. topRules: { JsonText: [0, 1] },
  104889. tokenPrec: 0
  104890. }), Eht = /* @__PURE__ */ r0.define({
  104891. name: "json",
  104892. parser: /* @__PURE__ */ Aht.configure({
  104893. props: [
  104894. /* @__PURE__ */ y4.add({
  104895. Object: /* @__PURE__ */ Yg({ except: /^\s*\}/ }),
  104896. Array: /* @__PURE__ */ Yg({ except: /^\s*\]/ })
  104897. }),
  104898. /* @__PURE__ */ _4.add({
  104899. "Object Array": Foe
  104900. })
  104901. ]
  104902. }),
  104903. languageData: {
  104904. closeBrackets: { brackets: ["[", "{", '"'] },
  104905. indentOnInput: /^\s*[\}\]]$/
  104906. }
  104907. });
  104908. function Mht() {
  104909. return new Boe(Eht);
  104910. }
  104911. var vle = { exports: {} }, zv = {}, h_ = { exports: {} }, W$ = {}, Q$ = {}, b9;
  104912. function k4() {
  104913. if (b9) return Q$;
  104914. b9 = 1;
  104915. function t(r) {
  104916. 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 = [];
  104917. }
  104918. t.prototype.clone_empty = function() {
  104919. var r = new t(this.__parent);
  104920. return r.set_indent(this.__indent_count, this.__alignment_count), r;
  104921. }, t.prototype.item = function(r) {
  104922. return r < 0 ? this.__items[this.__items.length + r] : this.__items[r];
  104923. }, t.prototype.has_match = function(r) {
  104924. for (var i = this.__items.length - 1; i >= 0; i--)
  104925. if (this.__items[i].match(r))
  104926. return !0;
  104927. return !1;
  104928. }, t.prototype.set_indent = function(r, i) {
  104929. 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));
  104930. }, t.prototype._set_wrap_point = function() {
  104931. 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);
  104932. }, t.prototype._should_wrap = function() {
  104933. return this.__wrap_point_index && this.__character_count > this.__parent.wrap_line_length && this.__wrap_point_character_count > this.__parent.next_line.__character_count;
  104934. }, t.prototype._allow_wrap = function() {
  104935. if (this._should_wrap()) {
  104936. this.__parent.add_new_line();
  104937. var r = this.__parent.current_line;
  104938. 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;
  104939. }
  104940. return !1;
  104941. }, t.prototype.is_empty = function() {
  104942. return this.__items.length === 0;
  104943. }, t.prototype.last = function() {
  104944. return this.is_empty() ? null : this.__items[this.__items.length - 1];
  104945. }, t.prototype.push = function(r) {
  104946. this.__items.push(r);
  104947. var i = r.lastIndexOf(`
  104948. `);
  104949. i !== -1 ? this.__character_count = r.length - i : this.__character_count += r.length;
  104950. }, t.prototype.pop = function() {
  104951. var r = null;
  104952. return this.is_empty() || (r = this.__items.pop(), this.__character_count -= r.length), r;
  104953. }, t.prototype._remove_indent = function() {
  104954. this.__indent_count > 0 && (this.__indent_count -= 1, this.__character_count -= this.__parent.indent_size);
  104955. }, t.prototype._remove_wrap_indent = function() {
  104956. this.__wrap_point_indent_count > 0 && (this.__wrap_point_indent_count -= 1);
  104957. }, t.prototype.trim = function() {
  104958. for (; this.last() === " "; )
  104959. this.__items.pop(), this.__character_count -= 1;
  104960. }, t.prototype.toString = function() {
  104961. var r = "";
  104962. 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;
  104963. };
  104964. function e(r, i) {
  104965. 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;
  104966. }
  104967. e.prototype.get_indent_size = function(r, i) {
  104968. var a = this.__base_string_length;
  104969. return i = i || 0, r < 0 && (a = 0), a += r * this.__indent_size, a += i, a;
  104970. }, e.prototype.get_indent_string = function(r, i) {
  104971. var a = this.__base_string;
  104972. return i = i || 0, r < 0 && (r = 0, a = ""), i += r * this.__indent_size, this.__ensure_cache(i), a += this.__cache[i], a;
  104973. }, e.prototype.__ensure_cache = function(r) {
  104974. for (; r >= this.__cache.length; )
  104975. this.__add_column();
  104976. }, e.prototype.__add_column = function() {
  104977. var r = this.__cache.length, i = 0, a = "";
  104978. 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);
  104979. };
  104980. function n(r, i) {
  104981. 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();
  104982. }
  104983. return n.prototype.__add_outputline = function() {
  104984. this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line);
  104985. }, n.prototype.get_line_number = function() {
  104986. return this.__lines.length;
  104987. }, n.prototype.get_indent_string = function(r, i) {
  104988. return this.__indent_cache.get_indent_string(r, i);
  104989. }, n.prototype.get_indent_size = function(r, i) {
  104990. return this.__indent_cache.get_indent_size(r, i);
  104991. }, n.prototype.is_empty = function() {
  104992. return !this.previous_line && this.current_line.is_empty();
  104993. }, n.prototype.add_new_line = function(r) {
  104994. return this.is_empty() || !r && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0);
  104995. }, n.prototype.get_code = function(r) {
  104996. this.trim(!0);
  104997. var i = this.current_line.pop();
  104998. i && (i[i.length - 1] === `
  104999. ` && (i = i.replace(/\n+$/g, "")), this.current_line.push(i)), this._end_with_newline && this.__add_outputline();
  105000. var a = this.__lines.join(`
  105001. `);
  105002. return r !== `
  105003. ` && (a = a.replace(/[\n]/g, r)), a;
  105004. }, n.prototype.set_wrap_point = function() {
  105005. this.current_line._set_wrap_point();
  105006. }, n.prototype.set_indent = function(r, i) {
  105007. 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);
  105008. }, n.prototype.add_raw_token = function(r) {
  105009. for (var i = 0; i < r.newlines; i++)
  105010. this.__add_outputline();
  105011. 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;
  105012. }, n.prototype.add_token = function(r) {
  105013. 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();
  105014. }, n.prototype.__add_space_before_token = function() {
  105015. this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" "));
  105016. }, n.prototype.remove_indent = function(r) {
  105017. for (var i = this.__lines.length; r < i; )
  105018. this.__lines[r]._remove_indent(), r++;
  105019. this.current_line._remove_wrap_indent();
  105020. }, n.prototype.trim = function(r) {
  105021. for (r = r === void 0 ? !1 : r, this.current_line.trim(); r && this.__lines.length > 1 && this.current_line.is_empty(); )
  105022. this.__lines.pop(), this.current_line = this.__lines[this.__lines.length - 1], this.current_line.trim();
  105023. this.previous_line = this.__lines.length > 1 ? this.__lines[this.__lines.length - 2] : null;
  105024. }, n.prototype.just_added_newline = function() {
  105025. return this.current_line.is_empty();
  105026. }, n.prototype.just_added_blankline = function() {
  105027. return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
  105028. }, n.prototype.ensure_empty_line_above = function(r, i) {
  105029. for (var a = this.__lines.length - 2; a >= 0; ) {
  105030. var o = this.__lines[a];
  105031. if (o.is_empty())
  105032. break;
  105033. if (o.item(0).indexOf(r) !== 0 && o.item(-1) !== i) {
  105034. this.__lines.splice(a + 1, 0, new t(this)), this.previous_line = this.__lines[this.__lines.length - 2];
  105035. break;
  105036. }
  105037. a--;
  105038. }
  105039. }, Q$.Output = n, Q$;
  105040. }
  105041. var H$ = {}, _9;
  105042. function gle() {
  105043. if (_9) return H$;
  105044. _9 = 1;
  105045. function t(e, n, r, i) {
  105046. 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;
  105047. }
  105048. return H$.Token = t, H$;
  105049. }
  105050. var G$ = {}, O9;
  105051. function mle() {
  105052. return O9 || (O9 = 1, function(t) {
  105053. 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 + "])*";
  105054. 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
  105055. |` + t.newline.source), t.allLineBreaks = new RegExp(t.lineBreak.source, "g");
  105056. }(G$)), G$;
  105057. }
  105058. var j$ = {}, Vv = {}, S9;
  105059. function L4() {
  105060. if (S9) return Vv;
  105061. S9 = 1;
  105062. function t(r, i) {
  105063. 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"]);
  105064. }
  105065. t.prototype._get_array = function(r, i) {
  105066. var a = this.raw_options[r], o = i || [];
  105067. return typeof a == "object" ? a !== null && typeof a.concat == "function" && (o = a.concat()) : typeof a == "string" && (o = a.split(/[^a-zA-Z0-9_\/\-]+/)), o;
  105068. }, t.prototype._get_boolean = function(r, i) {
  105069. var a = this.raw_options[r], o = a === void 0 ? !!i : !!a;
  105070. return o;
  105071. }, t.prototype._get_characters = function(r, i) {
  105072. var a = this.raw_options[r], o = i || "";
  105073. return typeof a == "string" && (o = a.replace(/\\r/, "\r").replace(/\\n/, `
  105074. `).replace(/\\t/, " ")), o;
  105075. }, t.prototype._get_number = function(r, i) {
  105076. var a = this.raw_options[r];
  105077. i = parseInt(i, 10), isNaN(i) && (i = 0);
  105078. var o = parseInt(a, 10);
  105079. return isNaN(o) && (o = i), o;
  105080. }, t.prototype._get_selection = function(r, i, a) {
  105081. var o = this._get_selection_list(r, i, a);
  105082. if (o.length !== 1)
  105083. throw new Error(
  105084. "Invalid Option Value: The option '" + r + `' can only be one of the following values:
  105085. ` + i + `
  105086. You passed in: '` + this.raw_options[r] + "'"
  105087. );
  105088. return o[0];
  105089. }, t.prototype._get_selection_list = function(r, i, a) {
  105090. if (!i || i.length === 0)
  105091. throw new Error("Selection list cannot be empty.");
  105092. if (a = a || [i[0]], !this._is_valid_selection(a, i))
  105093. throw new Error("Invalid Default Value!");
  105094. var o = this._get_array(r, a);
  105095. if (!this._is_valid_selection(o, i))
  105096. throw new Error(
  105097. "Invalid Option Value: The option '" + r + `' can contain only the following values:
  105098. ` + i + `
  105099. You passed in: '` + this.raw_options[r] + "'"
  105100. );
  105101. return o;
  105102. }, t.prototype._is_valid_selection = function(r, i) {
  105103. return r.length && i.length && !r.some(function(a) {
  105104. return i.indexOf(a) === -1;
  105105. });
  105106. };
  105107. function e(r, i) {
  105108. var a = {};
  105109. r = n(r);
  105110. var o;
  105111. for (o in r)
  105112. o !== i && (a[o] = r[o]);
  105113. if (i && r[i])
  105114. for (o in r[i])
  105115. a[o] = r[i][o];
  105116. return a;
  105117. }
  105118. function n(r) {
  105119. var i = {}, a;
  105120. for (a in r) {
  105121. var o = a.replace(/-/g, "_");
  105122. i[o] = r[a];
  105123. }
  105124. return i;
  105125. }
  105126. return Vv.Options = t, Vv.normalizeOpts = n, Vv.mergeOpts = e, Vv;
  105127. }
  105128. var x9;
  105129. function yle() {
  105130. if (x9) return j$;
  105131. x9 = 1;
  105132. var t = L4().Options, e = ["before-newline", "after-newline", "preserve-newline"];
  105133. function n(r) {
  105134. t.call(this, r, "js");
  105135. var i = this.raw_options.brace_style || null;
  105136. 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");
  105137. var a = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
  105138. this.brace_preserve_inline = !1, this.brace_style = "collapse";
  105139. for (var o = 0; o < a.length; o++)
  105140. a[o] === "preserve-inline" ? this.brace_preserve_inline = !0 : this.brace_style = a[o];
  105141. 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);
  105142. }
  105143. return n.prototype = new t(), j$.Options = n, j$;
  105144. }
  105145. var Cd = {}, Z$ = {}, w9;
  105146. function N4() {
  105147. if (w9) return Z$;
  105148. w9 = 1;
  105149. var t = RegExp.prototype.hasOwnProperty("sticky");
  105150. function e(n) {
  105151. this.__input = n || "", this.__input_length = this.__input.length, this.__position = 0;
  105152. }
  105153. return e.prototype.restart = function() {
  105154. this.__position = 0;
  105155. }, e.prototype.back = function() {
  105156. this.__position > 0 && (this.__position -= 1);
  105157. }, e.prototype.hasNext = function() {
  105158. return this.__position < this.__input_length;
  105159. }, e.prototype.next = function() {
  105160. var n = null;
  105161. return this.hasNext() && (n = this.__input.charAt(this.__position), this.__position += 1), n;
  105162. }, e.prototype.peek = function(n) {
  105163. var r = null;
  105164. return n = n || 0, n += this.__position, n >= 0 && n < this.__input_length && (r = this.__input.charAt(n)), r;
  105165. }, e.prototype.__match = function(n, r) {
  105166. n.lastIndex = r;
  105167. var i = n.exec(this.__input);
  105168. return i && !(t && n.sticky) && i.index !== r && (i = null), i;
  105169. }, e.prototype.test = function(n, r) {
  105170. return r = r || 0, r += this.__position, r >= 0 && r < this.__input_length ? !!this.__match(n, r) : !1;
  105171. }, e.prototype.testChar = function(n, r) {
  105172. var i = this.peek(r);
  105173. return n.lastIndex = 0, i !== null && n.test(i);
  105174. }, e.prototype.match = function(n) {
  105175. var r = this.__match(n, this.__position);
  105176. return r ? this.__position += r[0].length : r = null, r;
  105177. }, e.prototype.read = function(n, r, i) {
  105178. var a = "", o;
  105179. return n && (o = this.match(n), o && (a += o[0])), r && (o || !n) && (a += this.readUntil(r, i)), a;
  105180. }, e.prototype.readUntil = function(n, r) {
  105181. var i = "", a = this.__position;
  105182. n.lastIndex = this.__position;
  105183. var o = n.exec(this.__input);
  105184. 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;
  105185. }, e.prototype.readUntilAfter = function(n) {
  105186. return this.readUntil(n, !0);
  105187. }, e.prototype.get_regexp = function(n, r) {
  105188. var i = null, a = "g";
  105189. return r && t && (a = "y"), typeof n == "string" && n !== "" ? i = new RegExp(n, a) : n && (i = new RegExp(n.source, a)), i;
  105190. }, e.prototype.get_literal_regexp = function(n) {
  105191. return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
  105192. }, e.prototype.peekUntilAfter = function(n) {
  105193. var r = this.__position, i = this.readUntilAfter(n);
  105194. return this.__position = r, i;
  105195. }, e.prototype.lookBack = function(n) {
  105196. var r = this.__position - 1;
  105197. return r >= n.length && this.__input.substring(r - n.length, r).toLowerCase() === n;
  105198. }, Z$.InputScanner = e, Z$;
  105199. }
  105200. var p_ = {}, U$ = {}, C9;
  105201. function Iht() {
  105202. if (C9) return U$;
  105203. C9 = 1;
  105204. function t(e) {
  105205. this.__tokens = [], this.__tokens_length = this.__tokens.length, this.__position = 0, this.__parent_token = e;
  105206. }
  105207. return t.prototype.restart = function() {
  105208. this.__position = 0;
  105209. }, t.prototype.isEmpty = function() {
  105210. return this.__tokens_length === 0;
  105211. }, t.prototype.hasNext = function() {
  105212. return this.__position < this.__tokens_length;
  105213. }, t.prototype.next = function() {
  105214. var e = null;
  105215. return this.hasNext() && (e = this.__tokens[this.__position], this.__position += 1), e;
  105216. }, t.prototype.peek = function(e) {
  105217. var n = null;
  105218. return e = e || 0, e += this.__position, e >= 0 && e < this.__tokens_length && (n = this.__tokens[e]), n;
  105219. }, t.prototype.add = function(e) {
  105220. this.__parent_token && (e.parent = this.__parent_token), this.__tokens.push(e), this.__tokens_length += 1;
  105221. }, U$.TokenStream = t, U$;
  105222. }
  105223. var X$ = {}, Y$ = {}, T9;
  105224. function Hw() {
  105225. if (T9) return Y$;
  105226. T9 = 1;
  105227. function t(e, n) {
  105228. 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);
  105229. }
  105230. return t.prototype.read = function() {
  105231. var e = this._input.read(this._starting_pattern);
  105232. return (!this._starting_pattern || e) && (e += this._input.read(this._match_pattern, this._until_pattern, this._until_after)), e;
  105233. }, t.prototype.read_match = function() {
  105234. return this._input.match(this._match_pattern);
  105235. }, t.prototype.until_after = function(e) {
  105236. var n = this._create();
  105237. return n._until_after = !0, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  105238. }, t.prototype.until = function(e) {
  105239. var n = this._create();
  105240. return n._until_after = !1, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  105241. }, t.prototype.starting_with = function(e) {
  105242. var n = this._create();
  105243. return n._starting_pattern = this._input.get_regexp(e, !0), n._update(), n;
  105244. }, t.prototype.matching = function(e) {
  105245. var n = this._create();
  105246. return n._match_pattern = this._input.get_regexp(e, !0), n._update(), n;
  105247. }, t.prototype._create = function() {
  105248. return new t(this._input, this);
  105249. }, t.prototype._update = function() {
  105250. }, Y$.Pattern = t, Y$;
  105251. }
  105252. var P9;
  105253. function Dht() {
  105254. if (P9) return X$;
  105255. P9 = 1;
  105256. var t = Hw().Pattern;
  105257. function e(n, r) {
  105258. 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 = "";
  105259. }
  105260. return e.prototype = new t(), e.prototype.__set_whitespace_patterns = function(n, r) {
  105261. n += "\\t ", r += "\\n\\r", this._match_pattern = this._input.get_regexp(
  105262. "[" + n + r + "]+",
  105263. !0
  105264. ), this._newline_regexp = this._input.get_regexp(
  105265. "\\r\\n|[" + r + "]"
  105266. );
  105267. }, e.prototype.read = function() {
  105268. this.newline_count = 0, this.whitespace_before_token = "";
  105269. var n = this._input.read(this._match_pattern);
  105270. if (n === " ")
  105271. this.whitespace_before_token = " ";
  105272. else if (n) {
  105273. var r = this.__split(this._newline_regexp, n);
  105274. this.newline_count = r.length - 1, this.whitespace_before_token = r[this.newline_count];
  105275. }
  105276. return n;
  105277. }, e.prototype.matching = function(n, r) {
  105278. var i = this._create();
  105279. return i.__set_whitespace_patterns(n, r), i._update(), i;
  105280. }, e.prototype._create = function() {
  105281. return new e(this._input, this);
  105282. }, e.prototype.__split = function(n, r) {
  105283. n.lastIndex = 0;
  105284. for (var i = 0, a = [], o = n.exec(r); o; )
  105285. a.push(r.substring(i, o.index)), i = o.index + o[0].length, o = n.exec(r);
  105286. return i < r.length ? a.push(r.substring(i, r.length)) : a.push(""), a;
  105287. }, X$.WhitespacePattern = e, X$;
  105288. }
  105289. var $9;
  105290. function PS() {
  105291. if ($9) return p_;
  105292. $9 = 1;
  105293. var t = N4().InputScanner, e = gle().Token, n = Iht().TokenStream, r = Dht().WhitespacePattern, i = {
  105294. START: "TK_START",
  105295. RAW: "TK_RAW",
  105296. EOF: "TK_EOF"
  105297. }, a = function(o, s) {
  105298. this._input = new t(o), this._options = s || {}, this.__tokens = null, this._patterns = {}, this._patterns.whitespace = new r(this._input);
  105299. };
  105300. return a.prototype.tokenize = function() {
  105301. this._input.restart(), this.__tokens = new n(), this._reset();
  105302. for (var o, s = new e(i.START, ""), l = null, u = [], c = new n(); s.type !== i.EOF; ) {
  105303. for (o = this._get_next_token(s, l); this._is_comment(o); )
  105304. c.add(o), o = this._get_next_token(s, l);
  105305. 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;
  105306. }
  105307. return this.__tokens;
  105308. }, a.prototype._is_first_token = function() {
  105309. return this.__tokens.isEmpty();
  105310. }, a.prototype._reset = function() {
  105311. }, a.prototype._get_next_token = function(o, s) {
  105312. this._readWhitespace();
  105313. var l = this._input.read(/.+/g);
  105314. return l ? this._create_token(i.RAW, l) : this._create_token(i.EOF, "");
  105315. }, a.prototype._is_comment = function(o) {
  105316. return !1;
  105317. }, a.prototype._is_opening = function(o) {
  105318. return !1;
  105319. }, a.prototype._is_closing = function(o, s) {
  105320. return !1;
  105321. }, a.prototype._create_token = function(o, s) {
  105322. var l = new e(
  105323. o,
  105324. s,
  105325. this._patterns.whitespace.newline_count,
  105326. this._patterns.whitespace.whitespace_before_token
  105327. );
  105328. return l;
  105329. }, a.prototype._readWhitespace = function() {
  105330. return this._patterns.whitespace.read();
  105331. }, p_.Tokenizer = a, p_.TOKEN = i, p_;
  105332. }
  105333. var q$ = {}, A9;
  105334. function B4() {
  105335. if (A9) return q$;
  105336. A9 = 1;
  105337. function t(e, n) {
  105338. 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");
  105339. }
  105340. return t.prototype.get_directives = function(e) {
  105341. if (!e.match(this.__directives_block_pattern))
  105342. return null;
  105343. var n = {};
  105344. this.__directive_pattern.lastIndex = 0;
  105345. for (var r = this.__directive_pattern.exec(e); r; )
  105346. n[r[1]] = r[2], r = this.__directive_pattern.exec(e);
  105347. return n;
  105348. }, t.prototype.readIgnored = function(e) {
  105349. return e.readUntilAfter(this.__directives_end_ignore_pattern);
  105350. }, q$.Directives = t, q$;
  105351. }
  105352. var K$ = {}, E9;
  105353. function ble() {
  105354. if (E9) return K$;
  105355. E9 = 1;
  105356. var t = Hw().Pattern, e = {
  105357. django: !1,
  105358. erb: !1,
  105359. handlebars: !1,
  105360. php: !1,
  105361. smarty: !1,
  105362. angular: !1
  105363. };
  105364. function n(r, i) {
  105365. 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));
  105366. var a = new t(r);
  105367. this.__patterns = {
  105368. handlebars_comment: a.starting_with(/{{!--/).until_after(/--}}/),
  105369. handlebars_unescaped: a.starting_with(/{{{/).until_after(/}}}/),
  105370. handlebars: a.starting_with(/{{/).until_after(/}}/),
  105371. php: a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
  105372. erb: a.starting_with(/<%[^%]/).until_after(/[^%]%>/),
  105373. // django coflicts with handlebars a bit.
  105374. django: a.starting_with(/{%/).until_after(/%}/),
  105375. django_value: a.starting_with(/{{/).until_after(/}}/),
  105376. django_comment: a.starting_with(/{#/).until_after(/#}/),
  105377. smarty: a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
  105378. smarty_comment: a.starting_with(/{\*/).until_after(/\*}/),
  105379. smarty_literal: a.starting_with(/{literal}/).until_after(/{\/literal}/)
  105380. };
  105381. }
  105382. return n.prototype = new t(), n.prototype._create = function() {
  105383. return new n(this._input, this);
  105384. }, n.prototype._update = function() {
  105385. this.__set_templated_pattern();
  105386. }, n.prototype.disable = function(r) {
  105387. var i = this._create();
  105388. return i._disabled[r] = !0, i._update(), i;
  105389. }, n.prototype.read_options = function(r) {
  105390. var i = this._create();
  105391. for (var a in e)
  105392. i._disabled[a] = r.templating.indexOf(a) === -1;
  105393. return i._update(), i;
  105394. }, n.prototype.exclude = function(r) {
  105395. var i = this._create();
  105396. return i._excluded[r] = !0, i._update(), i;
  105397. }, n.prototype.read = function() {
  105398. var r = "";
  105399. this._match_pattern ? r = this._input.read(this._starting_pattern) : r = this._input.read(this._starting_pattern, this.__template_pattern);
  105400. for (var i = this._read_template(); i; )
  105401. this._match_pattern ? i += this._input.read(this._match_pattern) : i += this._input.readUntil(this.__template_pattern), r += i, i = this._read_template();
  105402. return this._until_after && (r += this._input.readUntilAfter(this._until_pattern)), r;
  105403. }, n.prototype.__set_templated_pattern = function() {
  105404. var r = [];
  105405. 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("|") + ")");
  105406. }, n.prototype._read_template = function() {
  105407. var r = "", i = this._input.peek();
  105408. if (i === "<") {
  105409. var a = this._input.peek(1);
  105410. !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());
  105411. } 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()));
  105412. return r;
  105413. }, K$.TemplatablePattern = n, K$;
  105414. }
  105415. var M9;
  105416. function v_() {
  105417. if (M9) return Cd;
  105418. M9 = 1;
  105419. var t = N4().InputScanner, e = PS().Tokenizer, n = PS().TOKEN, r = B4().Directives, i = mle(), a = Hw().Pattern, o = ble().TemplatablePattern;
  105420. function s(S, x) {
  105421. return x.indexOf(S) !== -1;
  105422. }
  105423. var l = {
  105424. START_EXPR: "TK_START_EXPR",
  105425. END_EXPR: "TK_END_EXPR",
  105426. START_BLOCK: "TK_START_BLOCK",
  105427. END_BLOCK: "TK_END_BLOCK",
  105428. WORD: "TK_WORD",
  105429. RESERVED: "TK_RESERVED",
  105430. SEMICOLON: "TK_SEMICOLON",
  105431. STRING: "TK_STRING",
  105432. EQUALS: "TK_EQUALS",
  105433. OPERATOR: "TK_OPERATOR",
  105434. COMMA: "TK_COMMA",
  105435. BLOCK_COMMENT: "TK_BLOCK_COMMENT",
  105436. COMMENT: "TK_COMMENT",
  105437. DOT: "TK_DOT",
  105438. UNKNOWN: "TK_UNKNOWN",
  105439. START: n.START,
  105440. RAW: n.RAW,
  105441. EOF: n.EOF
  105442. }, 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 = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
  105443. p = p.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"), p = "\\?\\.(?!\\d) " + p, p = p.replace(/ /g, "|");
  105444. 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("|") + ")$"), b, _ = function(S, x) {
  105445. e.call(this, S, x), this._patterns.whitespace = this._patterns.whitespace.matching(
  105446. /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
  105447. /\u2028\u2029/.source
  105448. );
  105449. var C = new a(this._input), T = new o(this._input).read_options(this._options);
  105450. this.__patterns = {
  105451. template: T,
  105452. identifier: T.starting_with(i.identifier).matching(i.identifierMatch),
  105453. number: C.matching(c),
  105454. punct: C.matching(v),
  105455. // comment ends just before nearest linefeed or end of file
  105456. comment: C.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
  105457. // /* ... */ comment ends with nearest */ or end of file
  105458. block_comment: C.starting_with(/\/\*/).until_after(/\*\//),
  105459. html_comment_start: C.matching(/<!--/),
  105460. html_comment_end: C.matching(/-->/),
  105461. include: C.starting_with(/#include/).until_after(i.lineBreak),
  105462. shebang: C.starting_with(/#!/).until_after(i.lineBreak),
  105463. xml: C.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*>/),
  105464. single_quote: T.until(/['\\\n\r\u2028\u2029]/),
  105465. double_quote: T.until(/["\\\n\r\u2028\u2029]/),
  105466. template_text: T.until(/[`\\$]/),
  105467. template_expression: T.until(/[`}\\]/)
  105468. };
  105469. };
  105470. _.prototype = new e(), _.prototype._is_comment = function(S) {
  105471. return S.type === l.COMMENT || S.type === l.BLOCK_COMMENT || S.type === l.UNKNOWN;
  105472. }, _.prototype._is_opening = function(S) {
  105473. return S.type === l.START_BLOCK || S.type === l.START_EXPR;
  105474. }, _.prototype._is_closing = function(S, x) {
  105475. return (S.type === l.END_BLOCK || S.type === l.END_EXPR) && x && (S.text === "]" && x.text === "[" || S.text === ")" && x.text === "(" || S.text === "}" && x.text === "{");
  105476. }, _.prototype._reset = function() {
  105477. b = !1;
  105478. }, _.prototype._get_next_token = function(S, x) {
  105479. var C = null;
  105480. this._readWhitespace();
  105481. var T = this._input.peek();
  105482. return T === null ? this._create_token(l.EOF, "") : (C = C || this._read_non_javascript(T), C = C || this._read_string(T), C = C || this._read_pair(T, this._input.peek(1)), C = C || this._read_word(S), C = C || this._read_singles(T), C = C || this._read_comment(T), C = C || this._read_regexp(T, S), C = C || this._read_xml(T, S), C = C || this._read_punctuation(), C = C || this._create_token(l.UNKNOWN, this._input.next()), C);
  105483. }, _.prototype._read_word = function(S) {
  105484. var x;
  105485. if (x = this.__patterns.identifier.read(), x !== "")
  105486. return x = x.replace(i.allLineBreaks, `
  105487. `), !(S.type === l.DOT || S.type === l.RESERVED && (S.text === "set" || S.text === "get")) && y.test(x) ? (x === "in" || x === "of") && (S.type === l.WORD || S.type === l.STRING) ? this._create_token(l.OPERATOR, x) : this._create_token(l.RESERVED, x) : this._create_token(l.WORD, x);
  105488. if (x = this.__patterns.number.read(), x !== "")
  105489. return this._create_token(l.WORD, x);
  105490. }, _.prototype._read_singles = function(S) {
  105491. var x = null;
  105492. return S === "(" || S === "[" ? x = this._create_token(l.START_EXPR, S) : S === ")" || S === "]" ? x = this._create_token(l.END_EXPR, S) : S === "{" ? x = this._create_token(l.START_BLOCK, S) : S === "}" ? x = this._create_token(l.END_BLOCK, S) : S === ";" ? x = this._create_token(l.SEMICOLON, S) : S === "." && d.test(this._input.peek(1)) ? x = this._create_token(l.DOT, S) : S === "," && (x = this._create_token(l.COMMA, S)), x && this._input.next(), x;
  105493. }, _.prototype._read_pair = function(S, x) {
  105494. var C = null;
  105495. return S === "#" && x === "{" && (C = this._create_token(l.START_BLOCK, S + x)), C && (this._input.next(), this._input.next()), C;
  105496. }, _.prototype._read_punctuation = function() {
  105497. var S = this.__patterns.punct.read();
  105498. if (S !== "")
  105499. return S === "=" ? this._create_token(l.EQUALS, S) : S === "?." ? this._create_token(l.DOT, S) : this._create_token(l.OPERATOR, S);
  105500. }, _.prototype._read_non_javascript = function(S) {
  105501. var x = "";
  105502. if (S === "#") {
  105503. if (this._is_first_token() && (x = this.__patterns.shebang.read(), x))
  105504. return this._create_token(l.UNKNOWN, x.trim() + `
  105505. `);
  105506. if (x = this.__patterns.include.read(), x)
  105507. return this._create_token(l.UNKNOWN, x.trim() + `
  105508. `);
  105509. S = this._input.next();
  105510. var C = "#";
  105511. if (this._input.hasNext() && this._input.testChar(f)) {
  105512. do
  105513. S = this._input.next(), C += S;
  105514. while (this._input.hasNext() && S !== "#" && S !== "=");
  105515. return S === "#" || (this._input.peek() === "[" && this._input.peek(1) === "]" ? (C += "[]", this._input.next(), this._input.next()) : this._input.peek() === "{" && this._input.peek(1) === "}" && (C += "{}", this._input.next(), this._input.next())), this._create_token(l.WORD, C);
  105516. }
  105517. this._input.back();
  105518. } else if (S === "<" && this._is_first_token()) {
  105519. if (x = this.__patterns.html_comment_start.read(), x) {
  105520. for (; this._input.hasNext() && !this._input.testChar(i.newline); )
  105521. x += this._input.next();
  105522. return b = !0, this._create_token(l.COMMENT, x);
  105523. }
  105524. } else if (b && S === "-" && (x = this.__patterns.html_comment_end.read(), x))
  105525. return b = !1, this._create_token(l.COMMENT, x);
  105526. return null;
  105527. }, _.prototype._read_comment = function(S) {
  105528. var x = null;
  105529. if (S === "/") {
  105530. var C = "";
  105531. if (this._input.peek(1) === "*") {
  105532. C = this.__patterns.block_comment.read();
  105533. var T = u.get_directives(C);
  105534. T && T.ignore === "start" && (C += u.readIgnored(this._input)), C = C.replace(i.allLineBreaks, `
  105535. `), x = this._create_token(l.BLOCK_COMMENT, C), x.directives = T;
  105536. } else this._input.peek(1) === "/" && (C = this.__patterns.comment.read(), x = this._create_token(l.COMMENT, C));
  105537. }
  105538. return x;
  105539. }, _.prototype._read_string = function(S) {
  105540. if (S === "`" || S === "'" || S === '"') {
  105541. var x = this._input.next();
  105542. return this.has_char_escapes = !1, S === "`" ? x += this._read_string_recursive("`", !0, "${") : x += this._read_string_recursive(S), this.has_char_escapes && this._options.unescape_strings && (x = O(x)), this._input.peek() === S && (x += this._input.next()), x = x.replace(i.allLineBreaks, `
  105543. `), this._create_token(l.STRING, x);
  105544. }
  105545. return null;
  105546. }, _.prototype._allow_regexp_or_xml = function(S) {
  105547. return S.type === l.RESERVED && s(S.text, ["return", "case", "throw", "else", "do", "typeof", "yield"]) || S.type === l.END_EXPR && S.text === ")" && S.opened.previous.type === l.RESERVED && s(S.opened.previous.text, ["if", "while", "for"]) || s(S.type, [
  105548. l.COMMENT,
  105549. l.START_EXPR,
  105550. l.START_BLOCK,
  105551. l.START,
  105552. l.END_BLOCK,
  105553. l.OPERATOR,
  105554. l.EQUALS,
  105555. l.EOF,
  105556. l.SEMICOLON,
  105557. l.COMMA
  105558. ]);
  105559. }, _.prototype._read_regexp = function(S, x) {
  105560. if (S === "/" && this._allow_regexp_or_xml(x)) {
  105561. for (var C = this._input.next(), T = !1, w = !1; this._input.hasNext() && (T || w || this._input.peek() !== S) && !this._input.testChar(i.newline); )
  105562. C += this._input.peek(), T ? T = !1 : (T = this._input.peek() === "\\", this._input.peek() === "[" ? w = !0 : this._input.peek() === "]" && (w = !1)), this._input.next();
  105563. return this._input.peek() === S && (C += this._input.next(), C += this._input.read(i.identifier)), this._create_token(l.STRING, C);
  105564. }
  105565. return null;
  105566. }, _.prototype._read_xml = function(S, x) {
  105567. if (this._options.e4x && S === "<" && this._allow_regexp_or_xml(x)) {
  105568. var C = "", T = this.__patterns.xml.read_match();
  105569. if (T) {
  105570. for (var w = T[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}"), P = w.indexOf("{") === 0, $ = 0; T; ) {
  105571. var A = !!T[1], D = T[2], E = !!T[T.length - 1] || D.slice(0, 8) === "![CDATA[";
  105572. if (!E && (D === w || P && D.replace(/^{\s+/, "{").replace(/\s+}$/, "}")) && (A ? --$ : ++$), C += T[0], $ <= 0)
  105573. break;
  105574. T = this.__patterns.xml.read_match();
  105575. }
  105576. return T || (C += this._input.match(/[\s\S]*/g)[0]), C = C.replace(i.allLineBreaks, `
  105577. `), this._create_token(l.STRING, C);
  105578. }
  105579. }
  105580. return null;
  105581. };
  105582. function O(S) {
  105583. for (var x = "", C = 0, T = new t(S), w = null; T.hasNext(); )
  105584. if (w = T.match(/([\s]|[^\\]|\\\\)+/g), w && (x += w[0]), T.peek() === "\\") {
  105585. if (T.next(), T.peek() === "x")
  105586. w = T.match(/x([0-9A-Fa-f]{2})/g);
  105587. else if (T.peek() === "u")
  105588. w = T.match(/u([0-9A-Fa-f]{4})/g), w || (w = T.match(/u\{([0-9A-Fa-f]+)\}/g));
  105589. else {
  105590. x += "\\", T.hasNext() && (x += T.next());
  105591. continue;
  105592. }
  105593. if (!w || (C = parseInt(w[1], 16), C > 126 && C <= 255 && w[0].indexOf("x") === 0))
  105594. return S;
  105595. C >= 0 && C < 32 || C > 1114111 ? x += "\\" + w[0] : C === 34 || C === 39 || C === 92 ? x += "\\" + String.fromCharCode(C) : x += String.fromCharCode(C);
  105596. }
  105597. return x;
  105598. }
  105599. return _.prototype._read_string_recursive = function(S, x, C) {
  105600. var T, w;
  105601. S === "'" ? w = this.__patterns.single_quote : S === '"' ? w = this.__patterns.double_quote : S === "`" ? w = this.__patterns.template_text : S === "}" && (w = this.__patterns.template_expression);
  105602. for (var P = w.read(), $ = ""; this._input.hasNext(); ) {
  105603. if ($ = this._input.next(), $ === S || !x && i.newline.test($)) {
  105604. this._input.back();
  105605. break;
  105606. } else $ === "\\" && this._input.hasNext() ? (T = this._input.peek(), T === "x" || T === "u" ? this.has_char_escapes = !0 : T === "\r" && this._input.peek(1) === `
  105607. ` && this._input.next(), $ += this._input.next()) : C && (C === "${" && $ === "$" && this._input.peek() === "{" && ($ += this._input.next()), C === $ && (S === "`" ? $ += this._read_string_recursive("}", x, "`") : $ += this._read_string_recursive("`", x, "${"), this._input.hasNext() && ($ += this._input.next())));
  105608. $ += w.read(), P += $;
  105609. }
  105610. return P;
  105611. }, Cd.Tokenizer = _, Cd.TOKEN = l, Cd.positionable_operators = h.slice(), Cd.line_starters = g.slice(), Cd;
  105612. }
  105613. var I9;
  105614. function Rht() {
  105615. if (I9) return W$;
  105616. I9 = 1;
  105617. var t = k4().Output, e = gle().Token, n = mle(), r = yle().Options, i = v_().Tokenizer, a = v_().line_starters, o = v_().positionable_operators, s = v_().TOKEN;
  105618. function l(w, P) {
  105619. return P.indexOf(w) !== -1;
  105620. }
  105621. function u(w) {
  105622. return w.replace(/^\s+/g, "");
  105623. }
  105624. function c(w) {
  105625. for (var P = {}, $ = 0; $ < w.length; $++)
  105626. P[w[$].replace(/-/g, "_")] = w[$];
  105627. return P;
  105628. }
  105629. function f(w, P) {
  105630. return w && w.type === s.RESERVED && w.text === P;
  105631. }
  105632. function d(w, P) {
  105633. return w && w.type === s.RESERVED && l(w.text, P);
  105634. }
  105635. 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 = {
  105636. BlockStatement: "BlockStatement",
  105637. // 'BLOCK'
  105638. Statement: "Statement",
  105639. // 'STATEMENT'
  105640. ObjectLiteral: "ObjectLiteral",
  105641. // 'OBJECT',
  105642. ArrayLiteral: "ArrayLiteral",
  105643. //'[EXPRESSION]',
  105644. ForInitializer: "ForInitializer",
  105645. //'(FOR-EXPRESSION)',
  105646. Conditional: "Conditional",
  105647. //'(COND-EXPRESSION)',
  105648. Expression: "Expression"
  105649. //'(EXPRESSION)'
  105650. };
  105651. function y(w, P) {
  105652. P.multiline_frame || P.mode === m.ForInitializer || P.mode === m.Conditional || w.remove_indent(P.start_line_index);
  105653. }
  105654. function b(w) {
  105655. w = w.replace(n.allLineBreaks, `
  105656. `);
  105657. for (var P = [], $ = w.indexOf(`
  105658. `); $ !== -1; )
  105659. P.push(w.substring(0, $)), w = w.substring($ + 1), $ = w.indexOf(`
  105660. `);
  105661. return w.length && P.push(w), P;
  105662. }
  105663. function _(w) {
  105664. return w === m.ArrayLiteral;
  105665. }
  105666. function O(w) {
  105667. return l(w, [m.Expression, m.ForInitializer, m.Conditional]);
  105668. }
  105669. function S(w, P) {
  105670. for (var $ = 0; $ < w.length; $++) {
  105671. var A = w[$].trim();
  105672. if (A.charAt(0) !== P)
  105673. return !1;
  105674. }
  105675. return !0;
  105676. }
  105677. function x(w, P) {
  105678. for (var $ = 0, A = w.length, D; $ < A; $++)
  105679. if (D = w[$], D && D.indexOf(P) !== 0)
  105680. return !1;
  105681. return !0;
  105682. }
  105683. function C(w, P) {
  105684. P = P || {}, this._source_text = w || "", 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(P);
  105685. }
  105686. C.prototype.create_flags = function(w, P) {
  105687. var $ = 0;
  105688. w && ($ = w.indentation_level, !this._output.just_added_newline() && w.line_indent_level > $ && ($ = w.line_indent_level));
  105689. var A = {
  105690. mode: P,
  105691. parent: w,
  105692. last_token: w ? w.last_token : new e(s.START_BLOCK, ""),
  105693. // last token text
  105694. last_word: w ? w.last_word : "",
  105695. // last TOKEN.WORD passed
  105696. declaration_statement: !1,
  105697. declaration_assignment: !1,
  105698. multiline_frame: !1,
  105699. inline_frame: !1,
  105700. if_block: !1,
  105701. else_block: !1,
  105702. class_start_block: !1,
  105703. // class A { INSIDE HERE } or class B extends C { INSIDE HERE }
  105704. do_block: !1,
  105705. do_while: !1,
  105706. import_block: !1,
  105707. in_case_statement: !1,
  105708. // switch(..){ INSIDE HERE }
  105709. in_case: !1,
  105710. // we're on the exact line with "case 0:"
  105711. case_body: !1,
  105712. // the indented case-action block
  105713. case_block: !1,
  105714. // the indented case-action block is wrapped with {}
  105715. indentation_level: $,
  105716. alignment: 0,
  105717. line_indent_level: w ? w.line_indent_level : $,
  105718. start_line_index: this._output.get_line_number(),
  105719. ternary_depth: 0
  105720. };
  105721. return A;
  105722. }, C.prototype._reset = function(w) {
  105723. var P = w.match(/^[\t ]*/)[0];
  105724. this._last_last_text = "", this._output = new t(this._options, P), this._output.raw = this._options.test_output_raw, this._flag_store = [], this.set_mode(m.BlockStatement);
  105725. var $ = new i(w, this._options);
  105726. return this._tokens = $.tokenize(), w;
  105727. }, C.prototype.beautify = function() {
  105728. if (this._options.disabled)
  105729. return this._source_text;
  105730. var w, P = this._reset(this._source_text), $ = this._options.eol;
  105731. this._options.eol === "auto" && ($ = `
  105732. `, P && n.lineBreak.test(P || "") && ($ = P.match(n.lineBreak)[0]));
  105733. for (var A = this._tokens.next(); A; )
  105734. this.handle_token(A), this._last_last_text = this._flags.last_token.text, this._flags.last_token = A, A = this._tokens.next();
  105735. return w = this._output.get_code($), w;
  105736. }, C.prototype.handle_token = function(w, P) {
  105737. w.type === s.START_EXPR ? this.handle_start_expr(w) : w.type === s.END_EXPR ? this.handle_end_expr(w) : w.type === s.START_BLOCK ? this.handle_start_block(w) : w.type === s.END_BLOCK ? this.handle_end_block(w) : w.type === s.WORD ? this.handle_word(w) : w.type === s.RESERVED ? this.handle_word(w) : w.type === s.SEMICOLON ? this.handle_semicolon(w) : w.type === s.STRING ? this.handle_string(w) : w.type === s.EQUALS ? this.handle_equals(w) : w.type === s.OPERATOR ? this.handle_operator(w) : w.type === s.COMMA ? this.handle_comma(w) : w.type === s.BLOCK_COMMENT ? this.handle_block_comment(w, P) : w.type === s.COMMENT ? this.handle_comment(w, P) : w.type === s.DOT ? this.handle_dot(w) : w.type === s.EOF ? this.handle_eof(w) : w.type === s.UNKNOWN ? this.handle_unknown(w, P) : this.handle_unknown(w, P);
  105738. }, C.prototype.handle_whitespace_and_comments = function(w, P) {
  105739. var $ = w.newlines, A = this._options.keep_array_indentation && _(this._flags.mode);
  105740. if (w.comments_before)
  105741. for (var D = w.comments_before.next(); D; )
  105742. this.handle_whitespace_and_comments(D, P), this.handle_token(D, P), D = w.comments_before.next();
  105743. if (A)
  105744. for (var E = 0; E < $; E += 1)
  105745. this.print_newline(E > 0, P);
  105746. else if (this._options.max_preserve_newlines && $ > this._options.max_preserve_newlines && ($ = this._options.max_preserve_newlines), this._options.preserve_newlines && $ > 1) {
  105747. this.print_newline(!1, P);
  105748. for (var R = 1; R < $; R += 1)
  105749. this.print_newline(!0, P);
  105750. }
  105751. };
  105752. var T = ["async", "break", "continue", "return", "throw", "yield"];
  105753. return C.prototype.allow_wrap_or_preserved_newline = function(w, P) {
  105754. if (P = P === void 0 ? !1 : P, !this._output.just_added_newline()) {
  105755. var $ = this._options.preserve_newlines && w.newlines || P, A = l(this._flags.last_token.text, o) || l(w.text, o);
  105756. if (A) {
  105757. var D = l(this._flags.last_token.text, o) && l(this._options.operator_position, g) || l(w.text, o);
  105758. $ = $ && D;
  105759. }
  105760. if ($)
  105761. this.print_newline(!1, !0);
  105762. else if (this._options.wrap_line_length) {
  105763. if (d(this._flags.last_token, T))
  105764. return;
  105765. this._output.set_wrap_point();
  105766. }
  105767. }
  105768. }, C.prototype.print_newline = function(w, P) {
  105769. if (!P && 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 === "++"))
  105770. for (var $ = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f($, "else")) && !this._flags.do_block; )
  105771. this.restore_mode();
  105772. this._output.add_new_line(w) && (this._flags.multiline_frame = !0);
  105773. }, C.prototype.print_token_line_indentation = function(w) {
  105774. this._output.just_added_newline() && (this._options.keep_array_indentation && w.newlines && (w.text === "[" || _(this._flags.mode)) ? (this._output.current_line.set_indent(-1), this._output.current_line.push(w.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));
  105775. }, C.prototype.print_token = function(w) {
  105776. if (this._output.raw) {
  105777. this._output.add_raw_token(w);
  105778. return;
  105779. }
  105780. if (this._options.comma_first && w.previous && w.previous.type === s.COMMA && this._output.just_added_newline() && this._output.previous_line.last() === ",") {
  105781. var P = this._output.previous_line.pop();
  105782. this._output.previous_line.is_empty() && (this._output.previous_line.push(P), this._output.trim(!0), this._output.current_line.pop(), this._output.trim()), this.print_token_line_indentation(w), this._output.add_token(","), this._output.space_before_token = !0;
  105783. }
  105784. this.print_token_line_indentation(w), this._output.non_breaking_space = !0, this._output.add_token(w.text), this._output.previous_token_wrapped && (this._flags.multiline_frame = !0);
  105785. }, C.prototype.indent = function() {
  105786. this._flags.indentation_level += 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  105787. }, C.prototype.deindent = function() {
  105788. 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));
  105789. }, C.prototype.set_mode = function(w) {
  105790. this._flags ? (this._flag_store.push(this._flags), this._previous_flags = this._flags) : this._previous_flags = this.create_flags(null, w), this._flags = this.create_flags(this._previous_flags, w), this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  105791. }, C.prototype.restore_mode = function() {
  105792. 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));
  105793. }, C.prototype.start_of_object_property = function() {
  105794. 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"]));
  105795. }, C.prototype.start_of_statement = function(w) {
  105796. var P = !1;
  105797. return P = P || d(this._flags.last_token, ["var", "let", "const"]) && w.type === s.WORD, P = P || f(this._flags.last_token, "do"), P = P || !(this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement) && d(this._flags.last_token, T) && !w.newlines, P = P || f(this._flags.last_token, "else") && !(f(w, "if") && !w.comments_before), P = P || this._flags.last_token.type === s.END_EXPR && (this._previous_flags.mode === m.ForInitializer || this._previous_flags.mode === m.Conditional), P = P || this._flags.last_token.type === s.WORD && this._flags.mode === m.BlockStatement && !this._flags.in_case && !(w.text === "--" || w.text === "++") && this._last_last_text !== "function" && w.type !== s.WORD && w.type !== s.RESERVED, P = P || this._flags.mode === m.ObjectLiteral && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"])), P ? (this.set_mode(m.Statement), this.indent(), this.handle_whitespace_and_comments(w, !0), this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
  105798. w,
  105799. d(w, ["do", "for", "if", "while"])
  105800. ), !0) : !1;
  105801. }, C.prototype.handle_start_expr = function(w) {
  105802. this.start_of_statement(w) || this.handle_whitespace_and_comments(w);
  105803. var P = m.Expression;
  105804. if (w.text === "[") {
  105805. if (this._flags.last_token.type === s.WORD || this._flags.last_token.text === ")") {
  105806. d(this._flags.last_token, a) && (this._output.space_before_token = !0), this.print_token(w), this.set_mode(P), this.indent(), this._options.space_in_paren && (this._output.space_before_token = !0);
  105807. return;
  105808. }
  105809. P = m.ArrayLiteral, _(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);
  105810. } else {
  105811. if (this._flags.last_token.type === s.RESERVED)
  105812. this._flags.last_token.text === "for" ? (this._output.space_before_token = this._options.space_before_conditional, P = m.ForInitializer) : l(this._flags.last_token.text, ["if", "while", "switch"]) ? (this._output.space_before_token = this._options.space_before_conditional, P = m.Conditional) : l(this._flags.last_word, ["await", "async"]) ? this._output.space_before_token = !0 : this._flags.last_token.text === "import" && w.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);
  105813. else if (this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR)
  105814. this.start_of_object_property() || this.allow_wrap_or_preserved_newline(w);
  105815. else if (this._flags.last_token.type === s.WORD) {
  105816. this._output.space_before_token = !1;
  105817. var $ = this._tokens.peek(-3);
  105818. if (this._options.space_after_named_function && $) {
  105819. var A = this._tokens.peek(-4);
  105820. d($, ["async", "function"]) || $.text === "*" && d(A, ["async", "function"]) ? this._output.space_before_token = !0 : this._flags.mode === m.ObjectLiteral ? ($.text === "{" || $.text === "," || $.text === "*" && (A.text === "{" || A.text === ",")) && (this._output.space_before_token = !0) : this._flags.parent && this._flags.parent.class_start_block && (this._output.space_before_token = !0);
  105821. }
  105822. } else
  105823. this.allow_wrap_or_preserved_newline(w);
  105824. (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);
  105825. }
  105826. 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(w, w.newlines), this.print_token(w), this.set_mode(P), this._options.space_in_paren && (this._output.space_before_token = !0), this.indent();
  105827. }, C.prototype.handle_end_expr = function(w) {
  105828. for (; this._flags.mode === m.Statement; )
  105829. this.restore_mode();
  105830. this.handle_whitespace_and_comments(w), this._flags.multiline_frame && this.allow_wrap_or_preserved_newline(
  105831. w,
  105832. w.text === "]" && _(this._flags.mode) && !this._options.keep_array_indentation
  105833. ), 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(w), 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);
  105834. }, C.prototype.handle_start_block = function(w) {
  105835. this.handle_whitespace_and_comments(w);
  105836. var P = this._tokens.peek(), $ = this._tokens.peek(1);
  105837. 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) : $ && (l($.text, [":", ","]) && l(P.type, [s.STRING, s.WORD, s.RESERVED]) || l(P.text, ["get", "set", "..."]) && l($.type, [s.WORD, s.RESERVED])) ? l(this._last_last_text, ["class", "interface"]) && !l($.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);
  105838. var A = !P.comments_before && P.text === "}", D = A && this._flags.last_word === "function" && this._flags.last_token.type === s.END_EXPR;
  105839. if (this._options.brace_preserve_inline) {
  105840. var E = 0, R = null;
  105841. this._flags.inline_frame = !0;
  105842. do
  105843. if (E += 1, R = this._tokens.peek(E - 1), R.newlines) {
  105844. this._flags.inline_frame = !1;
  105845. break;
  105846. }
  105847. while (R.type !== s.EOF && !(R.type === s.END_BLOCK && R.opened === w));
  105848. }
  105849. (this._options.brace_style === "expand" || this._options.brace_style === "none" && w.newlines) && !this._flags.inline_frame ? this._flags.last_token.type !== s.OPERATOR && (D || 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) : (_(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(w), 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(w), this.indent(), !A && !(this._options.brace_preserve_inline && this._flags.inline_frame) && this.print_newline();
  105850. }, C.prototype.handle_end_block = function(w) {
  105851. for (this.handle_whitespace_and_comments(w); this._flags.mode === m.Statement; )
  105852. this.restore_mode();
  105853. var P = this._flags.last_token.type === s.START_BLOCK;
  105854. this._flags.inline_frame && !P ? this._output.space_before_token = !0 : this._options.brace_style === "expand" ? P || this.print_newline() : P || (_(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(w);
  105855. }, C.prototype.handle_word = function(w) {
  105856. if (w.type === s.RESERVED) {
  105857. if (l(w.text, ["set", "get"]) && this._flags.mode !== m.ObjectLiteral)
  105858. w.type = s.WORD;
  105859. else if (w.text === "import" && l(this._tokens.peek().text, ["(", "."]))
  105860. w.type = s.WORD;
  105861. else if (l(w.text, ["as", "from"]) && !this._flags.import_block)
  105862. w.type = s.WORD;
  105863. else if (this._flags.mode === m.ObjectLiteral) {
  105864. var P = this._tokens.peek();
  105865. P.text === ":" && (w.type = s.WORD);
  105866. }
  105867. }
  105868. if (this.start_of_statement(w) ? d(this._flags.last_token, ["var", "let", "const"]) && w.type === s.WORD && (this._flags.declaration_statement = !0) : w.newlines && !O(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(w), this.print_newline()) : this.handle_whitespace_and_comments(w), this._flags.do_block && !this._flags.do_while)
  105869. if (f(w, "while")) {
  105870. this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0, this._flags.do_while = !0;
  105871. return;
  105872. } else
  105873. this.print_newline(), this._flags.do_block = !1;
  105874. if (this._flags.if_block)
  105875. if (!this._flags.else_block && f(w, "else"))
  105876. this._flags.else_block = !0;
  105877. else {
  105878. for (; this._flags.mode === m.Statement; )
  105879. this.restore_mode();
  105880. this._flags.if_block = !1, this._flags.else_block = !1;
  105881. }
  105882. if (this._flags.in_case_statement && d(w, ["case", "default"])) {
  105883. 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(w), this._flags.in_case = !0;
  105884. return;
  105885. }
  105886. 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
  105887. (l(this._flags.last_token.text, ["+", "-"]) && this._last_last_text === ":" && this._flags.parent.mode === m.ObjectLiteral) && this.allow_wrap_or_preserved_newline(w), f(w, "function")) {
  105888. (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() && !w.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, T) ? 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 && (O(this._flags.mode) || _(this._flags.mode)) || this.print_newline(), this.print_token(w), this._flags.last_word = w.text;
  105889. return;
  105890. }
  105891. var $ = "NONE";
  105892. if (this._flags.last_token.type === s.END_BLOCK ? this._previous_flags.inline_frame ? $ = "SPACE" : d(w, ["else", "catch", "finally", "from"]) ? this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && w.newlines ? $ = "NEWLINE" : ($ = "SPACE", this._output.space_before_token = !0) : $ = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && this._flags.mode === m.BlockStatement ? $ = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && O(this._flags.mode) ? $ = "SPACE" : this._flags.last_token.type === s.STRING ? $ = "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, ["{", ","])) ? $ = "SPACE" : this._flags.last_token.type === s.START_BLOCK ? this._flags.inline_frame ? $ = "SPACE" : $ = "NEWLINE" : this._flags.last_token.type === s.END_EXPR && (this._output.space_before_token = !0, $ = "NEWLINE"), d(w, a) && this._flags.last_token.text !== ")" && (this._flags.inline_frame || this._flags.last_token.text === "else" || this._flags.last_token.text === "export" ? $ = "SPACE" : $ = "NEWLINE"), d(w, ["else", "catch", "finally"]))
  105893. 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" && w.newlines) && !this._flags.inline_frame)
  105894. this.print_newline();
  105895. else {
  105896. this._output.trim(!0);
  105897. var A = this._output.current_line;
  105898. A.last() !== "}" && this.print_newline(), this._output.space_before_token = !0;
  105899. }
  105900. else $ === "NEWLINE" ? d(this._flags.last_token, h) ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" && d(w, ["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(w, ["var", "let", "const"])) && this._flags.last_token.text !== ":" && (f(w, "if") && f(w.previous, "else") ? this._output.space_before_token = !0 : this.print_newline()) : d(w, a) && this._flags.last_token.text !== ")" && this.print_newline() : this._flags.multiline_frame && _(this._flags.mode) && this._flags.last_token.text === "," && this._last_last_text === "}" ? this.print_newline() : $ === "SPACE" && (this._output.space_before_token = !0);
  105901. w.previous && (w.previous.type === s.WORD || w.previous.type === s.RESERVED) && (this._output.space_before_token = !0), this.print_token(w), this._flags.last_word = w.text, w.type === s.RESERVED && (w.text === "do" ? this._flags.do_block = !0 : w.text === "if" ? this._flags.if_block = !0 : w.text === "import" ? this._flags.import_block = !0 : this._flags.import_block && f(w, "from") && (this._flags.import_block = !1));
  105902. }, C.prototype.handle_semicolon = function(w) {
  105903. this.start_of_statement(w) ? this._output.space_before_token = !1 : this.handle_whitespace_and_comments(w);
  105904. for (var P = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f(P, "else")) && !this._flags.do_block; )
  105905. this.restore_mode();
  105906. this._flags.import_block && (this._flags.import_block = !1), this.print_token(w);
  105907. }, C.prototype.handle_string = function(w) {
  105908. w.text.startsWith("`") && w.newlines === 0 && w.whitespace_before === "" && (w.previous.text === ")" || this._flags.last_token.type === s.WORD) || (this.start_of_statement(w) ? this._output.space_before_token = !0 : (this.handle_whitespace_and_comments(w), 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(w) : w.text.startsWith("`") && this._flags.last_token.type === s.END_EXPR && (w.previous.text === "]" || w.previous.text === ")") && w.newlines === 0 ? this._output.space_before_token = !0 : this.print_newline())), this.print_token(w);
  105909. }, C.prototype.handle_equals = function(w) {
  105910. this.start_of_statement(w) || this.handle_whitespace_and_comments(w), this._flags.declaration_statement && (this._flags.declaration_assignment = !0), this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0;
  105911. }, C.prototype.handle_comma = function(w) {
  105912. this.handle_whitespace_and_comments(w, !0), this.print_token(w), this._output.space_before_token = !0, this._flags.declaration_statement ? (O(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(w)) : 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(w);
  105913. }, C.prototype.handle_operator = function(w) {
  105914. var P = w.text === "*" && (d(this._flags.last_token, ["function", "yield"]) || l(this._flags.last_token.type, [s.START_BLOCK, s.COMMA, s.END_BLOCK, s.SEMICOLON])), $ = l(w.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 === ",");
  105915. if (!this.start_of_statement(w)) {
  105916. var A = !P;
  105917. this.handle_whitespace_and_comments(w, A);
  105918. }
  105919. if (w.text === "*" && this._flags.last_token.type === s.DOT) {
  105920. this.print_token(w);
  105921. return;
  105922. }
  105923. if (w.text === "::") {
  105924. this.print_token(w);
  105925. return;
  105926. }
  105927. if (l(w.text, ["-", "+"]) && this.start_of_object_property()) {
  105928. this.print_token(w);
  105929. return;
  105930. }
  105931. if (this._flags.last_token.type === s.OPERATOR && l(this._options.operator_position, g) && this.allow_wrap_or_preserved_newline(w), w.text === ":" && this._flags.in_case) {
  105932. this.print_token(w), 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);
  105933. return;
  105934. }
  105935. var D = !0, E = !0, R = !1;
  105936. if (w.text === ":" ? this._flags.ternary_depth === 0 ? D = !1 : (this._flags.ternary_depth -= 1, R = !0) : w.text === "?" && (this._flags.ternary_depth += 1), !$ && !P && this._options.preserve_newlines && l(w.text, o)) {
  105937. var N = w.text === ":", V = N && R, B = N && !R;
  105938. switch (this._options.operator_position) {
  105939. case v.before_newline:
  105940. this._output.space_before_token = !B, this.print_token(w), (!N || V) && this.allow_wrap_or_preserved_newline(w), this._output.space_before_token = !0;
  105941. return;
  105942. case v.after_newline:
  105943. this._output.space_before_token = !0, !N || V ? this._tokens.peek().newlines ? this.print_newline(!1, !0) : this.allow_wrap_or_preserved_newline(w) : this._output.space_before_token = !1, this.print_token(w), this._output.space_before_token = !0;
  105944. return;
  105945. case v.preserve_newline:
  105946. B || this.allow_wrap_or_preserved_newline(w), D = !(this._output.just_added_newline() || B), this._output.space_before_token = D, this.print_token(w), this._output.space_before_token = !0;
  105947. return;
  105948. }
  105949. }
  105950. if (P) {
  105951. this.allow_wrap_or_preserved_newline(w), D = !1;
  105952. var W = this._tokens.peek();
  105953. E = W && l(W.type, [s.WORD, s.RESERVED]);
  105954. } else if (w.text === "...")
  105955. this.allow_wrap_or_preserved_newline(w), D = this._flags.last_token.type === s.START_BLOCK, E = !1;
  105956. else if (l(w.text, ["--", "++", "!", "~"]) || $) {
  105957. if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR) && this.allow_wrap_or_preserved_newline(w), D = !1, E = !1, w.newlines && (w.text === "--" || w.text === "++" || w.text === "~")) {
  105958. var F = d(this._flags.last_token, h) && w.newlines;
  105959. F && (this._previous_flags.if_block || this._previous_flags.else_block) && this.restore_mode(), this.print_newline(F, !0);
  105960. }
  105961. this._flags.last_token.text === ";" && O(this._flags.mode) && (D = !0), this._flags.last_token.type === s.RESERVED ? D = !0 : this._flags.last_token.type === s.END_EXPR ? D = !(this._flags.last_token.text === "]" && (w.text === "--" || w.text === "++")) : this._flags.last_token.type === s.OPERATOR && (D = l(w.text, ["--", "-", "++", "+"]) && l(this._flags.last_token.text, ["--", "-", "++", "+"]), l(w.text, ["+", "-"]) && l(this._flags.last_token.text, ["--", "++"]) && (E = !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();
  105962. }
  105963. this._output.space_before_token = this._output.space_before_token || D, this.print_token(w), this._output.space_before_token = E;
  105964. }, C.prototype.handle_block_comment = function(w, P) {
  105965. if (this._output.raw) {
  105966. this._output.add_raw_token(w), w.directives && w.directives.preserve === "end" && (this._output.raw = this._options.test_output_raw);
  105967. return;
  105968. }
  105969. if (w.directives) {
  105970. this.print_newline(!1, P), this.print_token(w), w.directives.preserve === "start" && (this._output.raw = !0), this.print_newline(!1, !0);
  105971. return;
  105972. }
  105973. if (!n.newline.test(w.text) && !w.newlines) {
  105974. this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0;
  105975. return;
  105976. } else
  105977. this.print_block_commment(w, P);
  105978. }, C.prototype.print_block_commment = function(w, P) {
  105979. var $ = b(w.text), A, D = !1, E = !1, R = w.whitespace_before, N = R.length;
  105980. if (this.print_newline(!1, P), this.print_token_line_indentation(w), this._output.add_token($[0]), this.print_newline(!1, P), $.length > 1) {
  105981. for ($ = $.slice(1), D = S($, "*"), E = x($, R), D && (this._flags.alignment = 1), A = 0; A < $.length; A++)
  105982. D ? (this.print_token_line_indentation(w), this._output.add_token(u($[A]))) : E && $[A] ? (this.print_token_line_indentation(w), this._output.add_token($[A].substring(N))) : (this._output.current_line.set_indent(-1), this._output.add_token($[A])), this.print_newline(!1, P);
  105983. this._flags.alignment = 0;
  105984. }
  105985. }, C.prototype.handle_comment = function(w, P) {
  105986. w.newlines ? this.print_newline(!1, P) : this._output.trim(!0), this._output.space_before_token = !0, this.print_token(w), this.print_newline(!1, P);
  105987. }, C.prototype.handle_dot = function(w) {
  105988. this.start_of_statement(w) || this.handle_whitespace_and_comments(w, !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(
  105989. w,
  105990. this._flags.last_token.text === ")" && this._options.break_chained_methods
  105991. ), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(w);
  105992. }, C.prototype.handle_unknown = function(w, P) {
  105993. this.print_token(w), w.text[w.text.length - 1] === `
  105994. ` && this.print_newline(!1, P);
  105995. }, C.prototype.handle_eof = function(w) {
  105996. for (; this._flags.mode === m.Statement; )
  105997. this.restore_mode();
  105998. this.handle_whitespace_and_comments(w);
  105999. }, W$.Beautifier = C, W$;
  106000. }
  106001. var D9;
  106002. function kht() {
  106003. if (D9) return h_.exports;
  106004. D9 = 1;
  106005. var t = Rht().Beautifier, e = yle().Options;
  106006. function n(r, i) {
  106007. var a = new t(r, i);
  106008. return a.beautify();
  106009. }
  106010. return h_.exports = n, h_.exports.defaultOptions = function() {
  106011. return new e();
  106012. }, h_.exports;
  106013. }
  106014. var g_ = { exports: {} }, J$ = {}, e2 = {}, R9;
  106015. function _le() {
  106016. if (R9) return e2;
  106017. R9 = 1;
  106018. var t = L4().Options;
  106019. function e(n) {
  106020. 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);
  106021. var r = this._get_boolean("space_around_selector_separator");
  106022. this.space_around_combinator = this._get_boolean("space_around_combinator") || r;
  106023. var i = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
  106024. this.brace_style = "collapse";
  106025. for (var a = 0; a < i.length; a++)
  106026. i[a] !== "expand" ? this.brace_style = "collapse" : this.brace_style = i[a];
  106027. }
  106028. return e.prototype = new t(), e2.Options = e, e2;
  106029. }
  106030. var k9;
  106031. function Lht() {
  106032. if (k9) return J$;
  106033. k9 = 1;
  106034. var t = _le().Options, e = k4().Output, n = N4().InputScanner, r = B4().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;
  106035. function f(d, h) {
  106036. this._source_text = d || "", this._options = new t(h), this._ch = null, this._input = null, this.NESTED_AT_RULE = {
  106037. page: !0,
  106038. "font-face": !0,
  106039. keyframes: !0,
  106040. // also in CONDITIONAL_GROUP_RULE below
  106041. media: !0,
  106042. supports: !0,
  106043. document: !0
  106044. }, this.CONDITIONAL_GROUP_RULE = {
  106045. media: !0,
  106046. supports: !0,
  106047. document: !0
  106048. }, this.NON_SEMICOLON_NEWLINE_PROPERTY = [
  106049. "grid-template-areas",
  106050. "grid-template"
  106051. ];
  106052. }
  106053. return f.prototype.eatString = function(d) {
  106054. var h = "";
  106055. for (this._ch = this._input.next(); this._ch; ) {
  106056. if (h += this._ch, this._ch === "\\")
  106057. h += this._input.next();
  106058. else if (d.indexOf(this._ch) !== -1 || this._ch === `
  106059. `)
  106060. break;
  106061. this._ch = this._input.next();
  106062. }
  106063. return h;
  106064. }, f.prototype.eatWhitespace = function(d) {
  106065. for (var h = s.test(this._input.peek()), p = 0; s.test(this._input.peek()); )
  106066. this._ch = this._input.next(), d && this._ch === `
  106067. ` && (p === 0 || p < this._options.max_preserve_newlines) && (p++, this._output.add_new_line(!0));
  106068. return h;
  106069. }, f.prototype.foundNestedPseudoClass = function() {
  106070. for (var d = 0, h = 1, p = this._input.peek(h); p; ) {
  106071. if (p === "{")
  106072. return !0;
  106073. if (p === "(")
  106074. d += 1;
  106075. else if (p === ")") {
  106076. if (d === 0)
  106077. return !1;
  106078. d -= 1;
  106079. } else if (p === ";" || p === "}")
  106080. return !1;
  106081. h++, p = this._input.peek(h);
  106082. }
  106083. return !1;
  106084. }, f.prototype.print_string = function(d) {
  106085. this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(d);
  106086. }, f.prototype.preserveSingleSpace = function(d) {
  106087. d && (this._output.space_before_token = !0);
  106088. }, f.prototype.indent = function() {
  106089. this._indentLevel++;
  106090. }, f.prototype.outdent = function() {
  106091. this._indentLevel > 0 && this._indentLevel--;
  106092. }, f.prototype.beautify = function() {
  106093. if (this._options.disabled)
  106094. return this._source_text;
  106095. var d = this._source_text, h = this._options.eol;
  106096. h === "auto" && (h = `
  106097. `, d && a.test(d || "") && (h = d.match(a)[0])), d = d.replace(o, `
  106098. `);
  106099. var p = d.match(/^[\t ]*/)[0];
  106100. this._output = new e(this._options, p), this._input = new n(d), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null;
  106101. for (var v = 0, g = !1, m = !1, y = !1, b = !1, _ = !1, O = this._ch, S = !1, x, C, T; x = this._input.read(l), C = x !== "", T = O, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), O = this._ch, this._ch; )
  106102. if (this._ch === "/" && this._input.peek() === "*") {
  106103. this._output.add_new_line(), this._input.back();
  106104. var w = this._input.read(u), P = i.get_directives(w);
  106105. P && P.ignore === "start" && (w += i.readIgnored(this._input)), this.print_string(w), this.eatWhitespace(!0), this._output.add_new_line();
  106106. } else if (this._ch === "/" && this._input.peek() === "/")
  106107. this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(c)), this.eatWhitespace(!0);
  106108. else if (this._ch === "$") {
  106109. this.preserveSingleSpace(C), this.print_string(this._ch);
  106110. var $ = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
  106111. $.match(/[ :]$/) && ($ = this.eatString(": ").replace(/\s+$/, ""), this.print_string($), this._output.space_before_token = !0), v === 0 && $.indexOf(":") !== -1 && (m = !0, this.indent());
  106112. } else if (this._ch === "@")
  106113. if (this.preserveSingleSpace(C), this._input.peek() === "{")
  106114. this.print_string(this._ch + this.eatString("}"));
  106115. else {
  106116. this.print_string(this._ch);
  106117. var A = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
  106118. A.match(/[ :]$/) && (A = this.eatString(": ").replace(/\s+$/, ""), this.print_string(A), this._output.space_before_token = !0), v === 0 && A.indexOf(":") !== -1 ? (m = !0, this.indent()) : A in this.NESTED_AT_RULE ? (this._nestedLevel += 1, A in this.CONDITIONAL_GROUP_RULE && (y = !0)) : v === 0 && !m && (b = !0);
  106119. }
  106120. else if (this._ch === "#" && this._input.peek() === "{")
  106121. this.preserveSingleSpace(C), this.print_string(this._ch + this.eatString("}"));
  106122. else if (this._ch === "{")
  106123. m && (m = !1, this.outdent()), b = !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)) : (T === "(" ? this._output.space_before_token = !1 : T !== "," && this.indent(), this.print_string(this._ch)), this.eatWhitespace(!0), this._output.add_new_line();
  106124. else if (this._ch === "}")
  106125. this.outdent(), this._output.add_new_line(), T === "{" && 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));
  106126. else if (this._ch === ":") {
  106127. for (var D = 0; D < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; D++)
  106128. if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[D])) {
  106129. S = !0;
  106130. break;
  106131. }
  106132. (g || y) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !b && 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(":"));
  106133. } else if (this._ch === '"' || this._ch === "'") {
  106134. var E = T === '"' || T === "'";
  106135. this.preserveSingleSpace(E || C), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0);
  106136. } else if (this._ch === ";")
  106137. S = !1, v === 0 ? (m && (this.outdent(), m = !1), b = !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);
  106138. else if (this._ch === "(")
  106139. if (this._input.lookBack("url"))
  106140. 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()));
  106141. else {
  106142. var R = !1;
  106143. this._input.lookBack("with") && (R = !0), this.preserveSingleSpace(C || R), this.print_string(this._ch), m && T === "$" && this._options.selector_separator_newline ? (this._output.add_new_line(), _ = !0) : (this.eatWhitespace(), v++, this.indent());
  106144. }
  106145. else if (this._ch === ")")
  106146. v && (v--, this.outdent()), _ && this._input.peek() === ";" && this._options.selector_separator_newline && (_ = !1, this.outdent(), this._output.add_new_line()), this.print_string(this._ch);
  106147. else if (this._ch === ",")
  106148. this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && (!m || _) && v === 0 && !b ? this._output.add_new_line() : this._output.space_before_token = !0;
  106149. else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !m && v === 0)
  106150. 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 = ""));
  106151. else if (this._ch === "]")
  106152. this.print_string(this._ch);
  106153. else if (this._ch === "[")
  106154. this.preserveSingleSpace(C), this.print_string(this._ch);
  106155. else if (this._ch === "=")
  106156. this.eatWhitespace(), this.print_string("="), s.test(this._ch) && (this._ch = "");
  106157. else if (this._ch === "!" && !this._input.lookBack("\\"))
  106158. this._output.space_before_token = !0, this.print_string(this._ch);
  106159. else {
  106160. var N = T === '"' || T === "'";
  106161. this.preserveSingleSpace(N || C), this.print_string(this._ch), !this._output.just_added_newline() && this._input.peek() === `
  106162. ` && S && this._output.add_new_line();
  106163. }
  106164. var V = this._output.get_code(h);
  106165. return V;
  106166. }, J$.Beautifier = f, J$;
  106167. }
  106168. var L9;
  106169. function Nht() {
  106170. if (L9) return g_.exports;
  106171. L9 = 1;
  106172. var t = Lht().Beautifier, e = _le().Options;
  106173. function n(r, i) {
  106174. var a = new t(r, i);
  106175. return a.beautify();
  106176. }
  106177. return g_.exports = n, g_.exports.defaultOptions = function() {
  106178. return new e();
  106179. }, g_.exports;
  106180. }
  106181. var m_ = { exports: {} }, t2 = {}, n2 = {}, N9;
  106182. function Ole() {
  106183. if (N9) return n2;
  106184. N9 = 1;
  106185. var t = L4().Options;
  106186. function e(n) {
  106187. 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(
  106188. "wrap_attributes",
  106189. ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
  106190. ), 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", [
  106191. "a",
  106192. "abbr",
  106193. "area",
  106194. "audio",
  106195. "b",
  106196. "bdi",
  106197. "bdo",
  106198. "br",
  106199. "button",
  106200. "canvas",
  106201. "cite",
  106202. "code",
  106203. "data",
  106204. "datalist",
  106205. "del",
  106206. "dfn",
  106207. "em",
  106208. "embed",
  106209. "i",
  106210. "iframe",
  106211. "img",
  106212. "input",
  106213. "ins",
  106214. "kbd",
  106215. "keygen",
  106216. "label",
  106217. "map",
  106218. "mark",
  106219. "math",
  106220. "meter",
  106221. "noscript",
  106222. "object",
  106223. "output",
  106224. "progress",
  106225. "q",
  106226. "ruby",
  106227. "s",
  106228. "samp",
  106229. /* 'script', */
  106230. "select",
  106231. "small",
  106232. "span",
  106233. "strong",
  106234. "sub",
  106235. "sup",
  106236. "svg",
  106237. "template",
  106238. "textarea",
  106239. "time",
  106240. "u",
  106241. "var",
  106242. "video",
  106243. "wbr",
  106244. "text",
  106245. // obsolete inline tags
  106246. "acronym",
  106247. "big",
  106248. "strike",
  106249. "tt"
  106250. ]), this.inline_custom_elements = this._get_boolean("inline_custom_elements", !0), this.void_elements = this._get_array("void_elements", [
  106251. // HTLM void elements - aka self-closing tags - aka singletons
  106252. // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
  106253. "area",
  106254. "base",
  106255. "br",
  106256. "col",
  106257. "embed",
  106258. "hr",
  106259. "img",
  106260. "input",
  106261. "keygen",
  106262. "link",
  106263. "menuitem",
  106264. "meta",
  106265. "param",
  106266. "source",
  106267. "track",
  106268. "wbr",
  106269. // NOTE: Optional tags are too complex for a simple list
  106270. // they are hard coded in _do_optional_end_element
  106271. // Doctype and xml elements
  106272. "!doctype",
  106273. "?xml",
  106274. // obsolete tags
  106275. // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
  106276. // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
  106277. "basefont",
  106278. "isindex"
  106279. ]), this.unformatted = this._get_array("unformatted", []), this.content_unformatted = this._get_array("content_unformatted", [
  106280. "pre",
  106281. "textarea"
  106282. ]), this.unformatted_content_delimiter = this._get_characters("unformatted_content_delimiter"), this.indent_scripts = this._get_selection("indent_scripts", ["normal", "keep", "separate"]);
  106283. }
  106284. return e.prototype = new t(), n2.Options = e, n2;
  106285. }
  106286. var y_ = {}, B9;
  106287. function z9() {
  106288. if (B9) return y_;
  106289. B9 = 1;
  106290. var t = PS().Tokenizer, e = PS().TOKEN, n = B4().Directives, r = ble().TemplatablePattern, i = Hw().Pattern, a = {
  106291. TAG_OPEN: "TK_TAG_OPEN",
  106292. TAG_CLOSE: "TK_TAG_CLOSE",
  106293. CONTROL_FLOW_OPEN: "TK_CONTROL_FLOW_OPEN",
  106294. CONTROL_FLOW_CLOSE: "TK_CONTROL_FLOW_CLOSE",
  106295. ATTRIBUTE: "TK_ATTRIBUTE",
  106296. EQUALS: "TK_EQUALS",
  106297. VALUE: "TK_VALUE",
  106298. COMMENT: "TK_COMMENT",
  106299. TEXT: "TK_TEXT",
  106300. UNKNOWN: "TK_UNKNOWN",
  106301. START: e.START,
  106302. RAW: e.RAW,
  106303. EOF: e.EOF
  106304. }, o = new n(/<\!--/, /-->/), s = function(l, u) {
  106305. t.call(this, l, u), this._current_tag_name = "";
  106306. var c = new r(this._input).read_options(this._options), f = new i(this._input);
  106307. if (this.__patterns = {
  106308. word: c.until(/[\n\r\t <]/),
  106309. word_control_flow_close_excluded: c.until(/[\n\r\t <}]/),
  106310. single_quote: c.until_after(/'/),
  106311. double_quote: c.until_after(/"/),
  106312. attribute: c.until(/[\n\r\t =>]|\/>/),
  106313. element_name: c.until(/[\n\r\t >\/]/),
  106314. angular_control_flow_start: f.matching(/\@[a-zA-Z]+[^({]*[({]/),
  106315. handlebars_comment: f.starting_with(/{{!--/).until_after(/--}}/),
  106316. handlebars: f.starting_with(/{{/).until_after(/}}/),
  106317. handlebars_open: f.until(/[\n\r\t }]/),
  106318. handlebars_raw_close: f.until(/}}/),
  106319. comment: f.starting_with(/<!--/).until_after(/-->/),
  106320. cdata: f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
  106321. // https://en.wikipedia.org/wiki/Conditional_comment
  106322. conditional_comment: f.starting_with(/<!\[/).until_after(/]>/),
  106323. processing: f.starting_with(/<\?/).until_after(/\?>/)
  106324. }, 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) {
  106325. var d = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
  106326. this.__patterns.unformatted_content_delimiter = f.matching(d).until_after(d);
  106327. }
  106328. };
  106329. return s.prototype = new t(), s.prototype._is_comment = function(l) {
  106330. return !1;
  106331. }, s.prototype._is_opening = function(l) {
  106332. return l.type === a.TAG_OPEN || l.type === a.CONTROL_FLOW_OPEN;
  106333. }, s.prototype._is_closing = function(l, u) {
  106334. 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("{");
  106335. }, s.prototype._reset = function() {
  106336. this._current_tag_name = "";
  106337. }, s.prototype._get_next_token = function(l, u) {
  106338. var c = null;
  106339. this._readWhitespace();
  106340. var f = this._input.peek();
  106341. 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);
  106342. }, s.prototype._read_comment_or_cdata = function(l) {
  106343. var u = null, c = null, f = null;
  106344. if (l === "<") {
  106345. var d = this._input.peek(1);
  106346. 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);
  106347. }
  106348. return u;
  106349. }, s.prototype._read_processing = function(l) {
  106350. var u = null, c = null, f = null;
  106351. if (l === "<") {
  106352. var d = this._input.peek(1);
  106353. (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);
  106354. }
  106355. return u;
  106356. }, s.prototype._read_open = function(l, u) {
  106357. var c = null, f = null;
  106358. 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;
  106359. }, s.prototype._read_open_handlebars = function(l, u) {
  106360. var c = null, f = null;
  106361. 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;
  106362. }, s.prototype._read_control_flows = function(l, u) {
  106363. var c = "", f = null;
  106364. if (!this._options.templating.includes("angular") || !this._options.indent_handlebars)
  106365. return f;
  106366. if (l === "@") {
  106367. if (c = this.__patterns.angular_control_flow_start.read(), c === "")
  106368. return f;
  106369. for (var d = c.endsWith("(") ? 1 : 0, h = 0; !(c.endsWith("{") && d === h); ) {
  106370. var p = this._input.next();
  106371. if (p === null)
  106372. break;
  106373. p === "(" ? d++ : p === ")" && h++, c += p;
  106374. }
  106375. f = this._create_token(a.CONTROL_FLOW_OPEN, c);
  106376. } else l === "}" && u && u.type === a.CONTROL_FLOW_OPEN && (c = this._input.next(), f = this._create_token(a.CONTROL_FLOW_CLOSE, c));
  106377. return f;
  106378. }, s.prototype._read_close = function(l, u) {
  106379. var c = null, f = null;
  106380. 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;
  106381. }, s.prototype._read_attribute = function(l, u, c) {
  106382. var f = null, d = "";
  106383. if (c && c.text[0] === "<")
  106384. if (l === "=")
  106385. f = this._create_token(a.EQUALS, this._input.next());
  106386. else if (l === '"' || l === "'") {
  106387. var h = this._input.next();
  106388. l === '"' ? h += this.__patterns.double_quote.read() : h += this.__patterns.single_quote.read(), f = this._create_token(a.VALUE, h);
  106389. } else
  106390. d = this.__patterns.attribute.read(), d && (u.type === a.EQUALS ? f = this._create_token(a.VALUE, d) : f = this._create_token(a.ATTRIBUTE, d));
  106391. return f;
  106392. }, s.prototype._is_content_unformatted = function(l) {
  106393. return this._options.void_elements.indexOf(l) === -1 && (this._options.content_unformatted.indexOf(l) !== -1 || this._options.unformatted.indexOf(l) !== -1);
  106394. }, s.prototype._read_raw_content = function(l, u, c) {
  106395. var f = "";
  106396. if (c && c.text[0] === "{")
  106397. f = this.__patterns.handlebars_raw_close.read();
  106398. else if (u.type === a.TAG_CLOSE && u.opened.text[0] === "<" && u.text[0] !== "/") {
  106399. var d = u.opened.text.substr(1).toLowerCase();
  106400. if (d === "script" || d === "style") {
  106401. var h = this._read_comment_or_cdata(l);
  106402. if (h)
  106403. return h.type = a.TEXT, h;
  106404. f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig"));
  106405. } else this._is_content_unformatted(d) && (f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig")));
  106406. }
  106407. return f ? this._create_token(a.TEXT, f) : null;
  106408. }, s.prototype._read_content_word = function(l, u) {
  106409. var c = "";
  106410. 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)
  106411. return this._create_token(a.TEXT, c);
  106412. }, y_.Tokenizer = s, y_.TOKEN = a, y_;
  106413. }
  106414. var V9;
  106415. function Bht() {
  106416. if (V9) return t2;
  106417. V9 = 1;
  106418. var t = Ole().Options, e = k4().Output, n = z9().Tokenizer, r = z9().TOKEN, i = /\r\n|[\r\n]/, a = /\r\n|[\r\n]/g, o = function(g, m) {
  106419. 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);
  106420. };
  106421. o.prototype.current_line_has_match = function(g) {
  106422. return this._output.current_line.has_match(g);
  106423. }, o.prototype.set_space_before_token = function(g, m) {
  106424. this._output.space_before_token = g, this._output.non_breaking_space = m;
  106425. }, o.prototype.set_wrap_point = function() {
  106426. this._output.set_indent(this.indent_level, this.alignment_size), this._output.set_wrap_point();
  106427. }, o.prototype.add_raw_token = function(g) {
  106428. this._output.add_raw_token(g);
  106429. }, o.prototype.print_preserved_newlines = function(g) {
  106430. var m = 0;
  106431. 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);
  106432. for (var y = 0; y < m; y++)
  106433. this.print_newline(y > 0);
  106434. return m !== 0;
  106435. }, o.prototype.traverse_whitespace = function(g) {
  106436. return g.whitespace_before || g.newlines ? (this.print_preserved_newlines(g) || (this._output.space_before_token = !0), !0) : !1;
  106437. }, o.prototype.previous_token_wrapped = function() {
  106438. return this._output.previous_token_wrapped;
  106439. }, o.prototype.print_newline = function(g) {
  106440. this._output.add_new_line(g);
  106441. }, o.prototype.print_token = function(g) {
  106442. g.text && (this._output.set_indent(this.indent_level, this.alignment_size), this._output.add_token(g.text));
  106443. }, o.prototype.indent = function() {
  106444. this.indent_level++;
  106445. }, o.prototype.deindent = function() {
  106446. this.indent_level > 0 && (this.indent_level--, this._output.set_indent(this.indent_level, this.alignment_size));
  106447. }, o.prototype.get_full_indent = function(g) {
  106448. return g = this.indent_level + (g || 0), g < 1 ? "" : this._output.get_indent_string(g);
  106449. };
  106450. var s = function(g) {
  106451. for (var m = null, y = g.next; y.type !== r.EOF && g.closed !== y; ) {
  106452. if (y.type === r.ATTRIBUTE && y.text === "type") {
  106453. y.next && y.next.type === r.EQUALS && y.next.next && y.next.next.type === r.VALUE && (m = y.next.next.text);
  106454. break;
  106455. }
  106456. y = y.next;
  106457. }
  106458. return m;
  106459. }, l = function(g, m) {
  106460. var y = null, b = null;
  106461. return m.closed ? (g === "script" ? y = "text/javascript" : g === "style" && (y = "text/css"), y = s(m) || y, y.search("text/css") > -1 ? b = "css" : y.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1 ? b = "javascript" : y.search(/(text|application|dojo)\/(x-)?(html)/) > -1 ? b = "html" : y.search(/test\/null/) > -1 && (b = "null"), b) : null;
  106462. };
  106463. function u(g, m) {
  106464. return m.indexOf(g) !== -1;
  106465. }
  106466. function c(g, m, y) {
  106467. this.parent = g || null, this.tag = m ? m.tag_name : "", this.indent_level = y || 0, this.parser_token = m || null;
  106468. }
  106469. function f(g) {
  106470. this._printer = g, this._current_frame = null;
  106471. }
  106472. f.prototype.get_parser_token = function() {
  106473. return this._current_frame ? this._current_frame.parser_token : null;
  106474. }, f.prototype.record_tag = function(g) {
  106475. var m = new c(this._current_frame, g, this._printer.indent_level);
  106476. this._current_frame = m;
  106477. }, f.prototype._try_pop_frame = function(g) {
  106478. var m = null;
  106479. return g && (m = g.parser_token, this._printer.indent_level = g.indent_level, this._current_frame = g.parent), m;
  106480. }, f.prototype._get_frame = function(g, m) {
  106481. for (var y = this._current_frame; y && g.indexOf(y.tag) === -1; ) {
  106482. if (m && m.indexOf(y.tag) !== -1) {
  106483. y = null;
  106484. break;
  106485. }
  106486. y = y.parent;
  106487. }
  106488. return y;
  106489. }, f.prototype.try_pop = function(g, m) {
  106490. var y = this._get_frame([g], m);
  106491. return this._try_pop_frame(y);
  106492. }, f.prototype.indent_to_tag = function(g) {
  106493. var m = this._get_frame(g);
  106494. m && (this._printer.indent_level = m.indent_level);
  106495. };
  106496. function d(g, m, y, b) {
  106497. this._source_text = g || "", m = m || {}, this._js_beautify = y, this._css_beautify = b, this._tag_stack = null;
  106498. var _ = new t(m, "html");
  106499. this._options = _, 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";
  106500. }
  106501. d.prototype.beautify = function() {
  106502. if (this._options.disabled)
  106503. return this._source_text;
  106504. var g = this._source_text, m = this._options.eol;
  106505. this._options.eol === "auto" && (m = `
  106506. `, g && i.test(g) && (m = g.match(i)[0])), g = g.replace(a, `
  106507. `);
  106508. var y = g.match(/^[\t ]*/)[0], b = {
  106509. text: "",
  106510. type: ""
  106511. }, _ = new h(), O = new o(this._options, y), S = new n(g, this._options).tokenize();
  106512. this._tag_stack = new f(O);
  106513. for (var x = null, C = S.next(); C.type !== r.EOF; )
  106514. C.type === r.TAG_OPEN || C.type === r.COMMENT ? (x = this._handle_tag_open(O, C, _, b, S), _ = x) : C.type === r.ATTRIBUTE || C.type === r.EQUALS || C.type === r.VALUE || C.type === r.TEXT && !_.tag_complete ? x = this._handle_inside_tag(O, C, _, b) : C.type === r.TAG_CLOSE ? x = this._handle_tag_close(O, C, _) : C.type === r.TEXT ? x = this._handle_text(O, C, _) : C.type === r.CONTROL_FLOW_OPEN ? x = this._handle_control_flow_open(O, C) : C.type === r.CONTROL_FLOW_CLOSE ? x = this._handle_control_flow_close(O, C) : O.add_raw_token(C), b = x, C = S.next();
  106515. var T = O._output.get_code(m);
  106516. return T;
  106517. }, d.prototype._handle_control_flow_open = function(g, m) {
  106518. var y = {
  106519. text: m.text,
  106520. type: m.type
  106521. };
  106522. 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;
  106523. }, d.prototype._handle_control_flow_close = function(g, m) {
  106524. var y = {
  106525. text: m.text,
  106526. type: m.type
  106527. };
  106528. 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;
  106529. }, d.prototype._handle_tag_close = function(g, m, y) {
  106530. var b = {
  106531. text: m.text,
  106532. type: m.type
  106533. };
  106534. 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(), b;
  106535. }, d.prototype._handle_inside_tag = function(g, m, y, b) {
  106536. var _ = y.has_wrapped_attrs, O = {
  106537. text: m.text,
  106538. type: m.type
  106539. };
  106540. 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), _ = _ || m.newlines !== 0), this._is_wrap_attributes_force && y.attr_count >= this._options.wrap_attributes_min_attrs && (b.type !== r.TAG_OPEN || // ie. second attribute and beyond
  106541. this._is_wrap_attributes_force_expand_multiline) && (g.print_newline(!1), _ = !0)), g.print_token(m), _ = _ || g.previous_token_wrapped(), y.has_wrapped_attrs = _), O;
  106542. }, d.prototype._handle_text = function(g, m, y) {
  106543. var b = {
  106544. text: m.text,
  106545. type: "TK_CONTENT"
  106546. };
  106547. 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)), b;
  106548. }, d.prototype._print_custom_beatifier_text = function(g, m, y) {
  106549. var b = this;
  106550. if (m.text !== "") {
  106551. var _ = m.text, O, S = 1, x = "", C = "";
  106552. y.custom_beautifier_name === "javascript" && typeof this._js_beautify == "function" ? O = this._js_beautify : y.custom_beautifier_name === "css" && typeof this._css_beautify == "function" ? O = this._css_beautify : y.custom_beautifier_name === "html" && (O = function(D, E) {
  106553. var R = new d(D, E, b._js_beautify, b._css_beautify);
  106554. return R.beautify();
  106555. }), this._options.indent_scripts === "keep" ? S = 0 : this._options.indent_scripts === "separate" && (S = -g.indent_level);
  106556. var T = g.get_full_indent(S);
  106557. if (_ = _.replace(/\n[ \t]*$/, ""), y.custom_beautifier_name !== "html" && _[0] === "<" && _.match(/^(<!--|<!\[CDATA\[)/)) {
  106558. var w = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(_);
  106559. if (!w) {
  106560. g.add_raw_token(m);
  106561. return;
  106562. }
  106563. x = T + w[1] + `
  106564. `, _ = w[4], w[5] && (C = T + w[5]), _ = _.replace(/\n[ \t]*$/, ""), (w[2] || w[3].indexOf(`
  106565. `) !== -1) && (w = w[3].match(/[ \t]+$/), w && (m.whitespace_before = w[0]));
  106566. }
  106567. if (_)
  106568. if (O) {
  106569. var P = function() {
  106570. this.eol = `
  106571. `;
  106572. };
  106573. P.prototype = this._options.raw_options;
  106574. var $ = new P();
  106575. _ = O(T + _, $);
  106576. } else {
  106577. var A = m.whitespace_before;
  106578. A && (_ = _.replace(new RegExp(`
  106579. (` + A + ")?", "g"), `
  106580. `)), _ = T + _.replace(/\n/g, `
  106581. ` + T);
  106582. }
  106583. x && (_ ? _ = x + _ + `
  106584. ` + C : _ = x + C), g.print_newline(!1), _ && (m.text = _, m.whitespace_before = "", m.newlines = 0, g.add_raw_token(m), g.print_newline(!0));
  106585. }
  106586. }, d.prototype._handle_tag_open = function(g, m, y, b, _) {
  106587. var O = this._get_tag_open_token(m);
  106588. if ((y.is_unformatted || y.is_content_unformatted) && !y.is_empty_element && m.type === r.TAG_OPEN && !O.is_start_tag ? (g.add_raw_token(m), O.start_tag_token = this._tag_stack.try_pop(O.tag_name)) : (g.traverse_whitespace(m), this._set_tag_position(g, m, O, y, b), O.is_inline_element || g.set_wrap_point(), g.print_token(m)), O.is_start_tag && this._is_wrap_attributes_force) {
  106589. var S = 0, x;
  106590. do
  106591. x = _.peek(S), x.type === r.ATTRIBUTE && (O.attr_count += 1), S += 1;
  106592. while (x.type !== r.EOF && x.type !== r.TAG_CLOSE);
  106593. }
  106594. return (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) && (O.alignment_size = m.text.length + 1), !O.tag_complete && !O.is_unformatted && (g.alignment_size = O.alignment_size), O;
  106595. };
  106596. var h = function(g, m) {
  106597. 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)
  106598. this.tag_complete = !0;
  106599. else {
  106600. var y;
  106601. 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 === "/>";
  106602. var b = 2;
  106603. this.tag_start_char === "{" && this.text.length >= 3 && this.text.charAt(2) === "~" && (b = 3), this.is_end_tag = this.is_end_tag || this.tag_start_char === "{" && (this.text.length < 3 || /[^#\^]/.test(this.text.charAt(b)));
  106604. }
  106605. };
  106606. d.prototype._get_tag_open_token = function(g) {
  106607. var m = new h(this._tag_stack.get_parser_token(), g);
  106608. 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;
  106609. }, d.prototype._set_tag_position = function(g, m, y, b, _) {
  106610. 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) {
  106611. if (y.tag_start_char === "{" && y.tag_check === "else") {
  106612. this._tag_stack.indent_to_tag(["if", "unless", "each"]), y.indent_content = !0;
  106613. var O = g.current_line_has_match(/{{#if/);
  106614. O || g.print_newline(!1);
  106615. }
  106616. y.tag_name === "!--" && _.type === r.TAG_CLOSE && b.is_end_tag && y.text.indexOf(`
  106617. `) === -1 || (y.is_inline_element || y.is_unformatted || g.print_newline(!1), this._calcluate_parent_multiline(g, y));
  106618. } else if (y.is_end_tag) {
  106619. var S = !1;
  106620. S = y.start_tag_token && y.start_tag_token.multiline_content, S = S || !y.is_inline_element && !(b.is_inline_element || b.is_unformatted) && !(_.type === r.TAG_CLOSE && y.start_tag_token === b) && _.type !== "TK_CONTENT", (y.is_content_unformatted || y.is_unformatted) && (S = !1), S && g.print_newline(!1);
  106621. } else
  106622. 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) && (_.type !== "TK_CONTENT" || y.is_content_unformatted) && g.print_newline(!1), this._calcluate_parent_multiline(g, y);
  106623. }, d.prototype._calcluate_parent_multiline = function(g, m) {
  106624. m.parent && g._output.just_added_newline() && !((m.is_inline_element || m.is_unformatted) && m.parent.is_inline_element) && (m.parent.multiline_content = !0);
  106625. };
  106626. 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"];
  106627. return d.prototype._do_optional_end_element = function(g) {
  106628. var m = null;
  106629. if (!(g.is_empty_element || !g.is_start_tag || !g.parent)) {
  106630. if (g.tag_name === "body")
  106631. m = m || this._tag_stack.try_pop("head");
  106632. else if (g.tag_name === "li")
  106633. m = m || this._tag_stack.try_pop("li", ["ol", "ul", "menu"]);
  106634. else if (g.tag_name === "dd" || g.tag_name === "dt")
  106635. m = m || this._tag_stack.try_pop("dt", ["dl"]), m = m || this._tag_stack.try_pop("dd", ["dl"]);
  106636. else if (g.parent.tag_name === "p" && p.indexOf(g.tag_name) !== -1) {
  106637. var y = g.parent.parent;
  106638. (!y || v.indexOf(y.tag_name) === -1) && (m = m || this._tag_stack.try_pop("p"));
  106639. } 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"]));
  106640. return g.parent = this._tag_stack.get_parser_token(), m;
  106641. }
  106642. }, t2.Beautifier = d, t2;
  106643. }
  106644. var F9;
  106645. function zht() {
  106646. if (F9) return m_.exports;
  106647. F9 = 1;
  106648. var t = Bht().Beautifier, e = Ole().Options;
  106649. function n(r, i, a, o) {
  106650. var s = new t(r, i, a, o);
  106651. return s.beautify();
  106652. }
  106653. return m_.exports = n, m_.exports.defaultOptions = function() {
  106654. return new e();
  106655. }, m_.exports;
  106656. }
  106657. var W9;
  106658. function Vht() {
  106659. if (W9) return zv;
  106660. W9 = 1;
  106661. var t = kht(), e = Nht(), n = zht();
  106662. function r(i, a, o, s) {
  106663. return o = o || t, s = s || e, n(i, a, o, s);
  106664. }
  106665. return r.defaultOptions = n.defaultOptions, zv.js = t, zv.css = e, zv.html = r, zv;
  106666. }
  106667. (function(t) {
  106668. function e(n, r, i) {
  106669. var a = function(o, s) {
  106670. return n.js_beautify(o, s);
  106671. };
  106672. 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;
  106673. }
  106674. (function(n) {
  106675. var r = Vht();
  106676. r.js_beautify = r.js, r.css_beautify = r.css, r.html_beautify = r.html, n.exports = e(r, r, r);
  106677. })(t);
  106678. })(vle);
  106679. var Fht = vle.exports;
  106680. const Wht = /* @__PURE__ */ mx(Fht), Qht = {
  106681. indent_size: "2",
  106682. indent_char: " ",
  106683. max_preserve_newlines: "5",
  106684. preserve_newlines: !0,
  106685. keep_array_indentation: !1,
  106686. break_chained_methods: !1,
  106687. indent_scripts: "normal",
  106688. brace_style: "collapse",
  106689. space_before_conditional: !0,
  106690. unescape_strings: !1,
  106691. jslint_happy: !1,
  106692. end_with_newline: !0,
  106693. wrap_line_length: "0",
  106694. indent_inner_html: !1,
  106695. comma_first: !1,
  106696. e4x: !1,
  106697. indent_empty_lines: !1
  106698. }, Hht = te({
  106699. name: "DEditor",
  106700. components: { Codemirror: Odt },
  106701. props: {
  106702. code: {
  106703. type: String,
  106704. default: ""
  106705. }
  106706. },
  106707. emits: ["update:code", "change"],
  106708. setup(t, { emit: e }) {
  106709. const n = U(null), r = U(Wht(t.code, Qht));
  106710. return {
  106711. editorRef: n,
  106712. modelValue: r,
  106713. handleCodeChange: (a) => {
  106714. try {
  106715. e("update:code", a), e("change", a);
  106716. } catch (o) {
  106717. console.error(o);
  106718. return;
  106719. }
  106720. },
  106721. oneDark: Idt,
  106722. javascript: wht,
  106723. json: Mht
  106724. };
  106725. }
  106726. });
  106727. function Ght(t, e, n, r, i, a) {
  106728. const o = fi("Codemirror");
  106729. return pe(), je(o, {
  106730. ref: "editorRef",
  106731. placeholder: "请输入",
  106732. style: { height: "500px" },
  106733. "model-value": t.modelValue,
  106734. "tab-size": 2,
  106735. "auto-focus": !1,
  106736. "indent-with-tabs": !0,
  106737. extensions: [
  106738. t.oneDark,
  106739. t.javascript(),
  106740. t.json()
  106741. ],
  106742. onChange: t.handleCodeChange
  106743. }, null, 8, ["model-value", "extensions", "onChange"]);
  106744. }
  106745. const jht = /* @__PURE__ */ $r(Hht, [["render", Ght]]), Zht = te({
  106746. name: "DEditorModal",
  106747. components: {
  106748. Modal: ji,
  106749. Editor: jht
  106750. },
  106751. props: {
  106752. title: {
  106753. type: String,
  106754. default: "编辑"
  106755. },
  106756. width: {
  106757. type: Number,
  106758. default: 800
  106759. }
  106760. },
  106761. emits: ["ok"],
  106762. setup(t, { emit: e }) {
  106763. const n = U(!1), r = U(""), i = () => {
  106764. e("ok", r.value), n.value = !1;
  106765. };
  106766. return Zle({
  106767. open: (a) => {
  106768. n.value = !0, r.value = a;
  106769. },
  106770. close: () => {
  106771. n.value = !1;
  106772. }
  106773. }), {
  106774. open: n,
  106775. code: r,
  106776. handleOk: i
  106777. };
  106778. }
  106779. });
  106780. function Uht(t, e, n, r, i, a) {
  106781. const o = fi("Editor"), s = fi("Modal");
  106782. return pe(), je(s, {
  106783. open: t.open,
  106784. "onUpdate:open": e[1] || (e[1] = (l) => t.open = l),
  106785. title: t.title,
  106786. width: t.width,
  106787. destroyOnClose: !0,
  106788. onOk: t.handleOk
  106789. }, {
  106790. default: we(() => [
  106791. M(o, {
  106792. code: t.code,
  106793. "onUpdate:code": e[0] || (e[0] = (l) => t.code = l)
  106794. }, null, 8, ["code"])
  106795. ]),
  106796. _: 1
  106797. }, 8, ["open", "title", "width", "onOk"]);
  106798. }
  106799. const p1 = /* @__PURE__ */ $r(Zht, [["render", Uht]]);
  106800. p1.install = (t) => (t.component(p1.name, p1), t);
  106801. const Xht = /* @__PURE__ */ He("span", { class: "text-gray-500" }, "秒", -1), z4 = /* @__PURE__ */ te({
  106802. __name: "DataConfig",
  106803. props: {
  106804. dataSource: {}
  106805. },
  106806. emits: ["change"],
  106807. setup(t, { emit: e }) {
  106808. const n = e, r = t, i = U({
  106809. sourceType: Li.STATIC,
  106810. // 静态数据相关
  106811. data: "",
  106812. // 接口相关
  106813. url: "",
  106814. method: "",
  106815. params: {},
  106816. headers: {},
  106817. refreshTime: 0,
  106818. // 数据处理
  106819. dataProcess: ""
  106820. }), a = (c) => {
  106821. i.value.refreshTime = c === 0 || c >= 60 ? c : 60;
  106822. };
  106823. let o;
  106824. const s = U(null), l = (c) => {
  106825. var f;
  106826. o = c, (f = s.value) == null || f.open(
  106827. typeof i.value[c] == "string" ? i.value[c] : JSON.stringify(i.value[c])
  106828. );
  106829. }, u = (c) => {
  106830. try {
  106831. i.value[o] = JSON.parse(c);
  106832. } catch {
  106833. i.value[o] = c;
  106834. }
  106835. };
  106836. return se(
  106837. () => r.dataSource,
  106838. (c) => {
  106839. Object.assign(i.value, c || {});
  106840. },
  106841. { immediate: !0 }
  106842. ), se(
  106843. () => i.value,
  106844. (c) => {
  106845. n("change", c);
  106846. },
  106847. { deep: !0 }
  106848. ), (c, f) => (pe(), Qe(wt, null, [
  106849. M(z(dr), {
  106850. size: "small",
  106851. layout: "horizontal",
  106852. model: i.value,
  106853. "label-col": { span: 8 },
  106854. "wrapper-col": { span: 16 }
  106855. }, {
  106856. default: we(() => [
  106857. M(z(dr).Item, {
  106858. label: "类型",
  106859. name: "sourceType"
  106860. }, {
  106861. default: we(() => [
  106862. M(z(di), {
  106863. value: i.value.sourceType,
  106864. "onUpdate:value": f[0] || (f[0] = (d) => i.value.sourceType = d)
  106865. }, {
  106866. default: we(() => [
  106867. M(z(D1), {
  106868. value: z(Li).STATIC
  106869. }, {
  106870. default: we(() => [
  106871. Kt("静态数据")
  106872. ]),
  106873. _: 1
  106874. }, 8, ["value"]),
  106875. M(z(D1), {
  106876. value: z(Li).API
  106877. }, {
  106878. default: we(() => [
  106879. Kt("动态数据")
  106880. ]),
  106881. _: 1
  106882. }, 8, ["value"])
  106883. ]),
  106884. _: 1
  106885. }, 8, ["value"])
  106886. ]),
  106887. _: 1
  106888. }),
  106889. i.value.sourceType === z(Li).STATIC ? (pe(), je(z(dr).Item, {
  106890. key: 0,
  106891. label: "数据",
  106892. name: "data"
  106893. }, {
  106894. default: we(() => [
  106895. M(z(Xr), {
  106896. type: "default",
  106897. size: "small",
  106898. onClick: f[1] || (f[1] = (d) => l("data"))
  106899. }, {
  106900. default: we(() => [
  106901. Kt("编辑")
  106902. ]),
  106903. _: 1
  106904. })
  106905. ]),
  106906. _: 1
  106907. })) : i.value.sourceType === z(Li).API ? (pe(), Qe(wt, { key: 1 }, [
  106908. M(z(dr).Item, {
  106909. label: "接口地址",
  106910. name: "url"
  106911. }, {
  106912. default: we(() => [
  106913. M(z(Hn).TextArea, {
  106914. "auto-size": { minRows: 5 },
  106915. placeholder: "请输入接口地址",
  106916. value: i.value.url,
  106917. "onUpdate:value": f[2] || (f[2] = (d) => i.value.url = d)
  106918. }, null, 8, ["value"])
  106919. ]),
  106920. _: 1
  106921. }),
  106922. M(z(dr).Item, {
  106923. label: "请求方式",
  106924. name: "method"
  106925. }, {
  106926. default: we(() => [
  106927. M(z(gf), {
  106928. value: i.value.method,
  106929. "onUpdate:value": f[3] || (f[3] = (d) => i.value.method = d)
  106930. }, {
  106931. default: we(() => [
  106932. M(z(hi), { value: "GET" }, {
  106933. default: we(() => [
  106934. Kt("GET")
  106935. ]),
  106936. _: 1
  106937. }),
  106938. M(z(hi), { value: "POST" }, {
  106939. default: we(() => [
  106940. Kt("POST")
  106941. ]),
  106942. _: 1
  106943. })
  106944. ]),
  106945. _: 1
  106946. }, 8, ["value"])
  106947. ]),
  106948. _: 1
  106949. }),
  106950. M(z(dr).Item, {
  106951. label: "刷新时间",
  106952. name: "refreshTime"
  106953. }, {
  106954. default: we(() => [
  106955. M(z(S0), {
  106956. value: i.value.refreshTime,
  106957. "onUpdate:value": f[4] || (f[4] = (d) => i.value.refreshTime = d),
  106958. step: 1,
  106959. style: { width: "100%" },
  106960. onChange: a
  106961. }, {
  106962. addonAfter: we(() => [
  106963. Xht
  106964. ]),
  106965. _: 1
  106966. }, 8, ["value"])
  106967. ]),
  106968. _: 1
  106969. }),
  106970. M(z(dr).Item, {
  106971. label: "请求参数",
  106972. name: "params"
  106973. }, {
  106974. default: we(() => [
  106975. M(z(Xr), {
  106976. type: "default",
  106977. size: "small",
  106978. onClick: f[5] || (f[5] = (d) => l("params"))
  106979. }, {
  106980. default: we(() => [
  106981. Kt("编辑")
  106982. ]),
  106983. _: 1
  106984. })
  106985. ]),
  106986. _: 1
  106987. }),
  106988. M(z(dr).Item, {
  106989. label: "请求头",
  106990. name: "headers"
  106991. }, {
  106992. default: we(() => [
  106993. M(z(Xr), {
  106994. type: "default",
  106995. size: "small",
  106996. onClick: f[6] || (f[6] = (d) => l("headers"))
  106997. }, {
  106998. default: we(() => [
  106999. Kt("编辑")
  107000. ]),
  107001. _: 1
  107002. })
  107003. ]),
  107004. _: 1
  107005. }),
  107006. M(z(dr).Item, {
  107007. label: "数据处理",
  107008. name: "dataProcess"
  107009. }, {
  107010. default: we(() => [
  107011. M(z(Xr), {
  107012. type: "default",
  107013. size: "small",
  107014. onClick: f[7] || (f[7] = (d) => l("dataProcess"))
  107015. }, {
  107016. default: we(() => [
  107017. Kt("编辑")
  107018. ]),
  107019. _: 1
  107020. })
  107021. ]),
  107022. _: 1
  107023. })
  107024. ], 64)) : _t("", !0)
  107025. ]),
  107026. _: 1
  107027. }, 8, ["model"]),
  107028. M(z(p1), {
  107029. ref_key: "codeEditorRef",
  107030. ref: s,
  107031. title: "编辑",
  107032. onOk: u
  107033. }, null, 512)
  107034. ], 64));
  107035. }
  107036. }), In = {
  107037. /* 标题 */
  107038. title: {
  107039. label: "标题",
  107040. prop: "title",
  107041. type: "group",
  107042. children: [
  107043. {
  107044. label: " ",
  107045. prop: "title.show",
  107046. type: "checkboxGroup",
  107047. fieldProps: {
  107048. options: [{ label: "标题可见", value: !0 }]
  107049. },
  107050. defaultValue: [],
  107051. format: (t, e) => {
  107052. t.value["title.show"] = !!(e != null && e.length);
  107053. },
  107054. valueToForm: (t) => t ? [!0] : []
  107055. },
  107056. {
  107057. type: "dependency",
  107058. label: "",
  107059. prop: "",
  107060. name: ["title.show"],
  107061. children: (t) => t["title.show"].length ? [
  107062. {
  107063. label: "文本",
  107064. prop: "title.text",
  107065. type: "input",
  107066. defaultValue: "图表标题"
  107067. },
  107068. {
  107069. label: "位置",
  107070. prop: "title.left",
  107071. type: "position",
  107072. defaultValue: "center"
  107073. },
  107074. {
  107075. label: "样式",
  107076. prop: "title.textStyle",
  107077. type: "fontStyle",
  107078. defaultValue: {
  107079. color: "#ffffffff",
  107080. size: 18,
  107081. bold: !0,
  107082. italic: !1
  107083. },
  107084. format: (e, n) => {
  107085. e.value["title.textStyle"] = {
  107086. color: n.color,
  107087. fontSize: n.size,
  107088. fontWeight: n.bold ? "bold" : "normal",
  107089. fontStyle: n.italic ? "italic" : "normal"
  107090. };
  107091. },
  107092. valueToForm: (e, n) => ({
  107093. color: kt(n, "title.textStyle.color", "#FFFFFF"),
  107094. size: kt(n, "title.textStyle.size", 16),
  107095. bold: kt(n, "title.textStyle.fontWeight") === "bold",
  107096. italic: kt(n, "title.textStyle.fontStyle") === "italic"
  107097. })
  107098. },
  107099. {
  107100. label: "背景",
  107101. prop: "",
  107102. type: "divider"
  107103. },
  107104. {
  107105. label: "填充",
  107106. prop: "title.backgroundColor",
  107107. type: "backgroundSelect",
  107108. fieldProps: {
  107109. filterOptions: ["image"]
  107110. },
  107111. defaultValue: {
  107112. type: "color",
  107113. color: "#FFFFFF00"
  107114. },
  107115. format: (e, n) => {
  107116. e.value["title.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107117. },
  107118. valueToForm: (e) => !e || e === "none" ? {
  107119. type: "none",
  107120. color: "#000000ff"
  107121. } : {
  107122. type: "color",
  107123. color: e.color
  107124. }
  107125. },
  107126. {
  107127. label: "圆角",
  107128. prop: "title.borderRadius",
  107129. type: "inputNumber",
  107130. fieldProps: {
  107131. addonAfter: "px"
  107132. },
  107133. defaultValue: 0
  107134. }
  107135. ] : []
  107136. }
  107137. ]
  107138. },
  107139. /* 图例 */
  107140. legend: {
  107141. label: "图例",
  107142. prop: "legend",
  107143. type: "group",
  107144. children: [
  107145. {
  107146. label: " ",
  107147. prop: "legend.show",
  107148. type: "checkboxGroup",
  107149. fieldProps: {
  107150. options: [{ label: "图例可见", value: !0 }]
  107151. },
  107152. defaultValue: [!0],
  107153. format: (t, e) => {
  107154. t.value["legend.show"] = !!(e != null && e.length);
  107155. },
  107156. valueToForm: (t) => t ? [!0] : []
  107157. },
  107158. {
  107159. type: "dependency",
  107160. label: "",
  107161. prop: "",
  107162. name: ["legend.show"],
  107163. children: (t) => t["legend.show"].length ? [
  107164. {
  107165. label: "位置",
  107166. prop: "legend.position",
  107167. type: "position",
  107168. fieldProps: {
  107169. type: "round"
  107170. },
  107171. defaultValue: "top",
  107172. format: (e, n) => {
  107173. switch (["left", "right"].includes(n) ? e.value["legend.orient"] = "vertical" : e.value["legend.orient"] = "horizontal", n) {
  107174. case "bottom":
  107175. e.value["legend.top"] = "auto", e.value["legend.right"] = "auto", e.value["legend.bottom"] = 8, e.value["legend.left"] = "center";
  107176. break;
  107177. case "left":
  107178. e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.left"] = 8, e.value["legend.top"] = "center";
  107179. break;
  107180. case "right":
  107181. e.value["legend.bottom"] = "auto", e.value["legend.left"] = "auto", e.value["legend.right"] = 8, e.value["legend.top"] = "center";
  107182. break;
  107183. default:
  107184. e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.top"] = 32, e.value["legend.left"] = "center";
  107185. }
  107186. },
  107187. valueToForm: (e, n) => kt(n, "legend.orient") === "vertical" ? e === "top" ? "top" : e === "bottom" ? "bottom" : "left" : kt(n, "legend.bottom") === 8 && kt(n, "legend.left") === "center" ? "bottom" : "top"
  107188. },
  107189. {
  107190. label: "样式",
  107191. prop: "legend.textStyle",
  107192. type: "fontStyle",
  107193. defaultValue: {
  107194. color: "#000000ff",
  107195. size: 12,
  107196. bold: !1,
  107197. italic: !1
  107198. },
  107199. format: (e, n) => {
  107200. e.value["legend.textStyle"] = {
  107201. color: n.color,
  107202. fontSize: n.size,
  107203. fontWeight: n.bold ? "bold" : "normal",
  107204. fontStyle: n.italic ? "italic" : "normal"
  107205. };
  107206. },
  107207. valueToForm: (e, n) => ({
  107208. color: kt(n, "legend.textStyle.color", "#000000ff"),
  107209. size: kt(n, "legend.textStyle.fontSize", 12),
  107210. bold: kt(n, "legend.textStyle.fontWeight") === "bold",
  107211. italic: kt(n, "legend.textStyle.fontStyle") === "italic"
  107212. })
  107213. },
  107214. {
  107215. label: "边框",
  107216. prop: "",
  107217. type: "divider"
  107218. },
  107219. {
  107220. label: "线宽",
  107221. prop: "legend.borderWidth",
  107222. type: "inputNumber",
  107223. fieldProps: {
  107224. addonAfter: "px"
  107225. },
  107226. defaultValue: 0
  107227. },
  107228. {
  107229. label: "颜色",
  107230. prop: "legend.borderColor",
  107231. type: "colorSelect",
  107232. defaultValue: "#ccc"
  107233. },
  107234. {
  107235. label: "圆角",
  107236. prop: "legend.borderRadius",
  107237. type: "inputNumber",
  107238. fieldProps: {
  107239. addonAfter: "px"
  107240. },
  107241. defaultValue: 0
  107242. },
  107243. {
  107244. label: "背景",
  107245. prop: "",
  107246. type: "divider"
  107247. },
  107248. {
  107249. label: "背景",
  107250. prop: "legend.backgroundColor",
  107251. type: "backgroundSelect",
  107252. fieldProps: {
  107253. filterOptions: ["image"]
  107254. },
  107255. defaultValue: {
  107256. type: "color",
  107257. color: "#fff"
  107258. },
  107259. format: (e, n) => {
  107260. e.value["legend.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107261. },
  107262. valueToForm: (e) => !e || e === "none" ? {
  107263. type: "none"
  107264. } : {
  107265. type: "color",
  107266. color: e.color
  107267. }
  107268. },
  107269. {
  107270. label: "阴影",
  107271. prop: "legend.shadowBlur",
  107272. type: "radioGroup",
  107273. fieldProps: {
  107274. options: [
  107275. { label: "开启", value: !0 },
  107276. { label: "关闭", value: !1 }
  107277. ]
  107278. },
  107279. defaultValue: !1,
  107280. format: (e, n) => {
  107281. 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);
  107282. },
  107283. valueToForm: (e) => !!e
  107284. }
  107285. ] : []
  107286. }
  107287. ]
  107288. },
  107289. /* 系列 */
  107290. series: {
  107291. label: "系列",
  107292. prop: "series",
  107293. type: "group",
  107294. children: [
  107295. {
  107296. label: "配色",
  107297. prop: "color",
  107298. type: "colorScheme",
  107299. defaultValue: X1[0].color
  107300. }
  107301. ]
  107302. },
  107303. /* X轴 */
  107304. xAxis: {
  107305. label: "X 轴",
  107306. prop: "xAxis",
  107307. type: "group",
  107308. children: [
  107309. {
  107310. label: "类型",
  107311. prop: "xAxis.type",
  107312. type: "select",
  107313. fieldProps: {
  107314. options: [
  107315. { label: "类目坐标轴", value: "category" },
  107316. { label: "数值坐标轴", value: "value" },
  107317. { label: "时间坐标轴", value: "time" }
  107318. ]
  107319. },
  107320. defaultValue: "category"
  107321. },
  107322. {
  107323. label: " ",
  107324. prop: "xAxis.showName",
  107325. type: "checkboxGroup",
  107326. fieldProps: {
  107327. options: [{ label: "显示轴标题", value: !0 }]
  107328. },
  107329. defaultValue: [!0],
  107330. format: (t, e) => {
  107331. 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);
  107332. },
  107333. valueToForm: (t) => t ? [!0] : []
  107334. },
  107335. {
  107336. label: "",
  107337. prop: "",
  107338. type: "dependency",
  107339. name: ["xAxis.showName"],
  107340. children: (t) => t["xAxis.showName"].length ? [
  107341. {
  107342. label: "标题内容",
  107343. prop: "xAxis.name",
  107344. type: "input",
  107345. defaultValue: "X 轴标题",
  107346. format: (e, n) => {
  107347. e.value["xAxis.showName"] && (e.value["xAxis.name"] = n, e.value["xAxis.nameGap"] = 25);
  107348. },
  107349. valueToForm: (e) => e || "X 轴标题"
  107350. },
  107351. {
  107352. label: "标题位置",
  107353. prop: "xAxis.nameLocation",
  107354. type: "position",
  107355. defaultValue: "center",
  107356. format: (e, n) => {
  107357. const r = {
  107358. left: "start",
  107359. center: "middle",
  107360. right: "end"
  107361. };
  107362. e.value["xAxis.nameLocation"] = n ? r[n] : "middle";
  107363. },
  107364. valueToForm: (e) => ({
  107365. start: "left",
  107366. middle: "center",
  107367. end: "right"
  107368. })[e] || "center"
  107369. },
  107370. {
  107371. label: "标题样式",
  107372. prop: "xAxis.nameTextStyle",
  107373. type: "fontStyle",
  107374. defaultValue: {
  107375. color: "#000000ff",
  107376. size: 12,
  107377. bold: !1,
  107378. italic: !1
  107379. },
  107380. format: (e, n) => {
  107381. e.value["xAxis.nameTextStyle"] = {
  107382. color: n.color,
  107383. fontSize: n.size,
  107384. fontWeight: n.bold ? "bold" : "normal",
  107385. fontStyle: n.italic ? "italic" : "normal"
  107386. };
  107387. },
  107388. valueToForm: (e) => ({
  107389. color: (e == null ? void 0 : e.color) || "#000000ff",
  107390. size: (e == null ? void 0 : e.fontSize) || 12,
  107391. bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
  107392. italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
  107393. })
  107394. }
  107395. ] : []
  107396. },
  107397. {
  107398. label: "轴线",
  107399. prop: "",
  107400. type: "divider"
  107401. },
  107402. {
  107403. label: "线宽",
  107404. prop: "xAxis.axisLine.lineStyle.width",
  107405. type: "inputNumber",
  107406. fieldProps: {
  107407. addonAfter: "px"
  107408. },
  107409. defaultValue: 1
  107410. },
  107411. {
  107412. label: "颜色",
  107413. prop: "xAxis.axisLine.lineStyle.color",
  107414. type: "colorSelect",
  107415. defaultValue: "#ccc"
  107416. },
  107417. {
  107418. label: "刻度",
  107419. prop: "",
  107420. type: "divider"
  107421. },
  107422. {
  107423. label: " ",
  107424. prop: "xAxis.axisTick.show",
  107425. type: "checkboxGroup",
  107426. fieldProps: {
  107427. options: [{ label: "显示刻度", value: !0 }]
  107428. },
  107429. defaultValue: [!0],
  107430. format: (t, e) => {
  107431. t.value["xAxis.axisTick.show"] = !!(e != null && e.length);
  107432. },
  107433. valueToForm: (t) => t ? [!0] : []
  107434. },
  107435. {
  107436. label: "",
  107437. prop: "",
  107438. type: "dependency",
  107439. name: ["xAxis.axisTick.show"],
  107440. children: (t) => t["xAxis.axisTick.show"].length ? [
  107441. {
  107442. label: "刻度宽度",
  107443. prop: "xAxis.axisTick.lineStyle.width",
  107444. type: "inputNumber",
  107445. fieldProps: {
  107446. addonAfter: "px"
  107447. },
  107448. defaultValue: 5
  107449. },
  107450. {
  107451. label: "刻度颜色",
  107452. prop: "xAxis.axisTick.lineStyle.color",
  107453. type: "colorSelect",
  107454. defaultValue: "#ccc"
  107455. }
  107456. ] : []
  107457. },
  107458. {
  107459. label: "标签",
  107460. prop: "",
  107461. type: "divider"
  107462. },
  107463. {
  107464. label: " ",
  107465. prop: "xAxis.axisLabel.show",
  107466. type: "checkboxGroup",
  107467. fieldProps: {
  107468. options: [{ label: "显示标签", value: !0 }]
  107469. },
  107470. defaultValue: [!0],
  107471. format: (t, e) => {
  107472. t.value["xAxis.axisLabel.show"] = !!(e != null && e.length);
  107473. },
  107474. valueToForm: (t) => t ? [!0] : []
  107475. },
  107476. {
  107477. label: "",
  107478. prop: "",
  107479. type: "dependency",
  107480. name: ["xAxis.axisLabel.show"],
  107481. children: (t) => t["xAxis.axisLabel.show"].length ? [
  107482. {
  107483. label: "样式",
  107484. prop: "xAxis.axisLabel",
  107485. type: "fontStyle",
  107486. defaultValue: {
  107487. color: "#000000ff",
  107488. size: 12,
  107489. bold: !1,
  107490. italic: !1
  107491. },
  107492. format: (e, n) => {
  107493. 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";
  107494. },
  107495. valueToForm: (e, n) => ({
  107496. color: kt(n, "xAxis.axisLabel.color", "#000000ff"),
  107497. size: kt(n, "xAxis.axisLabel.fontSize", 12),
  107498. bold: kt(n, "xAxis.axisLabel.fontWeight") === "bold",
  107499. italic: kt(n, "xAxis.axisLabel.fontStyle") === "italic"
  107500. })
  107501. }
  107502. ] : []
  107503. }
  107504. ]
  107505. },
  107506. /* Y 轴 */
  107507. yAxis: {
  107508. label: "Y 轴",
  107509. prop: "yAxis",
  107510. type: "group",
  107511. children: [
  107512. {
  107513. label: " ",
  107514. prop: "yAxis.showName",
  107515. type: "checkboxGroup",
  107516. fieldProps: {
  107517. options: [{ label: "显示轴标题", value: !0 }]
  107518. },
  107519. defaultValue: [],
  107520. format: (t, e) => {
  107521. 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);
  107522. },
  107523. valueToForm: (t) => t ? [!0] : []
  107524. },
  107525. {
  107526. label: "",
  107527. prop: "",
  107528. type: "dependency",
  107529. name: ["yAxis.showName"],
  107530. children: (t) => t["yAxis.showName"].length ? [
  107531. {
  107532. label: "标题内容",
  107533. prop: "yAxis.name",
  107534. type: "input",
  107535. defaultValue: "Y 轴标题",
  107536. format: (e, n) => {
  107537. e.value["yAxis.showName"] ? (e.value["yAxis.name"] = n, e.value["yAxis.nameGap"] = 25) : (e.value["yAxis.name"] = "", e.value["yAxis.nameGap"] = 15);
  107538. },
  107539. valueToForm: (e) => e || "Y 轴标题"
  107540. },
  107541. {
  107542. label: "标题位置",
  107543. prop: "yAxis.nameLocation",
  107544. type: "position",
  107545. defaultValue: "center",
  107546. format: (e, n) => {
  107547. const r = {
  107548. left: "start",
  107549. center: "middle",
  107550. right: "end"
  107551. };
  107552. e.value["yAxis.nameLocation"] = n ? r[n] : "middle";
  107553. },
  107554. valueToForm: (e) => ({
  107555. start: "left",
  107556. middle: "center",
  107557. end: "right"
  107558. })[e] || "center "
  107559. },
  107560. {
  107561. label: "标题样式",
  107562. prop: "yAxis.nameTextStyle",
  107563. type: "fontStyle",
  107564. defaultValue: {
  107565. color: "#FFFFFFFF",
  107566. size: 12,
  107567. bold: !1,
  107568. italic: !1
  107569. },
  107570. format: (e, n) => {
  107571. e.value["yAxis.nameTextStyle"] = {
  107572. color: n.color,
  107573. fontSize: n.size,
  107574. fontWeight: n.bold ? "bold" : "normal",
  107575. fontStyle: n.italic ? "italic" : "normal"
  107576. };
  107577. },
  107578. valueToForm: (e) => ({
  107579. color: (e == null ? void 0 : e.color) || "#000000ff",
  107580. size: (e == null ? void 0 : e.fontSize) || 12,
  107581. bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
  107582. italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
  107583. })
  107584. }
  107585. ] : []
  107586. },
  107587. {
  107588. label: "轴线",
  107589. prop: "",
  107590. type: "divider"
  107591. },
  107592. {
  107593. label: " ",
  107594. prop: "yAxis.axisLine.show",
  107595. type: "checkboxGroup",
  107596. fieldProps: {
  107597. options: [{ label: "显示轴线", value: !0 }]
  107598. },
  107599. defaultValue: [!0],
  107600. format: (t, e) => {
  107601. t.value["yAxis.axisLine.show"] = !!(e != null && e.length);
  107602. },
  107603. valueToForm: (t) => t ? [!0] : []
  107604. },
  107605. {
  107606. label: "",
  107607. prop: "",
  107608. type: "dependency",
  107609. name: ["yAxis.axisLine.show"],
  107610. children: (t) => t["yAxis.axisLine.show"].length ? [
  107611. {
  107612. label: "线宽",
  107613. prop: "yAxis.axisLine.lineStyle.width",
  107614. type: "inputNumber",
  107615. fieldProps: {
  107616. addonAfter: "px"
  107617. },
  107618. defaultValue: 1
  107619. },
  107620. {
  107621. label: "颜色",
  107622. prop: "yAxis.axisLine.lineStyle.color",
  107623. type: "colorSelect",
  107624. defaultValue: "#ccc"
  107625. }
  107626. ] : []
  107627. },
  107628. {
  107629. label: "刻度",
  107630. prop: "",
  107631. type: "divider"
  107632. },
  107633. {
  107634. label: " ",
  107635. prop: "yAxis.axisTick.show",
  107636. type: "checkboxGroup",
  107637. fieldProps: {
  107638. options: [{ label: "显示刻度", value: !0 }]
  107639. },
  107640. defaultValue: [!0],
  107641. format: (t, e) => {
  107642. t.value["yAxis.axisTick.show"] = !!(e != null && e.length);
  107643. },
  107644. valueToForm: (t) => t ? [!0] : []
  107645. },
  107646. {
  107647. label: "",
  107648. prop: "",
  107649. type: "dependency",
  107650. name: ["yAxis.axisTick.show"],
  107651. children: (t) => t["yAxis.axisTick.show"].length ? [
  107652. {
  107653. label: "刻度长度",
  107654. prop: "yAxis.axisTick.lineStyle.width",
  107655. type: "inputNumber",
  107656. fieldProps: {
  107657. addonAfter: "px"
  107658. },
  107659. defaultValue: 5
  107660. },
  107661. {
  107662. label: "刻度颜色",
  107663. prop: "yAxis.axisTick.lineStyle.color",
  107664. type: "colorSelect",
  107665. defaultValue: "#ccc"
  107666. }
  107667. ] : []
  107668. },
  107669. {
  107670. label: "标签",
  107671. prop: "",
  107672. type: "divider"
  107673. },
  107674. {
  107675. label: " ",
  107676. prop: "yAxis.axisLabel.show",
  107677. type: "checkboxGroup",
  107678. fieldProps: {
  107679. options: [{ label: "显示标签", value: !0 }]
  107680. },
  107681. defaultValue: [!0],
  107682. format: (t, e) => {
  107683. t.value["yAxis.axisLabel.show"] = !!(e != null && e.length);
  107684. },
  107685. valueToForm: (t) => t ? [!0] : []
  107686. },
  107687. {
  107688. label: "",
  107689. prop: "",
  107690. type: "dependency",
  107691. name: ["yAxis.axisLabel.show"],
  107692. children: (t) => t["yAxis.axisLabel.show"].length ? [
  107693. {
  107694. label: "样式",
  107695. prop: "yAxis.axisLabel",
  107696. type: "fontStyle",
  107697. defaultValue: {
  107698. color: "#000000ff",
  107699. size: 12,
  107700. bold: !1,
  107701. italic: !1
  107702. },
  107703. format: (e, n) => {
  107704. 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";
  107705. },
  107706. valueToForm: (e, n) => ({
  107707. color: kt(n, "yAxis.axisLabel.color", "#000000ff"),
  107708. size: kt(n, "yAxis.axisLabel.fontSize", 12),
  107709. bold: kt(n, "yAxis.axisLabel.fontWeight") === "bold",
  107710. italic: kt(n, "yAxis.axisLabel.fontStyle") === "italic"
  107711. })
  107712. },
  107713. {
  107714. label: "旋转角度",
  107715. prop: "yAxis.axisLabel.rotate",
  107716. type: "inputNumber",
  107717. fieldProps: {
  107718. addonAfter: "°",
  107719. min: -90,
  107720. max: 90,
  107721. step: 1
  107722. }
  107723. }
  107724. ] : []
  107725. }
  107726. ]
  107727. },
  107728. /* 提示 */
  107729. tooltip: {
  107730. label: "提示",
  107731. prop: "tooltip",
  107732. type: "group",
  107733. children: [
  107734. {
  107735. label: " ",
  107736. prop: "tooltip.show",
  107737. type: "checkboxGroup",
  107738. fieldProps: {
  107739. options: [{ label: "提示可见", value: !0 }]
  107740. },
  107741. defaultValue: [!0],
  107742. format: (t, e) => {
  107743. t.value["tooltip.show"] = !!(e != null && e.length);
  107744. },
  107745. valueToForm: (t) => t ? [!0] : []
  107746. },
  107747. {
  107748. label: "",
  107749. prop: "",
  107750. type: "dependency",
  107751. name: ["tooltip.show"],
  107752. children: (t) => t["tooltip.show"].length ? [
  107753. {
  107754. label: "文本",
  107755. prop: "tooltip.formatter",
  107756. type: "checkboxGroup",
  107757. fieldProps: {
  107758. options: [
  107759. { label: "分类名", value: "b" },
  107760. { label: "系列名", value: "a" },
  107761. { label: "数值", value: "c" }
  107762. ]
  107763. },
  107764. defaultValue: ["b"],
  107765. format: (e, n) => {
  107766. e.value["tooltip.formatter"] = n.map((r) => `{${r}}`).join(" ");
  107767. },
  107768. valueToForm: (e, n) => {
  107769. var r, i;
  107770. return (i = (r = kt(n, "tooltip.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
  107771. }
  107772. },
  107773. // {
  107774. // label: "格式化",
  107775. // prop: "tooltip.valueFormatter",
  107776. // type: "input",
  107777. // tip: "支持字符串模板和回调函数",
  107778. // defaultValue: "(value, dataIndex) => value",
  107779. // },
  107780. {
  107781. label: "样式",
  107782. prop: "tooltip.textStyle",
  107783. type: "fontStyle",
  107784. defaultValue: {
  107785. color: "#000000ff",
  107786. size: 12,
  107787. bold: !1,
  107788. italic: !1
  107789. },
  107790. format: (e, n) => {
  107791. e.value["tooltip.textStyle"] = {
  107792. color: n.color,
  107793. fontSize: n.size,
  107794. fontWeight: n.bold ? "bold" : "normal",
  107795. fontStyle: n.italic ? "italic" : "normal"
  107796. };
  107797. },
  107798. valueToForm: (e, n) => ({
  107799. color: kt(n, "tooltip.textStyle.color", "#000000ff"),
  107800. size: kt(n, "tooltip.textStyle.fontSize", 12),
  107801. bold: kt(n, "tooltip.textStyle.fontWeight") === "bold",
  107802. italic: kt(n, "tooltip.textStyle.fontStyle") === "italic"
  107803. })
  107804. },
  107805. {
  107806. label: "边框",
  107807. prop: "",
  107808. type: "divider"
  107809. },
  107810. {
  107811. label: "线宽",
  107812. prop: "tooltip.borderWidth",
  107813. type: "inputNumber",
  107814. fieldProps: {
  107815. addonAfter: "px"
  107816. },
  107817. defaultValue: 1
  107818. },
  107819. {
  107820. label: "颜色",
  107821. prop: "tooltip.borderColor",
  107822. type: "colorSelect",
  107823. defaultValue: "#ccc"
  107824. },
  107825. {
  107826. label: "圆角",
  107827. prop: "tooltip.borderRadius",
  107828. type: "inputNumber",
  107829. fieldProps: {
  107830. addonAfter: "px"
  107831. },
  107832. defaultValue: 4
  107833. },
  107834. {
  107835. label: "背景",
  107836. prop: "",
  107837. type: "divider"
  107838. },
  107839. {
  107840. label: "填充",
  107841. prop: "tooltip.backgroundColor",
  107842. type: "backgroundSelect",
  107843. fieldProps: {
  107844. filterOptions: ["image"]
  107845. },
  107846. defaultValue: {
  107847. type: "color",
  107848. color: "#fff"
  107849. },
  107850. format: (e, n) => {
  107851. e.value["tooltip.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107852. },
  107853. valueToForm: (e) => !e || e === "none" ? {
  107854. type: "none"
  107855. } : {
  107856. type: "color",
  107857. color: e
  107858. }
  107859. },
  107860. {
  107861. label: "阴影",
  107862. prop: "tooltip.extraCssText",
  107863. type: "radioGroup",
  107864. fieldProps: {
  107865. options: [
  107866. { label: "开启", value: !0 },
  107867. { label: "关闭", value: !1 }
  107868. ]
  107869. },
  107870. defaultValue: !1,
  107871. format: (e, n) => {
  107872. e.value["tooltip.extraCssText"] = n ? "box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);" : "";
  107873. },
  107874. valueToForm: (e, n) => !!kt(n, "tooltip.extraCssText")
  107875. }
  107876. ] : []
  107877. }
  107878. ]
  107879. },
  107880. /* 标签 */
  107881. label: {
  107882. label: "标签",
  107883. prop: "label",
  107884. type: "group",
  107885. children: [
  107886. {
  107887. label: " ",
  107888. prop: "label.show",
  107889. type: "checkboxGroup",
  107890. fieldProps: {
  107891. options: [{ label: "标签可见", value: !0 }]
  107892. },
  107893. defaultValue: [],
  107894. format: (t, e) => {
  107895. t.value["label.show"] = !!(e != null && e.length);
  107896. },
  107897. valueToForm: (t) => t ? [!0] : []
  107898. },
  107899. {
  107900. label: "",
  107901. prop: "",
  107902. type: "dependency",
  107903. name: ["label.show"],
  107904. children: (t) => t["label.show"].length ? [
  107905. {
  107906. label: "文本",
  107907. prop: "label.formatter",
  107908. type: "checkboxGroup",
  107909. fieldProps: {
  107910. options: [
  107911. { label: "分类名", value: "b" },
  107912. { label: "系列名", value: "a" },
  107913. { label: "数值", value: "c" }
  107914. // { label: "百分比", value: "percent" },
  107915. ]
  107916. },
  107917. defaultValue: ["a"],
  107918. format: (e, n) => {
  107919. e.value["label.formatter"] = `{${n}}`;
  107920. },
  107921. valueToForm: (e, n) => {
  107922. var r, i;
  107923. return (i = (r = kt(n, "label.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
  107924. }
  107925. },
  107926. {
  107927. label: "样式",
  107928. prop: "label.fontStyle",
  107929. type: "fontStyle",
  107930. defaultValue: {
  107931. color: "#000000ff",
  107932. size: 12,
  107933. bold: !1,
  107934. italic: !1
  107935. },
  107936. format: (e, n) => {
  107937. 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";
  107938. },
  107939. valueToForm: (e, n) => ({
  107940. color: kt(n, "label.color", "#000000ff"),
  107941. size: kt(n, "label.fontSize", 12),
  107942. bold: kt(n, "label.fontWeight") === "bold",
  107943. italic: kt(n, "label.fontStyle") === "italic"
  107944. })
  107945. },
  107946. {
  107947. label: "布局",
  107948. prop: "",
  107949. type: "divider"
  107950. },
  107951. {
  107952. label: "位置",
  107953. prop: "label.position",
  107954. type: "radioGroup",
  107955. fieldProps: {
  107956. options: [
  107957. { label: "顶部", value: "top" },
  107958. { label: "左侧", value: "left" },
  107959. { label: "右侧", value: "right" },
  107960. { label: "底部", value: "bottom" },
  107961. { label: "内部", value: "inside" },
  107962. { label: "内部左侧", value: "insideLeft" },
  107963. { label: "内部右侧", value: "insideRight" },
  107964. { label: "内部顶部", value: "insideTop" },
  107965. { label: "内部底部", value: "insideBottom" }
  107966. ]
  107967. },
  107968. defaultValue: "top"
  107969. },
  107970. {
  107971. label: "文本方向",
  107972. prop: "label.rotate",
  107973. type: "radioGroup",
  107974. fieldProps: {
  107975. options: [
  107976. { label: "水平", value: "horizontal" },
  107977. { label: "垂直", value: "vertical" }
  107978. ]
  107979. },
  107980. defaultValue: "horizontal",
  107981. format: (e, n) => {
  107982. e.value["label.rotate"] = n === "horizontal" ? 0 : 90;
  107983. },
  107984. valueToForm: (e) => e === 0 ? "horizontal" : "vertical"
  107985. },
  107986. {
  107987. label: "边框",
  107988. prop: "",
  107989. type: "divider"
  107990. },
  107991. {
  107992. label: "线宽",
  107993. prop: "label.borderWidth",
  107994. type: "inputNumber",
  107995. fieldProps: {
  107996. addonAfter: "px"
  107997. },
  107998. defaultValue: 0
  107999. },
  108000. {
  108001. label: "颜色",
  108002. prop: "label.borderColor",
  108003. type: "colorSelect",
  108004. defaultValue: "#ccc"
  108005. },
  108006. {
  108007. label: "圆角",
  108008. prop: "label.borderRadius",
  108009. type: "inputNumber",
  108010. fieldProps: {
  108011. addonAfter: "px"
  108012. },
  108013. defaultValue: 0
  108014. }
  108015. ] : []
  108016. }
  108017. ]
  108018. }
  108019. }, Sle = (t) => (MS("data-v-0b356b47"), t = t(), IS(), t), Yht = { class: "chart-config" }, qht = { class: "config-tab" }, Kht = /* @__PURE__ */ Sle(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), Jht = /* @__PURE__ */ Sle(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), ept = /* @__PURE__ */ te({
  108020. __name: "Config",
  108021. props: NL,
  108022. emits: ["change"],
  108023. setup(t, { emit: e }) {
  108024. const n = t, r = U("1"), i = e, a = [
  108025. {
  108026. label: "线",
  108027. prop: "",
  108028. type: "divider"
  108029. },
  108030. {
  108031. label: "线条样式",
  108032. prop: "series.line.lineStyle.type",
  108033. type: "select",
  108034. fieldProps: {
  108035. options: [
  108036. { label: "实线", value: "solid" },
  108037. { label: "虚线", value: "dashed" },
  108038. { label: "点线", value: "dotted" }
  108039. ]
  108040. }
  108041. },
  108042. {
  108043. label: "线宽",
  108044. prop: "series.line.lineStyle.width",
  108045. type: "inputNumber",
  108046. fieldProps: {
  108047. min: 0,
  108048. addonAfter: "px"
  108049. }
  108050. },
  108051. {
  108052. label: "形态",
  108053. prop: "series.line.lineType",
  108054. type: "radioGroupButton",
  108055. fieldProps: {
  108056. options: [
  108057. { label: "普通", value: "normal" },
  108058. { label: "平滑", value: "smooth" },
  108059. { label: "阶梯", value: "step" }
  108060. ]
  108061. },
  108062. format: (u, c) => {
  108063. switch (c) {
  108064. case "smooth":
  108065. u.value["series.line.smooth"] = !0, u.value["series.line.step"] = !1;
  108066. break;
  108067. case "step":
  108068. u.value["series.line.smooth"] = !1, u.value["series.line.step"] = "end";
  108069. break;
  108070. default:
  108071. u.value["series.line.smooth"] = !1, u.value["series.line.step"] = !1;
  108072. }
  108073. },
  108074. valueToForm: (u, c) => {
  108075. const f = kt(c, "series.line.step"), d = kt(c, "series.line.smooth");
  108076. return f ? "step" : d ? "smooth" : "normal";
  108077. }
  108078. },
  108079. {
  108080. label: "标记点",
  108081. prop: "",
  108082. type: "divider"
  108083. },
  108084. {
  108085. label: "图形",
  108086. prop: "series.line.symbol",
  108087. type: "select",
  108088. fieldProps: {
  108089. options: [
  108090. { label: "圆", value: "circle" },
  108091. { label: "方", value: "rect" },
  108092. { label: "三角", value: "triangle" },
  108093. { label: "菱形", value: "diamond" },
  108094. { label: "标记", value: "pin" },
  108095. { label: "箭头", value: "arrow" },
  108096. { label: "无", value: "none" }
  108097. ]
  108098. }
  108099. },
  108100. {
  108101. label: "大小",
  108102. prop: "series.line.symbolSize",
  108103. type: "inputNumber",
  108104. fieldProps: {
  108105. min: 0,
  108106. addonAfter: "px"
  108107. }
  108108. },
  108109. {
  108110. label: "旋转",
  108111. prop: "series.line.symbolRotate",
  108112. type: "inputNumber",
  108113. fieldProps: {
  108114. min: 0,
  108115. addonAfter: "°"
  108116. }
  108117. }
  108118. ], o = [
  108119. In.title,
  108120. In.legend,
  108121. In.label,
  108122. {
  108123. ...In.series,
  108124. children: In.series.children.concat(
  108125. a
  108126. )
  108127. },
  108128. In.tooltip,
  108129. In.background
  108130. ], s = (u) => {
  108131. i("change", {
  108132. ...n,
  108133. dataSource: u
  108134. });
  108135. }, l = (u) => {
  108136. const c = Zc(n);
  108137. Object.keys(u).forEach((f) => {
  108138. qI(c, f, u[f]);
  108139. }), i("change", c);
  108140. };
  108141. return (u, c) => (pe(), Qe("div", Yht, [
  108142. He("div", qht, [
  108143. M(z(Uc), {
  108144. activeKey: r.value,
  108145. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108146. size: "small",
  108147. centered: ""
  108148. }, {
  108149. default: we(() => [
  108150. M(z(Ws), { key: "1" }, {
  108151. tab: we(() => [
  108152. M(z(w0)),
  108153. Kht
  108154. ]),
  108155. _: 1
  108156. }),
  108157. M(z(Ws), { key: "2" }, {
  108158. tab: we(() => [
  108159. M(z(C0)),
  108160. Jht
  108161. ]),
  108162. _: 1
  108163. })
  108164. ]),
  108165. _: 1
  108166. }, 8, ["activeKey"])
  108167. ]),
  108168. r.value === "1" ? (pe(), je(z4, {
  108169. key: 0,
  108170. dataSource: u.dataSource,
  108171. onChange: s
  108172. }, null, 8, ["dataSource"])) : _t("", !0),
  108173. r.value === "2" ? (pe(), je(z(qc), {
  108174. key: 1,
  108175. columns: o,
  108176. formModel: n,
  108177. onChange: l
  108178. }, null, 8, ["formModel"])) : _t("", !0)
  108179. ]));
  108180. }
  108181. }), xle = /* @__PURE__ */ $r(ept, [["__scopeId", "data-v-0b356b47"]]);
  108182. lh.Config = xle;
  108183. lh.install = (t) => (t.component(lh.name, lh), t);
  108184. const tpt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108185. __proto__: null,
  108186. Config: xle,
  108187. basicLineProps: NL,
  108188. default: lh,
  108189. defaultPropsValue: BZe
  108190. }, Symbol.toStringTag, { value: "Module" })), V4 = {
  108191. width: {
  108192. type: Number,
  108193. default: 400
  108194. },
  108195. height: {
  108196. type: Number,
  108197. default: 260
  108198. },
  108199. dataSource: LL,
  108200. // 标题
  108201. title: {
  108202. type: Object
  108203. },
  108204. // 图例
  108205. legend: {
  108206. type: Object
  108207. },
  108208. // 背景
  108209. backgroundColor: {
  108210. type: String
  108211. },
  108212. // 边框
  108213. grid: {
  108214. type: Object
  108215. },
  108216. // 提示框
  108217. tooltip: {
  108218. type: Object
  108219. },
  108220. // x轴数据
  108221. xAxis: {
  108222. type: Object
  108223. },
  108224. // y轴数据
  108225. yAxis: {
  108226. type: Object
  108227. },
  108228. // 折线
  108229. series: {
  108230. type: Array
  108231. },
  108232. // color
  108233. color: {
  108234. type: Object
  108235. }
  108236. }, wle = [];
  108237. wle.bar = {
  108238. // @ts-ignore
  108239. fixedBarWidth: !1,
  108240. barWidth: "auto",
  108241. barGap: "10%",
  108242. barCategoryGap: "20%",
  108243. itemStyle: {
  108244. borderColor: "#ccc",
  108245. borderRadius: 0,
  108246. borderWidth: 0
  108247. }
  108248. };
  108249. const npt = kL({
  108250. title: {
  108251. text: "柱状图标题"
  108252. },
  108253. xAxis: {
  108254. data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  108255. },
  108256. series: wle
  108257. }), rpt = {
  108258. // 组件容器默认属性
  108259. container: {
  108260. props: {
  108261. width: 400,
  108262. height: 260
  108263. }
  108264. },
  108265. // 图表默认属性
  108266. props: {
  108267. // 数据源
  108268. dataSource: {
  108269. sourceType: Li.STATIC,
  108270. data: {
  108271. series: [
  108272. {
  108273. type: "bar",
  108274. name: "系列1",
  108275. data: [10, 30, 20, 40]
  108276. },
  108277. {
  108278. type: "bar",
  108279. name: "系列2",
  108280. data: [15, 35, 25, 45]
  108281. }
  108282. ]
  108283. },
  108284. url: location.origin + "/mock/api/get/example/bar",
  108285. method: "POST",
  108286. params: {},
  108287. headers: {},
  108288. refreshTime: 0,
  108289. dataProcess: `
  108290. (res) => {
  108291. // 取出列表
  108292. const data = res.data;
  108293. // x轴数据
  108294. const xData = data.map((item) => item.name);
  108295. // 系列数据
  108296. const series = [
  108297. { type: 'bar', name: '价格', data: data.map(item => item.price) },
  108298. { type: 'bar', name: '总量', data: data.map(item => item.count) },
  108299. ];
  108300. // 返回图表数据
  108301. return { xData, series };
  108302. }
  108303. `
  108304. },
  108305. ...npt
  108306. }
  108307. }, ipt = te({
  108308. name: "DBasicBar",
  108309. components: { Charts: RL },
  108310. props: V4,
  108311. setup(t) {
  108312. const { options: e, loading: n } = KL(t);
  108313. return {
  108314. options: e,
  108315. loading: n
  108316. };
  108317. }
  108318. });
  108319. function apt(t, e, n, r, i, a) {
  108320. const o = fi("Charts");
  108321. return pe(), je(o, {
  108322. width: t.width,
  108323. height: t.height,
  108324. "echarts-options": t.options,
  108325. loading: t.loading
  108326. }, null, 8, ["width", "height", "echarts-options", "loading"]);
  108327. }
  108328. const gh = /* @__PURE__ */ $r(ipt, [["render", apt]]), Cle = (t) => (MS("data-v-d6923dbc"), t = t(), IS(), t), opt = { class: "chart-config" }, spt = { class: "config-tab" }, lpt = /* @__PURE__ */ Cle(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), upt = /* @__PURE__ */ Cle(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), cpt = /* @__PURE__ */ te({
  108329. __name: "Config",
  108330. props: V4,
  108331. emits: ["change"],
  108332. setup(t, { emit: e }) {
  108333. const n = t, r = U("1"), i = e, a = [
  108334. {
  108335. label: "样式",
  108336. prop: "",
  108337. type: "divider"
  108338. },
  108339. {
  108340. label: "固定柱宽",
  108341. prop: "series.bar.fixedBarWidth",
  108342. type: "radioGroup",
  108343. fieldProps: {
  108344. options: [
  108345. { label: "是", value: !0 },
  108346. { label: "否", value: !1 }
  108347. ]
  108348. },
  108349. defaultValue: !1,
  108350. format: (u, c) => {
  108351. var f, d;
  108352. u.value["series.bar.barWidth"] = c && ((f = u.value) == null ? void 0 : f["series.bar.barWidth"]) !== "auto" ? ((d = u.value) == null ? void 0 : d["series.bar.barWidth"]) || 20 : "auto";
  108353. }
  108354. },
  108355. {
  108356. label: "",
  108357. prop: "",
  108358. type: "dependency",
  108359. name: ["series.bar.fixedBarWidth"],
  108360. children: (u) => u["series.bar.fixedBarWidth"] ? [
  108361. {
  108362. label: "柱宽",
  108363. prop: "series.bar.barWidth",
  108364. type: "inputNumber",
  108365. fieldProps: {
  108366. addonAfter: "px"
  108367. },
  108368. defaultValue: 20
  108369. }
  108370. ] : []
  108371. },
  108372. {
  108373. label: "系列间隔",
  108374. prop: "series.bar.barGap",
  108375. type: "slider",
  108376. defaultValue: 30,
  108377. format: (u, c) => {
  108378. u.value["series.bar.barGap"] = c + "%";
  108379. },
  108380. valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
  108381. },
  108382. {
  108383. label: "分类间隔",
  108384. prop: "series.bar.barCategoryGap",
  108385. type: "slider",
  108386. defaultValue: 20,
  108387. format: (u, c) => {
  108388. u.value["series.bar.barCategoryGap"] = c + "%";
  108389. },
  108390. valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
  108391. },
  108392. {
  108393. label: "边框",
  108394. prop: "",
  108395. type: "divider"
  108396. },
  108397. {
  108398. label: "线宽",
  108399. prop: "series.bar.itemStyle.borderWidth",
  108400. type: "inputNumber",
  108401. fieldProps: {
  108402. addonAfter: "px"
  108403. },
  108404. defaultValue: 0
  108405. },
  108406. {
  108407. label: "颜色",
  108408. prop: "series.bar.itemStyle.borderColor",
  108409. type: "colorSelect",
  108410. defaultValue: "#ccc"
  108411. },
  108412. {
  108413. label: "圆角",
  108414. prop: "series.bar.itemStyle.borderRadius",
  108415. type: "inputNumber",
  108416. fieldProps: {
  108417. addonAfter: "px"
  108418. },
  108419. defaultValue: 0
  108420. }
  108421. ], o = [
  108422. In.title,
  108423. In.legend,
  108424. In.label,
  108425. {
  108426. ...In.series,
  108427. children: In.series.children.concat(
  108428. a
  108429. )
  108430. },
  108431. In.xAxis,
  108432. In.yAxis,
  108433. In.tooltip
  108434. ], s = (u) => {
  108435. i("change", {
  108436. ...n,
  108437. dataSource: u
  108438. });
  108439. }, l = (u) => {
  108440. const c = Zc(n);
  108441. Object.keys(u).forEach((f) => {
  108442. qI(c, f, u[f]);
  108443. }), i("change", c);
  108444. };
  108445. return (u, c) => (pe(), Qe("div", opt, [
  108446. He("div", spt, [
  108447. M(z(Uc), {
  108448. activeKey: r.value,
  108449. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108450. size: "small",
  108451. centered: ""
  108452. }, {
  108453. default: we(() => [
  108454. M(z(Ws), { key: "1" }, {
  108455. tab: we(() => [
  108456. M(z(w0)),
  108457. lpt
  108458. ]),
  108459. _: 1
  108460. }),
  108461. M(z(Ws), { key: "2" }, {
  108462. tab: we(() => [
  108463. M(z(C0)),
  108464. upt
  108465. ]),
  108466. _: 1
  108467. })
  108468. ]),
  108469. _: 1
  108470. }, 8, ["activeKey"])
  108471. ]),
  108472. r.value === "1" ? (pe(), je(z4, {
  108473. key: 0,
  108474. dataSource: u.dataSource,
  108475. onChange: s
  108476. }, null, 8, ["dataSource"])) : _t("", !0),
  108477. r.value === "2" ? (pe(), je(z(qc), {
  108478. key: 1,
  108479. columns: o,
  108480. formModel: n,
  108481. onChange: l
  108482. }, null, 8, ["formModel"])) : _t("", !0)
  108483. ]));
  108484. }
  108485. }), Tle = /* @__PURE__ */ $r(cpt, [["__scopeId", "data-v-d6923dbc"]]);
  108486. gh.Config = Tle;
  108487. gh.install = (t) => (t.component(gh.name, gh), t);
  108488. const fpt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108489. __proto__: null,
  108490. Config: Tle,
  108491. basicBarProps: V4,
  108492. default: gh,
  108493. defaultPropsValue: rpt
  108494. }, Symbol.toStringTag, { value: "Module" })), F4 = {
  108495. width: {
  108496. type: Number,
  108497. default: 400
  108498. },
  108499. height: {
  108500. type: Number,
  108501. default: 260
  108502. },
  108503. dataSource: LL,
  108504. // 标题
  108505. title: {
  108506. type: Object
  108507. },
  108508. // 图例
  108509. legend: {
  108510. type: Object
  108511. },
  108512. // 背景
  108513. backgroundColor: {
  108514. type: String
  108515. },
  108516. // 边框
  108517. grid: {
  108518. type: Object
  108519. },
  108520. // 提示框
  108521. tooltip: {
  108522. type: Object
  108523. },
  108524. // 饼图数据
  108525. series: {
  108526. type: Array
  108527. },
  108528. // color
  108529. color: {
  108530. type: Object
  108531. }
  108532. }, Ple = [];
  108533. Ple.pie = {
  108534. top: 70,
  108535. startAngle: 0,
  108536. endAngle: 360,
  108537. radius: ["0%", "75%"]
  108538. };
  108539. const dpt = kL({
  108540. title: {
  108541. text: "饼图标题"
  108542. },
  108543. grid: {
  108544. show: !1
  108545. },
  108546. xAxis: {
  108547. show: !1
  108548. },
  108549. yAxis: {
  108550. show: !1
  108551. },
  108552. series: Ple
  108553. }), hpt = {
  108554. // 组件容器默认属性
  108555. container: {
  108556. props: {
  108557. width: 400,
  108558. height: 260
  108559. }
  108560. },
  108561. // 图表默认属性
  108562. props: {
  108563. // 数据源
  108564. dataSource: {
  108565. sourceType: Li.STATIC,
  108566. data: {
  108567. series: [
  108568. {
  108569. type: "pie",
  108570. name: "系列1",
  108571. data: [
  108572. { value: 335, name: "直接访问" },
  108573. { value: 310, name: "邮件营销" },
  108574. { value: 234, name: "联盟广告" },
  108575. { value: 135, name: "视频广告" }
  108576. ]
  108577. }
  108578. ]
  108579. },
  108580. url: location.origin + "/mock/api/get/example/pie",
  108581. method: "POST",
  108582. params: {},
  108583. headers: {},
  108584. refreshTime: 0,
  108585. dataProcess: `
  108586. (res) => {
  108587. // 取出列表
  108588. const data = res.data;
  108589. // 系列数据
  108590. const series = [
  108591. { type: 'pie', name: '价格', data: data.map(item => item.price) },
  108592. ];
  108593. // 返回图表数据
  108594. return { series };
  108595. }
  108596. `
  108597. },
  108598. ...dpt
  108599. }
  108600. }, ppt = te({
  108601. name: "DBasicPie",
  108602. components: { Charts: RL },
  108603. props: F4,
  108604. setup(t) {
  108605. const { options: e, loading: n } = KL(t);
  108606. return {
  108607. options: e,
  108608. loading: n
  108609. };
  108610. }
  108611. });
  108612. function vpt(t, e, n, r, i, a) {
  108613. const o = fi("Charts");
  108614. return pe(), je(o, {
  108615. width: t.width,
  108616. height: t.height,
  108617. "echarts-options": t.options,
  108618. loading: t.loading
  108619. }, null, 8, ["width", "height", "echarts-options", "loading"]);
  108620. }
  108621. const mh = /* @__PURE__ */ $r(ppt, [["render", vpt]]), $le = (t) => (MS("data-v-bd423688"), t = t(), IS(), t), gpt = { class: "chart-config" }, mpt = { class: "config-tab" }, ypt = /* @__PURE__ */ $le(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), bpt = /* @__PURE__ */ $le(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), _pt = /* @__PURE__ */ te({
  108622. __name: "Config",
  108623. props: F4,
  108624. emits: ["change"],
  108625. setup(t, { emit: e }) {
  108626. const n = t, r = U("1"), i = e, a = [
  108627. {
  108628. label: "样式",
  108629. prop: "",
  108630. type: "divider"
  108631. },
  108632. {
  108633. label: "起始角度",
  108634. prop: "series.pie.startAngle",
  108635. type: "inputNumber",
  108636. fieldProps: {
  108637. min: 0,
  108638. max: 360,
  108639. addonAfter: "°"
  108640. }
  108641. },
  108642. {
  108643. label: "完结角度",
  108644. prop: "series.pie.endAngle",
  108645. type: "inputNumber",
  108646. fieldProps: {
  108647. min: 0,
  108648. max: 360,
  108649. addonAfter: "°"
  108650. }
  108651. },
  108652. {
  108653. label: "内径占比",
  108654. prop: "series.pie.radius",
  108655. type: "slider",
  108656. format: (u, c) => {
  108657. console.log("formatModel", u);
  108658. const f = c * 0.75;
  108659. return u.value["series.pie.radius"] = [f + "%", "75%"], c * 100;
  108660. },
  108661. valueToForm: (u) => (u || ["0%", "75%"])[0].replace("%", "") / 0.75
  108662. }
  108663. ], o = [
  108664. In.title,
  108665. In.legend,
  108666. In.label,
  108667. {
  108668. ...In.series,
  108669. children: In.series.children.concat(
  108670. a
  108671. )
  108672. },
  108673. In.tooltip
  108674. ], s = (u) => {
  108675. i("change", {
  108676. ...n,
  108677. dataSource: u
  108678. });
  108679. }, l = (u) => {
  108680. const c = Zc(n);
  108681. Object.keys(u).forEach((f) => {
  108682. qI(c, f, u[f]);
  108683. }), i("change", c);
  108684. };
  108685. return (u, c) => (pe(), Qe("div", gpt, [
  108686. He("div", mpt, [
  108687. M(z(Uc), {
  108688. activeKey: r.value,
  108689. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108690. size: "small",
  108691. centered: ""
  108692. }, {
  108693. default: we(() => [
  108694. M(z(Ws), { key: "1" }, {
  108695. tab: we(() => [
  108696. M(z(w0)),
  108697. ypt
  108698. ]),
  108699. _: 1
  108700. }),
  108701. M(z(Ws), { key: "2" }, {
  108702. tab: we(() => [
  108703. M(z(C0)),
  108704. bpt
  108705. ]),
  108706. _: 1
  108707. })
  108708. ]),
  108709. _: 1
  108710. }, 8, ["activeKey"])
  108711. ]),
  108712. r.value === "1" ? (pe(), je(z4, {
  108713. key: 0,
  108714. dataSource: u.dataSource,
  108715. onChange: s
  108716. }, null, 8, ["dataSource"])) : _t("", !0),
  108717. r.value === "2" ? (pe(), je(z(qc), {
  108718. key: 1,
  108719. columns: o,
  108720. formModel: n,
  108721. onChange: l
  108722. }, null, 8, ["formModel"])) : _t("", !0)
  108723. ]));
  108724. }
  108725. }), Ale = /* @__PURE__ */ $r(_pt, [["__scopeId", "data-v-bd423688"]]);
  108726. mh.Config = Ale;
  108727. mh.install = (t) => (t.component(mh.name, mh), t);
  108728. const Opt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108729. __proto__: null,
  108730. Config: Ale,
  108731. basicPieProps: F4,
  108732. default: mh,
  108733. defaultPropsValue: hpt
  108734. }, Symbol.toStringTag, { value: "Module" })), Mpt = {
  108735. Title: () => Promise.resolve().then(() => XMe),
  108736. BasicLine: () => Promise.resolve().then(() => tpt),
  108737. BasicBar: () => Promise.resolve().then(() => fpt),
  108738. BasicPie: () => Promise.resolve().then(() => Opt)
  108739. }, Q9 = {
  108740. BasicLine: lh,
  108741. BasicBar: gh,
  108742. Title: Zd,
  108743. BasicPie: mh
  108744. }, Spt = function(t) {
  108745. return Object.keys(Q9).forEach((e) => {
  108746. const n = Q9[e];
  108747. n != null && n.install && (console.log("注册组件:", e), t.use(n));
  108748. }), t;
  108749. }, Ipt = {
  108750. version: "1.0.0",
  108751. install: Spt
  108752. };
  108753. export {
  108754. gh as BasicBar,
  108755. Tle as BasicBarConfig,
  108756. rpt as BasicBarDefaultProps,
  108757. V4 as BasicBarProps,
  108758. lh as BasicLine,
  108759. xle as BasicLineConfig,
  108760. BZe as BasicLineDefaultProps,
  108761. NL as BasicLineProps,
  108762. mh as BasicPie,
  108763. Ale as BasicPieConfig,
  108764. hpt as BasicPieDefaultProps,
  108765. F4 as BasicPieProps,
  108766. qc as CusForm,
  108767. Li as DataSourceType,
  108768. Zd as Title,
  108769. Mpt as asyncComponentAll,
  108770. Q9 as components,
  108771. Ipt as default,
  108772. Spt as install
  108773. };
  108774. //# sourceMappingURL=shalu-dashboard-ui.js.map